/* =====================================================
   SanatShop — Design System v2
   فروشگاه تجهیزات صنعتی — RTL, IRANYekan (فونت دیجی‌کالا)
   ===================================================== */

/* ---------- IRANYekan (self-hosted, fanum) ---------- */
@font-face {
    font-family: 'IRANYekan';
    src: url('../fonts/iranyekan/iranyekan-thin.woff') format('woff');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANYekan';
    src: url('../fonts/iranyekan/iranyekan-light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANYekan';
    src: url('../fonts/iranyekan/iranyekan-regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANYekan';
    src: url('../fonts/iranyekan/iranyekan-medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANYekan';
    src: url('../fonts/iranyekan/iranyekan-bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANYekan';
    src: url('../fonts/iranyekan/iranyekan-extrabold.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANYekan';
    src: url('../fonts/iranyekan/iranyekan-black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Brand — برگرفته از لوگو پلابر نوزین (سرمه‌ای + زرد طلایی) */
    --primary: #1e2a63;
    --primary-dark: #141d4a;
    --primary-deep: #0f1435;
    --primary-soft: #edeffa;
    --accent: #c8b400;
    --accent-soft: #faf6dc;

    /* Neutrals */
    --bg: #f4f5f9;
    --card: #ffffff;
    --text: #23273d;
    --heading: #141835;
    --muted: #5c6078;
    --border: #e5e7f0;
    --border-strong: #d4d7e6;

    /* Semantic */
    --danger: #d8434e;
    --danger-soft: #fdecec;
    --success: #17995c;
    --success-soft: #e6f7ee;
    --warning: #d98a06;
    --warning-soft: #fdf5e2;
    --info: #2a6fb8;
    --info-soft: #e8f1fb;

    /* Layout */
    --navy: #12142e;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 3px rgba(20, 24, 53, 0.07);
    --shadow-md: 0 6px 20px -6px rgba(20, 24, 53, 0.14);
    --shadow-lg: 0 16px 40px -12px rgba(20, 24, 53, 0.22);
    --ring: 0 0 0 4px rgba(30, 42, 99, 0.13);

    /* Legacy aliases (views reference these inline) */
    --card: #ffffff;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: IRANYekan, Vazirmatn, Vazir, Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14.5px;
    line-height: 1.9;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection { background: var(--primary); color: #fff; }

img { max-width: 100%; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

h1, h2, h3, h4 { color: var(--heading); line-height: 1.6; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

.main-content { padding-top: 14px; padding-bottom: 26px; }
/* Thin elegant scrollbar */
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c7d0dc; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #a8b4c4; }

/* ---------- Section headings ---------- */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 34px 0 18px;
}
.section-head h2, .section-title {
    font-size: 1.22rem;
    font-weight: 800;
    color: var(--heading);
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-head h2::before, .section-title::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 22px;
    border-radius: 99px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
}
.section-link { font-size: 0.85rem; font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.section-link svg { transition: transform 0.2s; }
.section-link:hover svg { transform: translateX(-3px); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all 0.18s ease;
    user-select: none;
    white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:active { transform: scale(0.975); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 14px -4px rgba(13, 94, 168, 0.45);
}
.btn-primary:hover { box-shadow: 0 8px 22px -6px rgba(13, 94, 168, 0.55); transform: translateY(-1px); color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c93434; color: #fff; }

.btn-outline {
    background: #fff;
    border-color: var(--border-strong);
    color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }

.btn-light { background: #fff; color: var(--primary-deep); }
.btn-light:hover { background: #eef5fc; color: var(--primary-deep); transform: translateY(-1px); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; border-radius: 8px; }
.btn-lg { padding: 14px 34px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }

.link-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.15s;
}
.link-btn:hover { background: var(--danger-soft); }
.inline-form { display: inline; }

/* ---------- Badges & status pills ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: #9a6a05; }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }

.status-pill {
    display: inline-block;
    padding: 4px 13px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}
.status-pending { background: var(--warning-soft); color: #9a6a05; }
.status-confirmed { background: var(--info-soft); color: var(--info); }
.status-packing { background: #e9ecf8; color: #1e2a63; }
.status-shipped { background: #ece7fb; color: #5b3db8; }
.status-delivered { background: var(--success-soft); color: var(--success); }
.status-cancelled { background: var(--danger-soft); color: var(--danger); }

/* ---------- Alerts ---------- */
.alert {
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    animation: fadeDown 0.3s ease;
}
.alert-success { background: var(--success-soft); color: #0d6e42; border-color: #b9e8cd; }
.alert-error { background: var(--danger-soft); color: #a33030; border-color: #f5c6c6; }

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes toastIn {
    from { opacity: 0; transform: translateY(14px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   TOPBAR
   ===================================================== */
.topbar {
    background: #eeeff6;
    border-bottom: 1px solid var(--border);
    font-size: 0.76rem;
    color: var(--muted);
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 34px;
}
.topbar-items { display: flex; align-items: center; gap: 22px; }
.topbar-items span, .topbar-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}
.topbar-phone { color: var(--primary); font-weight: 700; direction: ltr; }
.topbar-phone svg { transform: scaleX(-1); }

/* =====================================================
   HEADER
   ===================================================== */
.site-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-main-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 26px;
    padding: 14px 20px;
}
.header-main-inner .search-form { justify-self: center; width: min(640px, 100%); }
@media (max-width: 900px) {
    .header-main-inner {
        display: flex;
        flex-wrap: wrap;
        gap: 9px;
        padding: 9px 14px;
    }
    .cat-nav .category-menu-panel {
        position: fixed;
        inset-block-start: 145px;
        inset-inline-start: 16px;
        inset-inline-end: 16px;
        top: auto;
        width: auto;
        max-height: min(70dvh, 520px);
        margin-top: 8px;
    }
}

/* Logo */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.28rem;
    font-weight: 900;
    color: var(--heading);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.logo:hover { color: var(--heading); }
.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    border-radius: 12px;
    color: #fff;
    box-shadow: 0 4px 12px -3px rgba(13, 94, 168, 0.5);
}
.logo-text b { color: var(--primary); font-weight: 900; }
.logo:hover .logo-mark { animation: spinGear 6s linear infinite; }
@keyframes spinGear { to { transform: rotate(360deg); } }

/* Search */
.search-form {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f2f4f8;
    border: 1.5px solid transparent;
    border-radius: 12px;
    padding: 3px 14px 3px 4px;
    transition: all 0.2s;
    max-width: 640px;
    position: relative;
}
.search-form:focus-within {
    background: #fff;
    border-color: var(--primary);
    box-shadow: var(--ring);
}
.search-icon { color: var(--muted); display: grid; place-items: center; }
.search-form input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--text);
    outline: none;
    min-width: 0;
}
.search-form input::placeholder { color: #6d7d8f; }
.search-btn {
    padding: 9px 22px;
    border: none;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-radius: 9px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.18s;
    flex-shrink: 0;
}
.search-btn:hover { box-shadow: 0 4px 12px -3px rgba(13, 94, 168, 0.5); }

/* ---------- جستجوی زنده (پیشنهاد وسط تایپ) ---------- */
.search-form { position: relative; }
.search-suggest {
    position: absolute;
    top: calc(100% + 7px);
    inset-inline: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 13px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 200;
    animation: fadeDown 0.18s ease;
}
.search-suggest-list { max-height: 380px; overflow-y: auto; padding: 7px; }
.search-suggest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.12s;
}
.search-suggest-item:hover, .search-suggest-item:focus-visible { background: var(--primary-soft); outline: none; }
.search-suggest-item img {
    width: 52px;
    height: 52px;
    border-radius: 9px;
    object-fit: cover;
    background: #f2f5f9;
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.ss-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ss-name {
    font-size: 0.87rem;
    font-weight: 700;
    color: var(--heading);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}
.search-suggest-item:hover .ss-name { color: var(--primary); }
.ss-meta { font-size: 0.72rem; color: var(--muted); }
.ss-delivery { font-size: 0.68rem; font-weight: 700; color: var(--primary); }
.ss-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.ss-price { font-size: 0.82rem; font-weight: 800; color: var(--primary); white-space: nowrap; }
.ss-flag {
    font-size: 0.64rem;
    font-weight: 800;
    padding: 1px 8px;
    border-radius: 999px;
}
.ss-ok { background: var(--success-soft); color: var(--success); }
.ss-low { background: var(--warning-soft); color: #9a6a05; }
.ss-out { background: var(--danger-soft); color: var(--danger); }
.search-suggest-empty {
    padding: 26px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 0.86rem;
}
.search-suggest-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    background: #f7f8fc;
    transition: background 0.12s;
}
.search-suggest-all:hover { background: var(--primary-soft); }

@media (max-width: 768px) {
    .search-suggest { position: fixed; top: 118px; inset-inline: 10px; }
    .search-suggest-list { max-height: 46vh; }
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.header-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.18s;
    white-space: nowrap;
}
.header-action:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.header-action svg { color: var(--muted); transition: color 0.18s; }
.header-action:hover svg { color: var(--primary); }

.cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    color: var(--heading);
    transition: all 0.18s;
}
.cart-btn:hover { background: var(--primary-soft); color: var(--primary); }
.cart-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    line-height: 1;
}
.cart-badge.hidden { display: none; }

.admin-link { color: var(--warning) !important; font-weight: 800; border-color: var(--warning-soft); background: var(--warning-soft); }
.admin-link:hover { border-color: var(--warning); }

.admin-logout {
    color: var(--danger) !important;
    border-color: var(--danger-soft) !important;
    background: var(--danger-soft) !important;
    font-weight: 700;
}
.admin-logout:hover { background: var(--danger) !important; border-color: var(--danger) !important; color: #fff !important; }

/* دکمه واحد ورود/ثبت‌نام برای مهمان‌ها */
.header-auth-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border: 1.5px solid var(--primary);
    border-radius: 10px;
    background: var(--primary-soft);
    transition: all 0.18s;
    white-space: nowrap;
}
.header-auth-half {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
}
.header-auth-wrap:hover { background: var(--primary); box-shadow: 0 4px 14px -4px rgba(13, 94, 168, 0.5); }
.header-auth-wrap:hover .header-auth-half { color: #fff; }
.header-auth-wrap:hover svg { color: #fff; }
.header-auth-wrap .auth-sep {
    width: 1px;
    height: 14px;
    background: currentColor;
    opacity: 0.35;
}

/* Category nav bar */
.cat-nav {
    border-top: 1px solid var(--border);
    background: var(--card);
    position: relative;
    z-index: 80;
}
.cat-nav-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
}
.cat-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 9px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    position: relative;
}
.cat-nav-link:hover, .cat-nav-link:focus-visible { color: var(--primary); background: var(--primary-soft); }
.cat-nav-link:focus-visible, .category-menu-trigger:focus-visible, .category-menu-item:focus-visible, .category-menu-all:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cat-nav-all { color: var(--primary); font-weight: 800; }
.cat-nav-all svg { color: var(--accent); }
.cat-nav-spacer { flex: 1; }
.category-menu { position: relative; flex: 0 0 auto; }
.category-menu-trigger { cursor: pointer; list-style: none; border: 1px solid var(--border); background: #f5f6fb; color: var(--primary); user-select: none; font-weight: 800; }
.category-menu-trigger::-webkit-details-marker { display: none; }
.category-menu-trigger::marker { content: ""; }
.category-menu[open] .category-menu-trigger { color: var(--primary); background: var(--primary-soft); border-color: var(--border-strong); }
.category-menu-trigger svg { transition: transform 0.18s ease; }
.category-menu[open] .category-menu-trigger svg { transform: rotate(180deg); }
.category-count { display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px; background: #e8ecfa; color: var(--primary); font-size: 0.7rem; font-weight: 800; }
.category-menu-panel {
    position: absolute;
    inset-block-start: calc(100% + 8px);
    inset-inline-start: 0;
    width: min(860px, calc(100vw - 32px));
    max-height: min(74vh, 560px);
    display: flex;
    flex-direction: column;
    padding: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 16px 38px -18px rgba(16, 24, 40, .32);
    overflow: hidden;
}
.category-menu-heading { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px 10px; border-bottom: 1px solid var(--border); }
.category-menu-heading b { color: var(--heading); font-size: 0.98rem; font-weight: 850; }
.category-menu-heading span { color: var(--muted); font-size: 0.76rem; }

/* --- Digikala-style mega body: roots column (right in RTL) + content pane --- */
.category-mega-body { display: grid; grid-template-columns: 210px 1fr; flex: 1; min-height: 0; }
.category-mega-roots { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; background: #f7f8fb; border-inline-end: 1px solid var(--border); overflow-y: auto; }
.category-mega-root {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    min-height: 44px; padding: 8px 12px; border: 0; border-radius: 9px;
    background: transparent; color: var(--heading); cursor: pointer;
    font: inherit; font-size: 0.85rem; font-weight: 750; text-align: start;
}
.category-mega-root svg { width: 15px; height: 15px; flex: 0 0 auto; opacity: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: scaleX(-1); transition: opacity .12s ease, transform .12s ease; }
.category-mega-root:hover { color: var(--primary); background: var(--primary-soft); }
.category-mega-root.is-active { color: var(--primary); background: var(--primary-soft); font-weight: 850; }
.category-mega-root.is-active svg { opacity: 1; }
.category-mega-content { padding: 16px 18px; overflow-y: auto; min-width: 0; }
.category-mega-title { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-size: 0.9rem; font-weight: 850; text-decoration: none; margin-bottom: 12px; }
.category-mega-title span { color: var(--muted); font-size: 0.74rem; font-weight: 600; }
.category-mega-title:hover { text-decoration: underline; }
.category-mega-columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 22px; }
.category-mega-column { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.category-mega-child-title { color: var(--heading); font-size: 0.83rem; font-weight: 800; text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.category-mega-child-title:hover { color: var(--primary); }
.category-mega-leaf { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text); font-size: 0.8rem; font-weight: 550; text-decoration: none; padding: 5px 2px; border-radius: 6px; }
.category-mega-leaf span { color: var(--muted); font-size: 0.71rem; }
.category-mega-leaf:hover { color: var(--primary); background: var(--primary-soft); }
.category-mega-content:not(.is-active) { display: none; }

/* --- Mobile: stacked accordion inside the same panel (declared after mega rules so it wins) --- */
@media (max-width: 900px) {
    .category-mega-body { display: block; overflow-y: auto; }
    .category-mega-roots {
        display: flex; flex-direction: column; gap: 2px;
        padding: 8px; background: transparent; border-inline-end: 0; overflow: visible;
    }
    .category-mega-root { min-height: 44px; border-radius: 8px; }
    .category-mega-root svg { display: none; }
    .category-mega-content { padding: 4px 8px 10px; }
    .category-mega-title { display: none; }
    .category-mega-columns { display: flex; flex-direction: column; gap: 0; }
    .category-mega-child-title { font-size: 0.8rem; padding: 8px 0 6px; margin-bottom: 2px; }
    .category-mega-leaf { min-height: 38px; padding: 6px 10px; font-size: 0.82rem; }
}

.category-menu-list { display: grid; gap: 4px; overflow-y: auto; overscroll-behavior: contain; padding: 10px 0; }
.category-menu-group { border-bottom: 1px solid var(--border); padding: 3px 0; }
.category-menu-group:last-child { border-bottom: 0; }
.category-menu-parent { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 8px 10px; border-radius: 8px; color: var(--heading); text-decoration: none; font-size: 0.88rem; font-weight: 800; }
.category-menu-parent:hover { color: var(--primary); background: var(--primary-soft); }
.category-menu-subgroups { margin: 0 10px 4px; border-radius: 8px; background: #f7f8fb; }
.category-menu-branch { margin: 0; background: transparent; }
.category-menu-parent-toggle { min-height: 0; padding: 0; font-size: 0.88rem; font-weight: 800; color: var(--heading); }
.category-menu-parent-toggle:hover { color: var(--primary); background: var(--primary-soft); }
.category-menu-parent-toggle > .category-menu-branch-name { flex: 1; min-height: 42px; display: flex; align-items: center; padding: 8px 10px; }
.category-menu-parent-toggle > svg { margin-inline-start: auto; margin-inline-end: 10px; }
.category-menu-subgroups[open] > .category-menu-subgroups-toggle { color: var(--primary); }
.category-menu-subgroups-nested { margin: 0 4px 2px; background: #fbfcfe; }
.category-menu-subgroups-nested > .category-menu-subgroups-toggle { padding: 0; }
.category-menu-subgroups-nested > .category-menu-subgroups-toggle > .category-menu-item { flex: 1; min-height: 36px; }
.category-menu-subgroups-nested > .category-menu-subgroups-toggle > svg { margin-inline-end: 9px; }
.category-menu-subgroups-toggle { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 9px; color: var(--primary); cursor: pointer; list-style: none; font-size: 0.78rem; font-weight: 750; }
.category-menu-subgroups-toggle::-webkit-details-marker { display: none; }
.category-menu-subgroups-toggle::marker { content: ""; }
.category-menu-subgroups-toggle svg { margin-inline-start: auto; transition: transform .16s ease; }
.category-menu-subgroups[open] .category-menu-subgroups-toggle svg { transform: rotate(180deg); }
.category-menu-children { display: grid; gap: 2px; padding: 0 6px 6px; }
.category-menu-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; padding: 7px 9px; border-radius: 7px; color: var(--text); text-decoration: none; font-size: 0.81rem; font-weight: 600; }
.category-menu-item-deep { padding-inline-start: 22px; font-size: 0.78rem; }
.category-menu-item-deep > span:first-child::before { content: "↳"; margin-inline-end: 7px; color: var(--muted); }
.category-menu-item:hover { color: var(--primary); background: var(--primary-soft); }
.category-menu-count { flex: 0 0 auto; color: var(--muted); font-size: 0.73rem; font-weight: 600; }
.category-menu-all { display: block; padding: 11px 10px 2px; border-top: 1px solid var(--border); color: var(--primary); font-size: 0.82rem; font-weight: 800; text-decoration: none; }
.category-nav-shop { color: var(--muted); }
.cat-nav-hot {
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 999px;
    padding: 7px 14px;
    margin-inline-start: 4px;
    font-weight: 800;
}
.cat-nav-hot:hover { background: var(--accent); color: #fff; }
.cat-nav-hot svg { animation: pulse 1.8s ease infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--muted);
    padding: 16px 0 4px;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { color: #c3cbd7; margin: 0 2px; }
.breadcrumbs .current { color: var(--text); font-weight: 600; }

/* =====================================================
   HERO
   ===================================================== */
.hero {
    background:
        radial-gradient(ellipse at 85% 20%, rgba(255, 255, 255, 0.14) 0%, transparent 50%),
        radial-gradient(ellipse at 10% 90%, rgba(239, 64, 86, 0.18) 0%, transparent 45%),
        linear-gradient(120deg, var(--primary-deep) 0%, var(--primary) 55%, #2c3a7e 100%);
    border-radius: 20px;
    padding: 48px 46px;
    margin: 20px 0 30px;
    color: #fff;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}
.hero-content { position: relative; max-width: 620px; }
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 5px 16px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 16px;
    backdrop-filter: blur(4px);
}
.hero h1 { font-size: 2rem; font-weight: 900; margin-bottom: 12px; color: #fff; }
.hero h1 b { color: #f2cd00; }
.hero p { opacity: 0.92; font-size: 0.98rem; margin-bottom: 24px; max-width: 540px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art {
    position: relative;
    flex: 0 1 480px;
    min-width: 0;
    display: grid;
    place-items: center;
}
/* Triangular arrangement: large unit on top, two below. */
.hero-showcase {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 255px 195px;
    align-items: center;
    justify-items: center;
    gap: 20px 8px;
}
.hero-shot {
    display: grid;
    place-items: center;
    height: 100%;
    min-width: 0;
}
.hero-shot:first-child { grid-column: 1 / -1; }
.hero-shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 18px 26px rgba(3, 7, 24, 0.55));
}

/* Hero stats row */
.hero-stats {
    position: relative;
    display: flex;
    gap: 0;
    margin-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 18px;
    flex-wrap: wrap;
}
.hero-stat { padding-inline-end: 34px; }
.hero-stat b { display: block; font-size: 1.3rem; font-weight: 900; color: #f2cd00; }
.hero-stat span { font-size: 0.76rem; opacity: 0.85; }

/* ---------- Feature strip ---------- */
.features-strip {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 18px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin: 26px 0;
    box-shadow: var(--shadow-sm);
}
.feat {
    display: flex;
    align-items: center;
    gap: 13px;
}
.feat-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 13px;
}
.feat b { display: block; font-size: 0.88rem; color: var(--heading); }
.feat span { font-size: 0.76rem; color: var(--muted); }

/* ---------- Category tiles ---------- */
.cat-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.cat-tile {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}
.cat-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    color: var(--primary);
}
.cat-tile-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 16px;
    transition: all 0.2s;
}
.cat-tile:hover .cat-tile-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
}
.cat-tile b { font-size: 0.88rem; font-weight: 700; color: var(--heading); }
.cat-tile:hover b { color: var(--primary); }
.cat-tile span { font-size: 0.72rem; color: var(--muted); }

/* ---------- Promo banners ---------- */

/* Brands strip */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.brand-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 14px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text);
    position: relative;
    overflow: hidden;
}
.brand-card::after {
    content: "";
    position: absolute;
    top: 0;
    inset-inline: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #3d4a8f);
    opacity: 0;
    transition: opacity 0.2s;
}
.brand-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #ccd2ea;
}
.brand-card:hover::after { opacity: 1; }
.brand-logo-box {
    width: 100%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f8fc;
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 6px 10px;
    margin-bottom: 6px;
    transition: all 0.2s;
    overflow: hidden;
}
.brand-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.brand-card:hover .brand-logo-box { background: #fff; border-color: #ccd2ea; }
.brand-name {
    font-weight: 800;
    color: var(--heading);
    font-size: 1rem;
    font-family: "Segoe UI", "Helvetica Neue", Vazirmatn, sans-serif;
    direction: ltr;
}
.brand-card:hover .brand-name { color: var(--primary); }
.brand-card-link .brand-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 999px;
    padding: 4px 10px;
    margin-top: 2px;
    transition: all 0.2s;
}
.brand-card-link:hover .brand-cta { background: var(--primary); color: #fff; }
.brand-country {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
}
.brand-flag {
    width: 21px;
    height: 15px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(23, 43, 77, 0.14);
    overflow: hidden;
    display: block;
    flex-shrink: 0;
}
.brand-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 3px 13px;
    border-radius: 999px;
    margin-top: 3px;
}

.promo-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 26px 0;
}
.promo-card {
    border-radius: var(--radius);
    padding: 26px 28px;
    color: #fff;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-height: 150px;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.promo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: #fff; }
.promo-card::after {
    content: "";
    position: absolute;
    inset-inline-start: -30px;
    bottom: -50px;
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}
.promo-blue { background: linear-gradient(120deg, #1a2456, #2c3a7e); }
.promo-warm { background: linear-gradient(120deg, #8a7a00, #c8b400); }
.promo-card b { font-size: 1.1rem; font-weight: 900; position: relative; z-index: 1; }
.promo-card span { font-size: 0.8rem; opacity: 0.9; position: relative; z-index: 1; }
.promo-card .promo-cta {
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 5px 16px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

/* =====================================================
   PRODUCT GRID & CARD
   ===================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
    gap: 16px;
    margin: 18px 0;
}
@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .card-body { padding: 9px 11px 11px; }
    .card-name { font-size: 0.78rem; min-height: 2.6em; }
    .price-value { font-size: 0.82rem; }
    .price-unit { font-size: 0.62rem; }
    .card-add button { width: 32px; height: 32px; }
}

/* Homepage latest products stay in one compact row. */
.product-grid-home-latest {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.product-grid-home-latest > .empty-state { grid-column: 1 / -1; }

/* Homepage merchandising rows reuse the catalog card grid, with balanced columns at each breakpoint. */
.catalog-shelf { min-width: 0; max-width: 100%; }
.catalog-shelf .product-grid { margin: 18px 0 30px; }
.product-grid-home-category { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-grid-home-category > .empty-state { grid-column: 1 / -1; }

@media (min-width: 641px) and (max-width: 1100px) {
    .product-grid-home-latest,
    .product-grid-home-category { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) and (min-width: 641px) {
    .product-grid-home-latest,
    .product-grid-home-category { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .product-grid-home-latest,
    .product-grid-home-category { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .catalog-shelf .product-grid { gap: 10px; margin-bottom: 24px; }
}

.product-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: all 0.22s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    position: relative;
    animation: fadeUp 0.4s ease both;
}
.product-card:nth-child(2) { animation-delay: 0.04s; }
.product-card:nth-child(3) { animation-delay: 0.08s; }
.product-card:nth-child(4) { animation-delay: 0.12s; }
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: #ccd2ea;
}

.card-media {
    height: 185px;
    background:
        radial-gradient(circle at 50% 40%, #f8fafc 0%, #eef2f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.card-media img.card-media-default { object-fit: contain; padding: 14px; background: #fff; }
.product-card:hover .card-media img { transform: scale(1.06); }
@media (hover: none) {
    .product-card:hover .card-media img { transform: none; }
}
.card-media-placeholder { color: #b9c4d2; transition: color 0.2s; }
.product-card:hover .card-media-placeholder { color: var(--primary); }

.card-flag {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    backdrop-filter: blur(6px);
    z-index: 2;
}
.card-flag-out { background: rgba(224, 64, 64, 0.92); color: #fff; }
.card-flag-low { background: rgba(253, 245, 226, 0.95); color: #9a6a05; }

.card-body {
    padding: 10px 13px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.card-cat {
    font-size: 0.71rem;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.card-cat::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: var(--primary);
    opacity: 0.5;
}
.card-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--heading);
    line-height: 1.7;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}
.card-name:hover { color: var(--primary); }
.card-delivery {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    align-self: flex-start;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 6px;
    padding: 2px 7px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.6;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 6px;
    padding-top: 0;
    border-top: none;
}
.card-price { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.price-value { color: var(--heading); font-weight: 800; font-size: 0.88rem; }
.price-unit { font-size: 0.62rem; color: var(--muted); font-weight: 400; }
.price-tag {
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 6px;
}
.price-out { color: var(--muted); font-weight: 600; font-size: 0.78rem; }

.card-add {
    margin: 0;
}
.card-add button {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--primary);
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.18s;
}
.card-add button:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px -3px rgba(13, 94, 168, 0.5);
}
.card-add button:active { transform: scale(0.92); }

/* Legacy product-card inner spacing (old views) */
.product-card .body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.product-card .cat { font-size: 0.75rem; color: var(--muted); }
.product-card .name { font-size: 0.95rem; font-weight: 700; line-height: 1.5; }
.product-card .price-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.price { color: var(--primary); font-weight: 800; font-size: 0.95rem; }
.price small { color: var(--muted); font-weight: 400; }

/* =====================================================
   LISTING (shop page)
   ===================================================== */
.listing-toolbar {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin: 16px 0;
    box-shadow: var(--shadow-sm);
}
.toolbar-count { font-size: 0.84rem; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.toolbar-count b { color: var(--heading); }
.sort-form { display: flex; align-items: center; gap: 10px; }
.sort-form label { font-size: 0.8rem; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.sort-form select {
    padding: 8px 14px;
    border: 1.5px solid var(--border-strong);
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s;
}
.sort-form select:hover, .sort-form select:focus { border-color: var(--primary); outline: none; }

/* ---------- Listing with filter sidebar ---------- */
.listing-layout {
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin: 16px 0;
}

.filters-sidebar {
    position: sticky;
    top: 130px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* دکمه باز/بستن فیلترها — فقط موبایل */
.filters-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px;
    background: var(--card);
    border: 1.5px solid var(--primary);
    border-radius: 11px;
    color: var(--primary);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    margin-bottom: 4px;
}
@media (max-width: 900px) {
    .filters-toggle { display: flex; }
}

/* موبایل: فیلترها در دراور جمع شون */
@media (max-width: 900px) {
    .listing-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .filters-sidebar {
        position: static;
        display: none;
    }
    .filters-sidebar.filters-open { display: flex; }
    .listing-toolbar { position: static; }
}

.filter-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}
.filter-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--heading);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.filter-title svg { color: var(--primary); }
.filter-clear {
    margin-inline-start: auto;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--danger);
    text-decoration: none;
}
.filter-clear:hover { text-decoration: underline; }
.filter-heading {
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--heading);
    margin-bottom: 10px;
}
.filter-check {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.85rem;
    padding: 6px 4px;
    cursor: pointer;
    border-radius: 7px;
    transition: background 0.12s;
}
.filter-check:hover { background: var(--primary-soft); }
.filter-check input[type="checkbox"], .filter-check input[type="radio"] {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}
.filter-options { display: flex; flex-direction: column; gap: 2px; }

.price-range {
    display: flex;
    align-items: center;
    gap: 8px;
}
.price-range input {
    flex: 1;
    min-width: 0;
    padding: 9px 11px;
    border: 1.5px solid var(--border-strong);
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.85rem;
    text-align: center;
    direction: ltr;
}
.price-range input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.price-range-sep { color: var(--muted); font-weight: 700; }

/* Sort tabs */
.sort-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    background: #eeeff6;
    border-radius: 10px;
    padding: 4px;
    gap: 3px;
}
.sort-tab {
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    transition: all 0.15s;
}
.sort-tab:hover { color: var(--primary); }
.sort-tab.active {
    background: #fff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Category chips (filters + admin) */
.catalog-taxonomy-listing { margin: 18px 0 20px; }
.catalog-taxonomy-parents { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.catalog-taxonomy-parent { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--heading); font-size: 0.82rem; font-weight: 750; text-decoration: none; }
.catalog-taxonomy-parent span { color: var(--muted); font-size: 0.72rem; font-weight: 600; }
.catalog-taxonomy-parent:hover, .catalog-taxonomy-parent.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.catalog-taxonomy-parent:hover span, .catalog-taxonomy-parent.active span { color: rgba(255,255,255,.8); }
.catalog-taxonomy-children { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
.cat-chips { display: flex; gap: 9px; flex-wrap: wrap; margin: 16px 0; }
.cat-chip {
    background: var(--card);
    border: 1.5px solid var(--border);
    padding: 7px 18px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.83rem;
    font-weight: 600;
    transition: all 0.15s;
    box-shadow: var(--shadow-sm);
}
.cat-chip:hover, .cat-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px -3px rgba(13, 94, 168, 0.45);
}
.cat-chip .count { opacity: 0.7; font-size: 0.75rem; }

/* =====================================================
   PRODUCT PAGE
   ===================================================== */
.p-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 26px;
    margin: 20px 0;
    align-items: start;
}
@media (max-width: 900px) { .p-layout { grid-template-columns: 1fr; } }

.p-gallery {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: sticky;
    top: 130px;
    box-shadow: var(--shadow-sm);
}
.p-gallery-wrap { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.p-gallery img { width: 100%; object-fit: cover; }
.p-gallery .p-gallery-image { height: 100%; }
.p-gallery .p-gallery-image[hidden] { display: none; }
.p-gallery .p-gallery-default { object-fit: contain; padding: 30px; height: 100%; position: absolute; inset: 0; }
.p-gallery .p-gallery-placeholder { color: #c3ccd9; }
.p-gallery-thumbs {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 2px 2px 6px;
    scrollbar-width: thin;
}
.p-gallery-thumb {
    flex: 0 0 68px;
    width: 68px;
    height: 62px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--card);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.p-gallery-thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 5px; }
.p-gallery-thumb:hover, .p-gallery-thumb.is-active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.p-gallery-thumb:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.p-gallery-badges {
    position: absolute;
    top: 14px;
    inset-inline-start: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.p-info { display: flex; flex-direction: column; gap: 4px; }
.p-info .card-cat { font-size: 0.78rem; }
.p-info h1 { font-size: 1.45rem; font-weight: 800; margin-bottom: 6px; }
.p-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 10px 0 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.79rem;
    color: var(--muted);
}
.p-meta .dot { color: #cfd6e0; }
.p-desc {
    color: var(--text);
    margin: 16px 0;
    font-size: 0.92rem;
    text-align: justify;
}

.category-intro { margin: 12px 0 18px; line-height: 2; color: var(--text); overflow-wrap: anywhere; }
.quote-hint { font-size: 0.8rem; color: var(--muted); margin-top: 10px; line-height: 1.9; }
.variant-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.variant-option {
    display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
    padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 10px;
    background: var(--card); cursor: pointer; font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.variant-option:hover { border-color: var(--primary); }
.variant-option[aria-checked="true"] {
    border-color: var(--primary); background: var(--primary-soft);
    box-shadow: 0 0 0 1px var(--primary);
}
.variant-label { font-size: 0.86rem; font-weight: 800; color: var(--heading); }
.variant-price { font-size: 0.78rem; color: var(--muted); }
.product-content-section { margin: 24px 0; padding-top: 18px; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.product-content-section h2 { font-size: 1rem; margin-bottom: 12px; color: var(--heading); }
.product-content-section p, .product-content-section li { font-size: 0.9rem; line-height: 2; }
.product-content-section p + p { margin-top: 10px; }
.product-content-section ul { padding-inline-start: 20px; list-style: disc; }
.search-suggest-item[aria-selected="true"] { background: var(--primary-soft); outline: 2px solid var(--primary); outline-offset: -2px; }
.p-info, .p-info h1, .p-desc { min-width: 0; overflow-wrap: anywhere; }
.spec-table { table-layout: fixed; overflow-wrap: anywhere; }
.spec-block { margin: 18px 0; }
.spec-block h3 {
    font-size: 0.98rem;
    font-weight: 800;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.spec-block h3 svg { color: var(--primary); }
.spec-table { width: 100%; border-collapse: collapse; margin: 8px 0 4px; background: var(--card); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.spec-table tr:nth-child(odd) { background: #f8fafc; }
.spec-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.spec-table tr:last-child td { border-bottom: none; }
.spec-table td:first-child { color: var(--muted); width: 38%; font-weight: 600; }

/* Buy box */
.buy-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}
.buy-box .big-price { font-size: 1.5rem; color: var(--primary); font-weight: 900; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.buy-box .big-price small { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.buy-box-stock { font-size: 0.8rem; margin-bottom: 6px; }
.buy-box form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.buy-box .qty-label { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }

.p-perks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.p-perk {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--muted);
    background: var(--card);
    border: 1px solid var(--border);
    padding: 10px 13px;
    border-radius: var(--radius-sm);
}
.p-perk svg { color: var(--success); flex-shrink: 0; }

/* =====================================================
   CART
   ===================================================== */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
    margin: 16px 0;
}
@media (max-width: 820px) { .cart-layout { grid-template-columns: 1fr; } }

.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-row {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}
.cart-row:hover { box-shadow: var(--shadow-md); }
.cart-row-thumb {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: #f2f5f9;
    display: grid;
    place-items: center;
    color: #aab6c5;
    overflow: hidden;
    border: 1px solid var(--border);
}
.cart-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-row-main { flex: 1; min-width: 0; }
.cart-row-main a {
    color: var(--heading);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
}
.cart-row-main a:hover { color: var(--primary); }
.cart-row-price { font-size: 0.8rem; color: var(--muted); }
.cart-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.cart-row-total { font-weight: 800; color: var(--primary); font-size: 1rem; }

.qty-form { display: flex; align-items: center; gap: 6px; }
.qty-input {
    width: 64px;
    padding: 8px;
    border: 1.5px solid var(--border-strong);
    border-radius: 9px;
    text-align: center;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.88rem;
    transition: border-color 0.15s;
    background: #fff;
}
.qty-input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

.cart-remove {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--danger);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 7px;
    transition: background 0.15s;
}
.cart-remove:hover { background: var(--danger-soft); }

/* Summary card (cart/checkout) */
.summary-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 130px;
}
.summary-card h3 { font-size: 0.98rem; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.summary-card h3 svg { color: var(--primary); }
.summary-card .row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.88rem;
    color: var(--muted);
}
.summary-card .row b { color: var(--text); font-weight: 700; }
.summary-card .divider { border-top: 1px dashed var(--border-strong); margin: 14px 0; }
.summary-card .total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 900;
    font-size: 1.05rem;
    color: var(--heading);
}
.summary-card .total .total-num { color: var(--primary); font-size: 1.25rem; font-weight: 900; }
.summary-note {
    font-size: 0.75rem;
    color: var(--muted);
    background: var(--warning-soft);
    border-radius: 9px;
    padding: 10px 13px;
    margin-top: 14px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.summary-note svg { flex-shrink: 0; color: var(--warning); margin-top: 3px; }

/* Legacy cart summary (checkout form, success) */
.cart-summary {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    max-width: 360px;
    margin-inline-start: auto;
    box-shadow: var(--shadow-sm);
}
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.9rem; color: var(--muted); }
.cart-summary .total { font-weight: 900; font-size: 1.15rem; color: var(--primary); }

/* =====================================================
   FORMS
   ===================================================== */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    margin-bottom: 7px;
    color: var(--heading);
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    background: #fff;
    color: var(--text);
    transition: all 0.18s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--ring);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: #6d7d8f; }

/* فیلد شماره تماس با پیشوند ثابت +98 */
.phone-field {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    overflow: hidden;
    transition: all 0.18s;
}
.phone-field:focus-within {
    border-color: var(--primary);
    box-shadow: var(--ring);
}
.phone-prefix {
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: #eef0f8;
    color: var(--heading);
    font-weight: 800;
    font-size: 0.92rem;
    border-inline-end: 1.5px solid var(--border-strong);
    user-select: none;
    direction: ltr;
}
.phone-field input {
    flex: 1;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    text-align: left;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    min-width: 0;
}
.phone-field input:focus { outline: none; }

.form-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 480px;
    margin: 34px auto;
    box-shadow: var(--shadow-md);
    animation: fadeUp 0.35s ease;
}
.form-box h2 { margin-bottom: 22px; font-size: 1.25rem; font-weight: 800; text-align: center; }
.form-wide { max-width: none; }
.form-row { display: flex; gap: 14px; }
.form-row > * { flex: 1; }
.text-danger { color: var(--danger); font-size: 0.78rem; display: block; margin-top: 4px; }

/* Auth card */
.auth-card { max-width: 440px; padding: 36px 32px; }
.auth-intro, .signup-step-copy { margin: -8px 0 18px; color: var(--muted); text-align: center; font-size: 0.84rem; line-height: 1.8; }
.signup-method-tabs { display: flex; gap: 5px; padding: 4px; margin: 18px 0 20px; border: 1px solid var(--border); border-radius: 12px; background: #f2f4f8; }
.signup-method-tab { flex: 1; min-height: 42px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font: inherit; font-size: 0.82rem; font-weight: 750; cursor: pointer; }
.signup-method-tab.active { color: var(--primary); background: var(--card); box-shadow: var(--shadow-sm); }
.signup-method-tab:focus-visible, .auth-text-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.signup-method-panel[hidden] { display: none; }
.signup-step-indicator { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 16px 0 18px; }
.signup-step-indicator span { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.signup-step-indicator span.active { border-color: var(--primary); color: #fff; background: var(--primary); }
.signup-step-indicator i { width: 40px; height: 1px; background: var(--border-strong); }
.signup-step-title { margin: 8px 0 14px; text-align: center; font-size: 1.02rem; font-weight: 850; color: var(--heading); }
.signup-step-actions { display: flex; justify-content: center; gap: 22px; margin-top: 16px; }
.auth-text-button { padding: 4px 2px; border: 0; color: var(--primary); background: transparent; font: inherit; font-size: 0.8rem; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.signup-cancel-form { display: flex; justify-content: center; margin-top: 12px; }
.field-optional { color: var(--muted); font-size: 0.75rem; font-weight: 500; }
.forgot-password-row { display: flex; justify-content: flex-start; margin: -4px 0 16px; }
.forgot-password-row a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 10px; border-radius: 8px; color: var(--primary); background: var(--primary-soft); font-size: 0.83rem; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.auth-inline-notice { margin-top: 14px; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: 9px; color: var(--text); background: #f7f8fc; font-size: 0.81rem; line-height: 1.8; }
.auth-inline-notice a { color: var(--primary); font-weight: 850; text-decoration: underline; text-underline-offset: 3px; }
.auth-register-card { max-width: 520px; }
.auth-register-card .alert-error > div + div { margin-top: 4px; }
.auth-register-card .phone-field input { min-width: 0; }
@media (max-width: 640px) {
    .auth-register-card { padding: 24px 18px; }
    .signup-method-tabs { gap: 3px; }
    .signup-method-tab { min-height: 40px; padding: 7px 5px; font-size: 0.76rem; }
    .signup-step-indicator { margin: 12px 0 14px; }
}

/* تب‌های ورود دوحالته */
.login-tabs {
    display: flex;
    background: #eef0f7;
    border-radius: 11px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 20px;
}
.login-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.18s;
}
.login-tab:hover { color: var(--primary); }
.login-tab.active {
    background: #fff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}
.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.auth-logo .logo-mark { width: 56px; height: 56px; border-radius: 16px; }
.auth-switch {
    text-align: center;
    font-size: 0.84rem;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-strong);
    color: var(--muted);
}

/* Checkout summary items mini list */
.mini-items { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.mini-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.82rem;
    padding: 9px 12px;
    background: #f8fafc;
    border-radius: 9px;
    border: 1px solid var(--border);
}
.mini-item b { font-weight: 700; color: var(--heading); }
.mini-item span { color: var(--muted); white-space: nowrap; }

/* =====================================================
   TABLES
   ===================================================== */
.table-wrap {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 16px 0;
    box-shadow: var(--shadow-sm);
}
table.tbl { width: 100%; border-collapse: collapse; min-width: 600px; }
table.tbl th, table.tbl td {
    padding: 13px 16px;
    text-align: right;
    border-bottom: 1px solid var(--border);
    font-size: 0.86rem;
}
table.tbl th {
    background: #f7f8fc;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.78rem;
    white-space: nowrap;
}
table.tbl tbody tr { transition: background 0.12s; }
table.tbl tbody tr:hover { background: #f6f7fc; }
table.tbl tbody tr:last-child td { border-bottom: none; }

/* =====================================================
   EMPTY STATE
   ===================================================== */
.empty-state {
    background: var(--card);
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 54px 24px;
    text-align: center;
    color: var(--muted);
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.empty-state svg { color: #c3ccd9; }
.empty-state b { font-size: 1rem; color: var(--heading); }
.empty-state p { font-size: 0.85rem; max-width: 380px; }

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
    align-items: center;
    margin: 28px 0;
}
.pagination .page-link {
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    background: var(--card);
    box-shadow: var(--shadow-sm);
    transition: all 0.15s;
}
.pagination a.page-link:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.pagination .page-link.active {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px -3px rgba(13, 94, 168, 0.45);
}
.pagination .page-link.disabled { opacity: 0.45; cursor: default; }

/* ---------- RFQ ---------- */
.rfq-product {
    background: var(--primary-soft);
    border: 1px solid #ccd2ea;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.rfq-product-label { color: var(--muted); }
.rfq-product b { color: var(--primary); }

/* ردیف‌های اقلام استعلام */
.quote-item-row {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 11px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-sm);
}
.qi-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.qi-product label, .qi-fields label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--muted);
}
.qi-product select, .qi-product input, .qi-fields input {
    padding: 9px 12px;
    border: 1.5px solid var(--border-strong);
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.86rem;
    color: var(--text);
    background: #fff;
    transition: border-color 0.15s;
}
.qi-product select:focus, .qi-product input:focus, .qi-fields input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--ring);
}
.qi-fields {
    display: grid;
    grid-template-columns: 100px 1fr 1.4fr;
    gap: 10px;
    align-items: end;
}
@media (max-width: 640px) {
    .qi-product, .qi-fields { grid-template-columns: 1fr; }
}

/* ---------- کارت استعلام ادمین ---------- */
.quote-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.quote-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.quote-card-head > div:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.95rem;
}
.quote-card-contact {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--muted);
    padding: 9px 13px;
    background: #f7f8fc;
    border-radius: 9px;
}
.quote-card-contact b { color: var(--text); }
.quote-items-tbl { margin: 0; box-shadow: none; border: 1px solid var(--border); }
.quote-items-tbl th, .quote-items-tbl td { font-size: 0.82rem; padding: 9px 13px; }
.quote-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    border-top: 1px dashed var(--border);
    padding-top: 12px;
}

/* =====================================================
   ORDER SUCCESS
   ===================================================== */
.success-card {
    text-align: center;
    max-width: 640px;
    position: relative;
    overflow: hidden;
}
.success-card::before {
    content: "";
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 120px;
    background: radial-gradient(ellipse, rgba(23, 153, 92, 0.14), transparent 70%);
}
.success-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    background: var(--success-soft);
    color: var(--success);
    border-radius: 50%;
    animation: popIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.success-code {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 800;
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 0.9rem;
    margin: 8px 0 4px;
}

/* =====================================================
   ACCOUNT PANEL (پنل کاربری)
   ===================================================== */
.account-wrap {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
    align-items: start;
    margin: 20px 0;
}
@media (max-width: 860px) {
    .account-wrap { grid-template-columns: 1fr; }
}

.account-side {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    position: sticky;
    top: 130px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.account-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 8px 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}
.account-avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
    font-size: 1.2rem;
    font-weight: 900;
    border-radius: 50%;
    flex-shrink: 0;
}
.account-user b { font-size: 0.92rem; color: var(--heading); display: block; }
.account-user .badge { font-size: 0.64rem; }

.account-nav { display: flex; flex-direction: column; gap: 2px; }
.account-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.15s;
}
.account-nav a:hover { background: var(--primary-soft); color: var(--primary); }
.account-nav a.active {
    background: linear-gradient(120deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 12px -3px rgba(30, 42, 99, 0.45);
}
.account-admin-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 10px;
    padding: 9px;
    border-radius: 10px;
    background: var(--warning-soft);
    color: #9a6a05;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s;
}
.account-admin-link:hover { background: var(--warning); color: #fff; }

.account-logout-form { margin-top: 10px; }
.account-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 9px;
    border: 1.5px solid var(--danger-soft);
    border-radius: 10px;
    background: var(--danger-soft);
    color: var(--danger);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.account-logout:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

.account-body { min-height: 300px; }
.account-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }

/* کارت آمار داشبورد */
.acc-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 16px 0;
}
.acc-stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 16px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.acc-stat::after {
    content: "";
    position: absolute;
    top: -30px;
    inset-inline-start: -30px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, var(--primary-soft), transparent 70%);
    border-radius: 50%;
}
.acc-stat .num { font-size: 1.4rem; font-weight: 900; color: var(--primary); position: relative; }
.acc-stat .lbl { font-size: 0.76rem; color: var(--muted); font-weight: 600; position: relative; }

/* تایم‌لاین پیگیری سفارش */
.order-timeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin: 22px 0;
    padding: 20px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}
.tl-step {
    flex: 1;
    min-width: 88px;
    text-align: center;
    position: relative;
    padding-top: 34px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--muted);
}
.tl-step::before {
    content: "";
    position: absolute;
    top: 10px;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e3e6f0;
    border: 3px solid var(--card);
    box-shadow: 0 0 0 2px #d5d9e8;
    z-index: 1;
}
.tl-step::after {
    content: "";
    position: absolute;
    top: 18px;
    inset-inline-start: 0;
    width: 50%;
    height: 3px;
    background: #e3e6f0;
}
.tl-step:not(:first-child)::before { inset-inline-start: calc(50% - 9px); transform: none; }
.tl-step:first-child::after { inset-inline-start: 50%; }
.tl-step.done { color: var(--success); }
.tl-step.done::before { background: var(--success); box-shadow: 0 0 0 2px var(--success-soft); }
.tl-step.done::after { background: var(--success); }
.tl-step.current { color: var(--primary); }
.tl-step.current::before { background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); animation: pulse 1.6s infinite; }
.tl-step.cancelled-step { color: var(--danger); }
.tl-step.cancelled-step::before { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

/* گفتگوی تیکت */
.ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}
.ticket-msg {
    max-width: 78%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.9;
    position: relative;
    box-shadow: var(--shadow-sm);
}
.ticket-msg .msg-meta {
    font-size: 0.68rem;
    color: var(--muted);
    margin-bottom: 4px;
    display: flex;
    gap: 8px;
    align-items: center;
}
.ticket-msg.user-msg {
    align-self: flex-start;
    background: var(--primary-soft);
    border: 1px solid #ccd2ea;
    border-start-start-radius: 4px;
}
.ticket-msg.admin-msg {
    align-self: flex-end;
    background: #f0faf4;
    border: 1px solid #c4e8d3;
    border-start-end-radius: 4px;
}
.ticket-msg.admin-msg .msg-meta b { color: var(--success); }
.ticket-reply-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

/* =====================================================
   ADMIN
   ===================================================== */
.admin-layout {
    display: grid;
    grid-template-columns: 232px 1fr;
    gap: 20px;
    margin: 20px 0;
    align-items: start;
}
@media (max-width: 820px) { .admin-layout { grid-template-columns: 1fr; } }

.admin-sidebar {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    height: fit-content;
    position: sticky;
    top: 130px;
    box-shadow: var(--shadow-sm);
}
.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.15s;
    margin-bottom: 2px;
}
.admin-sidebar a:hover { background: var(--primary-soft); color: var(--primary); }
.admin-sidebar a.active {
    background: linear-gradient(120deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 12px -3px rgba(13, 94, 168, 0.45);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card::before {
    content: "";
    position: absolute;
    top: -34px;
    inset-inline-end: -34px;
    width: 96px;
    height: 96px;
    background: radial-gradient(circle, var(--primary-soft), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.stat-card .num { font-size: 1.55rem; font-weight: 900; color: var(--primary); line-height: 1.4; }
.stat-card .lbl { font-size: 0.78rem; color: var(--muted); font-weight: 600; }

.admin-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 6px; }

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
    margin-top: 56px;
    background: var(--navy);
    color: #b8c4d4;
    font-size: 0.84rem;
}
.footer-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    padding: 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.site-footer .feat { color: #dfe7f1; }
.site-footer .feat-icon {
    background: rgba(255, 255, 255, 0.07);
    color: #8b93d6;
}
.site-footer .feat b { color: #fff; font-size: 0.88rem; }
.site-footer .feat span { color: #8fa2ba; font-size: 0.75rem; }

.footer-cols {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
    gap: 30px;
    padding: 36px 0 30px;
}
@media (max-width: 900px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-cols { grid-template-columns: 1fr; } }

.footer-col h4 {
    color: #fff;
    font-size: 0.92rem;
    font-weight: 800;
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 10px;
}
.footer-col h4::after {
    content: "";
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 28px;
    height: 3px;
    border-radius: 99px;
    background: var(--primary);
    background: #3d4a8f;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: #c5d1e0; text-decoration: none; transition: all 0.15s; }
.footer-col a:hover { color: #fff; padding-inline-start: 4px; }

.footer-about .logo { color: #fff; margin-bottom: 14px; }
.footer-about .logo:hover { color: #fff; }
.footer-about .logo-mark { box-shadow: none; }
.footer-about p { font-size: 0.8rem; line-height: 2; color: #a5b4c8; text-align: justify; }

/* لوگوی شرکت مادر در فوتر */
.parent-brand {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}
.parent-brand-label {
    font-size: 0.7rem;
    color: #8fa2ba;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.parent-brand-label::after {
    content: "";
    display: inline-block;
    width: 34px;
    height: 1px;
    background: rgba(255, 255, 255, 0.18);
}
.parent-brand-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s;
}
.parent-brand-card:hover { transform: translateY(-2px); }
.parent-brand-card img {
    max-width: 168px;
    max-height: 62px;
    object-fit: contain;
    display: block;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}
.footer-contact svg { color: #8b93d6; flex-shrink: 0; margin-top: 5px; }
.footer-contact .ltr { direction: ltr; unicode-bidi: embed; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: #a5b4c8;
}
.footer-trust { display: flex; gap: 10px; }
.trust-badge {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9px;
    padding: 5px 14px;
    font-size: 0.72rem;
    color: #cfd9e5;
    background: rgba(255, 255, 255, 0.04);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
    .hero { padding: 34px 26px; flex-direction: column; align-items: flex-start; }
    .hero h1 { font-size: 1.5rem; }
    .hero-art { display: grid; width: min(100%, 430px); align-self: center; }
    .hero-showcase { grid-template-rows: 190px 118px; gap: 22px 6px; }
    .promo-row { grid-template-columns: 1fr; }
    .topbar-inner { justify-content: center; }
    .topbar-hide-sm { display: none; }
}

@media (max-width: 640px) {
    .card-media { height: 130px; }
    .card-media img:not(.card-media-default) { object-fit: contain; }
}

/* Mobile Digikala-style category page + fixed bottom navigation */
.category-mobile-screen, .category-mobile-dock { display: none; }
@media (max-width: 768px) {
    html, body { overflow-x: hidden; max-width: 100vw; }
    body { padding-bottom: 76px; }
    .cat-nav { display: none !important; }
    .category-mobile-dock {
        display: grid;
        position: fixed; z-index: 1000; inset-inline: 0; bottom: 0;
        grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
        padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
        background: rgba(255,255,255,.97); border-top: 1px solid var(--border);
        box-shadow: 0 -5px 20px rgba(21,35,67,.08); backdrop-filter: blur(12px);
    }
    .category-mobile-dock a, .category-mobile-dock button {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
        min-height: 52px; padding: 3px 2px; border: 0; background: transparent;
        color: var(--muted); font: inherit; font-size: .67rem; font-weight: 650; text-decoration: none;
    }
    .category-mobile-dock svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .category-mobile-dock .dock-categories { color: var(--primary); font-weight: 850; }

    .category-mobile-screen[hidden] { display: none !important; }
    .category-mobile-screen {
        position: fixed; z-index: 1100; inset: 0; display: flex; flex-direction: column;
        background: var(--bg); padding-top: env(safe-area-inset-top);
    }
    .category-mobile-head {
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        min-height: 56px; padding: 8px 16px; background: #fff; border-bottom: 1px solid var(--border);
    }
    .category-mobile-head h2 { margin: 0; font-size: 1rem; font-weight: 850; }
    .category-mobile-close { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-size: 1.35rem; }
    .category-mobile-content { overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px calc(24px + env(safe-area-inset-bottom)); }
    .category-mobile-all {
        display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 10px;
        background: var(--primary-soft); color: var(--primary); border: 1px solid #d7e3fb; border-radius: 12px;
        font-size: .9rem; font-weight: 800;
    }
    .category-mobile-all .category-mobile-root-mark { width: 28px; height: 28px; border-radius: 8px; background: #fff; color: var(--primary); flex: 0 0 28px; }
    .category-mobile-all .category-mobile-root-mark svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .category-mobile-all > svg { width: 17px; height: 17px; margin-inline-start: auto; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
    .category-mobile-group { background: transparent; border: 0; border-radius: 0; overflow: visible; }
    .category-mobile-group + .category-mobile-group { border-top: 1px solid #e6eaf2; }
    .category-mobile-root {
        display: flex; align-items: center; justify-content: space-between; gap: 10px;
        width: 100%; min-height: 58px; padding: 10px 2px; border: 0; background: transparent;
        color: var(--heading); font: inherit; font-size: .92rem; font-weight: 800; text-align: start;
    }
    .category-mobile-root:active { opacity: .7; }
    .category-mobile-root-label { display: flex; align-items: center; gap: 12px; min-width: 0; }
    .category-mobile-root-mark {
        display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px;
        border-radius: 11px; background: var(--tint, #eef2f8); color: var(--tint-ink, var(--primary));
    }
    .category-mobile-root-mark svg:not(.ignore) { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .category-mobile-root > svg { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: #a5aec1; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
    .category-mobile-group.is-open .category-mobile-root > svg { transform: rotate(180deg); }
    .category-mobile-children { display: none; padding: 2px 0 14px 0; border-top: 0; }
    .category-mobile-group.is-open .category-mobile-children { display: block; }
    .category-mobile-child {
        display: flex; align-items: center; justify-content: space-between; gap: 10px;
        padding: 10px 2px; border: 0; color: var(--text); font-size: .86rem; font-weight: 700;
    }
    .category-mobile-child:active { color: var(--primary); }
    .category-mobile-child--root { background: transparent; border-radius: 0; color: var(--tint-ink, var(--primary)); font-weight: 850; }
    .category-mobile-child--leaf {
        margin-inline-start: 0; padding-inline-start: 0; border-inline-start: 0;
        color: var(--heading); font-size: .84rem; font-weight: 750;
    }
    .category-mobile-grandchild {
        display: flex; align-items: center; justify-content: space-between; gap: 10px;
        min-height: 38px; padding: 5px 0; margin-inline-start: 14px; padding-inline-start: 12px;
        border-inline-start: 1px solid #dfe5ef; color: var(--muted); font-size: .8rem; font-weight: 550;
    }
    .category-mobile-grandchild::before { content: none; }
    .category-mobile-grandchild-label { flex: 1; }
    .category-mobile-count { color: #748197; font-size: .74rem; font-weight: 600; white-space: nowrap; }
}

@media (max-width: 768px) {
    body { font-size: 14px; }
    .header-main-inner { flex-wrap: wrap; gap: 9px; padding: 9px 14px; min-width: 0; max-width: 100%; box-sizing: border-box; }
    .logo { font-size: 1.05rem; }
    .logo-mark { width: 36px; height: 36px; border-radius: 10px; }
    .search-form { order: 10; flex-basis: 100%; max-width: none; }
    .search-form input { padding: 7px 10px; font-size: 0.85rem; }
    .search-btn { padding: 7px 15px; font-size: 0.78rem; }
    .header-actions { margin-inline-start: auto; gap: 5px; }
    .header-action span { display: none; }
    .header-action { padding: 9px 11px; }
    .header-auth-wrap { padding: 7px 11px; }
    .header-auth-half { font-size: 0.76rem; gap: 5px; }
    .cart-btn { width: 38px; height: 38px; }
    .topbar { display: none; }
    .cat-nav-link { padding: 8px 10px; font-size: 0.76rem; }
    .cat-nav-spacer, .cat-nav-hot { display: none; }
    .cat-nav-inner { justify-content: space-between; gap: 2px; overflow: visible; }
    .category-menu-trigger { gap: 4px; }
    .category-count { min-width: 18px; height: 18px; padding: 0 4px; font-size: 0.64rem; }
    .category-nav-shop { display: none; }
    .cat-nav-all { font-size: 0.72rem; }
    .main-content { padding-top: 14px; padding-bottom: 26px; }
    .p-layout { grid-template-columns: 1fr; }
    .p-gallery { position: relative; min-height: 0; height: auto; aspect-ratio: 1 / 1; }
    .p-gallery .p-gallery-image { object-fit: contain; width: 100%; height: 100%; position: absolute; inset: 0; }
    .p-info h1 { font-size: 1.15rem; }
    .buy-box { position: static; padding: 16px; }
    .buy-box .big-price { font-size: 1.25rem; }
    .cart-row { flex-wrap: wrap; }
    .cart-row-side { align-items: flex-end; width: 100%; flex-direction: row; justify-content: space-between; }
    .form-row { flex-direction: column; gap: 0; }
    .form-box { padding: 24px 20px; margin: 20px auto; }
    .section-head { flex-wrap: wrap; margin: 24px 0 14px; }
    .section-head h2, .section-title { font-size: 1.02rem; }
    .section-head h2::before, .section-title::before { height: 18px; }
    .footer-bottom { justify-content: center; text-align: center; }
    .hero { padding: 26px 20px; border-radius: 14px; margin: 12px 0 20px; }
    .hero h1 { font-size: 1.25rem; }
    .hero p { font-size: 0.86rem; }
    .hero-stat { padding-inline-end: 20px; }
    .hero-stat b { font-size: 1.05rem; }
    .features-strip { gap: 12px; padding: 16px 14px; }
    .feat b { font-size: 0.78rem; }
    .feat span { font-size: 0.68rem; }
    .feat-icon { width: 40px; height: 40px; border-radius: 11px; }
    .cat-tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .cat-tile { padding: 14px 10px; }
    .brands-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .brand-card { padding: 14px 10px 12px; }
    .promo-card { padding: 18px 20px; min-height: 120px; }
    .summary-card { position: static; }
}

/* ===================== Reviews (star ratings) ===================== */
.reviews-block { margin: 30px 0 10px; }
.reviews-summary { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--heading); }
.reviews-summary b { font-size: 1rem; }
.reviews-summary small { color: var(--muted); font-weight: 550; }
.stars { display: inline-flex; gap: 2px; }
.stars .star { width: 17px; height: 17px; fill: #d7dce6; }
.stars .star.is-on { fill: #f5a623; }
.reviews-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.reviews-list { display: grid; gap: 10px; }
.reviews-empty { padding: 18px; border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); font-size: .87rem; text-align: center; }
.review-card { padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: 13px; }
.review-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 850; font-size: .95rem; }
.review-card-meta { display: grid; gap: 3px; }
.review-card-meta b { font-size: .88rem; color: var(--heading); }
.review-card-body { margin: 0; color: var(--text); font-size: .87rem; line-height: 1.9; }
.review-form-card { padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.review-form-card h3 { margin: 0 0 12px; font-size: .98rem; color: var(--heading); }
.review-label { display: grid; gap: 6px; margin-bottom: 12px; font-size: .82rem; font-weight: 750; color: var(--heading); }
.review-label input, .review-label textarea { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: .87rem; resize: vertical; }
.review-label input:focus, .review-label textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.review-flash { padding: 10px 12px; margin-bottom: 12px; background: #e8f7ee; color: #187a43; border-radius: 10px; font-size: .82rem; font-weight: 700; }
.review-error { display: block; margin: -6px 0 10px; color: var(--danger); font-size: .76rem; }
.review-submit { width: 100%; }
.stars--input { display: inline-flex; flex-direction: row-reverse; gap: 4px; margin-bottom: 12px; }
.stars--input input { position: absolute; opacity: 0; pointer-events: none; }
.stars--input label { cursor: pointer; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; transition: transform .12s ease; }
.stars--input .star, .stars--input label svg { width: 26px; height: 26px; fill: #c6cedd; stroke: #9aa7bd; stroke-width: 1.2; transition: fill .12s ease, stroke .12s ease, transform .12s ease; }
.stars--input label:hover { transform: scale(1.12); }
.stars--input label:hover svg, .stars--input label:hover ~ label svg,
.stars--input input:checked ~ label svg { fill: #f5a623; stroke: #d98c0d; }
.stars--input input:checked ~ label { transform: scale(1.05); }
.stars--input label:active svg { transform: scale(1.18); }
.stars--input input:focus-visible + label { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

@media (max-width: 768px) {
    .reviews-grid { grid-template-columns: 1fr; }
    .stars--input label { width: 36px; height: 36px; }
    .stars--input .star, .stars--input label svg { width: 30px; height: 30px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
/* ===== استعلام به‌جای قیمت در صفحهٔ محصول + باکس تماس ===== */
.esit-quote-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-top: 16px;
    box-shadow: var(--shadow-sm);
}
.esit-quote-card .eqc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.esit-quote-card .eqc-title { font-weight: 900; font-size: 1.05rem; color: var(--text); }
.esit-quote-card .eqc-badge {
    font-size: .72rem; font-weight: 700; color: var(--primary);
    background: var(--primary-soft); border: 1px solid #c9dcf0;
    padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.esit-quote-card p { font-size: .85rem; color: var(--muted); line-height: 1.9; margin: 6px 0 14px; }
.esit-quote-card .eqc-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.esit-contact-box {
    background: var(--primary-soft);
    border: 1px solid #c9dcf0;
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-top: 14px;
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.esit-contact-box .ecb-icon { flex-shrink: 0; color: var(--primary); }
.esit-contact-box .ecb-body { flex: 1; min-width: 180px; }
.esit-contact-box .ecb-title { font-weight: 800; font-size: .92rem; color: var(--text); margin-bottom: 3px; }
.esit-contact-box .ecb-text { font-size: .8rem; color: var(--muted); line-height: 1.8; }
.esit-contact-box .btn { white-space: nowrap; }

@media (max-width: 768px) {
    .esit-quote-card, .esit-contact-box { padding: 14px 16px; }
    .esit-quote-card .eqc-actions .btn { width: 100%; justify-content: center; }
}
