:root {
    --brand-red-1: #ee1d4d;
    --brand-red-2: #ff4d6d;
    --brand-red-dark: #c8102e;
    --ink: #1c1c22;
    --ink-soft: #5b5b66;
    --line: #e9e9ee;
    --surface: #ffffff;
    --surface-muted: #f6f6f9;
    --shadow-sm: 0 1px 2px rgba(20, 20, 30, .04);
    --shadow-md: 0 8px 24px rgba(20, 20, 30, .08);
    --shadow-lg: 0 24px 60px rgba(20, 20, 30, .22);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --header-h: 64px;
    --subnav-h: 46px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
body { font-family: 'Vazirmatn', Tahoma, sans-serif; background: #fafafc; color: var(--ink); direction: rtl; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

#pageRoot { transition: filter .28s ease; }
#pageRoot.blurred { filter: blur(6px) brightness(.94); pointer-events: none; user-select: none; }

/* ===================== HEADER ===================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.header-top {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 20px;
    height: var(--header-h);
}

.brand {
    display: flex;
    align-items: center;
    margin-inline-start: 6px;
    flex-shrink: 0;
}

.brand svg { height: 30px; display: block; }

/* Search */
.search-wrap {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    height: 46px;
    overflow: visible;
    position: relative;
    transition: border-color .15s ease, box-shadow .15s ease;
    min-width: 0;
}

.search-wrap:focus-within {
    border-color: var(--brand-red-2);
    box-shadow: 0 0 0 3px rgba(238, 29, 77, .10);
    background: var(--surface);
}

.search-icon-btn {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 100%; flex-shrink: 0;
    background: none; border: none; color: var(--ink-soft);
}

.search-input {
    flex: 1 1 auto; min-width: 0; border: none; background: transparent;
    outline: none; font-size: 14px; color: var(--ink); padding: 0 4px; height: 100%;
}
.search-input::placeholder { color: #a7a7b3; }

.category-trigger {
    flex-shrink: 0; display: flex; align-items: center; gap: 6px;
    height: 100%; padding: 0 16px 0 14px;
    background: linear-gradient(135deg, var(--brand-red-1), var(--brand-red-dark));
    color: #fff; border: none; border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: 14px; font-weight: 600; white-space: nowrap;
    transition: filter .15s ease; margin-inline-start: -1px;
}
.category-trigger:hover { filter: brightness(1.05); }
.category-trigger .chev { width: 14px; height: 14px; transition: transform .2s ease; flex-shrink: 0; }
.category-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* Search results */
.search-results {
    position: absolute; top: calc(100% + 8px); inset-inline-start: 0; inset-inline-end: 0;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg); max-height: 420px; overflow-y: auto; z-index: 60;
    opacity: 0; transform: translateY(-6px); pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
}
.search-results.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.search-results-header {
    padding: 10px 16px; font-size: 12px; color: var(--ink-soft);
    border-bottom: 1px solid var(--line); display: flex; justify-content: space-between;
}
.search-result-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 16px;
    font-size: 13.5px; border-bottom: 1px solid var(--line); transition: background .12s ease;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--surface-muted); }
.sri-icon {
    width: 30px; height: 30px; border-radius: 8px; background: var(--surface-muted);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--brand-red-1);
}
.sri-text mark { background: rgba(238, 29, 77, .16); color: var(--brand-red-dark); border-radius: 3px; padding: 0 1px; }
.sri-tag { margin-inline-start: auto; font-size: 11px; color: var(--ink-soft); background: var(--surface-muted); padding: 2px 8px; border-radius: 999px; flex-shrink: 0; }
.search-empty { padding: 28px 16px; text-align: center; color: var(--ink-soft); font-size: 13px; }

/* Account */
.account-btn {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface-muted); border: 1px solid var(--line);
    border-radius: var(--radius-md); padding: 6px 8px 6px 12px;
    height: 46px; flex-shrink: 0; transition: background .15s ease, border-color .15s ease;
}
.account-btn:hover { background: #eee; }
.account-btn .chev-sm { width: 12px; height: 12px; color: var(--ink-soft); }
.account-label { font-size: 13px; color: var(--ink); white-space: nowrap; }
.account-avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--surface);
    border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
    color: var(--ink-soft); flex-shrink: 0;
}

