/* ==================== Variables ==================== */
:root {
    color-scheme: light;

    /* Typography (theme fonts) */
    --font-sans: 'General Sans', 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Averia Serif Libre', 'Cairo', serif;

    /* Brand accent — copper (restaurant identity) */
    --price-copper: #CD7F32;
    --price-copper-hover: #B87333;

    /* Theme neutrals (light) */
    --bg-cream: #f9fafb;          /* page background + secondary surfaces */
    --card-bg: #ffffff;           /* cards / panels */
    --text-black: #1a1a1c;        /* primary text */
    --text-dark-gray: #5f6368;    /* secondary text */
    --decorative-gray: #e4e6e8;   /* borders */
    --circle-bg: #000000;
    --shadow: rgba(0, 0, 0, 0.08);

    /* Menu redesign tokens (used by css/menu.css on index.html only) */
    --surface-2: #f1f2f4;          /* secondary surface: chips, bands, placeholder bases */
    --surface-3: #e9eaed;          /* hover surface */
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-pill: 999px;
    --shadow-sm: 0 1px 2px var(--shadow);
    --shadow-md: 0 8px 24px -12px var(--shadow);
    --shadow-lg: 0 24px 60px -20px var(--shadow);
    --ring: rgba(205, 127, 50, 0.35);          /* focus ring */
    --success: #1f9d61;                          /* "available / save" style accents */
    --overlay: rgba(14, 10, 7, 0.55);           /* image scrim */

    /* Warm dark hero band (same in light & dark — brand statement) */
    --hero-bg: #1b130c;
    --hero-bg-2: #2c1f13;
    --hero-text: #f7f1e8;
    --hero-muted: rgba(247, 241, 232, 0.7);
    --hero-accent: #e0a458;
}

/* Dark mode */
.dark {
    color-scheme: dark;

    --bg-cream: #1f2126;
    --card-bg: #272a30;
    --text-black: #eef0f2;
    --text-dark-gray: #a3a8af;
    --price-copper: #D98E4A;
    --price-copper-hover: #E5A35F;
    --decorative-gray: #383c43;
    --circle-bg: #ffffff;
    --shadow: rgba(0, 0, 0, 0.45);

    /* Menu redesign tokens (dark overrides) */
    --surface-2: #2e3138;
    --surface-3: #3a3e46;
    --ring: rgba(217, 142, 74, 0.45);
    --overlay: rgba(0, 0, 0, 0.62);
    --hero-bg: #0f0c09;
    --hero-bg-2: #1d1610;
}

/* ==================== Reset & Base ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-cream);
    color: var(--text-black);
    line-height: 1.6;
    direction: ltr;
}

body[dir="rtl"] {
    direction: rtl;
    font-family: 'Cairo', 'General Sans', sans-serif;
}

/* ==================== Language Selector ==================== */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
    background: var(--card-bg);
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 4px 12px var(--shadow);
}

.lang-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-dark-gray);
    cursor: pointer;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: var(--bg-cream);
}

.lang-btn.active {
    background: var(--price-copper);
    color: white;
}

/* ==================== Dark Mode Toggle (fixed, opposite corner from language selector) ==================== */
.theme-toggle {
    position: fixed;
    top: 20px;
    inset-inline-start: 20px;
    z-index: 1000;
    width: 44px;
    height: 44px;
    border: 2px solid var(--decorative-gray);
    background: var(--card-bg);
    color: var(--text-black);
    border-radius: 50%;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--price-copper);
    transform: translateY(-2px);
}

/* ==================== Header ==================== */
.header {
    text-align: center;
    padding: 80px 20px 40px;
    position: relative;
}

.decorative-element {
    width: 60px;
    height: 2px;
    background: var(--decorative-gray);
    margin: 20px auto;
}

.restaurant-name {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--text-black);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.tagline {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-dark-gray);
    font-style: italic;
    font-weight: 300;
}

/* ==================== Contact Section ==================== */
.contact-section {
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.contact-item {
    text-align: center;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-item .icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.contact-item a {
    color: var(--price-copper);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.contact-item span {
    color: var(--text-dark-gray);
    font-size: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--card-bg);
    color: var(--text-dark-gray);
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: all 0.3s ease;
    font-weight: 500;
}

.social-btn:hover {
    background: var(--price-copper);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.3);
}

.social-btn span {
    font-size: 1.3rem;
}

/* ==================== Menu Sections ==================== */
.menu-section {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.pizza-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--text-dark-gray);
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--price-copper);
    border-radius: 2px;
}

/* ==================== Menu Grid ==================== */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.menu-item {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 2px 12px var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--decorative-gray);
    transition: all 0.3s ease;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.menu-item:hover::before {
    background: var(--price-copper);
    width: 6px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 15px;
}

.item-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-black);
    flex: 1;
}

.item-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--price-copper);
    white-space: nowrap;
}

.item-ingredients {
    font-size: 0.9rem;
    color: var(--text-dark-gray);
    line-height: 1.5;
}

