/* ============================================
   Cafe Library - Premium Stylesheet
   ============================================ */

:root {
    --bg: #F5F1EB;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text: #2C241E;
    --text-soft: #6B5D52;
    --text-muted: #9A8B7D;
    --accent: #C08552;
    --accent-hover: #A87042;
    --line: rgba(44, 36, 30, 0.08);
    --line-hover: rgba(192, 133, 82, 0.25);
    --shadow: 0 4px 20px rgba(44, 36, 30, 0.06);
    --shadow-hover: 0 12px 40px rgba(44, 36, 30, 0.1);
    --hero-fade: #F5F1EB;
    --surface: #EBE5DE;
    --filter-bg: transparent;
    --filter-border: var(--surface);
    --filter-color: var(--text-soft);
    --filter-active-bg: var(--accent);
    --filter-active-color: #fff;
    --placeholder-bg: linear-gradient(135deg, var(--surface), var(--bg));
    --toggle-border: var(--line);
    --toggle-bg: var(--bg-card);
}

[data-theme="dark"] {
    --bg: #000000;
    --bg-card: rgba(25, 22, 19, 0.85);
    --text: #EDE0D4;
    --text-soft: #B8A99A;
    --text-muted: #8A7B6E;
    --accent: #C08552;
    --accent-hover: #D49A6A;
    --line: rgba(192, 133, 82, 0.1);
    --line-hover: rgba(192, 133, 82, 0.25);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.6);
    --hero-fade: #000000;
    --surface: rgba(192, 133, 82, 0.08);
    --filter-bg: transparent;
    --filter-border: rgba(192, 133, 82, 0.15);
    --filter-color: var(--text-soft);
    --filter-active-bg: var(--accent);
    --filter-active-color: #fff;
    --placeholder-bg: linear-gradient(135deg, rgba(192, 133, 82, 0.1), transparent);
    --toggle-border: var(--line);
    --toggle-bg: rgba(192, 133, 82, 0.06);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    transition: background 0.4s ease;
}

html { background: #F5F1EB; }
html[data-theme="dark"] { background: #000000; }

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.9;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Theme Toggle
   ============================================ */

.mobile-toggle {
    position: fixed;
    top: 24px;
    inset-inline-start: 24px;
    z-index: 100;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--toggle-border);
    background: var(--toggle-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s ease;
    color: var(--text);
    box-shadow: var(--shadow);
}

.mobile-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: var(--shadow-hover);
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }
}

@media (min-width: 769px) {
    .mobile-toggle {
        display: none;
    }
}

.theme-icon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sun-icon { opacity: 1; transform: rotate(0) scale(1); }
.moon-icon { opacity: 0; transform: rotate(90deg) scale(0.5); }

[data-theme="dark"] .sun-icon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="dark"] .moon-icon { opacity: 1; transform: rotate(0) scale(1); }

/* ============================================
   Bookshelf
   ============================================ */

.bookshelf-decoration {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 16px;
    background: linear-gradient(180deg, transparent, rgba(44, 36, 30, 0.02));
}

