﻿/* ==================== رنگ‌ها و تنظیمات عمومی ==================== */
:root {
    --page: #f8f5ef;
    --paper: #fffdf8;
    --brown: #af743e;
    --brown-dark: #51331e;
    --text: #2e2118;
    --muted: #806c59;
    --line: #dccbb8;
    --accent-start: #ffe25a;
    --accent-end: #ff9649;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: var(--text);
    color-scheme: light;
    background: var(--page);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page) url('../assetsEx/backEx01.jpg') center top / 736px auto repeat;
}

button,
input,
select {
    font: inherit;
}

button,
a,
input,
select {
    -webkit-tap-highlight-color: transparent;
    outline-offset: 5px;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

:focus-visible {
    outline: 3px solid var(--brown-dark);
}

[hidden] {
    display: none !important;
}

.icon-definitions {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.page-shell {
    width: min(900px, calc(100% - 48px));
    margin-inline: auto;
}

/* ==================== سربرگ ==================== */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 25px;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--brown-dark);
    font-size: 29px;
    font-weight: 900;
    line-height: 1.4;
}

.brand-mark,
.landing-mark {
    display: grid;
    place-items: center;
    border: 1px solid var(--brown);
    border-radius: 50%;
    color: var(--brown);
}

.brand-mark {
    width: 48px;
    height: 48px;
    font-size: 32px;
}

.brand small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 400;
}

.text-button {
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--paper);
    color: var(--muted);
    font-size: 11px;
}

/* ==================== دسته‌های دایره‌ای ==================== */
.category-area {
    padding-block: 42px 22px;
}

.category-nav {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 2vw, 28px);
    overflow-x: auto;
    padding: 12px 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--brown) transparent;
}

.category-button {
    flex: 0 0 auto;
    width: clamp(104px, 14vw, 145px);
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--brown-dark);
    text-align: center;
}

.category-ring {
    display: block;
    padding: 8px;
    border-radius: 50%;
    background: transparent;
    transition: transform 180ms ease;
}

.category-disc {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--brown);
    color: #fffdf8;
}

.category-disc svg {
    width: 65%;
    height: 65%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.category-button.is-active .category-ring {
    background: linear-gradient(110deg, var(--accent-start), var(--accent-end));
    transform: scale(1.06);
}

.category-button:hover .category-disc {
    background: #9b602f;
}

.category-name {
    display: block;
    margin-top: 11px;
    font-size: 14px;
    font-weight: 700;
}

/* ==================== عنوان، جست‌وجو و کارت محصولات ==================== */
.menu-section {
    padding-block: 14px 40px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 12px;
}

.section-heading h1 {
    margin: 0;
    color: var(--brown-dark);
    font-size: 29px;
    font-weight: 800;
}

.item-count {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--paper);
    color: var(--muted);
    font-size: 11px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    padding-inline: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fffdf8e6;
    color: var(--muted);
}

.search-box:focus-within {
    border-color: var(--brown);
}

.search-box input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding-block: 10px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 12px;
}

.search-box input:focus-visible {
    outline: 0;
}

.menu-list {
    display: grid;
    gap: 28px;
}

/* تصویر کامل کارت است؛ متن در فضای خالی سمت راست آن قرار می‌گیرد. */
.product-card {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    aspect-ratio: 1672 / 941;
    overflow: hidden;
    border-radius: 42px;
    background: #e0bd94;
    box-shadow: 0 8px 26px #59391708;
}