/* Featured & Signature Items */
.menu-item.featured {
    border: 2px solid var(--price-copper);
}

.menu-item.signature {
    background: linear-gradient(135deg, #FFFAF0 0%, #FFF8E7 100%);
    border: 2px solid var(--price-copper);
}

.dark .menu-item.signature {
    background: linear-gradient(135deg, rgba(217, 142, 74, 0.14) 0%, rgba(217, 142, 74, 0.05) 100%);
}

.badge {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 15px;
    background: var(--price-copper);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== QR Code Section ==================== */
.qr-section {
    text-align: center;
    max-width: 600px;
    margin: 80px auto;
    padding: 40px 20px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 4px 20px var(--shadow);
}

.qr-section h3 {
    font-size: 1.5rem;
    color: var(--text-dark-gray);
    margin-bottom: 30px;
}

#qrcode {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

#qrcode img {
    max-width: 250px;
    height: auto;
    border: 4px solid var(--bg-cream);
    border-radius: 12px;
}

.print-btn {
    padding: 15px 40px;
    background: var(--price-copper);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.3);
}

.print-btn:hover {
    background: #B87333;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(205, 127, 50, 0.4);
}

/* ==================== Footer ==================== */
.footer {
    text-align: center;
    padding: 30px 20px;
    background: var(--text-dark-gray);
    color: white;
    margin-top: 80px;
}

.dark .footer {
    background: #18191d;
    color: #cfd3d8;
}

.footer p {
    font-size: 0.9rem;
}

/* ==================== Print Styles ==================== */
@media print {
    .language-selector,
    .theme-toggle,
    .social-links,
    .qr-section,
    .print-btn,
    .cart-icon-container {
        display: none !important;
    }

    body {
        background: white !important;
    }

    .menu-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .section-header {
        page-break-after: avoid;
    }
}

/* ==================== Hero Section ==================== */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--price-copper), #B87333);
    color: white;
    margin: 40px 0;
    border-radius: 20px;
}

.hero-content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 20px;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 700px;
    margin: 0 auto 30px;
}

.cta-button, .cta-button-secondary {
    display: inline-block;
    padding: 15px 40px;
    margin: 10px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-button {
    background: var(--card-bg);
    color: var(--price-copper);
    border: 2px solid white;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.cta-button.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-button.secondary:hover {
    background: var(--card-bg);
    color: var(--price-copper);
}

/* ==================== About Section ==================== */
.about-section {
    max-width: 900px;
    margin: 0 auto 60px;
    padding: 0 20px;
    text-align: center;
}

.about-section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--text-dark-gray);
    margin-bottom: 30px;
}

.about-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-black);
    margin-bottom: 20px;
}

/* ==================== Features Section ==================== */
.features-section {
    background: var(--card-bg);
    padding: 60px 20px;
    margin-bottom: 60px;
}

.features-section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--text-dark-gray);
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
    background: var(--bg-cream);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px var(--shadow);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 1.2rem;
    color: var(--text-black);
    margin-bottom: 15px;
}

.feature-item p {
    font-size: 1rem;
    color: var(--text-dark-gray);
    line-height: 1.6;
}

/* ==================== CTA Section ==================== */
.cta-section {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-cream);
    margin-bottom: 40px;
}

.cta-section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--text-dark-gray);
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 1.1rem;
    color: var(--text-black);
    margin-bottom: 30px;
}

.cta-button-primary {
    display: inline-block;
    padding: 18px 50px;
    background: var(--price-copper);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(205, 127, 50, 0.4);
}

.cta-button-primary:hover {
    background: #B87333;
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(205, 127, 50, 0.6);
}

/* ==================== Footer ==================== */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.footer-info h3,
.footer-social h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-info p,
.footer-social p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: white;
}

.footer .social-links {
    justify-content: flex-start;
}

.footer-legal {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 1.8rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .footer-content {
        grid-template-columns: 1fr;
    }
    .cta-button, .cta-button-secondary {
        display: block;
        margin: 10px auto;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 40px 15px;
    }
    .cta-button, .cta-button-secondary {
        width: 100%;
        margin: 5px 0;
    }
}

/* ==================== RTL Support ==================== */
body[dir="rtl"] .hero-content h2 {
    direction: rtl;
}

body[dir="rtl"] .footer .social-links {
    justify-content: flex-start;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .language-selector {
        top: 10px;
        right: 10px;
        padding: 5px;
    }

    .lang-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .header {
        padding: 60px 15px 30px;
    }

    .menu-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .social-links {
        flex-direction: column;
        align-items: stretch;
    }

    .social-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .item-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .item-price {
        margin-top: 5px;
    }
}

/* ==================== RTL Support ==================== */
body[dir="rtl"] .menu-item::before {
    left: auto;
    right: 0;
}

body[dir="rtl"] .language-selector {
    right: auto;
    left: 20px;
}

body[dir="rtl"] .section-header h2::after {
    left: 50%;
    transform: translateX(-50%);
}