.book {
    width: 16px;
    border-radius: 2px;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.book:hover {
    transform: translateY(-4px) scale(1.1);
    opacity: 0.8;
}

.book-1 { height: 44px; background: var(--text); }
.book-2 { height: 52px; background: var(--surface); }
.book-3 { height: 38px; background: var(--accent); }
.book-4 { height: 48px; background: #C9A96E; }
.book-5 { height: 34px; background: var(--text-soft); }
.book-6 { height: 46px; background: #3D352E; }
.book-7 { height: 40px; background: var(--accent); opacity: 0.6; }
.book-8 { height: 50px; background: var(--text); }
.book-9 { height: 36px; background: #CD853F; }
.book-10 { height: 44px; background: var(--surface); }
.book-11 { height: 42px; background: #E0C98A; }
.book-12 { height: 48px; background: #2D2A24; }

/* ============================================
   Hero
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(160deg, #1A0F0A 0%, #2C241E 35%, #3D352E 65%, #2C241E 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 25%, rgba(192, 133, 82, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(201, 169, 110, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(180deg, transparent, var(--hero-fade));
    pointer-events: none;
    transition: background 0.4s ease;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 24px;
    animation: heroIn 1.3s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
    opacity: 0;
}

@keyframes heroIn {
    0% { opacity: 0; transform: translateY(40px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-subtitle {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.3s forwards;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-title {
    font-family: 'Playfair Display', 'Vazirmatn', serif;
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    font-weight: 700;
    color: #F5F0EA;
    line-height: 1.25;
    margin-bottom: 16px;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}

.hero-tagline {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: rgba(245, 240, 234, 0.65);
    font-weight: 300;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.6s forwards;
}

.scroll-indicator {
    position: absolute;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0;
    animation: fadeUp 0.8s ease 1.2s forwards;
    cursor: pointer;
}

.scroll-text {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: rgba(245, 240, 234, 0.45);
}

.scroll-arrow {
    width: 1.5px;
    height: 26px;
    background: linear-gradient(180deg, var(--accent), transparent);
    animation: bounce 2.5s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); opacity: 0.3; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* Steam */
.hero-steam {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
}

.steam-particle {
    position: absolute;
    bottom: 0;
    width: 3px;
    height: 18px;
    background: linear-gradient(180deg, transparent, rgba(245, 240, 234, 0.08), transparent);
    border-radius: 50%;
    animation: steam 5s ease-in-out infinite;
}

.steam-particle:nth-child(1) { left: 30%; animation-delay: 0s; }
.steam-particle:nth-child(2) { left: 45%; animation-delay: 1.2s; width: 2px; }
.steam-particle:nth-child(3) { left: 60%; animation-delay: 2.4s; height: 14px; }
.steam-particle:nth-child(4) { left: 75%; animation-delay: 3.6s; width: 4px; height: 22px; }

@keyframes steam {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    15% { opacity: 0.5; }
    100% { transform: translateY(-130px) scale(2.5); opacity: 0; }
}

/* ============================================
   Menu
   ============================================ */

.menu-section {
    padding: 100px 0;
    background: var(--bg);
    transition: background 0.4s ease;
}

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

.section-badge {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-family: 'Playfair Display', 'Vazirmatn', serif;
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.divider-line {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--text-soft), transparent);
}

.divider-icon { color: var(--accent); font-size: 0.7rem; }

/* ============================================
   Filters
   ============================================ */

.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 48px;
}

.filter-btn {
    padding: 10px 22px;
    border: 1px solid var(--filter-border);
    background: var(--filter-bg);
    border-radius: 50px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.85rem;
    color: var(--filter-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-btn.active {
    background: var(--filter-active-bg);
    border-color: var(--filter-active-bg);
    color: var(--filter-active-color);
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(192, 133, 82, 0.3);
}

/* ============================================
   Grid
   ============================================ */

.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ============================================
   Card
   ============================================ */

.menu-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(24px);
}

.menu-card.visible { opacity: 1; transform: translateY(0); }

.menu-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--line-hover);
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .menu-card:hover {
    background: rgba(35, 30, 26, 0.9);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--surface);
    transition: background 0.4s ease;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.menu-card:hover .card-image img { transform: scale(1.06); }

.card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 65%, rgba(44, 36, 30, 0.04));
    pointer-events: none;
}

.card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--placeholder-bg);
    transition: background 0.4s ease;
}

.placeholder-icon {
    font-size: 2.8rem;
    opacity: 0.3;
    color: var(--text-muted);
}

.card-body { padding: 20px 22px 22px; }

.card-category {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 6px;
    font-weight: 500;
}

.card-title {
    font-family: 'Playfair Display', 'Vazirmatn', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.4;
    transition: color 0.3s;
}

.menu-card:hover .card-title { color: var(--accent); }

.card-description {
    font-size: 0.85rem;
    color: var(--text-soft);
    line-height: 1.8;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    transition: border-color 0.4s ease;
}

.card-price {
    font-family: 'Playfair Display', 'Vazirmatn', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    transition: color 0.3s;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}

/* ============================================
   Reservation Section
   ============================================ */

.reservation-section {
    padding: 100px 0;
    background: var(--bg);
    transition: background 0.4s ease;
}

.reservation-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    align-items: start;
}

.reservation-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px;
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: var(--line-hover);
    box-shadow: var(--shadow-hover);
}

.info-icon {
    color: var(--accent);
    display: inline-block;
    margin-bottom: 12px;
}

.info-icon svg {
    display: block;
}