.product-image {
    position: absolute;
    inset: 0;
    z-index: -1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-content {
    width: 46%;
    padding: 24px 30px 24px 14px;
}

.product-content h2 {
    margin: 0 0 18px;
    color: #24170e;
    font-size: clamp(26px, 4.8vw, 46px);
    font-weight: 900;
    line-height: 1.7;
    text-wrap: balance;
}

.product-price {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 7px 14px;
    border: 1px solid #fff7e28c;
    border-radius: 22px;
    background: #fff9eee8;
    color: var(--brown-dark);
}

.product-price strong {
    font-size: 18px;
    font-weight: 800;
}

.product-price span {
    font-size: 11px;
}

.product-card.is-sold-out .product-image {
    filter: grayscale(.8);
    opacity: .65;
}

.empty-state {
    padding: 50px 18px;
    border: 1px dashed var(--line);
    border-radius: 24px;
    background: var(--paper);
    color: var(--muted);
    text-align: center;
    line-height: 2;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-block: 24px 32px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
}

/* ==================== پنل موجودی محلی ==================== */
.availability-panel {
    width: min(430px, calc(100% - 32px));
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 25px;
    background: var(--paper);
    color: var(--text);
}

.availability-panel::backdrop {
    background: #38271880;
    backdrop-filter: blur(6px);
}

.close-button {
    display: block;
    width: 36px;
    height: 36px;
    margin-inline-start: auto;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--brown-dark);
    font-size: 24px;
}

.availability-panel h2 {
    margin-block: 10px;
    font-size: 23px;
}

.panel-note {
    color: var(--muted);
    font-size: 12px;
    line-height: 2;
}

.availability-panel label {
    display: block;
    margin-block: 20px 8px;
    font-size: 13px;
}

.availability-panel select {
    width: 100%;
    min-height: 46px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--page);
    color: var(--text);
}

.panel-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.panel-actions button {
    flex: 1;
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--brown);
    color: white;
    font-size: 12px;
}

#availabilityMessage {
    min-height: 24px;
    color: var(--brown-dark);
    font-size: 12px;
}

/* ==================== صفحهٔ ورود ==================== */
.landing-page {
    background: #20170f;
}

.landing {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    min-height: 100svh;
    padding: 50px 24px;
    overflow: hidden;
    background: #20170f url('../assetsEx/newpics/capochino.png') center / cover;
}

.landing-video,
.landing-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.landing-video {
    z-index: -2;
    object-fit: cover;
}

.landing-overlay {
    z-index: -1;
    background: linear-gradient(180deg, #160e0b99, #160e0bbf);
}

.landing-content {
    width: min(100%, 680px);
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 14px #0008;
}

.landing-content .eyebrow {
    color: #fff;
}

.landing-mark {
    width: 65px;
    height: 65px;
    margin: 0 auto 24px;
    border-color: #ffefda;
    color: #ffefda;
    font-size: 44px;
}

.landing-content h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(44px, 8vw, 86px);
}

.landing-description {
    margin-block: 16px 28px;
    color: #fff;
    font-size: 14px;
    line-height: 2.3;
}

.landing-button {
    display: inline-flex;
    align-items: center;
    gap: 40px;
    padding: 14px 26px;
    border-radius: 28px;
    background: var(--brown);
    color: white;
    font-size: 14px;
}

.landing-button:hover {
    background: var(--brown-dark);
}

/* ==================== نمایش موبایل ==================== */
@media (max-width: 600px) {
    .page-shell {
        width: calc(100% - 32px);
    }

    .site-header {
        padding-block: 18px;
    }

    .category-area {
        margin-inline: -16px;
        padding-block: 22px 10px;
    }

    .category-nav {
        justify-content: flex-start;
        gap: 8px;
        padding-inline: 16px;
        scroll-snap-type: x proximity;
    }

    .category-button {
        width: 104px;
        scroll-snap-align: center;
    }

    .category-ring {
        padding: 6px;
    }

    .category-name {
        margin-top: 8px;
        font-size: 12px;
    }

    .section-heading h1 {
        font-size: 24px;
    }

    .eyebrow {
        font-size: 11px;
    }

    .menu-list {
        gap: 20px;
    }

    .product-card {
        border-radius: 25px;
    }

    .product-content {
        width: 48%;
        padding: 12px 16px 12px 6px;
    }

    .product-content h2 {
        margin-bottom: 10px;
        font-size: clamp(19px, 5.5vw, 31px);
        line-height: 1.6;
    }

    .product-price {
        gap: 4px;
        padding: 5px 10px;
    }

    .product-price strong {
        font-size: 13px;
    }

    .product-price span {
        font-size: 9px;
    }

    .site-footer {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .landing {
        padding: 36px 20px;
    }

    .landing-content h1 {
        font-size: clamp(42px, 12vw, 68px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .category-ring {
        transition: none;
    }
}