/* Cart */
.cart-btn {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: var(--radius-md);
    background: var(--surface-muted); border: 1px solid var(--line); color: var(--ink); flex-shrink: 0;
}
.cart-btn:hover { background: #eee; }
.cart-badge {
    position: absolute; top: -6px; inset-inline-end: -6px;
    background: var(--brand-red-1); color: #fff; font-size: 10px; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--surface); padding: 0 3px;
}

/* Help */
.help-btn {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%;
    background: transparent; border: 1px solid var(--line); color: var(--ink-soft); flex-shrink: 0;
}
.help-btn:hover { background: var(--surface-muted); }

/* ===================== SUBNAV ===================== */
.subnav { border-top: 1px solid var(--line); background: var(--surface-muted); }
.subnav-inner {
    max-width: 1320px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; height: var(--subnav-h); gap: 18px;
}
.subnav-links {
    display: flex; align-items: center; gap: 22px; font-size: 13.5px;
    color: var(--ink-soft); overflow-x: auto; scrollbar-width: none;
}
.subnav-links::-webkit-scrollbar { display: none; }
.subnav-link { display: flex; align-items: center; gap: 6px; white-space: nowrap; transition: color .15s ease; }
.subnav-link:hover { color: var(--ink); }
.subnav-link svg { width: 16px; height: 16px; flex-shrink: 0; }

.all-categories { position: relative; flex-shrink: 0; }
.all-categories-btn {
    display: flex; align-items: center; gap: 8px;
    background: none; border: none; font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap;
}
.all-categories-btn .grid-ico { width: 18px; height: 18px; }
.all-categories-btn .chev { width: 12px; height: 12px; transition: transform .2s ease; color: var(--ink-soft); }
.all-categories-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* ===================== CATEGORY MEGA DROPDOWN ===================== */
.category-panel {
    position: absolute; top: calc(100% + 10px); background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: 10px; z-index: 55;
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
    max-height: 70vh; overflow-y: auto; width: 450px;
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(-8px) scale(.98); transition: .18s;
}
.category-panel.open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.cat-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border-radius: var(--radius-sm); transition: background .14s ease;
}
.cat-item:hover { background: var(--surface-muted); }
.cat-item .cat-ico {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, #fff0f2, #ffe4e8);
    display: flex; align-items: center; justify-content: center; color: var(--brand-red-1); flex-shrink: 0;
}
.cat-item-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cat-item-text strong { font-size: 13px; font-weight: 600; color: var(--ink); }
.cat-item-text span { font-size: 11px; color: var(--ink-soft); }

/* ===================== HIERARCHICAL CATEGORY DROPDOWN ===================== */
.cat-parent-item { position: relative; }
.cat-parent-btn {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 10px 12px; border: none; background: transparent;
    border-radius: var(--radius-sm); cursor: pointer;
    text-align: right; transition: background .14s ease;
}
.cat-parent-btn:hover { background: var(--surface-muted); }
.cat-parent-btn[aria-expanded="true"] { background: var(--surface-muted); }
.cat-parent-btn[aria-expanded="true"] .cat-chev { transform: rotate(180deg); }
.cat-chev { width: 16px; height: 16px; color: var(--ink-soft); margin-inline-start: auto; flex-shrink: 0; transition: transform .2s ease; }

