/* ═══════════════════════════════════════════
   کافه آشیون — استایل اصلی
   پالت برند: #163832 / #235347 / #8EB69B / #DAF1DE
   ═══════════════════════════════════════════ */

:root {
    --c-darkest: #0e2622;
    --c-dark:    #163832;
    --c-mid:     #235347;
    --c-sage:    #8EB69B;
    --c-mint:    #DAF1DE;
    --c-text:    #DAF1DE;
    --c-text-dim: rgba(218, 241, 222, 0.62);
    --glass-bg:      rgba(35, 83, 71, 0.32);
    --glass-bg-soft: rgba(142, 182, 155, 0.10);
    --glass-border:  rgba(218, 241, 222, 0.16);
    --glass-shine:   rgba(218, 241, 222, 0.05);
    --radius-lg: 28px;
    --radius-md: 20px;
    --shadow: 0 20px 50px -18px rgba(0, 0, 0, 0.55);
    --font: 'Vazirmatn', Tahoma, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background:
        radial-gradient(1200px 700px at 85% -10%, rgba(35, 83, 71, 0.9), transparent 60%),
        radial-gradient(900px 600px at -10% 40%, rgba(35, 83, 71, 0.55), transparent 60%),
        linear-gradient(165deg, var(--c-darkest) 0%, var(--c-dark) 55%, #11302b 100%);
    background-attachment: fixed;
    color: var(--c-text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* هاله‌های پس‌زمینه */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(110px);
    pointer-events: none;
    z-index: 0;
}
.bg-glow-1 { width: 480px; height: 480px; top: -140px; left: -120px; background: rgba(142, 182, 155, 0.16); }
.bg-glow-2 { width: 420px; height: 420px; bottom: -100px; right: -110px; background: rgba(35, 83, 71, 0.55); }

.page {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    padding: 16px 16px 0;
}

/* ═══════════ گلس‌مورفیسم ═══════════ */
.glass {
    background: linear-gradient(150deg, var(--glass-shine), transparent 40%), var(--glass-bg);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

/* ═══════════ هیرو ═══════════ */
.hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    animation: fadeUp 0.7s ease both;
}

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

.hero-placeholder {
    background:
        radial-gradient(400px 260px at 75% 20%, rgba(142, 182, 155, 0.35), transparent 65%),
        linear-gradient(140deg, var(--c-mid), var(--c-dark));
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(14, 38, 34, 0.92) 8%, rgba(14, 38, 34, 0.35) 55%, rgba(14, 38, 34, 0.12));
}

.hero-content {
    position: relative;
    padding: 28px 24px;
    width: 100%;
}

.hero h1 {
    font-size: clamp(26px, 6.5vw, 36px);
    font-weight: 800;
    line-height: 1.35;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}

/* ═══════════ دسته‌بندی‌ها ═══════════ */
.cats {
    margin: 18px -16px 6px;
    padding: 4px 16px;
    animation: fadeUp 0.7s 0.12s ease both;
}

.cats-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 2px 14px;
    scrollbar-width: none;
}
.cats-track::-webkit-scrollbar { display: none; }

.cat-chip {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 84px;
    padding: 12px 10px;
    border-radius: var(--radius-md);
    background: var(--glass-bg-soft);
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--c-text);
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.cat-chip:hover { transform: translateY(-3px); }
.cat-chip.active {
    background: linear-gradient(150deg, rgba(142, 182, 155, 0.35), rgba(142, 182, 155, 0.12));
    border-color: rgba(142, 182, 155, 0.55);
}

