/* فونت وزیرمتن (مجوز OFL، فایل کنار برنامه؛ بدون CDN). نسخه‌ی متغیر: وزن ۱۰۰ تا ۹۰۰ */
@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-variable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* پوسته‌ی اپلیکیشن — فقط CSS محلی (بدون CDN و فونت بیرونی).
   ساختار: ۱) متغیرها و تم‌ها  ۲) پایه  ۳) اجزا  ۴) انیمیشن‌ها
   تم با data-theme و رنگ اصلی با data-accent روی <html> انتخاب می‌شود (حساب من ← ظاهر برنامه). */

/* ───────── ۱) متغیرها ───────── */
:root {
    --color-bg: #f2f8f4;
    --color-bg-2: #e1f0e6;
    --color-surface: #ffffff;
    --color-text: #17212b;
    --color-muted: #5b6b79;
    --color-primary: #15803d;
    --color-primary-strong: #116a32;
    --color-primary-soft: #dcfce7;
    --color-primary-contrast: #ffffff;
    --color-border: #d3e3d8;
    --color-danger: #b42323;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-btn: 999px; /* شکل دکمه‌ی تم «داروخانه‌ی سبز» برای همه‌ی تم‌ها */
    --shadow: 0 1px 2px rgba(16, 36, 52, 0.06), 0 6px 18px rgba(16, 36, 52, 0.07);
    --shadow-lift: 0 2px 4px rgba(16, 36, 52, 0.08), 0 12px 28px rgba(16, 36, 52, 0.14);
    --page-bg: var(--color-bg);
    --space: 16px;
    --bar-height: 56px;
    --tab-height: 62px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --font: "Vazirmatn", Tahoma, "Segoe UI", system-ui, -apple-system, "Noto Sans Arabic", sans-serif;
    --ease: cubic-bezier(0.22, 0.8, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* تم «داروخانه‌ی سبز»: سطح‌های مات، دکمه‌ی کپسولی سبز تیره، پس‌زمینه‌ی خاکستری گرم */
html[data-theme="olive"] {
    --color-bg: #eff1ed;
    --color-bg-2: #e3e8e0;
    --color-primary: #2e6b3f;
    --color-primary-strong: #234f30;
    --color-primary-soft: #e2eedf;
    --color-border: #d8ddd3;
    --radius: 18px;
    --radius-lg: 24px;
    --shadow: 0 1px 2px rgba(30, 48, 28, 0.06), 0 8px 20px rgba(30, 48, 28, 0.07);
    --shadow-lift: 0 2px 4px rgba(30, 48, 28, 0.08), 0 14px 30px rgba(30, 48, 28, 0.15);
}

/* تم «نعنایی»: گرادیان روشن فیروزه‌ای، کارت‌های سفید و گرد */
html[data-theme="mint"] {
    --color-bg: #eafaf7;
    --color-bg-2: #d6f3ee;
    --color-primary: #14a39a;
    --color-primary-strong: #0d7f78;
    --color-primary-soft: #dcf6f2;
    --color-border: #cdeae5;
    --color-muted: #52706d;
    --radius: 20px;
    --radius-lg: 28px;
    --page-bg: linear-gradient(180deg, #d4f5ef 0%, #eafaf7 38%, #f4fcfb 100%);
    --shadow: 0 1px 2px rgba(10, 90, 84, 0.06), 0 8px 22px rgba(10, 90, 84, 0.09);
    --shadow-lift: 0 2px 4px rgba(10, 90, 84, 0.08), 0 14px 30px rgba(10, 90, 84, 0.16);
}

/* رنگ اصلی انتخابی (روی رنگ تم می‌نشیند) */

/* رنگ اصلی انتخابی: رنگ دکمه‌ها و پس‌زمینه‌ی صفحه هر دو از آن می‌آیند */
html[data-accent="teal"] { --color-primary: #0e9aa7; --color-primary-strong: #0a7983; --color-primary-soft: #dcf3f5; --color-bg: #eaf7f8; --color-bg-2: #d4eef1; --color-border: #cfe6e9; --page-bg: linear-gradient(180deg, #d4eef1 0%, #eaf7f8 40%); }
html[data-accent="green"] { --color-primary: #2e8b57; --color-primary-strong: #226c43; --color-primary-soft: #e0f2e8; --color-bg: #edf6ef; --color-bg-2: #d9ecde; --color-border: #d3e4d7; --page-bg: linear-gradient(180deg, #d9ecde 0%, #edf6ef 40%); }
html[data-accent="blue"] { --color-primary: #2563eb; --color-primary-strong: #1c4dbd; --color-primary-soft: #e1eafd; --color-bg: #eef3fd; --color-bg-2: #dbe6fb; --color-border: #d3def3; --page-bg: linear-gradient(180deg, #dbe6fb 0%, #eef3fd 40%); }
html[data-accent="purple"] { --color-primary: #7c3aed; --color-primary-strong: #6128c0; --color-primary-soft: #ece3fd; --color-bg: #f3effd; --color-bg-2: #e4daf9; --color-border: #ddd4f0; --page-bg: linear-gradient(180deg, #e4daf9 0%, #f3effd 40%); }
html[data-accent="orange"] { --color-primary: #c2540c; --color-primary-strong: #9a4309; --color-primary-soft: #fbe9dc; --color-bg: #fdf3ec; --color-bg-2: #fbe3d2; --color-border: #f1dccd; --page-bg: linear-gradient(180deg, #fbe3d2 0%, #fdf3ec 40%); }
html[data-accent="rose"] { --color-primary: #c2185b; --color-primary-strong: #98124a; --color-primary-soft: #fbe0ec; --color-bg: #fdeff5; --color-bg-2: #fadbe8; --color-border: #f1d3e0; --page-bg: linear-gradient(180deg, #fadbe8 0%, #fdeff5 40%); }

@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #0f171d;
        --color-bg-2: #16222a;
        --color-surface: #18232b;
        --color-text: #e8eef2;
        --color-muted: #9fb0bd;
        --color-primary: #4cc47a;
        --color-primary-strong: #86e0a6;
        --color-primary-soft: #153322;
        --color-primary-contrast: #07161c;
        --color-border: #2a3a45;
        --color-danger: #ff8a8a;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.35);
        --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.5), 0 12px 28px rgba(0, 0, 0, 0.5);
        --page-bg: var(--color-bg);
    }
    html[data-theme="olive"] { --color-bg: #12170f; --color-bg-2: #1a2216; --color-primary: #6fb583; --color-primary-strong: #93cca3; --color-primary-soft: #1d2b1f; --color-border: #2c3a2c; --color-surface: #1a2217; }
    html[data-theme="mint"] { --color-bg: #0c1a19; --color-bg-2: #12282a; --color-primary: #3fd0c4; --color-primary-strong: #7fe3da; --color-primary-soft: #11302f; --color-border: #234443; --color-surface: #132423; --page-bg: linear-gradient(180deg, #0f2a2a 0%, #0c1a19 45%); }
    html[data-accent="teal"] { --color-primary: #38c4d2; --color-primary-strong: #7edbe4; --color-primary-soft: #12303a; --color-bg: #0d1b1e; --color-bg-2: #12282c; --color-border: #234247; --color-surface: #132428; --page-bg: linear-gradient(180deg, #12282c 0%, #0d1b1e 45%); }
    html[data-accent="green"] { --color-primary: #55c585; --color-primary-strong: #8ad9ac; --color-primary-soft: #15301f; --color-bg: #0e1a12; --color-bg-2: #15281b; --color-border: #25402e; --color-surface: #14231a; --page-bg: linear-gradient(180deg, #15281b 0%, #0e1a12 45%); }
    html[data-accent="blue"] { --color-primary: #6b9bff; --color-primary-strong: #9dbbff; --color-primary-soft: #172444; --color-bg: #0e1424; --color-bg-2: #141e38; --color-border: #263558; --color-surface: #151d33; --page-bg: linear-gradient(180deg, #141e38 0%, #0e1424 45%); }
    html[data-accent="purple"] { --color-primary: #a78bfa; --color-primary-strong: #c4b2fc; --color-primary-soft: #261a44; --color-bg: #150f24; --color-bg-2: #1e1636; --color-border: #382b5c; --color-surface: #1b1430; --page-bg: linear-gradient(180deg, #1e1636 0%, #150f24 45%); }
    html[data-accent="orange"] { --color-primary: #fb923c; --color-primary-strong: #fdba74; --color-primary-soft: #3a2310; --color-bg: #1c120a; --color-bg-2: #2a1a0e; --color-border: #4d3320; --color-surface: #241810; --page-bg: linear-gradient(180deg, #2a1a0e 0%, #1c120a 45%); }
    html[data-accent="rose"] { --color-primary: #f472b6; --color-primary-strong: #f9a8d0; --color-primary-soft: #3a1527; --color-bg: #1c0e15; --color-bg-2: #2a1420; --color-border: #4d2538; --color-surface: #241119; --page-bg: linear-gradient(180deg, #2a1420 0%, #1c0e15 45%); }
}

/* ───────── ۲) پایه ───────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    background: var(--color-bg);
}

body {
    margin: 0;
    background: var(--page-bg);
    background-attachment: fixed;
    color: var(--color-text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: contain;
}

a {
    color: var(--color-primary);
}

.icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

.icon--sm { width: 18px; height: 18px; }
.icon--lg { width: 30px; height: 30px; }
.icon--xl { width: 40px; height: 40px; }
.icon--inline { width: 20px; height: 20px; vertical-align: -4px; margin-inline-end: 4px; }

.app {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.app-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: var(--safe-top) var(--space) 0;
    height: calc(var(--bar-height) + var(--safe-top));
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 6px 16px rgba(16, 36, 52, 0.05);
}

.app-bar__logo {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--color-primary);
    color: var(--color-primary-contrast);
}

.app-bar__logo .icon {
    width: 20px;
    height: 20px;
}

.app-bar__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.app-main {
    flex: 1;
    padding: var(--space);
    padding-bottom: calc(var(--tab-height) + var(--safe-bottom) + var(--space) + 8px);
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
}

/* ───────── ۳) اجزا ───────── */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space);
    margin-bottom: 12px;
}

.card--raised {
    border-color: transparent;
    box-shadow: var(--shadow);
    border-radius: var(--radius-lg);
}

.card--center { text-align: center; }

.card__title {
    margin: 0 0 8px;
    font-size: 17px;
}

.card__text {
    margin: 0;
    color: var(--color-muted);
}

.card__code {
    margin: 0;
    font-size: 40px;
    font-weight: 700;
    color: var(--color-primary);
}

/* بالای صفحه‌های ورود */
.hero {
    text-align: center;
    padding: 28px 8px 18px;
}

.hero__mark {
    display: inline-grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin-bottom: 12px;
    border-radius: 24px;
    background: linear-gradient(145deg, var(--color-primary), var(--color-primary-strong));
    color: var(--color-primary-contrast);
    box-shadow: var(--shadow-lift);
}

.hero__title {
    margin: 0 0 4px;
    font-size: 22px;
}

.hero__text {
    margin: 0;
    color: var(--color-muted);
    font-size: 14px;
}

/* دکمه‌ها */
.button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    margin-top: var(--space);
    padding: 0 22px;
    border: 0;
    border-radius: var(--radius-btn);
    background: linear-gradient(180deg, var(--color-primary), var(--color-primary-strong));
    color: var(--color-primary-contrast);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), filter 0.18s var(--ease);
}

.button::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
    transform: translateX(120%);
}

.button:hover { filter: brightness(1.05); }

.button:hover::after {
    transform: translateX(-120%);
    transition: transform 0.7s var(--ease);
}

.button:active {
    transform: scale(0.97);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.button:focus-visible,
.tab-bar__item:focus-visible,
.back-button:focus-visible,
.stepper__btn:focus-visible {
    outline: 3px solid var(--color-primary-soft);
    outline-offset: 2px;
}

.button--block { width: 100%; }

.button--secondary {
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
    box-shadow: none;
}

.button--secondary::after { display: none; }

/* فرم‌ها */
.form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: var(--space);
}

.form__label {
    font-size: 14px;
    font-weight: 700;
    margin-top: 8px;
}

.form__input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1.5px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-bg);
    color: var(--color-text);
    font: inherit;
    font-size: 16px; /* زیر ۱۶px مرورگر iOS هنگام فوکوس زوم می‌کند */
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.form__input--lg {
    min-height: 56px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 1px;
}

.form__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-soft);
}

.form__hint {
    margin-top: var(--space);
    font-size: 14px;
}

.form__hint a { color: var(--color-primary); }

.alert {
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    animation: slide-down 0.35s var(--ease) both;
}

.alert--error {
    background: #fdecec;
    color: #8a1f1f;
    border: 1px solid #f3c2c2;
}

.alert--success {
    background: #e8f5ec;
    color: #1e6b36;
    border: 1px solid #bfe0c9;
}

@media (prefers-color-scheme: dark) {
    .alert--error { background: #3a1b1b; color: #f5b5b5; border-color: #6b2b2b; }
    .alert--success { background: #17301f; color: #a9dcb8; border-color: #2d5a3b; }
}

/* فروشگاه */
.section-title {
    margin: 20px 0 10px;
    font-size: 16px;
}

/* مسیر + دکمه‌ی بازگشت بالای صفحه */
.crumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 14px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 14px 0 12px;
    border-radius: 999px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}

.back-button:active { transform: scale(0.95); }

.crumb__path {
    color: var(--color-muted);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crumb__path::before {
    content: "/ ";
}

.search {
    display: flex;
    gap: 8px;
    margin-bottom: var(--space);
}

.search__input {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    padding: 0 16px;
    border: 1.5px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-size: 16px;
    box-shadow: var(--shadow);
}

.search__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-soft);
}

.search__button {
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-primary-contrast);
    font: inherit;
    font-weight: 700;
    transition: transform 0.18s var(--ease);
}

.search__button:active { transform: scale(0.95); }

.tiles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.tile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 92px;
    padding: 14px;
    text-align: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--color-text);
    text-decoration: none;
    font-weight: 700;
    overflow: hidden;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.tile::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-strong));
}

.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.tile:active { transform: scale(0.97); }

.result-count {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--color-muted);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    color: var(--color-text);
    text-decoration: none;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.product-card:active { transform: scale(0.98); }

.product-card__image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fff;
}

