/* زرین‌کالا — استایل‌های کامپوننت روی Bootstrap RTL + tokens.css */

/* ---- چیدمان صفحه --------------------------------------------------------
   فوتر همیشه پایین صفحه بمونه، حتی اگه محتوای <main> کوتاه باشه — بدنه یک
   ستون فلکسی با حداقل ارتفاع کل viewport می‌شه، <main> فضای خالی رو پر
   می‌کنه (flex-grow) و فوتر جمع نمی‌شه (flex-shrink: 0 توی خودِ .site-footer
   پایین‌تر). وقتی محتوا از یک صفحه بلندتر باشه، این خودش به‌خودی به همون
   حالت معمولیِ اسکرول برمی‌گرده — فوتر همچنان انتهای محتواست، نه چسبیده به
   پایین viewport با position: fixed. -------------------------------------- */
html, body {
    height: 100%;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main {
    flex: 1 0 auto;
}

/* ---- نوار بالا --------------------------------------------------------- */
.site-nav {
    background: rgba(255, 255, 255, .82);
    border-bottom: 1px solid var(--border);
    padding-top: .75rem;
    padding-bottom: .75rem;
    box-shadow: 0 1px 2px rgba(34, 25, 14, .05);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .site-nav {
        backdrop-filter: saturate(180%) blur(14px);
        -webkit-backdrop-filter: saturate(180%) blur(14px);
    }
}
.brand-logo {
    height: 32px;
    width: auto;
    display: block;
}
.brand-logo-footer {
    height: 36px;
}
.navbar-brand {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--ink) !important;
}
.nav-search-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .75rem;
    border-radius: 8px;
    color: var(--ink-soft);
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}
.nav-search-link:hover { background: var(--surface-2); color: var(--gold-ink); }
.nav-search-link svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    flex: none;
}
.nav-text-link {
    color: var(--ink-soft);
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
    padding: .45rem .5rem;
    white-space: nowrap;
    transition: color .15s ease;
}
.nav-text-link:hover { color: var(--gold-ink); }
.nav-divider {
    width: 1px;
    height: 22px;
    background: var(--border);
}
.site-nav .btn {
    border-radius: 999px;
    font-weight: 700;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ---- هدر: لوگو | جستجو | حساب ---------------------------------------------- */
.site-nav-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
}
.nav-search-form {
    position: relative;
    order: 3;
    flex: 1 1 100%;
    min-width: 0;
}
.nav-actions {
    order: 2;
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: .5rem;
}
@media (min-width: 992px) {
    .site-nav-inner { flex-wrap: nowrap; }
    .nav-search-form { order: 2; flex: 1 1 auto; max-width: 40rem; }
    .nav-actions { order: 3; }
}
.nav-search-box {
    display: flex;
    align-items: center;
    height: 2.9rem;
    background: var(--surface-2);
    border: 1px solid transparent;
    border-radius: .8rem;
    padding-inline-start: .9rem;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.nav-search-box:focus-within {
    background: var(--surface);
    border-color: var(--gold);
    box-shadow: 0 0 0 .25rem rgba(184, 132, 42, .12);
}
.nav-search-icon {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: var(--ink-faint);
    stroke-width: 2;
    stroke-linecap: round;
}
.nav-search-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    padding: 0 .65rem;
    font-size: .95rem;
    color: var(--ink);
    outline: none;
}
.nav-search-input::-webkit-search-cancel-button { display: none; }
.nav-search-submit {
    height: calc(100% - .5rem);
    margin-inline-end: .25rem;
    padding: 0 1.1rem;
    border: 0;
    border-radius: .6rem;
    background: var(--gold);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    white-space: nowrap;
}
.nav-search-submit:hover { background: var(--gold-ink); }

.nav-suggest {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + .4rem);
    z-index: 1050;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .8rem;
    box-shadow: var(--shadow-lg);
    padding: .4rem;
    max-height: 70vh;
    overflow-y: auto;
}
.nav-suggest-heading {
    font-size: .75rem;
    font-weight: 700;
    color: var(--ink-faint);
    padding: .5rem .65rem .25rem;
}
.nav-suggest-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .55rem .65rem;
    border-radius: .5rem;
    color: var(--ink);
    text-decoration: none;
    font-size: .9rem;
}
.nav-suggest-item:hover, .nav-suggest-item.is-active { background: var(--surface-2); color: var(--ink); }
.nav-suggest-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-suggest-meta { flex: none; font-size: .8rem; color: var(--gold-ink); font-weight: 600; }
.nav-suggest-item.is-all {
    margin-top: .25rem;
    border-top: 1px solid var(--border);
    border-radius: 0 0 .5rem .5rem;
    color: var(--gold-ink);
    font-weight: 600;
}

