:root {
    --primary: #c6a664;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #2d3436;
    --radius: 20px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* تعریف ۱۰ تم مختلف */
.theme-1 { --primary: #c6a664; --bg: #fcfcfc; --text: #2d3436; } /* کلاسیک شیک */
.theme-2 { --primary: #ff7675; --bg: #1e272e; --card-bg: #2f3640; --text: #ffffff; } /* دارک مدرن */
.theme-3 { --primary: #00b894; --bg: #f0f7f4; --text: #2d3436; --radius: 0px; } /* مینیمال سبز */
.theme-4 { --primary: #a29bfe; --bg: #ffffff; --card-bg: #f9f9ff; --text: #2d3436; } /* پاستلی */
.theme-5 { --primary: #fdcb6e; --bg: #000000; --card-bg: #111111; --text: #eee; } /* لوکس مشکی-زرد */
.theme-6 { --primary: #e84393; --bg: #fff0f6; --text: #2d3436; } /* فانتزی دخترانه */
.theme-7 { --primary: #0984e3; --bg: #e1f5fe; --card-bg: #ffffff; --text: #01579b; } /* آبی آرامش */
.theme-8 { --primary: #d63031; --bg: #2c3e50; --card-bg: #34495e; --text: #ecf0f1; } /* رستوران ایتالیایی */
.theme-9 { --primary: #2d3436; --bg: #dfe6e9; --card-bg: #ffffff; --text: #2d3436; } /* مونوکروم (سیاه سفید) */
.theme-10 { --primary: #ff9f43; --bg: #fafafa; --card-bg: #ffffff; --text: #576574; } /* نارنجی گرم */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0; padding: 0;
    transition: background 0.5s ease;
}

/* Header */
.main-header {
    height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}
.main-header .overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.7));
}
.header-content { z-index: 1; }
.logo-circle {
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.1); /* یک پس‌زمینه بسیار شفاف برای شیک شدن */
    backdrop-filter: blur(5px); /* افکت شیشه مات */
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px; /* فاصله با نام کافه پایینش */
    overflow: hidden;
    animation: float 3s infinite ease-in-out;
}

.logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Search Bar */
.search-bar { padding: 20px; position: sticky; top: 0; z-index: 100; background: var(--bg); }
.search-input-wrapper {
    background: var(--card-bg);
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}
.search-input-wrapper input {
    border: none; background: none; outline: none; width: 100%;
    margin-right: 10px; font-family: inherit; color: var(--text);
}

/* Categories */
.categories-nav {
    display: flex; overflow-x: auto; padding: 0 20px 20px; gap: 12px;
    scrollbar-width: none;
}
.categories-nav::-webkit-scrollbar { display: none; }
.cat-btn {
    padding: 8px 25px;
    background: var(--card-bg);
    border-radius: 50px;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
    border: 1px solid transparent;
}
.cat-btn.active { background: var(--primary); color: white; transform: scale(1.05); }

/* Menu Grid */
.menu-grid { padding: 0 20px 100px; display: grid; gap: 20px; }
.menu-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    display: flex;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    animation: fadeIn 0.5s ease forwards;
}
.card-img {
    width: 100px; height: 100px;
    background-size: cover; background-position: center;
}
.card-info { padding: 15px; flex: 1; position: relative; }
.card-info h3 { margin: 0; font-size: 1.1rem; }
.card-info p { font-size: 0.8rem; opacity: 0.7; margin: 5px 0; }
.price { color: var(--primary); font-weight: bold; font-size: 1.1rem; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.main-header {
    min-height: 250px; /* حداقل ارتفاع */
    padding-top: 40px; /* ایجاد فاصله از سقف مرورگر برای اینکه زیر نوار آدرس نرود */
    padding-bottom: 20px;
    position: relative;
    display: flex;
    flex-direction: column; /* چیدمان عمودی لوگو، اسم و شعار */
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    background-color: #222;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

/* برای اطمینان از اینکه محتوا روی لایه سیاه قرار می‌گیرد */
.header-content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* افکت سیاه و سفید برای تصویر */
.finished-item .card-img {
    filter: grayscale(100%);
    opacity: 0.6;
}

/* مات کردن کل کارت */
.finished-item {
    position: relative;
    pointer-events: none; /* غیرفعال کردن کلیک (اختیاری) */
}
/* --- استایل کلی (دسکتاپ) --- */
.out-of-stock-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 10;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    white-space: nowrap;
}

/* --- استایل مخصوص موبایل (صفحه‌های کوچک‌تر از 600 پیکسل) --- */
@media (max-width: 600px) {
    .out-of-stock-badge {
        /* تغییر موقعیت از وسط به گوشه بالا سمت چپ */
        top: 10px;
        left: 10px;
        bottom: auto;
        right: auto;
        
        /* حذف وسط‌چین کردن قبلی */
        transform: rotate(-10deg); 
        
        /* کمی کوچک‌تر کردن برای موبایل که ظریف‌تر باشد */
        font-size: 0.7rem;
        padding: 3px 8px;
        border-width: 1px;
    }

    /* اگر کارت‌ها در موبایل به صورت افقی هستند (عکس سمت راست/چپ)، 
       این کد باعث می‌شود نشان دقیقاً روی عکس قرار بگیرد */
    .menu-card.finished-item {
        overflow: hidden; /* برای اینکه نشان از کادر بیرون نزند */
    }
}

/* افکت سیاه و سفید برای عکس */
.finished-item .card-img {
    filter: grayscale(100%);
    opacity: 0.6;
}

.finished-item {
    position: relative;
    /* جلوگیری از کلیک روی آیتم تمام شده */
    pointer-events: none; 
}

.finished-item .price-container {
    opacity: 0.5;
}


.theme-11 {
    --bg: #eff3f6;
    --primary: #4e443f; /* رنگ قهوه‌ای دکمه مشاهده منو */
    --card-bg: #ffffff;
    --text: #333;
    --radius: 15px;
}

.theme-11 .main-header { height: 280px; border-radius: 0 0 40px 40px; }

.theme-11 .logo-circle {
    width: 110px;
    height: 110px;
    border-radius: 15px; /* لوگوی مربعی مطابق تصویر */
    background: white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border: 3px solid white;
    margin-top: -55px; /* نیمی روی هدر، نیمی روی بدنه */
}

/* بخش دکمه‌های دوتایی (مشاهده منو / اطلاعات) */
.theme-11 .action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
}
.theme-11 .btn-main {
    padding: 12px 30px;
    border-radius: 12px;
    border: none;
    font-weight: bold;
    flex: 1;
    max-width: 180px;
}
.theme-11 .btn-primary-menu { background: var(--primary); color: white; }
.theme-11 .btn-info-cafe { background: #f8f9fa; color: #666; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }

/* تغییر چیدمان دسته‌بندی‌ها به شبکه (Grid) مطابق عکس */
.theme-11 .categories-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* ۴ ستون در هر ردیف */
    gap: 15px;
    padding: 20px;
    overflow: visible;
}

.theme-11 .cat-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 15px;
    height: 90px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--text);
    border: 1px solid transparent;
}

.theme-11 .cat-btn i {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.theme-11 .cat-btn.active {
    background: var(--primary);
    color: white;
}
.theme-11 .cat-btn.active i { color: white; }

/* مخفی کردن نوار جستجو در این قالب خاص (اختیاری) */
.theme-11 .search-bar { padding-bottom: 0; }


/* مخصوص قالب ۱۱ */
.theme-11 .cat-icon-img {
    width: 45px;      /* سایز آیکون‌ها مطابق عکس */
    height: 45px;
    object-fit: contain;
    margin-bottom: 5px;
}

.theme-11 .icon-wrapper {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* در سایر قالب‌ها که آیکون نمی‌خواهند، می‌توانیم آیکون را مخفی کنیم یا کوچک نگه داریم */
.theme-1 .cat-icon-img, .theme-2 .cat-icon-img , .theme-3 .cat-icon-img , .theme-4 .cat-icon-img , .theme-5 .cat-icon-img , .theme-6 .cat-icon-img , .theme-7 .cat-icon-img , .theme-8 .cat-icon-img , .theme-9 .cat-icon-img , .theme-10 .cat-icon-img{
    display: none; /* در قالب‌های کلاسیک فقط متن نمایش داده شود */
}