.product-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
}

.product-card__title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.product-card__meta,
.product__meta {
    font-size: 12px;
    color: var(--color-muted);
}

.price {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary);
}

.price__cash {
    font-weight: 400;
    color: var(--color-muted);
}

.price--old {
    font-weight: 400;
    color: var(--color-muted);
}

.price--muted { color: var(--color-muted); }

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0 0;
}

.badge {
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    font-size: 11px;
    font-weight: 400;
    color: var(--color-muted);
}

.badge--offer { background: #fdecec; border-color: #f3c2c2; color: #8a1f1f; }
.badge--cash { background: #e8f5ec; border-color: #bfe0c9; color: #1e6b36; }

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: var(--space) 0;
    font-size: 14px;
}

.pager__link {
    padding: 8px 14px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-primary);
    text-decoration: none;
}

.pager__link.is-disabled { color: var(--color-muted); opacity: 0.5; }
.pager__info { color: var(--color-muted); }

.product {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: var(--space);
}

.gallery {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-bottom: var(--space);
}

.gallery::-webkit-scrollbar { display: none; }

.gallery__image {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    scroll-snap-align: center;
    background: #fff;
    border-radius: 14px;
}

.product__title {
    margin: 0 0 4px;
    font-size: 18px;
    line-height: 1.5;
}