.nav-admin-btn, .nav-account-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    height: 2.4rem;
    padding: 0 .85rem;
    border-radius: .7rem;
    font-size: .88rem;
    font-weight: 700;
    white-space: nowrap;
}
.nav-admin-btn {
    background: var(--navy);
    color: #fff;
    border: 0;
}
.nav-admin-btn:hover { background: #162c3b; color: #fff; }
.nav-account-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink);
}
.nav-account-btn:hover, .nav-account-btn[aria-expanded="true"] { border-color: var(--gold); }
.nav-admin-btn svg, .nav-account-btn svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nav-account-name {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-account-menu {
    min-width: 13rem;
    border-color: var(--border);
    border-radius: .8rem;
    box-shadow: var(--shadow-md);
    padding: .4rem;
}
.nav-account-menu .dropdown-item {
    border-radius: .45rem;
    font-size: .9rem;
    padding: .5rem .7rem;
}
.nav-account-menu .dropdown-item:active { background: var(--gold); }
.nav-login-btn { height: 2.4rem; display: inline-flex; align-items: center; }
@media (max-width: 575.98px) {
    .nav-admin-btn span, .nav-account-name { display: none; }
}

/* ---- نوار باریک دسته‌بندی‌ها (زیر هدر، روی همه‌ی صفحات) -------------------- */
.category-strip {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.category-strip-inner {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: .6rem 1rem;
    scrollbar-width: thin;
}
.category-strip-inner::-webkit-scrollbar { height: 4px; }
.category-strip-inner::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.category-strip-link {
    color: var(--ink-soft);
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    padding: .2rem 0;
    border-bottom: 2px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}
.category-strip-link:hover, .category-strip-link.is-active {
    color: var(--gold-ink);
    border-bottom-color: var(--gold);
}

/* ---- فوتر --------------------------------------------------------------- */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: 5rem;
    flex-shrink: 0; /* هیچ‌وقت جمع نشه، حتی وقتی <main> بالاش خیلی کوتاهه */
}
.footer-heading {
    font-size: .8rem;
    font-weight: 700;
    color: var(--ink-faint);
    margin-bottom: .9rem;
}
.footer-links li { margin-bottom: .5rem; }
.footer-links a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: .92rem;
}
.footer-links a:hover { color: var(--gold-ink); }
.footer-bottom { border-top: 1px solid var(--border); }

/* ---- هیرو ----------------------------------------------------------------- */
/* پس‌زمینه‌ی متحرک: چند لکه‌ی رنگی محو (طلایی/سرمه‌ای/سبز) که آروم
   می‌چرخن و جابه‌جا می‌شن (::before)، به‌علاوه یک الگوی نقطه‌ای خیلی کم‌رنگ
   روشون (::after) — هیچ کتابخانه یا تصویر خارجی، فقط CSS خالص، سبک و
   کاملاً self-hosted (مطابق فلسفه‌ی پروژه: هیچ CDN/کتابخونه‌ی جاوااسکریپتی
   برای این کار لازم نیست). حرکت با transform انجام می‌شه (GPU-friendly)،
   و برای کسایی که حرکت رو کم می‌خوان (prefers-reduced-motion)، کاملاً
   متوقف می‌شه. */
.hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
}
.hero::before {
    content: "";
    position: absolute;
    inset: -30%;
    z-index: -2;
    background:
        radial-gradient(32% 32% at 18% 28%, rgba(184, 132, 42, .40), transparent 70%),
        radial-gradient(28% 28% at 84% 16%, rgba(31, 58, 77, .30), transparent 70%),
        radial-gradient(36% 36% at 68% 86%, rgba(47, 110, 98, .22), transparent 70%),
        radial-gradient(24% 24% at 8% 82%, rgba(184, 132, 42, .22), transparent 70%);
    filter: blur(70px);
    animation: hero-aurora 26s ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes hero-aurora {
    0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
    50%  { transform: translate3d(-3%, 3%, 0) rotate(6deg) scale(1.08); }
    100% { transform: translate3d(3%, -3%, 0) rotate(-5deg) scale(1.03); }
}
@media (prefers-reduced-motion: reduce) {
    .hero::before { animation: none; }
}
.hero-eyebrow {
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    color: var(--gold-ink);
    background: rgba(255, 255, 255, .75);
    box-shadow: var(--shadow-sm);
    padding: .35rem .9rem;
    border-radius: 999px;
    margin-bottom: 1.1rem;
}
.hero h1 {
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    /* پیش‌فرض بوت‌استرپ (1.2) برای فارسی خیلی تنگه — خط دوم روی نیم‌فاصله/
       دندانه‌های خط اول می‌افته. 1.6 فاصله‌ی نفس‌کشیدن واقعی می‌ده. */
    line-height: 1.6;
    font-weight: 800;
    color: var(--ink);
}
.hero h1 em {
    font-style: normal;
    color: var(--gold-ink);
}
.hero-lede {
    color: var(--ink-soft);
    font-size: 1.15rem;
    max-width: 55ch;
}
.hero-search { max-width: 720px; }
.hero-search .input-group {
    border-radius: .85rem;
    box-shadow: var(--shadow-lg);
}
.hero-search .form-control {
    height: 3.2rem;
    font-size: 1.05rem;
    border-radius: 0 .85rem .85rem 0;
    border-color: transparent;
}
.hero-search .btn {
    border-radius: .85rem 0 0 .85rem;
    padding-inline: 1.6rem;
}

/* ---- کارت دسته‌بندی -------------------------------------------------------- */
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    padding: 1.4rem 1rem;
    border-radius: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--ink);
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
    color: var(--ink);
}
.category-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--gold-soft);
    color: var(--gold-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .18s ease;
}
.category-card:hover .category-icon { transform: scale(1.08) rotate(-4deg); }
.category-card .label {
    font-weight: 600;
    font-size: .92rem;
    text-align: center;
}
/* چرخش رنگ آیکون‌ها بین چهار دسته‌ی رنگی برند — فقط تنوع بصری، بدون
   معنای خاص روی هر دسته‌بندی. nth-child روی خودِ .col هست (نه
   .category-card) چون هر کارت تنها فرزند از نوع خودش داخل .col والدشه —
   nth-of-type روی خود کارت همیشه ۱ می‌شد. */
.col:nth-child(4n+2) .category-icon { background: var(--navy-soft); color: var(--navy); }
.col:nth-child(4n+3) .category-icon { background: var(--teal-soft); color: var(--teal); }
.col:nth-child(4n+4) .category-icon { background: var(--terracotta-soft); color: var(--terracotta); }

/* ---- مزیت‌ها / روش کار ------------------------------------------------------ */
.value-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--navy-soft);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.value-icon.is-gold { background: var(--gold-soft); color: var(--gold-ink); }
.value-icon.is-teal { background: var(--teal-soft); color: var(--teal); }
.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ink), #3B2E1C);
    box-shadow: var(--shadow-sm);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex: none;
}

/* ---- کارت محصول ----------------------------------------------------------- */
.product-card {
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    height: 100%;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .18s ease, transform .18s ease;
}
.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.product-card .product-thumb {
    aspect-ratio: 4 / 3;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-card .product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-card .price {
    font-weight: 700;
    color: var(--ink);
}

/* ---- گالری تصویر محصول: فرم فروشنده --------------------------------------- */
.product-gallery-thumb {
    width: 96px;
    text-align: center;
}
.product-gallery-thumb img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: .6rem;
    border: 1px solid var(--border);
    margin-bottom: .3rem;
}
.product-gallery-thumb-badge {
    display: block;
    font-size: .72rem;
    color: var(--ink-faint);
}
.product-gallery-thumb form { display: inline; }

