/* =====================================
   A&J CRUNCH - Main Styles
   ===================================== */

:root {
    --cream: #fff9f0;
    --cream-dark: #f3e7d7;
    --brown: #482d2a;
    --brown-light: #76534e;
    --gold: #c49a6c;
    --white: #ffffff;
    --text: #382725;
    --muted: #887d76;
    --border: #eaded2;
    --success: #217a48;
    --shadow: 0 10px 35px rgba(72, 45, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--text);
    font-family: Tahoma, Arial, sans-serif;
    line-height: 1.7;
}

body,
button,
input,
select,
textarea {
    font-family: Tahoma, Arial, sans-serif;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

/* General layout */

.container {
    width: min(1150px, 92%);
    margin-inline: auto;
}

section {
    padding: 65px 0;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h2 {
    color: var(--brown);
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.4;
}

p {
    color: var(--muted);
}

/* Header */

header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 249, 240, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

header .container,
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

header .container {
    min-height: 78px;
}

.logo,
header h1 {
    margin: 0;
    color: var(--brown);
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -1px;
}

nav {
    flex-wrap: wrap;
}

nav a {
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--gold);
}

#languageBtn {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    color: var(--brown);
    padding: 9px 14px;
    font-weight: 700;
}

/* Hero section */

#home {
    min-height: 560px;
    display: flex;
    align-items: center;
    padding: 90px 0;
    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(196, 154, 108, 0.16),
            transparent 35%
        ),
        linear-gradient(135deg, #fff9f0, #f5eee5);
}

#home .container {
    text-align: center;
}

#home p:first-child {
    color: var(--gold);
    font-weight: 800;
}

#home h1 {
    margin: 18px 0;
    color: var(--brown);
    font-size: clamp(38px, 7vw, 76px);
    font-weight: 900;
    line-height: 1.25;
}

#home h1 span {
    color: var(--gold);
}

#home p {
    max-width: 650px;
    margin: 20px auto;
    font-size: 17px;
}

.btn,
button.add-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    padding: 13px 22px;
    background: var(--brown);
    color: var(--white);
    font-size: 15px;
    font-weight: 800;
    transition: transform 0.2s, background 0.2s;
}

.btn:hover,
button.add-btn:hover {
    transform: translateY(-2px);
    background: var(--brown-light);
}

/* Section headings */

.section-heading {
    margin-bottom: 30px;
    text-align: center;
}

.section-heading p {
    max-width: 600px;
    margin-inline: auto;
}

/* Product grid */

.products-grid,
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.product-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(72, 45, 42, 0.14);
}

.product-card img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--cream-dark);
}

.product-card .product-image,
.product-image {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8ead9, #eee0cf);
    color: var(--brown);
    font-size: 58px;
}

.product-info {
    padding: 22px;
}

.product-info h3,
.product-card h3 {
    margin-bottom: 8px;
    color: var(--brown);
    font-size: 20px;
}

.product-info p {
    font-size: 14px;
}

.product-price,
.price {
    margin: 12px 0;
    color: var(--brown);
    font-size: 21px;
    font-weight: 900;
}

.product-info button,
.product-card button {
    width: 100%;
}

/* About section */

#about {
    background: #f3e7d7;
}

#about .container {
    max-width: 850px;
    text-align: center;
}

/* Notification */

#cartNotice {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1200;
    max-width: min(360px, calc(100vw - 40px));
    padding: 14px 20px;
    border-radius: 14px;
    background: var(--brown);
    color: white;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(15px);
    transition: opacity 0.25s, transform 0.25s;
}

#cartNotice.show {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================
   Shopping cart
   ===================================== */

.cart-floating-button {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    border-radius: 50px;
    padding: 15px 21px;
    background: var(--brown);
    color: white;
    box-shadow: 0 8px 30px rgba(72, 45, 42, 0.25);
    font-size: 15px;
    font-weight: 800;
}

.cart-count {
    display: inline-flex;
    min-width: 25px;
    height: 25px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gold);
    color: white;
    font-size: 12px;
}

.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(35, 23, 21, 0.48);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 1100;
    display: flex;
    width: min(460px, 100%);
    flex-direction: column;
    background: var(--cream);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.12);
    transform: translateX(105%);
    transition: transform 0.3s ease;
}

.cart-panel.open {
    transform: translateX(0);
}

body.english .cart-panel {
    right: auto;
    left: 0;
    transform: translateX(-105%);
}

body.english .cart-panel.open {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.cart-header h2 {
    margin: 0;
    font-size: 24px;
}

.cart-close {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: white;
    color: var(--brown);
    font-size: 24px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
}

.cart-empty {
    padding: 50px 15px;
    text-align: center;
}

.cart-empty .empty-icon {
    display: block;
    margin-bottom: 15px;
    font-size: 55px;
}

.cart-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item h3 {
    margin: 0 0 6px;
    color: var(--brown);
    font-size: 16px;
}

.cart-item-price {
    margin: 0 0 10px;
    color: var(--brown-light);
    font-size: 14px;
    font-weight: 700;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-btn {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: white;
    color: var(--brown);
    font-size: 18px;
    font-weight: 800;
}

.quantity-number {
    min-width: 20px;
    text-align: center;
    font-weight: 800;
}

.remove-item {
    align-self: start;
    border: none;
    background: transparent;
    color: #a43b35;
    font-size: 13px;
    text-decoration: underline;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    background: white;
}

.cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--brown);
    font-size: 20px;
    font-weight: 900;
}