.notice {
    margin: var(--space) 0 0;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--color-primary-soft);
    border: 1px solid var(--color-border);
    font-size: 14px;
}

.product__description {
    font-size: 14px;
    color: var(--color-muted);
}

/* انتخاب بسته‌ها با + و − */
.add-to-cart {
    margin-top: var(--space);
    padding-top: var(--space);
    border-top: 1px solid var(--color-border);
}

.packs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pack {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.pack.is-selected {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
}

.pack__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pack__size { font-weight: 700; }
.pack__price { font-size: 14px; }
.pack__price small,
.pack__stock { display: block; color: var(--color-muted); font-size: 12px; }

.stepper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    direction: ltr; /* + سمت راست، − سمت چپ، مثل اپلیکیشن‌های رایج */
}

.stepper__btn {
    display: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-primary-contrast);
    cursor: pointer;
    transition: transform 0.15s var(--ease-spring), opacity 0.15s var(--ease);
}

.js .stepper__btn { display: grid; }
.stepper__btn:active { transform: scale(0.88); }
.stepper__btn:disabled { opacity: 0.35; cursor: default; transform: none; }

.stepper__input {
    width: 52px;
    height: 40px;
    border: 1.5px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
}

.stepper__input::-webkit-outer-spin-button,
.stepper__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* جمع‌بندی زنده */
.summary {
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--color-primary-soft);
    border: 1px dashed var(--color-primary);
    animation: slide-down 0.3s var(--ease) both;
}