.info-card h4 {
    font-family: 'Playfair Display', 'Vazirmatn', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.info-card p {
    font-size: 0.85rem;
    color: var(--text-soft);
    line-height: 1.7;
}

.info-note {
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    margin-top: 4px;
}

.reservation-form-container {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 36px;
    transition: all 0.3s ease;
}

.form-success {
    background: rgba(192, 133, 82, 0.1);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 24px;
}

.success-icon {
    color: var(--accent);
    font-size: 1.5rem;
    display: block;
    margin-bottom: 8px;
}

.form-success p {
    color: var(--text-soft);
    font-size: 0.9rem;
}

.reservation-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-soft);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(192, 133, 82, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-error {
    font-size: 0.75rem;
    color: #C0392B;
}

.submit-btn {
    padding: 14px 32px;
    background: var(--accent);
    border: none;
    border-radius: 50px;
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
    margin-top: 4px;
}

.submit-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 20px rgba(192, 133, 82, 0.35);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .reservation-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .reservation-info {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    .info-card {
        flex: 1 1 calc(50% - 10px);
        min-width: 140px;
        padding: 16px 14px;
        border-radius: 12px;
    }
    .info-card h4 {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }
    .info-card p {
        font-size: 0.7rem;
        line-height: 1.5;
    }
    .info-icon {
        margin-bottom: 8px;
    }
    .info-icon svg {
        width: 18px;
        height: 18px;
    }
    .info-note {
        font-size: 0.65rem !important;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .reservation-form-container {
        padding: 20px 16px;
        border-radius: 12px;
    }
    .reservation-form {
        gap: 14px;
    }
    .reservation-section {
        padding: 40px 0;
    }
    .form-group label {
        font-size: 0.75rem;
    }
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px 12px;
        font-size: 0.8rem;
        border-radius: 8px;
    }
    .form-group textarea {
        min-height: 64px;
    }
    .submit-btn {
        width: 100%;
        text-align: center;
        padding: 12px 24px;
        font-size: 0.85rem;
    }
    .form-success {
        padding: 16px;
        margin-bottom: 16px;
    }
    .form-success p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .info-card {
        flex: 1 1 100%;
        padding: 14px 12px;
    }
    .info-card h4 {
        font-size: 0.75rem;
    }
    .info-card p {
        font-size: 0.65rem;
    }
    .reservation-form-container {
        padding: 16px 12px;
    }
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
    .submit-btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
}

/* ============================================
   Books Section
   ============================================ */

.books-section {
    padding: 100px 0;
    background: var(--bg);
    transition: background 0.4s ease;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.book-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.book-card:hover {
    border-color: var(--line-hover);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.book-card-cover {
    height: 220px;
    overflow: hidden;
    background: var(--surface);
}

.book-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-cover-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0.4;
}

.book-card-body {
    padding: 20px;
}

.book-card-title {
    font-family: 'Playfair Display', 'Vazirmatn', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.4;
}

.book-card-author {
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.book-card-desc {
    font-size: 0.82rem;
    color: var(--text-soft);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .books-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .books-section { padding: 60px 0; }
    .book-card-cover { height: 160px; }
    .book-card-body { padding: 14px; }
    .book-card-title { font-size: 0.85rem; }
    .book-card-author { font-size: 0.7rem; }
    .book-card-desc { font-size: 0.72rem; }
}

@media (max-width: 540px) {
    .books-grid { grid-template-columns: 1fr; }
    .book-card-cover { height: 200px; }
}

/* ============================================
   Featured Section (Home)
   ============================================ */

.featured-section {
    padding: 100px 0;
    background: var(--bg);
    transition: background 0.4s ease;
}

.featured-group {
    margin-bottom: 48px;
}

.featured-group:last-child {
    margin-bottom: 0;
}

.featured-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Playfair Display', 'Vazirmatn', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.featured-group-title svg {
    color: var(--accent);
}

.featured-scroll {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.featured-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.featured-card:hover {
    border-color: var(--line-hover);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.featured-badge {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.featured-card-body h4 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
    line-height: 1.3;
}

.featured-price {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.featured-more {
    display: inline-block;
    margin-top: 16px;
    font-size: 0.82rem;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-more:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .featured-section { padding: 60px 0; }
    .featured-scroll { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .featured-card { padding: 12px; }
    .featured-card-body h4 { font-size: 0.78rem; }
    .featured-price { font-size: 0.65rem; }
    .featured-group-title { font-size: 0.95rem; }
    .featured-badge { width: 24px; height: 24px; font-size: 0.6rem; }
}

@media (max-width: 540px) {
    .featured-scroll { grid-template-columns: 1fr; }
}

/* ============================================
   Top Navbar (Desktop)
   ============================================ */

.site-nav {
    display: none;
}

@media (min-width: 769px) {
    .site-nav {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: var(--card-bg);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-bottom: 1px solid var(--line);
        transition: background 0.4s ease, border-color 0.4s ease;
    }
    .nav-inner {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 32px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 60px;
        direction: rtl;
    }
    .nav-brand {
        font-family: 'Playfair Display', 'Vazirmatn', serif;
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--text);
        text-decoration: none;
        letter-spacing: 0.5px;
        transition: color 0.3s ease;
    }
    .nav-brand:hover {
        color: var(--accent);
    }
    .nav-links {
        display: flex;
        align-items: center;
        gap: 4px;
    }
    .nav-links .tab-item {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 16px;
        text-decoration: none;
        color: var(--text-soft);
        font-size: 0.85rem;
        font-weight: 400;
        border-radius: 8px;
        transition: all 0.25s ease;
        position: relative;
    }
    .nav-links .tab-item:hover {
        color: var(--accent);
        background: rgba(192, 133, 82, 0.06);
    }
    .nav-links .tab-item.active {
        color: var(--accent);
        font-weight: 500;
    }
    .nav-links .tab-item.active::after {
        content: '';
        position: absolute;
        bottom: -2px;
        inset-inline: 16px;
        height: 2px;
        background: var(--accent);
        border-radius: 2px;
    }
    .nav-links .tab-icon {
        display: block;
        width: 16px;
        height: 16px;
    }
    .nav-links .tab-item span {
        font-size: 0.82rem;
    }
        .site-nav .theme-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        border: 1px solid var(--line);
        background: transparent;
        cursor: pointer;
        color: var(--text-soft);
        transition: all 0.3s ease;
        position: static;
        padding: 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .site-nav .theme-toggle:hover {
        border-color: var(--accent);
        color: var(--accent);
    }
    body {
        padding-top: 60px;
    }
}

/* ============================================
   Bottom Tab Bar (Mobile)
   ============================================ */

.bottom-tabs {
    display: none;
}

@media (max-width: 768px) {
    .bottom-tabs {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 99;
        background: var(--card-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--line);
        justify-content: space-around;
        align-items: center;
        padding: 6px 0 env(safe-area-inset-bottom, 6px);
    }
    .bottom-tabs .tab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 4px 12px;
        text-decoration: none;
        color: var(--text-muted);
        transition: color 0.3s ease;
        position: relative;
        border-radius: 12px;
    }
    .bottom-tabs .tab-item:hover,
    .bottom-tabs .tab-item.active {
        color: var(--accent);
    }
    .bottom-tabs .tab-item.active::after {
        content: '';
        position: absolute;
        top: -6px;
        width: 24px;
        height: 3px;
        background: var(--accent);
        border-radius: 0 0 3px 3px;
    }
    .bottom-tabs .tab-icon {
        display: block;
    }
    .bottom-tabs .tab-label {
        font-size: 0.6rem;
        font-weight: 500;
    }
    body {
        padding-bottom: 60px;
    }
    .footer {
        padding-bottom: 72px;
    }
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--footer-bg);
    padding: 48px 0 24px;
    color: var(--footer-text);
    border-top: 1px solid var(--line);
    transition: background 0.4s ease, color 0.4s ease;
}

:root { --footer-bg: #F5F2EE; --footer-text: var(--text-soft); --footer-heading: var(--text-primary); --footer-bottom: var(--text-muted); }
[data-theme="dark"] { --footer-bg: #0A0806; --footer-text: rgba(245, 240, 234, 0.55); --footer-heading: #EDE0D4; --footer-bottom: rgba(245, 240, 234, 0.2); }

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.footer-brand h3 {
    font-family: 'Playfair Display', 'Vazirmatn', serif;
    font-size: 1.3rem;
    color: var(--footer-heading);
    margin-bottom: 4px;
    transition: color 0.4s ease;
}

.footer-brand p {
    font-size: 0.8rem;
    color: var(--footer-text);
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--footer-text);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social span {
    font-size: 0.8rem;
    color: var(--footer-text);
    opacity: 0.6;
    cursor: default;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
}

.footer-bottom p {
    font-size: 0.75rem;
    color: var(--footer-bottom);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    .footer-links {
        justify-content: center;
    }
    .footer-social {
        justify-content: center;
    }
    .footer {
        padding: 36px 0 20px;
    }
}

/* ============================================
   Animations
   ============================================ */

.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible { opacity: 1; transform: translateY(0); }

.menu-card.hidden { display: none; }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .hero-title { font-size: 2.4rem; }
    .menu-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .filter-btn { padding: 8px 16px; font-size: 0.8rem; }
    .card-image { height: 170px; }
    .menu-section { padding: 60px 0; }
    .mobile-toggle { top: 16px; inset-inline-start: 16px; width: 38px; height: 38px; }
}

@media (max-width: 540px) {
    .menu-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 1.9rem; }
    .hero-tagline { font-size: 0.95rem; }
}

/* ============================================
   Language Toggle
   ============================================ */

.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    color: var(--text-soft);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-inline-start: 4px;
}

.lang-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.mobile-lang-toggle {
    display: none;
}

@media (max-width: 768px) {
    .mobile-lang-toggle {
        display: flex;
        position: fixed;
        top: 16px;
        inset-inline-end: 16px;
        z-index: 100;
        width: 48px;
        height: 34px;
        border-radius: 20px;
        border: 1px solid var(--toggle-border);
        background: var(--toggle-bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        cursor: pointer;
        font-family: 'Vazirmatn', sans-serif;
        font-size: 0.6rem;
        font-weight: 500;
        color: var(--text-soft);
        box-shadow: var(--shadow);
        transition: all 0.35s ease;
        padding: 0 8px;
        gap: 1px;
        align-items: center;
        justify-content: center;
    }
    .mobile-lang-toggle:hover {
        border-color: var(--accent);
        color: var(--accent);
    }
    .mobile-lang-toggle .lang-auto,
    .mobile-lang-toggle .lang-en,
    .mobile-lang-toggle .lang-fa {
        transition: all 0.2s ease;
    }
}

/* ============================================
   Bilingual Content Display
   ============================================ */

html[lang="fa"] [lang="en"],
html[lang="en"] [lang="fa"] {
    display: none;
}

html[lang="en"] [lang="en"],
html[lang="fa"] [lang="fa"] {
    display: inline;
}

/* ============================================
   Welcome Modal
   ============================================ */

.welcome-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.welcome-overlay.show {
    display: flex;
    animation: welcomeFadeIn 0.6s ease;
}

@keyframes welcomeFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.welcome-card {
    position: relative;
    background: var(--bg-card, #fff);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 48px 40px 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25);
    animation: welcomeSlideUp 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
    overflow: hidden;
}

@keyframes welcomeSlideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.welcome-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    opacity: 0.15;
    pointer-events: none;
}

.welcome-icon {
    color: var(--accent);
    margin-bottom: 16px;
}

.welcome-title {
    font-family: 'Playfair Display', 'Vazirmatn', serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.4;
}

.welcome-title-fa {
    font-family: 'Vazirmatn', sans-serif;
}

.welcome-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.6;
}

.welcome-sub span {
    font-family: 'Vazirmatn', sans-serif;
}

.welcome-group {
    margin-bottom: 24px;
}

.welcome-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-soft);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.welcome-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.welcome-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: transparent;
    color: var(--text-soft);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.welcome-opt svg {
    transition: all 0.3s ease;
}

.welcome-opt:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.welcome-opt:hover svg {
    stroke: var(--accent);
}

.welcome-opt.active {
    border-color: var(--accent);
    background: rgba(192, 133, 82, 0.08);
    color: var(--accent);
}

.welcome-opt.active svg {
    stroke: var(--accent);
}

.welcome-go {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 50px;
    background: var(--accent);
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.welcome-go:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 20px rgba(192, 133, 82, 0.35);
    transform: translateY(-2px);
}

.welcome-go span {
    font-family: 'Vazirmatn', sans-serif;
}

/* ============================================
   Jalali Datepicker Theme (Cafe Book)
   ============================================ */

jdp-container {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg-card, #fff);
    border: 1px solid var(--line, #e6e0d8);
    border-radius: 12px;
    box-shadow: var(--shadow-hover, 0 8px 32px rgba(0,0,0,0.1));
    max-width: 320px;
    min-width: 320px;
    padding: 4px 0;
}

jdp-container .jdp-year-picker,
jdp-container .jdp-month-picker {
    color: var(--text, #3a3530);
    font-size: 0.85rem;
    font-weight: 500;
    background: transparent;
    border: none;
}

jdp-container .jdp-months span,
jdp-container .jdp-years span {
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text, #3a3530);
    transition: all 0.2s ease;
}

jdp-container .jdp-months span:hover,
jdp-container .jdp-years span:hover {
    background: var(--accent, #C08552);
    color: #fff;
}

jdp-container .jdp-blue {
    background: var(--accent, #C08552);
    color: #fff;
    border-radius: 8px;
}

jdp-container .jdp-day {
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text, #3a3530);
    transition: all 0.2s ease;
    width: 38px;
    height: 36px;
    line-height: 36px;
}

jdp-container .jdp-day:hover {
    background: var(--accent, #C08552);
    color: #fff;
}

jdp-container .jdp-day.today {
    background: transparent;
    border: 1px solid var(--accent, #C08552);
    font-weight: 600;
}

jdp-container .jdp-day.today:hover {
    background: var(--accent, #C08552);
    color: #fff;
}

jdp-container .jdp-day.selected {
    background: var(--accent, #C08552);
    color: #fff;
    font-weight: 600;
}

jdp-container .jdp-day.selected:hover {
    background: #a06e40;
}

jdp-container .jdp-day.disabled {
    color: var(--text-muted, #aaa);
    cursor: not-allowed;
    opacity: 0.35;
}

jdp-container .jdp-day.disabled:hover {
    background: transparent;
    color: var(--text-muted, #aaa);
}

jdp-container .jdp-header {
    padding: 8px 12px 4px;
}

jdp-container .jdp-header .jdp-ym {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text, #3a3530);
}

jdp-container .jdp-icon-minus,
jdp-container .jdp-icon-plus {
    border-color: var(--line, #e6e0d8);
    border-radius: 8px;
    transition: all 0.2s ease;
}

jdp-container .jdp-icon-minus:hover,
jdp-container .jdp-icon-plus:hover {
    background: var(--accent-light, rgba(192,133,82,0.1));
}

jdp-container .jdp-icon-minus svg,
jdp-container .jdp-icon-plus svg {
    fill: var(--text, #3a3530);
}

jdp-container .jdp-days span {
    font-size: 0.7rem;
    color: var(--text-muted, #8a8580);
    width: 38px;
}

jdp-container .jdp-footer {
    padding: 6px 12px 10px;
}

jdp-container .jdp-footer-btn {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.78rem;
    color: var(--accent, #C08552);
    background: transparent;
    border: 1px solid var(--line, #e6e0d8);
    border-radius: 8px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

jdp-container .jdp-footer-btn:hover {
    background: var(--accent, #C08552);
    color: #fff;
    border-color: var(--accent, #C08552);
}

/* Dark mode overrides for datepicker */
[data-theme="dark"] jdp-container {
    background: var(--bg-card, #1e1b18);
    border-color: var(--line, #2e2b28);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

[data-theme="dark"] jdp-container .jdp-year-picker,
[data-theme="dark"] jdp-container .jdp-month-picker,
[data-theme="dark"] jdp-container .jdp-ym,
[data-theme="dark"] jdp-container .jdp-months span,
[data-theme="dark"] jdp-container .jdp-years span,
[data-theme="dark"] jdp-container .jdp-day {
    color: #d4cfc8;
}

[data-theme="dark"] jdp-container .jdp-day.today {
    border-color: var(--accent, #C08552);
}

[data-theme="dark"] jdp-container .jdp-day.disabled {
    color: #555;
}

[data-theme="dark"] jdp-container .jdp-icon-minus svg,
[data-theme="dark"] jdp-container .jdp-icon-plus svg {
    fill: #d4cfc8;
}

[data-theme="dark"] jdp-container .jdp-icon-minus,
[data-theme="dark"] jdp-container .jdp-icon-plus {
    border-color: #3a3530;
}

[data-theme="dark"] jdp-container .jdp-days span {
    color: #6a6560;
}