.cart-checkout {
    width: 100%;
    min-height: 50px;
    border: none;
    border-radius: 12px;
    background: #218c53;
    color: white;
    font-size: 16px;
    font-weight: 900;
}

.cart-checkout:hover {
    background: #176d3e;
}

.cart-checkout:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.cart-note {
    margin: 12px 0 0;
    font-size: 12px;
    text-align: center;
}

/* Checkout form */

.checkout-form {
    padding: 18px;
    border-top: 1px solid var(--border);
    background: white;
}

.checkout-form h3 {
    margin-bottom: 12px;
    color: var(--brown);
}

.checkout-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 700;
}

.checkout-form input,
.checkout-form select,
.checkout-form textarea {
    width: 100%;
    margin-bottom: 12px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: white;
    color: var(--text);
    font-size: 14px;
}

.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
    outline: 2px solid var(--gold);
    border-color: transparent;
}

.checkout-form .form-error {
    margin-bottom: 10px;
    color: #a43b35;
    font-size: 13px;
}

/* Footer */

footer {
    padding: 35px 0;
    background: var(--brown);
    color: white;
    text-align: center;
}

footer p {
    margin: 0;
    color: #f3e7d7;
}

/* English direction */

body.english {
    direction: ltr;
    text-align: left;
}

body.english #home .container,
body.english .section-heading,
body.english #about .container {
    text-align: center;
}

body.english #cartNotice {
    right: auto;
    left: 20px;
}

/* Mobile */

@media (max-width: 850px) {
    .products-grid,
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    header .container {
        flex-wrap: wrap;
        padding: 15px 0;
    }

    nav {
        gap: 12px;
    }

    nav a {
        font-size: 12px;
    }

    #home {
        min-height: 470px;
        padding: 65px 0;
    }
}

@media (max-width: 560px) {
    .products-grid,
    .product-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 45px 0;
    }

    header .container {
        justify-content: center;
    }

    nav {
        justify-content: center;
    }

    .logo,
    header h1 {
        font-size: 23px;
    }

    #home h1 {
        font-size: 43px;
    }

    .cart-floating-button {
        bottom: 15px;
        left: 15px;
        padding: 12px 17px;
    }

    body.english .cart-floating-button {
        left: 15px;
    }

    .cart-panel {
        width: 100%;
    }
}
/* ===== A&J CRUNCH - Compact Design ===== */

/* تصغير المساحات العامة */
.container {
    width: min(1050px, 94%);
}

section {
    padding: 42px 0;
}

/* تصغير الواجهة الرئيسية */
#home {
    min-height: 420px;
    padding: 50px 0;
}

#home h1 {
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.3;
}

#home p {
    font-size: 15px;
}

/* جعل المنتجات أصغر ومرتبة */
.products-grid,
.product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.product-card {
    border-radius: 15px;
}

.product-card img {
    height: 190px;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-info h3,
.product-card h3 {
    font-size: 17px;
}

.product-price,
.price {
    font-size: 18px;
}

/* زر السلة: ثابت وواضح */
.cart-floating-button {
    bottom: 18px;
    left: 18px;
    z-index: 1200;
    padding: 13px 19px;
    border: 2px solid #ffffff;
    border-radius: 50px;
    background: #482d2a;
    color: #ffffff;
    box-shadow: 0 5px 22px rgba(0, 0, 0, 0.3);
    font-size: 15px;
}

.cart-count {
    min-width: 28px;
    height: 28px;
    background: #c49a6c;
    color: #ffffff;
    font-weight: 900;
}

/* تحسين عرض السلة */
.cart-panel {
    width: min(420px, 100%);
}

.cart-header {
    padding: 15px 18px;
}

.cart-items {
    padding: 12px 18px;
}

.cart-footer {
    padding: 15px 18px;
}

.cart-checkout {
    min-height: 48px;
    font-size: 15px;
}

/* الجوال */
@media (max-width: 700px) {
    .products-grid,
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    #home {
        min-height: 350px;
        padding: 35px 0;
    }

    #home h1 {
        font-size: clamp(30px, 8vw, 42px);
    }

    #home p {
        font-size: 13px;
    }

    .product-card img {
        height: 145px;
    }

    .product-info {
        padding: 12px;
    }

    .product-info h3,
    .product-card h3 {
        font-size: 15px;
    }

    button.add-btn,
    .product-card button {
        padding: 10px;
        font-size: 13px;
    }

    .cart-floating-button {
        bottom: 12px;
        left: 12px;
        padding: 11px 15px;
    }
}

@media (max-width: 360px) {
    .products-grid,
    .product-grid {
        grid-template-columns: 1fr;
    }
}
/* WhatsApp contact numbers */
.contact-whatsapp {
    max-width: 360px;
    margin: 16px auto;
    padding: 14px;
    background: #fffdf8;
    border: 1px solid #e8dfd2;
    border-radius: 10px;
    text-align: center;
}

.contact-whatsapp h3 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #49382a;
}

.contact-whatsapp a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid #eee6dc;
    border-radius: 7px;
    background: #fff;
    color: #49382a;
    text-decoration: none;
    font-size: 13px;
    direction: rtl;
    transition: background 0.2s ease;
}

.contact-whatsapp a:hover {
    background: #f7f1e8;
}

.contact-whatsapp a span:last-child {
    direction: ltr;
    unicode-bidi: isolate;
}