.summary[hidden] { display: none; }
.summary__title { margin: 0 0 4px; font-size: 13px; color: var(--color-muted); }
.summary__lines { margin: 0 0 6px; padding: 0 18px 0 0; font-weight: 700; }
.summary__total { margin: 0; font-size: 15px; }
.summary__total strong { display: inline-block; color: var(--color-primary-strong); font-size: 18px; }
.summary__total strong.is-bump { animation: bump 0.35s var(--ease-spring); }

.choice {
    margin: 0;
    padding: 0;
    border: 0;
}

.choice__option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
}

.choice__option input { accent-color: var(--color-primary); width: 18px; height: 18px; }

/* سبد خرید */
.cart-lines {
    list-style: none;
    margin: 0 0 var(--space);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-line {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.cart-line--problem { border-color: #f3c2c2; }

.cart-line__image {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
}

.cart-line__body { flex: 1; min-width: 0; }

.cart-line__title {
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
}

.cart-line__meta {
    margin: 2px 0 6px;
    font-size: 13px;
    color: var(--color-muted);
}

.cart-line__total { margin: 4px 0; font-size: 14px; }

.pay-toggle {
    display: flex;
    gap: 6px;
    margin: 8px 0;
}

.pay-toggle__option {
    flex: 1;
    min-height: 40px;
    padding: 0 8px;
    border: 1.5px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-size: 13px;
    transition: transform 0.15s var(--ease);
}

.pay-toggle__option:active { transform: scale(0.96); }

.pay-toggle__option.is-active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-primary-contrast);
    font-weight: 700;
}

.link-button {
    padding: 8px 0;
    border: 0;
    background: none;
    color: var(--color-danger);
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
}

.order-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--color-text);
    text-decoration: none;
    transition: transform 0.2s var(--ease);
}

.order-card:active { transform: scale(0.98); }
.order-card__head { display: flex; justify-content: space-between; }
.order-card__meta { font-size: 13px; color: var(--color-muted); }
.order-card__total { font-weight: 700; color: var(--color-primary); }

.form__textarea {
    min-height: 90px;
    padding: 10px 14px;
    resize: vertical;
}

.summary-lines { list-style: none; margin: 0 0 12px; padding: 0; }

.summary-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
}

.summary-line__meta { grid-column: 1; font-size: 12px; color: var(--color-muted); }

.summary-line__price {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-weight: 700;
}

.cart-summary__row {
    display: flex;
    justify-content: space-between;
    margin: 0 0 8px;
}

.cart-summary__row--total {
    font-size: 17px;
    font-weight: 700;
    padding-top: 8px;
    border-top: 1px solid var(--color-border);
}

/* حساب من */
.profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar {
    display: grid;
    place-items: center;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary-strong);
}

.profile .card__title { margin: 0; }

.menu {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

.menu__item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--color-text);
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.18s var(--ease);
}

.menu__item:active { transform: scale(0.98); }
.menu__item .icon { color: var(--color-primary); }

.swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.swatches--themes { gap: 10px; }

.swatch,
.theme-option { position: relative; cursor: pointer; }

.swatch input,
.theme-option input {
    position: absolute;
    opacity: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 64px;
    font-size: 11px;
    color: var(--color-muted);
    text-align: center;
}

.swatch__dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid var(--color-surface);
    box-shadow: 0 0 0 1.5px var(--color-border);
    background: var(--color-primary);
    transition: transform 0.2s var(--ease-spring), box-shadow 0.2s var(--ease);
}