.cat-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(218, 241, 222, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.cat-icon img { width: 100%; height: 100%; object-fit: cover; }
.cat-emoji { font-size: 26px; line-height: 1; }

.cat-name { font-size: 13px; font-weight: 600; white-space: nowrap; }

/* ═══════════ بخش‌های منو ═══════════ */
.menu-section { margin-top: 26px; animation: fadeUp 0.7s ease both; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0 4px;
    margin-bottom: 4px;
}
.section-head h2 { font-size: 20px; font-weight: 800; }
.section-count { font-size: 12px; color: var(--c-text-dim); }

/* ═══════════ کاروسل ═══════════ */
.carousel {
    position: relative;
    margin: 0 -16px;
    padding: 0 6px;
}

.car-viewport {
    /* برش فقط افقی؛ عمودی باز می‌ماند تا هاله و سایه کارت وسط با لبه‌ی صاف بریده نشود */
    overflow: hidden;
    overflow: clip visible;
    direction: ltr; /* محاسبات transform در LTR ساده‌تر و پایدارتر است */
    padding: 34px 0 26px;
}

.car-track {
    display: flex;
    align-items: center;
    will-change: transform;
}

/*
 * مقیاس، شفافیت و ارتفاع هر آیتم بر اساس فاصله‌اش از مرکز، هر فریم در JS
 * محاسبه می‌شود (renderScales) تا بزرگ‌شدن آیتم وسط کاملاً نرم و پیوسته باشد.
 */
.car-item {
    flex: 0 0 33.333%;
    padding: 0 7px;
    direction: rtl;
    will-change: transform, opacity;
}

.car-item .product-card {
    box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.5);
}

.car-item.is-center .product-card {
    border-color: rgba(142, 182, 155, 0.55);
    box-shadow:
        0 16px 32px -16px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(142, 182, 155, 0.14),
        0 0 26px -4px rgba(142, 182, 155, 0.32);
}

.car-item.is-center .product-price {
    background: rgba(142, 182, 155, 0.22);
    border-color: rgba(142, 182, 155, 0.45);
    box-shadow: 0 6px 18px -8px rgba(142, 182, 155, 0.5);
}

.product-card {
    border-radius: var(--radius-md);
    padding: 12px 12px 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.product-img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 10px;
    background: rgba(218, 241, 222, 0.07);
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.car-item.is-center .product-img img { transform: scale(1.06); }

.product-img-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    opacity: 0.75;
}

.product-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
}

.product-desc {
    font-size: 11px;
    line-height: 1.7;
    color: var(--c-text-dim);
    margin-bottom: 8px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 13px;
    font-weight: 800;
    color: var(--c-sage);
    background: rgba(142, 182, 155, 0.12);
    border: 1px solid rgba(142, 182, 155, 0.25);
    border-radius: 999px;
    padding: 6px 12px;
    display: inline-block;
    margin: 0 auto;
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* فلش‌های کاروسل */
.car-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(22, 56, 50, 0.75);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--c-mint);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}
.car-arrow:hover { background: var(--c-mid); transform: translateY(-50%) scale(1.08); }
.car-prev { right: 10px; }
.car-next { left: 10px; }

/* ═══════════ درباره ═══════════ */
.about {
    margin-top: 34px;
    border-radius: var(--radius-lg);
    padding: 24px 22px;
}
.about h2 { font-size: 18px; font-weight: 800; margin-bottom: 10px; color: var(--c-mint); }
.about p { font-size: 13.5px; line-height: 2.1; color: var(--c-text-dim); }
.about strong { color: var(--c-sage); font-weight: 700; }

.about-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}
.about-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--c-mint);
}
.about-meta svg { color: var(--c-sage); flex: 0 0 auto; }
.about-meta a { color: inherit; text-decoration: none; }

.footer-space { height: 110px; }

/* ═══════════ منوی پایین ═══════════ */
.footer-nav {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    width: min(540px, calc(100% - 24px));
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 8px;
    border-radius: 26px;
    background: linear-gradient(150deg, var(--glass-shine), transparent 40%), rgba(22, 56, 50, 0.82);
}

.footer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: var(--c-text-dim);
    font-size: 10.5px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 16px;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.footer-item:hover { transform: translateY(-2px); }
.footer-item.active,
.footer-item:hover {
    color: var(--c-mint);
    background: rgba(142, 182, 155, 0.16);
}
.footer-item.active .footer-icon { color: var(--c-sage); }

/* ═══════════ انیمیشن‌ها ═══════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}

/* دسکتاپ: صفحه کمی عریض‌تر */
@media (min-width: 720px) {
    .page { max-width: 640px; }
    .hero { min-height: 380px; }
}
