html {
    overflow-y: scroll;
}

@font-face {
    font-family: 'Estedad';
    src: url('../fonts/Estedad-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Estedad';
    src: url('../fonts/Estedad-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

:root {
    --bg-dark: #120b07;
    --bg-card: #1c110a;
    --gold: #dca752;
    --gold-light: #f5cc8b;
    --text-light: #f4eedd;
    --text-muted: #a69a8f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Estedad', Tahoma, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    background-image: radial-gradient(circle at 50% 5%, #2a1a10 0%, #120b07 60%);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
    animation: pageFadeIn 0.5s ease-out forwards;
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.en-text {
    font-family: 'Playfair Display', serif;
    letter-spacing: 1px;
}

header {
    text-align: center;
    padding: 35px 20px 20px;
}

.logo-container {
    position: relative;
    z-index: 2;
}

.logo-container img {
    width: 500px;
    max-width: 90%;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.6));
    animation: float 5s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

.cafe-desc {
    color: var(--gold-light);
    font-size: 1.15rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin-top: -35px;
    position: relative;
    z-index: 1;
}

/* Category Dropdown Navigation Wrapper */
.menu-nav-wrapper {
    position: sticky;
    top: 20px;
    z-index: 100;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    margin-bottom: 35px;
}

.menu-filters-container {
    position: relative;
}

.menu-filters-header {
    background: rgba(28, 17, 10, 0.85);
    backdrop-filter: blur(15px);
    padding: 10px 25px;
    border-radius: 50px;
    border: 1px solid rgba(220, 167, 82, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    gap: 15px;
    color: var(--gold-light);
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 200px;
    transition: all 0.3s ease;
}

.menu-filters-header:hover {
    box-shadow: 0 10px 30px rgba(220, 167, 82, 0.15);
}

.menu-filters-header span.arrow {
    transition: transform 0.3s;
}

.menu-filters-header.open span.arrow {
    transform: rotate(180deg);
}

.menu-filters-dropdown {
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(28, 17, 10, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(220, 167, 82, 0.3);
    border-radius: 15px;
    padding: 10px 0;
    min-width: 200px;
    display: none;
    flex-direction: column;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.menu-filters-dropdown.open {
    display: flex;
    animation: dropIn 0.3s forwards;
}

@keyframes dropIn {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px 25px;
    cursor: pointer;
    font-family: 'Estedad', Tahoma, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    transition: all 0.3s ease;
    text-align: right;
    width: 100%;
}

.filter-btn:hover {
    color: var(--gold-light);
    background: rgba(220, 167, 82, 0.1);
}

.filter-btn.active {
    color: var(--gold);
    background: rgba(220, 167, 82, 0.15);
    border-right: 3px solid var(--gold);
}

.menu-container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 20px;
    display: none;
}

.menu-container.active {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 30px;
    animation: fadeInMenu 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.menu-item {
    display: block;
    text-decoration: none;
    background: linear-gradient(145deg, var(--bg-card), #140c07);
    padding: 30px; 
    border-radius: 20px;
    border: 1px solid rgba(220, 167, 82, 0.05);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    color: inherit;
    min-height: 145px; 
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(220, 167, 82, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.menu-item:hover {
    transform: translateY(-8px);
    border-color: rgba(220, 167, 82, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.menu-item:hover::before {
    opacity: 1;
}

.item-header-with-img {
    display: flex;
    align-items: flex-start; 
}

.product-image {
    width: 85px; 
    height: 85px;
    border-radius: 12px;
    object-fit: cover;
    margin-left: 20px; 
    border: 1px solid rgba(220, 167, 82, 0.2);
    flex-shrink: 0; 
}

.item-header {
    display: flex;
    align-items: flex-end;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    width: 100%;
}

.item-name {
    font-size: 1.35rem; 
    font-weight: 700;
    color: var(--text-light);
    white-space: nowrap;
}

.dots {
    flex-grow: 1;
    border-bottom: 2px dotted rgba(220, 167, 82, 0.25);
    margin: 0 15px;
    position: relative;
    top: -6px;
    min-width: 30px;
}

.item-price {
    font-size: 1.3rem;
    color: var(--gold);
    white-space: nowrap;
}

.item-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.8;
    position: relative;
    z-index: 1;
    margin-top: 5px; 
}

footer {
    text-align: center;
    padding: 60px 20px 30px;
    margin-top: 60px;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 2;
}

.footer-logo {
    font-size: 1.6rem;
    color: var(--gold);
    margin-bottom: 15px;
    font-weight: 700;
}

.social-links {
    margin: 15px 0;
    color: var(--gold-light);
    font-size: 1.1rem;
}

.copyright {
    margin-top: 25px;
    font-size: 0.85rem;
    opacity: 0.4;
    letter-spacing: 2px;
}

/* =========================================
   کدهای صفحه محصول و لودر
========================================== */

.loader-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-dark); z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.3s ease;
}
.spinner {
    width: 50px; height: 50px;
    border: 4px solid rgba(220, 167, 82, 0.1);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

.product-page-wrapper {
    max-width: 900px;
    margin: 30px auto 60px;
    padding: 0 20px;
}

.back-nav {
    text-align: left;
    margin-bottom: 25px;
    display: flex;
    justify-content: flex-end;
}

.back-btn-outlined {
    border: 1px solid rgba(220, 167, 82, 0.4);
    color: var(--gold-light);
    padding: 8px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.back-btn-outlined:hover {
    background: rgba(220, 167, 82, 0.1);
    color: #fff;
    border-color: var(--gold);
}

.product-detail-card {
    background: linear-gradient(145deg, #160d07, #0a0604);
    border: 1px solid rgba(220, 167, 82, 0.15);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    gap: 40px;
    align-items: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.product-info-side {
    flex: 1.2;
    text-align: right;
}

.product-image-side {
    flex: 1;
    display: flex;
    justify-content: center;
}

.product-image-side img {
    width: 100%;
    max-width: 320px;
    border-radius: 15px;
    border: 1px solid rgba(220, 167, 82, 0.2);
}

.product-title {
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 15px;
    font-weight: 700;
}

.product-price {
    font-size: 1.4rem;
    color: var(--gold);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.product-divider {
    border-bottom: 1px dashed rgba(220, 167, 82, 0.3);
    margin: 25px 0;
}

.product-desc {
    color: var(--text-muted);
    line-height: 2.2;
    text-align: justify;
    font-size: 1rem;
}

/* =========================================
   استایل‌های مخصوص گوشی موبایل (اصلاح شده)
========================================== */
@media (max-width: 768px) {
    header { padding: 20px 15px 10px; }
    .logo-container img { width: 260px; } /* لوگو جمع‌وجورتر */
    .cafe-desc { margin-top: -15px; font-size: 1rem; }
    
    .menu-container.active { grid-template-columns: 1fr; gap: 12px; }
    
    .menu-item {
        padding: 15px; /* کاهش فضای خالی داخل کارت‌ها */
        min-height: auto;
        border-radius: 15px;
    }
    
    .product-image {
        width: 65px; /* کوچک‌تر شدن عکس برای باز شدن جا */
        height: 65px;
        margin-left: 12px; /* کاهش فاصله عکس با متن */
        border-radius: 10px;
    }
    
    .item-header {
        align-items: center;
    }

    .item-name { 
        font-size: 1.05rem; /* فونت اسم محصول کوچک‌تر و ظریف‌تر */
        white-space: normal; /* اگر اسم خیلی طولانی بود، بشکند و به خط بعد برود */
        line-height: 1.4;
    }
    
    .item-price { 
        font-size: 1.05rem; /* فونت قیمت کوچک‌تر */
        direction: ltr; /* حل مشکل به هم ریختگی جای حرف T در قیمت */
        display: inline-block;
    }
    
    .dots {
        margin: 0 8px; /* فشرده‌تر شدن نقطه‌چین‌ها */
        min-width: 15px;
        top: -4px;
    }

    .item-desc {
        font-size: 0.85rem; /* فونت توضیحات کوچک‌تر */
        line-height: 1.6;
        margin-top: 4px;
    }
    
    /* اصلاحات صفحه اختصاصی محصول در موبایل */
    .product-detail-card {
        flex-direction: column;
        padding: 25px 15px;
    }
    .product-info-side, .product-desc {
        text-align: center;
    }
    .product-title { font-size: 1.6rem; }
    .product-price { font-size: 1.2rem; }
}