.cat-children-panel {
    position: absolute; inset-inline-start: 100%; top: 0;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    padding: 8px; min-width: 220px; z-index: 60;
    display: flex; flex-direction: column; gap: 2px;
}
.cat-child-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    transition: background .14s ease; color: inherit; text-decoration: none;
}
.cat-child-item:hover { background: var(--surface-muted); }
.cat-child-ico {
    width: 28px; height: 28px; border-radius: 7px;
    background: linear-gradient(135deg, #fdf1f3, #fff6f4);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-red-1); flex-shrink: 0;
}
.cat-child-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cat-child-text strong { font-size: 12px; font-weight: 600; color: var(--ink); }
.cat-child-text span { font-size: 10.5px; color: var(--ink-soft); }

.category-panel.from-header { inset-inline-end: auto; inset-inline-start: 0; width: min(560px, 90vw); transform-origin: top right; }

@media (max-width: 720px) {
    .cat-children-panel {
        position: static; box-shadow: none; border: none;
        border-top: 1px solid var(--line); margin-top: 4px;
        padding: 8px 0 0; background: transparent;
    }
    .cat-child-item { padding: 8px 10px 8px 36px; }
}

/* ===================== OVERLAY + MODAL (login) ===================== */
.overlay {
    position: fixed; inset: 0; background: rgba(15, 15, 20, .45); z-index: 100;
    opacity: 0; pointer-events: none; transition: opacity .25s ease;
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.auth-modal {
    background: var(--surface); width: min(420px, 100%); border-radius: var(--radius-lg);
    padding: 32px 30px 28px; box-shadow: var(--shadow-lg); position: relative;
    transform: translateY(16px) scale(.96); opacity: 0;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .22s ease;
}
.overlay.open .auth-modal { transform: translateY(0) scale(1); opacity: 1; }
.modal-close {
    position: absolute; top: 16px; inset-inline-start: 16px;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--surface-muted); border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-soft); transition: background .15s ease, color .15s ease, transform .15s ease;
}
.modal-close:hover { background: #fde8ec; color: var(--brand-red-dark); transform: rotate(90deg); }
.modal-logo { display: flex; justify-content: center; margin-bottom: 22px; }
.modal-logo svg { height: 34px; }
.modal-title { text-align: center; font-size: 18px; font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.modal-sub { text-align: center; font-size: 13px; color: var(--ink-soft); margin: 0 0 20px; }
.phone-field {
    display: flex; align-items: center; border: 1px solid var(--line);
    border-radius: var(--radius-md); height: 50px; padding: 0 14px; margin-bottom: 18px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.phone-field:focus-within { border-color: var(--brand-red-2); box-shadow: 0 0 0 3px rgba(238, 29, 77, .10); }
.phone-field input { flex: 1; border: none; outline: none; background: transparent; font-size: 14px; text-align: center; direction: ltr; }
.phone-field input::placeholder { color: #b6b6c0; letter-spacing: 1px; }
.phone-field svg { width: 20px; height: 20px; color: #c7c7d1; flex-shrink: 0; }
.submit-btn {
    width: 100%; height: 50px; border: none; border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--brand-red-2), var(--brand-red-1));
    color: #fff; font-size: 15px; font-weight: 700;
    box-shadow: 0 10px 24px rgba(238, 29, 77, .30); transition: filter .15s ease, transform .1s ease;
}
.submit-btn:hover { filter: brightness(1.04); }
.submit-btn:active { transform: scale(.98); }
.modal-terms { margin-top: 16px; text-align: center; font-size: 11.5px; line-height: 1.9; color: var(--ink-soft); }
.modal-terms a { color: var(--brand-red-1); font-weight: 600; }
.modal-terms a:hover { text-decoration: underline; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 980px) { .subnav-links .ml-text { display: none; } }
@media (max-width: 860px) {
    .account-label { display: none; }
    .account-btn { padding: 6px; }
}
@media (max-width: 720px) {
    .header-top { flex-wrap: wrap; height: auto; row-gap: 10px; padding: 10px 14px 12px; }
    .brand { order: 1; margin-inline-start: 0; }
    .help-btn { order: 2; }
    .account-btn { order: 3; }
    .cart-btn { order: 4; }
    .search-wrap { order: 5; flex-basis: 100%; width: 100%; }
    .category-trigger span.label-text { display: none; }
    .category-trigger { padding: 0 12px; }
    .subnav-inner { flex-wrap: wrap; height: auto; padding: 8px 14px; row-gap: 8px; }
    .subnav-links { order: 2; width: 100%; }
    .all-categories { order: 1; }
    .category-panel.from-header { inset-inline-start: 0; inset-inline-end: auto; width: 94vw; }
}
@media (max-width: 480px) {
    .category-panel { grid-template-columns: 1fr; }
    .auth-modal { padding: 26px 20px 22px; }
    .account-avatar { width: 28px; height: 28px; }
    .cart-btn, .account-btn { height: 42px; }
    .search-wrap { height: 42px; }
    .help-btn { width: 34px; height: 34px; }
}
@media (max-width: 720px) {
    .category-panel {
        width: calc(100vw - 20px); max-width: calc(100vw - 20px);
        right: 10px; left: 10px; box-sizing: border-box;
    }
}

button:focus-visible, input:focus-visible, a:focus-visible {
    outline: 2px solid var(--brand-red-1); outline-offset: 2px;
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}
/* =========================================================
   CATEGORY BUTTONS — MODERN PREMIUM STYLE
   ========================================================= */

/* ---------- Header Category Button ---------- */

.category-trigger {
    position: relative;
    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    height: 100%;
    min-width: 158px;
    padding: 0 17px;

    border: 0;
    border-radius: var(--radius-md) 0 0 var(--radius-md);

    background:
        linear-gradient(135deg,
            #ff315d 0%,
            #ee1d4d 48%,
            #c8102e 100%);

    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.18),
        0 4px 14px rgba(238, 29, 77, .16);

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease,
        background .18s ease;

    overflow: hidden;
}

/* نور متحرک روی دکمه */
.category-trigger::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 70%;
    height: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,.18),
        transparent
    );

    transform: skewX(-20deg);
    transition: left .55s ease;
}