.swatch__dot--default { background: conic-gradient(#0b6e8a, #2e6b3f, #14a39a, #0b6e8a); }
.swatch__dot--teal { background: #0e9aa7; }
.swatch__dot--green { background: #2e8b57; }
.swatch__dot--blue { background: #2563eb; }
.swatch__dot--purple { background: #7c3aed; }
.swatch__dot--orange { background: #c2540c; }
.swatch__dot--rose { background: #c2185b; }

.swatch input:checked + .swatch__dot {
    transform: scale(1.12);
    box-shadow: 0 0 0 2.5px var(--color-text);
}

.swatch input:focus-visible + .swatch__dot,
.theme-option input:focus-visible + .theme-option__card {
    outline: 3px solid var(--color-primary-soft);
    outline-offset: 2px;
}

.theme-option { flex: 1 1 28%; min-width: 96px; }

.theme-option__card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.theme-option input:checked + .theme-option__card {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.theme-option__preview {
    display: flex;
    gap: 4px;
    height: 34px;
    padding: 6px;
    border-radius: 10px;
}

.theme-option__preview i {
    flex: 1;
    border-radius: 6px;
    background: #fff;
}

.theme-option__preview i:first-child { background: var(--preview-primary); }

.theme-option__card--classic { --preview-primary: #0b6e8a; }
.theme-option__card--classic .theme-option__preview { background: #f4f7f9; }
.theme-option__card--olive { --preview-primary: #2e6b3f; }
.theme-option__card--olive .theme-option__preview { background: #eff1ed; }
.theme-option__card--olive .theme-option__preview i { border-radius: 999px; }
.theme-option__card--mint { --preview-primary: #14a39a; }
.theme-option__card--mint .theme-option__preview { background: linear-gradient(180deg, #d4f5ef, #f4fcfb); }

.theme-option__name { font-size: 12px; font-weight: 700; text-align: center; }

/* نوار پایین */
.tab-bar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    height: calc(var(--tab-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -6px 18px rgba(16, 36, 52, 0.06);
}

.tab-bar__item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    color: var(--color-muted);
    text-decoration: none;
    font-size: 11px;
    cursor: pointer;
    list-style: none;
    transition: color 0.2s var(--ease);
}

.tab-bar__item::-webkit-details-marker { display: none; }

.tab-bar__item .icon { transition: transform 0.25s var(--ease-spring); }
.tab-bar__item:active .icon { transform: scale(0.82); }

.tab-bar__item.is-active {
    color: var(--color-primary);
    font-weight: 700;
}

.tab-bar__item.is-active .icon { transform: translateY(-2px); }

.tab-bar__item.is-active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 28px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: var(--color-primary);
    animation: grow-x 0.3s var(--ease) both;
}

.tab-bar__icon { position: relative; display: inline-flex; }

.tab-bar__badge {
    position: absolute;
    top: -6px;
    inset-inline-end: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--color-danger);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    animation: pop 0.45s var(--ease-spring) both;
}

/* تماس با فروشگاه */
.tab-contact { flex: 1; display: flex; }
.tab-contact > summary { flex: 1; }
.tab-contact[open] > summary { color: var(--color-primary); }

.sheet__backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(8, 20, 28, 0.45);
    animation: fade-in 0.25s var(--ease) both;
}

.sheet {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 31;
    max-width: 720px;
    margin: 0 auto;
    padding: 18px var(--space) calc(var(--space) + var(--safe-bottom));
    background: var(--color-surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.22);
    animation: sheet-up 0.35s var(--ease) both;
}

.sheet::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    margin: -8px auto 12px;
    border-radius: 2px;
    background: var(--color-border);
}

.sheet__title {
    margin: 0 0 10px;
    font-weight: 700;
    text-align: center;
}

.sheet__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sheet__item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 16px;
    border-radius: var(--radius);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s var(--ease);
}

.sheet__item:active { transform: scale(0.97); }
.sheet__item .icon { color: var(--color-primary); }
.sheet__item--phone { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-primary-contrast); }
.sheet__item--phone .icon { color: inherit; }

.sheet__list li:nth-child(1) .sheet__item { animation: fade-up 0.4s 0.05s var(--ease) both; }
.sheet__list li:nth-child(2) .sheet__item { animation: fade-up 0.4s 0.1s var(--ease) both; }
.sheet__list li:nth-child(3) .sheet__item { animation: fade-up 0.4s 0.15s var(--ease) both; }
.sheet__list li:nth-child(4) .sheet__item { animation: fade-up 0.4s 0.2s var(--ease) both; }
.sheet__list li:nth-child(5) .sheet__item { animation: fade-up 0.4s 0.25s var(--ease) both; }

/* ───────── ۴) انیمیشن‌ها ───────── */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}

@keyframes sheet-up {
    from { transform: translateY(100%); }
    to { transform: none; }
}

@keyframes pop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

@keyframes bump {
    0% { transform: scale(1); }
    40% { transform: scale(1.22); }
    100% { transform: scale(1); }
}

@keyframes grow-x {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* ورود نرم محتوای هر صفحه، با تأخیر پلکانی برای فهرست‌ها */
.app-main > * { animation: fade-up 0.45s var(--ease) both; }
.app-main > *:nth-child(2) { animation-delay: 0.05s; }
.app-main > *:nth-child(3) { animation-delay: 0.1s; }
.app-main > *:nth-child(4) { animation-delay: 0.15s; }

.tiles li,
.product-grid > *,
.pack,
.order-list li,
.cart-lines li,
.menu li { animation: fade-up 0.45s var(--ease) both; }

.tiles li:nth-child(1), .product-grid > *:nth-child(1), .pack:nth-child(1), .order-list li:nth-child(1), .cart-lines li:nth-child(1) { animation-delay: 0.04s; }
.tiles li:nth-child(2), .product-grid > *:nth-child(2), .pack:nth-child(2), .order-list li:nth-child(2), .cart-lines li:nth-child(2) { animation-delay: 0.08s; }
.tiles li:nth-child(3), .product-grid > *:nth-child(3), .pack:nth-child(3), .order-list li:nth-child(3), .cart-lines li:nth-child(3) { animation-delay: 0.12s; }
.tiles li:nth-child(4), .product-grid > *:nth-child(4), .pack:nth-child(4), .order-list li:nth-child(4), .cart-lines li:nth-child(4) { animation-delay: 0.16s; }
.tiles li:nth-child(5), .product-grid > *:nth-child(5), .pack:nth-child(5), .order-list li:nth-child(5) { animation-delay: 0.2s; }
.tiles li:nth-child(6), .product-grid > *:nth-child(6), .pack:nth-child(6), .order-list li:nth-child(6) { animation-delay: 0.24s; }
.tiles li:nth-child(n+7), .product-grid > *:nth-child(n+7), .pack:nth-child(n+7), .order-list li:nth-child(n+7) { animation-delay: 0.28s; }

.hero__mark { animation: pop 0.6s var(--ease-spring) both; }

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

/* قیمت نقدی (آفردار): ضخیم و سبز */
.price .price__cash,
.pack__price small.pack__cash {
    font-weight: 700;
    color: #1e7a3c;
}

@media (prefers-color-scheme: dark) {
    .price .price__cash,
    .pack__price small.pack__cash { color: #6fcf8f; }
}

/* کاشی دسته‌ها با آیکن */
.tile {
    flex-direction: column;
    gap: 8px;
}

.tile__icon {
    display: block;
    width: 96px;
    height: 96px;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.tile__title {
    font-size: 14px;
    line-height: 1.5;
}

/* دکمه‌ی «تماس» متفاوت از تب‌های دیگر: کپسول رنگی با حاشیه */
.tab-contact {
    align-items: center;
    justify-content: center;
}

.tab-contact > summary.tab-bar__item {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 6px;
    min-height: 40px;
    margin: 0 6px;
    padding: 0 14px;
    border: 2px solid var(--color-primary);
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-primary-contrast);
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    transition: transform 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease);
}

.tab-contact > summary.tab-bar__item .icon { width: 18px; height: 18px; }
.tab-contact > summary.tab-bar__item:active { transform: scale(0.95); }

.tab-contact[open] > summary.tab-bar__item {
    background: var(--color-surface);
    color: var(--color-primary);
}

/* ───────── نسخه‌ی حرفه‌ای‌تر (بر اساس راهنمای طراحی: تخت، کنتراست بالا، هدف لمسی ≥۴۴px) ───────── */
body {
    line-height: 1.8;
    font-variant-numeric: tabular-nums;
}

/* دکمه‌ی اصلی تخت و خوانا؛ بدون براق‌بودن تزیینی */
.button {
    min-height: 52px;
    background: var(--color-primary);
    box-shadow: none;
    font-size: 16px;
}

.button::after { display: none; }
.button:hover { filter: brightness(0.95); }
.button:active { transform: scale(0.98); }

a:focus-visible,
.form__input:focus-visible,
.search__input:focus-visible,
.tile:focus-visible,
.product-card:focus-visible,
.menu__item:focus-visible,
.sheet__item:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* هدف لمسی بزرگ‌تر */
.stepper__btn { width: 44px; height: 44px; }
.stepper__input { width: 56px; height: 44px; font-size: 16px; }
.search__input, .search__button { min-height: 52px; }
.back-button { min-height: 44px; }
.pay-toggle__option { min-height: 44px; }

/* کارت‌ها: لبه‌ی مشخص به‌جای سایه‌ی سنگین */
.card, .product-card, .tile, .cart-line, .order-card, .menu__item, .product {
    box-shadow: none;
    border: 1px solid var(--color-border);
}

.card--raised { box-shadow: 0 1px 2px rgba(16, 36, 52, 0.06); border: 1px solid var(--color-border); }
.product-card:hover, .tile:hover { box-shadow: 0 6px 16px rgba(16, 36, 52, 0.1); }

/* عنوان کالا در کارت: حداکثر دو خط تا کارت‌ها هم‌قد بمانند */
.product-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3em;
}

.price { font-size: 14px; }

/* دکمه‌ی «افزودن به سبد» روی صفحه‌ی کالا همیشه در دسترس (بالای نوار پایین) */
.add-to-cart > .button {
    position: sticky;
    bottom: calc(var(--tab-height) + var(--safe-bottom) + 10px);
    z-index: 5;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

/* جمع‌بندی بزرگ‌تر و خواناتر */
.summary__total strong { font-size: 20px; }
.pack { padding: 12px; }
.pack__size { font-size: 16px; }

/* ───────── رنگ نقش دکمه‌ها: اصلی سبز، فرعی خنثی، پرداخت آنلاین آبی، خروج/حذف قرمز ───────── */
:root {
    --color-accent: #0369a1;
    --color-accent-strong: #02527f;
    --color-danger-soft: #fdecec;
    --elev-1: 0 1px 2px rgba(16, 36, 52, 0.07), 0 2px 6px rgba(16, 36, 52, 0.05);
    --elev-2: 0 2px 4px rgba(16, 36, 52, 0.08), 0 8px 20px rgba(16, 36, 52, 0.09);
    --elev-3: 0 4px 8px rgba(16, 36, 52, 0.1), 0 16px 36px rgba(16, 36, 52, 0.16);
    --edge-light: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-accent: #5db4ea;
        --color-accent-strong: #8cc9f1;
        --color-danger-soft: #3a1b1b;
        --elev-1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.35);
        --elev-2: 0 2px 4px rgba(0, 0, 0, 0.5), 0 8px 20px rgba(0, 0, 0, 0.45);
        --elev-3: 0 4px 8px rgba(0, 0, 0, 0.55), 0 16px 36px rgba(0, 0, 0, 0.55);
        --edge-light: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }
}

.button--secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1.5px solid var(--color-border);
    box-shadow: var(--elev-1);
}

.button--secondary .icon { color: var(--color-muted); }

.button--accent {
    background: var(--color-accent);
    color: #fff;
    border: 0;
    box-shadow: 0 2px 0 var(--color-accent-strong), var(--elev-2);
}

.button--danger {
    background: var(--color-danger-soft);
    color: var(--color-danger);
    border: 1.5px solid var(--color-danger);
    box-shadow: var(--elev-1);
}

/* ───────── عمق: سایه‌ی لایه‌ای، لبه‌ی روشن بالا، لبه‌ی تیره‌ی پایین ───────── */
.app-bar {
    background: linear-gradient(180deg, var(--color-surface), var(--color-surface));
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--elev-2);
}

.tab-bar {
    box-shadow: 0 -2px 4px rgba(16, 36, 52, 0.05), 0 -10px 24px rgba(16, 36, 52, 0.08);
}

.card,
.menu__item,
.cart-line,
.order-card,
.product {
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface) 70%);
    border: 1px solid var(--color-border);
    border-bottom-width: 2px;
    box-shadow: var(--edge-light), var(--elev-1);
}

.card--raised {
    box-shadow: var(--edge-light), var(--elev-2);
}

.tile,
.product-card {
    border: 1px solid var(--color-border);
    border-bottom-width: 2px;
    box-shadow: var(--edge-light), var(--elev-1);
}

.tile:hover,
.product-card:hover {
    box-shadow: var(--edge-light), var(--elev-3);
}

/* دکمه‌ی اصلی لمسی: لبه‌ی تیره‌ی پایین که هنگام فشار جمع می‌شود (فقط سایه، بدون جابه‌جایی چیدمان) */
.button:not(.button--secondary):not(.button--danger):not(.button--accent) {
    box-shadow: 0 2px 0 var(--color-primary-strong), 0 8px 16px rgba(16, 36, 52, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.button:active,
.button--accent:active {
    box-shadow: 0 0 0 var(--color-primary-strong), 0 2px 4px rgba(16, 36, 52, 0.2);
    transform: translateY(1px) scale(0.99);
}

.add-to-cart > .button { box-shadow: 0 2px 0 var(--color-primary-strong), var(--elev-3); }

/* قاب عکس: حاشیه و فرورفتگی ملایم */
.product-card__image,
.gallery__image,
.cart-line__image {
    border: 1px solid var(--color-border);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), inset 0 -8px 16px rgba(16, 36, 52, 0.04);
}

.tile__icon { box-shadow: var(--elev-2); border: 1px solid var(--color-border); }

/* فیلدها: کمی فرو رفته */
.form__input,
.search__input {
    box-shadow: inset 0 1px 3px rgba(16, 36, 52, 0.08);
}

.search__input { box-shadow: inset 0 1px 3px rgba(16, 36, 52, 0.08), var(--elev-1); }

.pack { box-shadow: var(--edge-light), var(--elev-1); }
.pack.is-selected { box-shadow: 0 0 0 3px var(--color-primary-soft), var(--elev-1); }

.stepper__btn { box-shadow: 0 2px 0 var(--color-primary-strong), var(--elev-1); }
.stepper__btn:active { box-shadow: none; }
.stepper__btn:disabled { box-shadow: none; }

.sheet { box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1), 0 -18px 44px rgba(0, 0, 0, 0.28); }
.sheet__item { box-shadow: var(--edge-light), var(--elev-1); }
.alert { box-shadow: var(--elev-1); }
.back-button { box-shadow: var(--edge-light), var(--elev-1); }
.tab-contact > summary.tab-bar__item { box-shadow: 0 2px 0 var(--color-primary-strong), var(--elev-2); }

/* ───────── پیشنهاد برای شما ───────── */
.section-title__hint {
    margin-inline-start: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--color-primary-soft);
    color: var(--color-primary-strong);
    font-size: 11px;
    font-weight: 700;
}

.suggest { margin-bottom: 8px; }

.suggest__row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 14px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.suggest__row::-webkit-scrollbar { display: none; }

.suggest__row > .product-card {
    flex: 0 0 150px;
    scroll-snap-align: start;
}

/* مقدار تعداد با رقم فارسی (با جاوااسکریپت، فیلد عددی مخفی و این نمایش دیده می‌شود) */
.stepper__value {
    display: none;
    min-width: 56px;
    height: 44px;
    line-height: 44px;
    border: 1.5px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    font-weight: 700;
    text-align: center;
}

.js .stepper__value { display: block; }
.js .stepper__input { display: none; }

/* «این سفارش برای چه کسی ثبت می‌شود» بالای صفحه‌ی ثبت سفارش */
.recipient {
    display: flex;
    align-items: center;
    gap: 12px;
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
}

.recipient__icon {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-primary-contrast);
}

.recipient__label { margin: 0; font-size: 13px; color: var(--color-muted); }
.recipient__name { margin: 0; font-size: 17px; font-weight: 700; }

/* ───────── ردیف سبد خرید منظم ───────── */
.cart-line__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.cart-line__name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    min-width: 0;
}

.cart-line__title { font-size: 15px; line-height: 1.6; }

.cart-line__unit-price { margin: 2px 0 6px; font-size: 13px; }

/* دکمه‌ی سطل زباله‌ی قرمز، سمت چپ و روبروی نام */
.trash-button {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    margin: -4px 0 0;
    border: 1.5px solid var(--color-danger);
    border-radius: 50%;
    background: var(--color-danger-soft);
    color: var(--color-danger);
    cursor: pointer;
    transition: transform 0.15s var(--ease-spring), background 0.15s var(--ease);
}

.trash-button:hover { background: var(--color-danger); color: #fff; }
.trash-button:active { transform: scale(0.88); }
.trash-button:focus-visible { outline: 3px solid var(--color-danger); outline-offset: 2px; }

/* بسته در یک سو، قیمت کل روبروی آن */
.cart-line__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 4px 0 8px;
    padding: 8px 0;
    border-top: 1px dashed var(--color-border);
    border-bottom: 1px dashed var(--color-border);
    font-size: 14px;
}

.cart-line__pack small { display: block; color: var(--color-muted); font-size: 12px; }
.cart-line__total { text-align: left; white-space: nowrap; }
.cart-line__total strong { font-size: 16px; color: var(--color-primary-strong); }

.cart-line__row { flex-wrap: wrap; }
.cart-line__pack { flex: 1 1 45%; min-width: 0; }
.cart-line__total { flex: 0 0 auto; }

.cart-line__row { flex-wrap: nowrap; align-items: center; }
.cart-line__pack { flex: 1 1 auto; }
.cart-line__total { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.5; white-space: nowrap; }
.cart-line__total small { font-size: 12px; color: var(--color-muted); }
.cart-line__total > span { font-size: 13px; }

/* بارگذاری تنبل */
.lazy-sentinel { height: 1px; }
.lazy-status { margin: 12px 0; text-align: center; color: var(--color-muted); font-size: 13px; }

.button:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* ───────── تماس با فروشگاه: دکمه‌ی گرد؛ با باز شدن، آیکن‌های گرد بالای آن ردیف می‌شوند ───────── */
.tab-contact {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-bullet {
    position: relative;
    z-index: 32;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid var(--color-surface);
    background: var(--color-primary);
    color: var(--color-primary-contrast);
    box-shadow: 0 0 0 1.5px var(--color-primary), 0 3px 0 var(--color-primary-strong), var(--elev-2);
    cursor: pointer;
    list-style: none;
    transition: transform 0.2s var(--ease-spring);
}

.contact-bullet::-webkit-details-marker { display: none; }
.contact-bullet:active { transform: scale(0.9); }
.contact-bullet:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 3px; }

.contact-bullet .icon { grid-area: 1 / 1; width: 24px; height: 24px; transition: transform 0.25s var(--ease), opacity 0.2s var(--ease); }
.contact-bullet__close { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.tab-contact[open] .contact-bullet__open { opacity: 0; transform: rotate(90deg) scale(0.6); }
.tab-contact[open] .contact-bullet__close { opacity: 1; transform: none; }

.dial__backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(8, 20, 28, 0.35);
    animation: fade-in 0.2s var(--ease) both;
}

.dial {
    position: absolute;
    bottom: calc(100% + 6px);
    inset-inline: 0;
    z-index: 31;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.dial__item {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-primary);
    box-shadow: var(--elev-2);
    transform-origin: bottom center;
    animation: dial-pop 0.38s var(--ease-spring) both;
}

.dial__item:active { transform: scale(0.9); }
.dial__item:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.dial__item--phone { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-primary-contrast); }