/* ---- گالری تصویر محصول: صفحه‌ی محصول --------------------------------------- */
.product-gallery-main {
    aspect-ratio: 4 / 3;
    background: var(--surface-2);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-gallery-thumbs {
    display: flex;
    gap: .5rem;
    margin-top: .6rem;
    flex-wrap: wrap;
}
.product-gallery-thumbs button {
    padding: 0;
    border: 2px solid transparent;
    border-radius: .5rem;
    overflow: hidden;
    width: 64px;
    height: 64px;
    background: none;
    cursor: pointer;
}
.product-gallery-thumbs button.is-active { border-color: var(--gold-ink); }
.product-gallery-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---- باند دعوت فروشنده ------------------------------------------------------ */
.cta-band {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(135deg, var(--ink), #34281A 60%, var(--ink));
    color: #fff;
    border-radius: 1.25rem;
    box-shadow: var(--shadow-lg);
}
.cta-band::before {
    content: "";
    position: absolute;
    inset: -40%;
    z-index: -1;
    background:
        radial-gradient(30% 40% at 15% 20%, rgba(184, 132, 42, .35), transparent 70%),
        radial-gradient(30% 40% at 85% 80%, rgba(47, 110, 98, .25), transparent 70%);
    filter: blur(50px);
}
.cta-band .btn-light {
    box-shadow: var(--shadow-md);
}

/* ---- جدول مقایسه قیمت -------------------------------------------------------- */
.offer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1rem;
    border: 1px solid var(--border);
    border-radius: .75rem;
    background: var(--surface);
}
.offer-row.is-cheapest {
    border-color: var(--gold);
    background: var(--gold-soft);
}

/* ---- نشان «بهترین انتخاب» / «ارزان‌ترین» + امتیاز فروشگاه ----------------- */
.offer-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    padding: .18rem .55rem;
    border-radius: 999px;
}
.offer-badge.is-best-pick {
    background: var(--navy-soft);
    color: var(--navy);
}
.offer-badge.is-cheapest-badge {
    background: var(--gold-soft);
    color: var(--gold-ink);
}
.offer-badge.is-installment {
    background: var(--teal-soft);
    color: var(--teal);
}
.seller-rating {
    font-size: .85rem;
    color: var(--gold-ink);
    letter-spacing: -1px;
}
.seller-rating-number {
    color: var(--ink-faint);
    font-size: .78rem;
    letter-spacing: 0;
}

/* ---- ظاهرشدن آروم بخش‌ها موقع اسکرول ---------------------------------------
   layout.php یک IntersectionObserver کوچیک داره که کلاس .is-visible رو به
   هر [data-reveal] موقع رسیدن به viewport اضافه می‌کنه. تا قبل از اون،
   عنصر کمی پایین‌تر و محوئه. prefers-reduced-motion کاملاً غیرفعالش می‌کنه.
   اگه جاوااسکریپت غیرفعال باشه، کلاس no-js روی <html> هیچ‌وقت به js تغییر
   پیدا نمی‌کنه — قانون .no-js زیر همون‌جا محتوا رو همیشه نمایان نگه
   می‌داره، پس بدون جاوااسکریپت هم چیزی گم نمی‌شه. */
[data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}
[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
/* Fallback اگر جاوااسکریپت غیرفعال بود — بدون آن، کلاس is-visible هیچ‌وقت
   اضافه نمی‌شه و محتوا برای همیشه محو می‌موند. */
.no-js [data-reveal] {
    opacity: 1;
    transform: none;
}

/* ---- صفحه‌ی نتایج جستجو ------------------------------------------------------ */
.search-head { margin-bottom: 1rem; }
.search-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
    padding: .75rem;
    margin-bottom: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .8rem;
}
.search-filters .form-select { width: auto; min-width: 9rem; }
.search-filter-check {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .88rem;
    margin: 0;
}
.search-filter-check .form-check-input { margin: 0; }

/* ---- کارت محصول (جستجو + صفحه‌ی اصلی) ------------------------------------- */
.product-card-body { padding: .85rem .95rem 1rem; }
.product-card-title {
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.7;
    color: var(--ink);
    margin-bottom: .45rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.1em;
}
.product-card-price {
    font-weight: 800;
    font-size: 1.02rem;
    color: var(--ink);
    margin-bottom: .3rem;
}
.product-card-from {
    font-weight: 500;
    font-size: .8rem;
    color: var(--ink-faint);
    margin-inline-end: .2rem;
}
.product-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
    font-size: .8rem;
    color: var(--ink-faint);
}

.empty-state {
    padding: 2rem 1.25rem;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: .8rem;
    color: var(--ink-soft);
}

/* ---- پنل مدیریت ------------------------------------------------------------- */
.admin-nav {
    display: flex;
    gap: .25rem;
    overflow-x: auto;
    padding: .35rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .8rem;
    scrollbar-width: thin;
}
.admin-nav-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .45rem .6rem;
    border-radius: .55rem;
    color: var(--ink-soft);
    font-size: .86rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}