.category-trigger:hover::before {
    left: 140%;
}

.category-trigger:hover {
    filter: brightness(1.05);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        0 7px 20px rgba(238, 29, 77, .25);
}

.category-trigger:active {
    transform: scale(.985);
}

/* متن و آیکن بالای افکت */
.category-trigger .label-text,
.category-trigger .chev {
    position: relative;
    z-index: 1;
}

.category-trigger .chev {
    width: 15px;
    height: 15px;

    opacity: .9;

    transition:
        transform .25s ease,
        opacity .2s ease;
}

.category-trigger:hover .chev {
    opacity: 1;
}

.category-trigger[aria-expanded="true"] {
    background:
        linear-gradient(135deg,
            #c8102e 0%,
            #ee1d4d 55%,
            #ff315d 100%);

    box-shadow:
        0 7px 22px rgba(238, 29, 77, .28),
        inset 0 1px 0 rgba(255,255,255,.15);
}

.category-trigger[aria-expanded="true"] .chev {
    transform: rotate(180deg);
}


/* =========================================================
   SUBNAV CATEGORY BUTTON
   ========================================================= */

.all-categories-btn {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-height: 38px;
    padding: 0 15px;

    border: 1px solid transparent;
    border-radius: 12px;

    background: transparent;
    color: var(--ink);

    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;

    transition:
        color .2s ease,
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .18s ease;
}

/* خط کوچک زیر دکمه */
.all-categories-btn::after {
    content: "";
    position: absolute;

    right: 14px;
    left: 14px;
    bottom: 3px;

    height: 2px;
    border-radius: 99px;

    background: linear-gradient(
        90deg,
        var(--brand-red-1),
        var(--brand-red-2)
    );

    transform: scaleX(0);
    transform-origin: center;

    transition: transform .22s ease;
}

/* آیکن چهارخانه */
.all-categories-btn .grid-ico {
    width: 19px;
    height: 19px;

    color: var(--brand-red-1);

    transition:
        transform .25s ease,
        color .2s ease;
}

/* فلش */
.all-categories-btn .chev {
    width: 13px;
    height: 13px;

    color: var(--ink-soft);

    transition:
        transform .25s ease,
        color .2s ease;
}

/* Hover */
.all-categories-btn:hover {
    color: var(--brand-red-dark);

    background:
        linear-gradient(
            135deg,
            rgba(238,29,77,.055),
            rgba(255,77,109,.09)
        );

    border-color: rgba(238,29,77,.10);

    box-shadow:
        0 5px 16px rgba(30,30,40,.06);
}

.all-categories-btn:hover::after {
    transform: scaleX(1);
}

.all-categories-btn:hover .grid-ico {
    transform: rotate(-4deg) scale(1.06);
}

.all-categories-btn:hover .chev {
    color: var(--brand-red-1);
}

/* حالت باز بودن منوی دسته‌بندی */
.all-categories-btn[aria-expanded="true"] {
    color: var(--brand-red-dark);

    background:
        linear-gradient(
            135deg,
            rgba(238,29,77,.08),
            rgba(255,77,109,.13)
        );

    border-color: rgba(238,29,77,.16);

    box-shadow:
        0 6px 18px rgba(238,29,77,.10);
}

.all-categories-btn[aria-expanded="true"]::after {
    transform: scaleX(1);
}

.all-categories-btn[aria-expanded="true"] .grid-ico {
    color: var(--brand-red-1);
    transform: scale(1.08);
}

.all-categories-btn[aria-expanded="true"] .chev {
    color: var(--brand-red-1);
    transform: rotate(180deg);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 720px) {

    .category-trigger {
        min-width: 54px;
        padding: 0 13px;

        border-radius: var(--radius-md) 0 0 var(--radius-md);
    }

    .category-trigger .chev {
        width: 16px;
        height: 16px;
    }

    .all-categories-btn {
        min-height: 40px;
        padding: 0 13px;
        border-radius: 11px;
    }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.category-trigger:focus-visible,
.all-categories-btn:focus-visible {
    outline: 2px solid var(--brand-red-1);
    outline-offset: 3px;

    box-shadow:
        0 0 0 5px rgba(238,29,77,.10);
}
/* =========================================================
   PREMIUM CATEGORY MENU ITEMS
   ========================================================= */

/* ---------- آیتم‌های اصلی ---------- */

.cat-item,
.cat-parent-item {
    position: relative;
    border-radius: 13px;
    overflow: hidden;

    transition:
        transform .18s ease,
        background .18s ease,
        box-shadow .18s ease;
}


/* دکمه دسته اصلی */

.cat-parent-btn {
    position: relative;

    display: flex;
    align-items: center;
    gap: 11px;

    width: 100%;
    min-height: 58px;

    padding: 8px 11px;

    border: 1px solid transparent;
    border-radius: 13px;

    background: transparent;

    color: var(--ink);

    text-align: right;
    cursor: pointer;

    transition:
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .18s ease;
}


/* آیکن دسته */

.cat-parent-btn .cat-ico,
.cat-item .cat-ico {
    position: relative;

    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #fff1f4,
            #ffe2e8
        );

    color: var(--brand-red-1);

    border: 1px solid rgba(238,29,77,.08);

    box-shadow:
        0 3px 8px rgba(238,29,77,.07);

    transition:
        transform .22s ease,
        background .22s ease,
        color .22s ease,
        box-shadow .22s ease;
}


/* متن */

.cat-item-text {
    display: flex;
    flex-direction: column;
    gap: 3px;

    min-width: 0;
    flex: 1;
}

.cat-item-text strong {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;

    color: var(--ink);

    transition: color .18s ease;
}

.cat-item-text span {
    font-size: 10.5px;
    line-height: 1.5;

    color: var(--ink-soft);

    transition: color .18s ease;
}


/* ---------- Hover ---------- */

.cat-parent-btn:hover,
.cat-item:hover {
    background:
        linear-gradient(
            135deg,
            rgba(238,29,77,.055),
            rgba(255,77,109,.025)
        );

    border-color: rgba(238,29,77,.12);

    box-shadow:
        0 5px 15px rgba(30,30,40,.055);

    transform: translateY(-1px);
}

.cat-parent-btn:hover .cat-ico,
.cat-item:hover .cat-ico {
    color: #fff;

    background:
        linear-gradient(
            135deg,
            var(--brand-red-2),
            var(--brand-red-1)
        );

    box-shadow:
        0 6px 14px rgba(238,29,77,.20);

    transform: scale(1.06) rotate(-2deg);
}

.cat-parent-btn:hover .cat-item-text strong,
.cat-item:hover .cat-item-text strong {
    color: var(--brand-red-dark);
}


/* ---------- خط رنگی کنار آیتم ---------- */

.cat-parent-btn::before,
.cat-item::before {
    content: "";

    position: absolute;

    right: 0;
    top: 10px;
    bottom: 10px;

    width: 3px;

    border-radius: 10px;

    background:
        linear-gradient(
            180deg,
            var(--brand-red-2),
            var(--brand-red-dark)
        );

    transform: scaleY(0);

    transition: transform .2s ease;
}

.cat-parent-btn:hover::before,
.cat-item:hover::before {
    transform: scaleY(1);
}


/* ---------- دسته‌ای که باز شده ---------- */

.cat-parent-btn[aria-expanded="true"] {
    background:
        linear-gradient(
            135deg,
            rgba(238,29,77,.08),
            rgba(255,77,109,.04)
        );

    border-color: rgba(238,29,77,.15);

    box-shadow:
        0 5px 16px rgba(238,29,77,.08);
}

.cat-parent-btn[aria-expanded="true"]::before {
    transform: scaleY(1);
}

.cat-parent-btn[aria-expanded="true"] .cat-ico {
    color: #fff;

    background:
        linear-gradient(
            135deg,
            var(--brand-red-2),
            var(--brand-red-1)
        );

    box-shadow:
        0 6px 15px rgba(238,29,77,.22);
}

.cat-parent-btn[aria-expanded="true"] .cat-item-text strong {
    color: var(--brand-red-dark);
}


/* ---------- فلش ---------- */

.cat-chev {
    width: 17px;
    height: 17px;

    margin-inline-start: auto;

    padding: 3px;

    border-radius: 6px;

    color: var(--ink-soft);

    background: var(--surface-muted);

    transition:
        transform .25s ease,
        color .2s ease,
        background .2s ease;
}

.cat-parent-btn:hover .cat-chev {
    color: var(--brand-red-1);
    background: #fff0f3;
}

.cat-parent-btn[aria-expanded="true"] .cat-chev {
    color: #fff;

    background: var(--brand-red-1);

    transform: rotate(180deg);
}


/* =========================================================
   زیر دسته‌ها
   ========================================================= */

.cat-children-panel {
    padding: 8px;

    gap: 4px;

    background:
        linear-gradient(
            180deg,
            #fff,
            #fffafb
        );

    border: 1px solid rgba(238,29,77,.10);

    box-shadow:
        0 15px 35px rgba(20,20,30,.13);
}


/* آیتم زیر دسته */

.cat-child-item {
    position: relative;

    display: flex;
    align-items: center;
    gap: 10px;

    min-height: 45px;

    padding: 7px 9px;

    border-radius: 10px;

    border: 1px solid transparent;

    transition:
        background .18s ease,
        border-color .18s ease,
        transform .18s ease;
}

.cat-child-item:hover {
    background:
        linear-gradient(
            135deg,
            #fff1f4,
            #fff8f9
        );

    border-color: rgba(238,29,77,.10);

    transform: translateX(-3px);
}


/* آیکن زیر دسته */

.cat-child-ico {
    width: 31px;
    height: 31px;

    flex: 0 0 31px;

    border-radius: 9px;

    background: #fff1f3;

    color: var(--brand-red-1);

    border: 1px solid rgba(238,29,77,.07);

    transition:
        background .18s ease,
        color .18s ease,
        transform .18s ease;
}

.cat-child-item:hover .cat-child-ico {
    color: #fff;

    background:
        linear-gradient(
            135deg,
            var(--brand-red-2),
            var(--brand-red-1)
        );

    transform: scale(1.05);
}


/* متن زیر دسته */

.cat-child-text {
    display: flex;
    flex-direction: column;
    gap: 2px;

    min-width: 0;
}

.cat-child-text strong {
    font-size: 12px;
    font-weight: 650;

    color: var(--ink);

    transition: color .18s ease;
}

.cat-child-text span {
    font-size: 10px;
    color: var(--ink-soft);
}

.cat-child-item:hover .cat-child-text strong {
    color: var(--brand-red-dark);
}


/* ---------- فاصله بهتر بین کارت‌ها ---------- */

.category-panel {
    gap: 6px;
    padding: 12px;
}

.category-panel > .cat-item,
.category-panel > .cat-parent-item {
    margin-bottom: 1px;
}


/* ---------- موبایل ---------- */

@media (max-width: 720px) {

    .cat-parent-btn {
        min-height: 56px;
    }

    .cat-parent-btn .cat-ico,
    .cat-item .cat-ico {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .cat-item-text strong {
        font-size: 12.5px;
    }
}