/* نزدیک‌ترین آیکن به دکمه اول ظاهر می‌شود */
.dial li:nth-last-child(1) .dial__item { animation-delay: 0.02s; }
.dial li:nth-last-child(2) .dial__item { animation-delay: 0.06s; }
.dial li:nth-last-child(3) .dial__item { animation-delay: 0.10s; }
.dial li:nth-last-child(4) .dial__item { animation-delay: 0.14s; }
.dial li:nth-last-child(5) .dial__item { animation-delay: 0.18s; }

@keyframes dial-pop {
    from { opacity: 0; transform: translateY(24px) scale(0.4); }
    to { opacity: 1; transform: none; }
}

.tab-contact > summary.contact-bullet { flex: 0 0 52px; width: 52px; }

.tab-contact > summary.contact-bullet,
.tab-contact[open] > summary.contact-bullet { color: var(--color-primary-contrast); }

/* ───────── موبایل: همه‌ی فهرست‌ها تک‌ستونه (کارت افقی: عکس کنار اطلاعات) ───────── */
@media (max-width: 599px) {
    .product-grid,
    .tiles {
        grid-template-columns: 1fr;
    }

    .product-card {
        flex-direction: row;
        align-items: stretch;
    }

    .product-card__image {
        flex: 0 0 116px;
        width: 116px;
        height: auto;
        min-height: 116px;
        aspect-ratio: auto;
        object-fit: contain;
        border-radius: 0;
        border: 0;
        border-inline-end: 1px solid var(--color-border);
    }

    .product-card__body {
        flex: 1;
        min-width: 0;
        justify-content: center;
        padding: 12px;
    }

    .product-card__title { min-height: 0; }

    .tile {
        flex-direction: row;
        justify-content: flex-start;
        gap: 14px;
        min-height: 88px;
        padding: 10px 14px;
        text-align: right;
    }

    .tile__icon { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 16px; }
    .tile__title { font-size: 16px; }
}

/* تبلت و بالاتر: سه ستون برای کالاها */
@media (min-width: 600px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}

/* پورسانت */
.order-card__commission { font-size: 13px; color: #1e7a3c; }
.order-card__commission strong { font-weight: 700; }

.commission { display: flex; align-items: center; gap: 12px; background: var(--color-primary-soft); border-color: var(--color-primary); }
.commission__icon { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; background: var(--color-primary); color: var(--color-primary-contrast); }
.commission__label, .commission__rate { margin: 0; font-size: 13px; color: var(--color-muted); }
.commission__amount { margin: 0; font-size: 18px; }
.commission__amount strong { color: var(--color-primary-strong); }

.link-button--primary { color: var(--color-primary); font-weight: 700; font-size: 14px; }
.form--inline { margin-top: 4px; }