.admin-nav-link:hover { background: var(--surface-2); color: var(--ink); }
@media (min-width: 768px) {
    .admin-nav { flex-wrap: wrap; overflow-x: visible; }
}
.admin-nav-link.is-active { background: var(--gold); color: #fff; }
.admin-nav-count {
    min-width: 1.3rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: var(--terracotta);
    color: #fff;
    font-size: .72rem;
    line-height: 1.3rem;
    text-align: center;
}
.admin-nav-link.is-active .admin-nav-count { background: rgba(255, 255, 255, .3); }

.admin-tabs .nav-link { color: var(--ink-soft); font-weight: 600; }
.admin-tabs .nav-link.active { color: var(--ink); }

.admin-product-row {
    display: grid;
    grid-template-columns: 72px 1fr auto 9rem;
    gap: 1rem;
    align-items: start;
    padding: .85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .8rem;
}
.admin-product-thumb {
    width: 72px;
    height: 72px;
    border-radius: .6rem;
    background: var(--surface-2);
    overflow: hidden;
}
.admin-product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-product-info { min-width: 0; }
.admin-product-price { font-weight: 700; white-space: nowrap; }
.admin-product-actions { display: flex; flex-direction: column; gap: .4rem; }
.admin-reject summary { list-style: none; cursor: pointer; }
.admin-reject summary::-webkit-details-marker { display: none; }
.admin-reject-form { margin-top: .4rem; }
@media (max-width: 767.98px) {
    .admin-product-row { grid-template-columns: 56px 1fr; }
    .admin-product-thumb { width: 56px; height: 56px; }
    .admin-product-price, .admin-product-actions { grid-column: 2; }
}

.stat-card {
    display: block;
    height: 100%;
    padding: 1rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .8rem;
    color: var(--ink);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
a.stat-card:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); color: var(--ink); }
.stat-card-label { font-size: .82rem; color: var(--ink-faint); margin-bottom: .25rem; }
.stat-card-value { font-size: 1.5rem; font-weight: 800; line-height: 1.3; }
.stat-card.is-alert { border-color: var(--terracotta); background: var(--terracotta-soft); }

/* ---- افزودن محصول: انتخاب از کاتالوگ ----------------------------------------- */
.catalog-summary, .pick-item {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .8rem;
}
.catalog-summary-thumb, .pick-item-thumb {
    width: 64px;
    height: 64px;
    flex: none;
    border-radius: .6rem;
    background: var(--surface-2);
    overflow: hidden;
}
.catalog-summary-thumb img, .pick-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pick-results { display: flex; flex-direction: column; gap: .5rem; }
.pick-item-body { flex: 1; min-width: 0; }
.pick-item-title { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-item-meta { font-size: .8rem; color: var(--ink-faint); }
.pick-item-action { flex: none; }
.min-w-0 { min-width: 0; }

/* Out-of-stock offers stay in the comparison table (price history context)
   but read as inactive — no buy button, greyed text. */
.compare-table tr.is-out-of-stock td { opacity: .55; }

/* Subcategory chips on the search page. */
.subcat-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.subcat-chip { display: inline-block; padding: .3rem .8rem; border: 1px solid var(--border); border-radius: 999px; font-size: .85rem; color: inherit; text-decoration: none; background: var(--surface); }
.subcat-chip:hover { border-color: var(--gold); color: var(--ink); }
.subcat-chip.is-active { background: var(--gold); border-color: var(--gold); color: #fff; }

/* Admin category tree. */
.category-admin-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .35rem .25rem; }
.category-admin-row:not(.is-main) { padding-inline-start: 1.75rem; border-top: 1px dashed var(--border); }
.category-admin-row form.flex-grow-1 { max-width: 28rem; }

/* Admin products filtered by category: a checkbox column for bulk move. */
.admin-product-row.has-check { grid-template-columns: auto 72px 1fr auto 9rem; }
@media (max-width: 767.98px) {
    .admin-product-row.has-check { grid-template-columns: auto 56px 1fr; }
    .admin-product-row.has-check .admin-product-price,
    .admin-product-row.has-check .admin-product-actions { grid-column: 3; }
}

/* Upload preview: chosen files before saving, with a "main image" pick. */
.upload-preview { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.upload-preview:empty { display: none; }
.upload-preview-item { position: relative; width: 104px; text-align: center; }
.upload-preview-item img { width: 104px; height: 104px; object-fit: cover; border-radius: .6rem; border: 2px solid var(--border); display: block; }
.upload-preview-item.is-cover img,
.product-gallery-thumb.is-cover img { border: 2px solid var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.upload-preview-pick { border: 0; background: none; font-size: .75rem; color: var(--gold-ink); padding: .2rem 0 0; }
.upload-preview-item.is-cover .upload-preview-pick { color: var(--ink); font-weight: 700; cursor: default; }
.upload-preview-remove { position: absolute; top: 4px; inset-inline-start: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; line-height: 1; font-size: 1rem; }

/* Admin product editor: review box and per-seller cards. */
.admin-decide { display: flex; flex-direction: column; gap: .35rem; }
.admin-offer-card.is-content { border-color: var(--gold); }
