@font-face {
    font-family: 'IRANSans';
    src: url('/assets/fonts/IRANSansXV.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   KALAMARKET — RTL Persian E-Commerce
   New customer-facing frontend styles
   ======================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

:root {
    --primary: #f97316;
    --primary-d: #ea580c;
    --primary-l: #fff7ed;
    --red: #ef4444;
    --green: #22c55e;
    --text: #1e1e1e;
    --muted: #64748b;
    --border: #e2e8f0;
    --bg: #f8fafc;
    --white: #fff;
    --r: 12px;
    --sh: 0 2px 12px rgba(0, 0, 0, .08);
    --sh2: 0 8px 30px rgba(0, 0, 0, .12);
    --header-h: 0px;
}

html {
    scroll-behavior: smooth
}

body {
    font-family: 'IRANSans', Tahoma, sans-serif;
    color: var(--text);
    direction: rtl;
    font-size: 14px;
    line-height: 1.6;
    padding-bottom: 70px
}

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

img {
    max-width: 100%
}

ul {
    list-style: none
}

button {
    cursor: pointer;
    font-family: 'IRANSans', Tahoma, sans-serif;
    border: none;
    background: none
}

.container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 16px
}

/* ====== TOP BANNER ====== */
.top-banner {
    color: #fff;
    text-align: center;
    font-size: 12px;
    line-height: 0;
    overflow: hidden
}

.top-banner img {
    line-height: 0
}

.banner-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap
}

.brand-pill {
    background: rgba(255, 255, 255, .2);
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 600
}

.discount-pill {
    background: var(--primary);
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 700
}

.sep {
    opacity: .5
}

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

.header-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 6px;
    width: 36px;
    height: 36px
}

.hamburger span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all .3s
}

.logo {
    display: flex;
    align-items: center
}

.logo img {
    height: 19px;
    width: auto;
    display: block
}

.logo-text {
    font-size: 22px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -.5px
}

.logo-accent {
    color: var(--primary)
}

.header-center {
    flex: 1;
    max-width: 375px
}

.search-box {
    display: flex;
    align-items: center;
    border-radius: 24px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
    background: #f5f5f5
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, .1);
    background: #fff
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 0;
    font-family: 'IRANSans', Tahoma, sans-serif;
    font-size: 13px;
    direction: rtl;
    background: transparent;
    min-width: 0
}

.search-btn {
    background: transparent;
    border: none;
    padding: 9px 14px;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .2s;
    flex-shrink: 0
}

.search-btn:hover {
    color: var(--primary)
}

/* ====== MOBILE HEADER ====== */
.mobile-header {
    display: none;
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
    padding: 10px 16px
}

.mob-search-form {
    display: block
}

.mob-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: 1.5px solid var(--border);
    border-radius: 24px;
    padding: 0 14px;
    gap: 8px;
    transition: border-color .2s
}

.mob-search-wrap:focus-within {
    border-color: var(--primary);
    background: #fff
}

.mob-search-icon {
    flex-shrink: 0;
    color: #aaa;
    display: flex;
    align-items: center
}

.mob-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'IRANSans', Tahoma, sans-serif;
    font-size: 14px;
    direction: rtl;
    min-width: 0;
    padding: 10px 0;
    position: relative;
    z-index: 1;
    color: var(--text)
}

.mob-search-hint {
    position: absolute;
    right: 42px;
    left: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
    color: #bbb;
    font-size: 14px;
    transition: opacity .15s
}

.mob-hint-logo {
    height: 14px;
    width: auto
}

.mob-search-wrap:focus-within .mob-search-hint,
.mob-search-input:not(:placeholder-shown) ~ .mob-search-hint {
    opacity: 0;
    pointer-events: none
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-right: auto
}

.cart-btn {
    position: relative;
    padding: 7px 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    border-radius: 10px;
    background: var(--white);
    transition: border-color .2s, color .2s
}

.cart-btn:hover {
    color: var(--primary);
    border-color: var(--primary)
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid #fff;
    padding: 0 3px
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    padding: 7px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--white);
    transition: border-color .2s, color .2s
}

.user-btn:hover {
    color: var(--primary);
    border-color: var(--primary)
}

.user-name {
    display: inline;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.header-divider {
    width: 1px;
    height: 27px;
    background: #E3E3E3;
    flex-shrink: 0;
    margin: 0 5px
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 8px 0;
}

.nav-cats-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;;
    color: var(--text);
    padding: 4px 0;
    transition: color .2s
}

.nav-cats-btn:hover, .nav-cats-btn.active {
    color: var(--primary)
}

.nav-installment {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text)
}

.nav-installment:hover {
    color: var(--primary)
}

/* ============================================
   MEGA MENU — Digikala-style dropdown
   ============================================ */

/* Overlay */
.mega-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 205;
}

.mega-overlay.is-visible {
    display: block
}

/* Dropdown panel — half-width, aligned right (RTL) */
.mega-menu {
    position: fixed;
    top: 0;
    right: max(0px, calc((100vw - 1200px) / 2));
    left: max(0px, calc((100vw - 1200px) / 2));
    bottom: 0;
    background: #fff;
    z-index: 210;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.mega-menu.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Mobile top-bar (hidden on desktop) */
.mob-topbar {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 2px solid var(--primary);
    background: #fff;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 3;
}

.mob-menu-search {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
}

.mob-menu-search-btn {
    background: none;
    border: none;
    padding: 0 10px;
    display: flex;
    align-items: center;
    color: var(--muted);
    cursor: pointer;
    flex-shrink: 0;
}

.mob-menu-search-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    padding: 9px 4px 9px 10px;
    font-family: 'IRANSans', Tahoma, sans-serif;
    font-size: 13px;
    color: var(--text);
}

.mob-menu-search-input::placeholder {
    color: #94a3b8
}

.mob-topbar-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* ── Two-column inner ── */
.mega-inner {
    display: flex;
    flex-direction: row;
    flex: 1;
    overflow: hidden;
}

/* RIGHT col (RTL): main categories — narrow gray strip */
.mega-cat-col {
    width: 210px;
    flex-shrink: 0;
    background: #f7f8fa;
    border-left: 1px solid var(--border);
    overflow-y: auto;
    padding: 6px 0;
}

/* Main category button */
.mega-cat-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 11px 14px;
    background: none;
    border: none;
    font-family: 'IRANSans', Tahoma, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    text-align: right;
    border-right: 3px solid transparent;
    transition: background .12s, color .12s;
    user-select: none;
    white-space: nowrap;
}

.mega-cat-btn:hover {
    background: #fff;
    color: var(--primary)
}

.mega-cat-btn.is-active {
    background: #fff;
    color: var(--primary);
    border-right-color: var(--primary);
    font-weight: 700;
}

.mcb-label {
    flex: 1;
    text-align: right
}

.mci-arrow {
    opacity: .3;
    flex-shrink: 0;
    /* RTL: sub-panel is on the left, arrow points left (chevron-left = default, no rotation) */
    transition: opacity .2s;
}

.mega-cat-btn:hover .mci-arrow,
.mega-cat-btn.is-active .mci-arrow {
    opacity: .9
}

/* LEFT col (RTL): subcategory panels */
.mega-sub-col {
    flex: 1;
    overflow-y: auto;
    padding: 22px 28px;
    background: #fff;
}

/* Desktop sub-panel (one per main category) */
.desk-sub-panel {
    display: none
}

.desk-sub-panel.is-active {
    display: block;
    animation: megaFadeIn .18s ease;
}

@keyframes megaFadeIn {
    from {
        opacity: 0;
        transform: translateX(-8px)
    }
    to {
        opacity: 1;
        transform: translateX(0)
    }
}

/* Panel header — category name + "see all" link */
.dsp-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 12px;
}

.dsp-title {
    display: none
}

.dsp-see-all {
    font-size: 13px;
    font-weight: 600;
    transition: color .15s;
}

.dsp-see-all:hover {
    color: var(--primary-d);
    text-decoration: underline
}

/* Grid of subcategory columns */
.dsp-cols {
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 0 28px;
}

.dsp-col {
    padding-bottom: 22px
}

/* Sub-category heading (clickable) */
.dsp-col-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 9px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--border);
    transition: color .12s;
}

.dsp-col-title:hover {
    color: var(--primary)
}

/* Sub-category links */
.dsp-col a:not(.dsp-col-title) {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    padding: 4px 0;
    line-height: 1.65;
    transition: color .12s, padding-right .12s;
}

.dsp-col a:not(.dsp-col-title):hover {
    color: var(--primary);
    padding-right: 5px;
}

.dsp-nested-list {
    margin-top: 4px;
    margin-right: 10px;
    padding-right: 8px;
    border-right: 1px solid var(--border);
}

/* Toggle arrow — desktop hidden, mobile shown via media query */
.dsp-col-toggle {
    display: none
}

/* Empty state */
.mega-no-sub {
    padding: 32px 0;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

/* mob-sub hidden (accordion approach removed) */
.mob-sub {
    display: none !important
}

/* Category icon image in mega-menu buttons */
.mci-img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--primary-l);
}

.mci-svg-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    color: var(--primary);
}

.mci-svg-icon svg {
    width: 22px;
    height: 22px;
}

.mci-default-icon {
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

/* ── MOBILE ──────────────────────────────────── */
@media (max-width: 768px) {
    .mega-overlay {
        display: none !important
    }

    /* Full-screen slide from right */
    .mega-menu {
        position: fixed !important;
        width: 100vw !important;
        right: 0 !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 64px !important;
        height: auto !important;
        flex-direction: column;
        opacity: 1 !important;
        transform: translateX(100%) !important;
        transition: transform .3s cubic-bezier(.4, 0, .2, 1), visibility 0s .3s !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }

    .mega-menu.is-open {
        transform: translateX(0) !important;
        pointer-events: all !important;
        visibility: visible !important;
        transition: transform .3s cubic-bezier(.4, 0, .2, 1), visibility 0s 0s !important;
    }

    .mob-topbar {
        display: flex !important
    }

    /* Two-panel layout: icon-list | sub-panel */
    .mega-inner {
        flex-direction: row !important;
        max-height: none !important;
        flex: 1 !important;
        height: 0 !important;
        overflow: hidden !important;
        border-top: none !important;
    }

    /* Left narrow col: icon list */
    .mega-cat-col {
        width: 88px !important;
        flex-shrink: 0 !important;
        background: #f7f8fa !important;
        border-left: 1px solid var(--border) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 4px 0 !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Category buttons: icon + label stacked */
    .mega-cat-btn {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px 4px !important;
        gap: 5px !important;
        border-right: 3px solid transparent !important;
        border-bottom: none !important;
        font-size: 10.5px !important;
        font-weight: 500 !important;
        color: var(--muted) !important;
        text-align: center !important;
        white-space: normal !important;
        line-height: 1.3 !important;
        width: 100% !important;
    }

    .mega-cat-btn.is-active {
        background: #fff !important;
        color: var(--primary) !important;
        border-right-color: var(--primary) !important;
        font-weight: 700 !important;
    }

    .mci-arrow {
        display: none !important
    }

    .mci-img {
        width: 38px !important;
        height: 38px !important;
        border-radius: 10px !important;
    }

    .mci-default-icon {
        font-size: 24px !important;
        width: 38px !important;
        height: 38px !important;
    }

    /* Right side: sub-panel (visible on mobile) */
    .mega-sub-col {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        padding: 14px 12px !important;
    }

    /* Sub-panel grid single column on narrow width */
    .dsp-cols {
        grid-template-columns:1fr !important
    }

    .dsp-header {
        margin-bottom: 10px;
        padding-bottom: 8px
    }

    .dsp-col {
        padding-bottom: 10px
    }

    .dsp-col a:not(.dsp-col-title):not(.dsp-col-toggle-btn) {
        padding: 6px 0;
        font-size: 13px
    }

    /* Collapsible sub-categories on mobile */
    .dsp-col-children {
        display: none
    }

    .dsp-col.is-open .dsp-col-children {
        display: block;
        padding-top: 4px
    }

    .dsp-col-title {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        cursor: pointer !important;
        user-select: none !important;
    }

    .dsp-col-toggle {
        display: inline-flex;
        align-items: center;
        flex-shrink: 0;
        color: var(--muted);
        transition: transform .2s;
    }

    .dsp-col.is-open .dsp-col-toggle {
        transform: rotate(180deg)
    }
}

/* ============================================
   CART DRAWER — DESKTOP
   ============================================ */
.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 300
}

.cart-overlay.visible, .cart-overlay.is-visible {
    display: block
}

.cart-drawer {
    position: fixed;
    top: 0;
    left: -110%;
    width: min(400px, 100vw);
    height: 100vh;
    background: var(--white);
    z-index: 310;
    box-shadow: 8px 0 40px rgba(0, 0, 0, .15);
    transition: left .3s cubic-bezier(.4, 0, .2, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.open, .cart-drawer.is-open {
    left: 0
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0
}

.cart-header h3 {
    font-size: 15px;
    font-weight: 700
}

.cart-header-count {
    font-size: 12px;
    color: var(--muted)
}

.cart-close {
    color: var(--muted);
    padding: 4px;
    display: flex;
    transition: color .2s
}

.cart-close:hover {
    color: var(--red)
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px
}

.cart-item {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid var(--border)
}

.cart-item img {
    width: 68px;
    height: 68px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid var(--border)
}

.ci-info {
    flex: 1;
    min-width: 0
}

.ci-title {
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 3px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical
}

.ci-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--text)
}

.ci-price-unit {
    font-size: 11px;
    color: var(--muted)
}

.ci-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
    flex-shrink: 0
}

.ci-qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff
}

.qty-btn {
    width: 28px;
    height: 28px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    color: var(--text)
}

.qty-btn:hover {
    background: var(--primary-l);
    color: var(--primary)
}

.qty-val {
    width: 26px;
    text-align: center;
    font-size: 13px;
    font-weight: 600
}

.ci-remove {
    color: var(--muted);
    padding: 3px;
    display: flex;
    transition: color .2s
}

.ci-remove:hover {
    color: var(--red)
}

.cart-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--muted)
}

.cart-empty-icon {
    font-size: 52px;
    margin-bottom: 10px
}

.cart-empty p {
    font-size: 14px
}

.cart-footer {
    flex-shrink: 0;
    padding: 14px 16px;
    border-top: 1px solid var(--border)
}

.cart-summary {
    margin-bottom: 12px
}

.cs-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 13px
}

.cs-discount {
    color: var(--green)
}

.cs-total {
    font-weight: 700;
    font-size: 15px;
    border-top: 1px dashed var(--border);
    padding-top: 9px;
    margin-top: 3px
}

.checkout-btn {
    display: flex;
    width: 100%;
    background: var(--primary);
    color: #fff;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    transition: background .2s;
    align-items: center;
    justify-content: center;
    gap: 6px
}

.checkout-btn:hover {
    background: var(--primary-d)
}

.continue-shopping {
    width: 100%;
    color: var(--muted);
    font-size: 12.5px;
    text-align: center;
    padding: 5px;
    transition: color .2s
}

.continue-shopping:hover {
    color: var(--primary)
}

/* ====== BREADCRUMB ====== */
.breadcrumb-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 10px 0
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted)
}

.breadcrumb a:hover {
    color: var(--primary)
}

.bc-sep {
    opacity: .4
}

/* ====== HERO SLIDER ====== */
.hero {
    padding: 16px 0
}

.slider {
    position: relative;
    border-radius: var(--r);
    overflow: hidden;
}

.slide {
    display: none
}

.slide.active {
    display: block
}

.slide-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 50px;
    min-height: 260px
}

.slide-text {
    color: #fff
}

.slide-text h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.3
}

.slide-text p {
    color: rgba(255, 255, 255, .7);
    margin-bottom: 20px
}

.slide-btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: background .2s
}

.slide-btn:hover {
    background: var(--primary-d)
}

.slide-img {
    max-width: 380px;
    border-radius: 8px
}

.slider-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, .4);
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s, width .2s
}

.dot.active {
    background: #fff;
    width: 20px;
    border-radius: 4px
}

.slider-prev, .slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    font-size: 24px;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s
}

.slider-prev {
    right: 14px
}

.slider-next {
    left: 14px
}

.slider-prev:hover, .slider-next:hover {
    background: rgba(255, 255, 255, .3)
}

/* Full-image banner slide (from database) */
.slide-content--banner {
    display: block;
    padding: 0;
    min-height: 0;
    height: 300px;
    overflow: hidden;
}

.slide-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

/* ====== SECTIONS ====== */
.section-title {
    font-size: 18px;
    font-weight: 700
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px
}

.see-all {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    margin-right: auto
}

.see-all:hover {
    opacity: .7
}

/* ====== CATEGORIES GRID ====== */
.categories {
    padding: 24px 0;
    background: var(--white);
}

.categories .section-title {
    margin-bottom: 16px;
    text-align: center
}

.cats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-between;
    margin: 0 auto
}

.cat-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    transition: transform .2s, box-shadow .2s;
    background: transparent;
    overflow: hidden;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
    border-radius: 33px 33px 0 0;
    margin: 10px 1%;
}

/*.cat-card:hover{transform:translateY(-3px);box-shadow:var(--sh2)}*/
.cat-card picture {
    display: contents
}

.cat-card img {
    width: 130px;
    height: 130px;
    object-fit: cover;
    display: block
}

/* ====== FLASH SALE / PRODUCT SCROLL ====== */
.flash-sale {
    padding: 8px 0;
    margin: 16px 50px;
    border-radius: 16px;
    border: none
}

.flash-sale-container {
    background: #F1F1F1;
    padding: 16px;
    border-radius: 16px;
}

.digital-section, .home-essentials {
    padding: 24px 0;
}

.flash-sale-inner {
    display: flex;
    align-items: stretch;
    gap: 16px;
    direction: rtl
}

.flash-sale-sidebar {
    width: 160px;
    flex-shrink: 0;
    color: #fff;
    border-radius: 12px;
    padding: 0 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center
}

.flash-offers-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0
}

.flash-offers-box-img {
    width: 120px;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain
}

.flash-offers-title {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-family: 'IRANSans', Tahoma, sans-serif;
    font-weight: 800;
    font-size: 14px;
    line-height: 1.25;
    color: #ff9f67;
    text-align: center;
    letter-spacing: -.02em
}

.flash-offers-title-line {
    display: block
}

.flash-countdown {
    display: flex;
    align-items: center;
    gap: 5px;
    direction: ltr
}

.flash-cd-block {
    border-radius: 8px;
    padding: 6px 8px;
    min-width: 38px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #fff
}

.flash-cd-block span:first-child {
    font-size: 17px;
    font-weight: 800;
    color: #6D6D6D;
    line-height: 1
}

.flash-cd-unit {
    font-size: 9px;
    color: #6D6D6D;
    display: block
}

.flash-cd-sep {
    color: #6D6D6D;
    font-weight: 700;
    font-size: 16px
}

.flash-see-all {
    font-size: 12px;
    font-weight: 600;
    color: #6D6D6D;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, .35);
    transition: background .2s
}

.flash-see-all:hover {
    background: rgba(255, 255, 255, .35)
}

.flash-products-scroll {
    flex: 1;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #fca5a5 transparent
}

.flash-products-scroll::-webkit-scrollbar {
    height: 4px
}

.flash-products-scroll::-webkit-scrollbar-thumb {
    background: #fca5a5;
    border-radius: 4px
}

@media (max-width: 767px) {
    .flash-sale {
        margin: 0;
        border-radius: 0
    }

    .flash-sale-inner {
        flex-direction: column;
        gap: 0
    }

    .flash-sale-sidebar {
        width: 100%;
        border-radius: 0;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;

    }

    .flash-offers-brand {
        flex-direction: row;
        align-items: center;
        flex: 1;
        min-width: 0;
        width: auto;
        gap: 10px
    }

    .flash-offers-box-img {
        width: auto;
        height: 44px;
        flex-shrink: 0
    }

    .flash-offers-title {
        text-align: right;
        align-items: flex-end;
        font-size: 12px;
        line-height: 1.2
    }

    .flash-countdown {
        gap: 3px
    }

    .flash-cd-block {
        min-width: 30px;
        padding: 4px 5px
    }

    .flash-cd-block span:first-child {
        font-size: 13px
    }

    .flash-cd-unit {
        display: none
    }

    .flash-cd-sep {
        font-size: 13px
    }

    .flash-see-all {
        font-size: 11px;
        padding: 5px 10px;
        flex-shrink: 0;
        white-space: nowrap
    }

    .flash-products-scroll {
        padding: 12px
    }

    .cat-card {
        width: 92px;
        height: 92px;
        border-radius: unset;
    }

    .cat-card img {
        width: 92px;
        height: 92px;
    }

    .pc-title {
        margin: 0px 0 8px;
    }

    .pc-price-main {
        font-size: 14px;
    }

    .product-card {
        width: 190px;
    }

    .pc-img-wrap {
        height: 156px;
    }
}

.countdown {
    display: flex;
    align-items: center;
    gap: 4px;
    direction: ltr
}

.cd-label {
    font-size: 12px;
    color: var(--muted);
    direction: rtl;
    margin-left: 6px
}

.cd-block {
    background: var(--red);
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 15px;
    min-width: 32px;
    text-align: center
}

.cd-sep {
    color: var(--red);
    font-weight: 700
}

.products-scroll {
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent
}

.products-scroll::-webkit-scrollbar {
    height: 4px
}

.products-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px
}

.products-track {
    display: flex;
    gap: 14px;
    width: max-content
}

/* ====== PRODUCT CARD ====== */
.product-card {
    width: 220px;
    background: var(--white);
    border-radius: 16px;
    border: 0.5px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    flex-shrink: 0;
    position: relative;
    display: block
}

/*.product-card:hover{transform:translateY(-4px);box-shadow:var(--sh2)}*/
.pc-badge-sale {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2
}

.pc-color-dots {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2
}

.pc-color-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12)
}

.pc-img-wrap {
    position: relative;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 175px;
    overflow: hidden
}

.pc-img-wrap img {
    width: 100%;
    height: 175px;
    object-fit: contain;
    transition: transform .3s
}

/*.product-card:hover .pc-img-wrap img{transform:scale(1.05)}*/
.pc-body {
    padding: 12px 14px 14px
}

.pc-title {
    font-size: 12.5px;
    color: var(--text);
    line-height: 1.7;
    margin: 0 0 10px;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: calc(1.7em * 2)
}

.pc-middle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    min-height: 18px
}

.pc-stock-info {
    font-size: 11.5px;
    color: var(--red);
    font-weight: 500
}

.pc-rating-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: auto;
    display: none;
}

.pc-star {
    color: #f5a623;
    font-size: 13px
}

.pc-rating-num {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500
}

.pc-price-section {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-direction: row-reverse
}

.pc-price-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px
}

.pc-price-main {
    font-size: 16px;
    font-weight: 700;
    color: var(--text)
}

.pc-price-main span {
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
    margin-right: 2px
}

.pc-price-old {
    font-size: 11px;
    color: var(--muted);
    text-decoration: line-through
}

.pc-price-old span {
    font-size: 10px
}

.pc-discount-pill {
    background: var(--red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    align-self: flex-end
}

/* ====== PROMO BANNERS ====== */
.promo-banners {
    padding: 24px 0
}

.banners-grid {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 16px
}

.promo-img-card {
    display: block;
    border-radius: var(--r);
    overflow: hidden;
    line-height: 0;
    transition: transform .2s, box-shadow .2s
}

/*.promo-img-card:hover {*/
/*    transform: translateY(-2px);*/
/*    box-shadow: 0 8px 24px rgba(0, 0, 0, .12)*/
/*}*/

.promo-img-card img {
    width: 100%;
    height: auto;
    display: block
}

.promo-img {
    width: 150px;
    border-radius: 8px
}

/* ====== BLOG ====== */
.blog-section {
    padding: 24px 0;
    background: var(--white)
}

.blog-grid-h {
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 14px
}

.blog-card-h {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--r);
    border: 1px solid var(--border);
    transition: box-shadow .2s;
    text-decoration: none;
    color: inherit
}

.blog-card-h:hover {
    box-shadow: var(--sh2)
}

.blog-thumb-wrap {
    flex-shrink: 0
}

.blog-thumb-wrap img {
    width: 86px;
    height: 86px;
    object-fit: cover;
    border-radius: 8px;
    display: block
}

.blog-info-h {
    flex: 1;
    text-align: right
}

.blog-info-h h4 {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px
}

.blog-info-h span {
    font-size: 11px;
    color: var(--muted)
}

/* legacy */
.blog-grid {
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 16px
}

.blog-card {
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow .2s
}

.blog-card:hover {
    box-shadow: var(--sh2)
}

.blog-card img {
    width: 100%;
    height: 160px;
    object-fit: cover
}

.blog-info {
    padding: 14px
}

.blog-info h4 {
    font-size: 13px;
    margin-bottom: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.blog-info span {
    font-size: 11px;
    color: var(--muted)
}

/* ====== FOOTER ====== */
.footer {
    margin-top: 48px;
    background: #F7F7F7;
}

/* Trust strip */
.footer-trust-strip {
    padding: 20px 0;
}

/* Horizontal divider line */
.footer-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 0 100px;
}

.fts-grid {
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    gap: 16px;
}

.fts-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 20px;
    padding: 10px;
}

.fts-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: var(--primary-l);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.fts-text {
    display: flex;
    flex-direction: column;
    gap: 2px
}

.fts-text strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--text)
}

.fts-text span {
    font-size: 11.5px;
    color: var(--muted)
}

/* Footer body */
.footer-body {
    background: #F7F7F7;
    padding: 44px 0 32px;
    color: #1E1E1E
}

.footer-grid {
    display: grid;
    grid-template-columns:1.5fr 1fr 1fr 1fr 1fr;
    gap: 36px
}

/* Brand col */
.footer-logo {
    display: inline-block;
    margin-bottom: 14px
}

.footer-logo-img {
    height: 24px;
    width: auto;
    display: block;
}

.footer-logo span {
    color: var(--primary)
}

.footer-brand p {
    font-size: 12.5px;
    color: #1E1E1E;
    line-height: 1.8;
    margin-bottom: 18px;
}

.footer-phones {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.footer-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1E1E1E;
    direction: ltr;
    justify-content: flex-end;
    transition: color .2s;
}

.footer-phone:hover {
    color: var(--primary)
}

/* Footer column heading + mobile accordion trigger */
.footer-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin: 0 0 16px;
    padding: 0 0 10px;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    background: none;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    color: #1E1E1E;
    text-align: right;
    cursor: pointer;
    direction: rtl;
}

.footer-col-head-label {
    flex: 1;
    min-width: 0;
}

.footer-col-head-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: transform .22s ease;
}

.footer-col.is-open .footer-col-head-icon {
    transform: rotate(180deg);
}

.footer-col-panel-wrap {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows .28s ease;
    min-height: 0;
}

.footer-col-panel {
    overflow: hidden;
    min-height: 0;
}

@media (min-width: 769px) {
    .footer-col[data-footer-accordion] .footer-col-head {
        pointer-events: none;
        cursor: default;
        justify-content: flex-start;
    }

    .footer-col[data-footer-accordion] .footer-col-head-icon {
        display: none;
    }
}

/* Links list */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li {
    border-bottom: none;
    text-align: right;
}

.footer-links a {
    display: block;
    font-size: 12.5px;
    color: #1E1E1E;
    padding: 5px 0;
    transition: color .15s, padding-right .15s;
}

/* Address + badges */
.footer-addr-text {
    font-size: 12px;
    color: #1E1E1E;
    line-height: 1.8;
    margin-bottom: 18px;
}

.footer-badges {
    display: flex;
    gap: 10px
}

.footer-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 10px;
    color: #94a3b8;
    min-width: 70px;
    text-align: center;
}

.footer-badge svg {
    color: #f97316
}

/* Footer bottom bar */
.footer-bottom {
    background: #F7F7F7;
    padding: 14px 0
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.footer-bottom p {
    font-size: 12px;
    color: #475569;
    text-align: center
}

/* Footer address center */
.footer-address {
    text-align: center;
    padding: 16px 0 0;
}

.footer-address .footer-addr-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
    text-align: center;
}

/* Phone link in footer cols */
.footer-phone-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1E1E1E;
    direction: ltr;
    justify-content: flex-end;
    transition: color .2s;
}

.footer-phone-link:hover {
    color: var(--primary)
}

/* Grid with 5 cols on large screens */
@media (min-width: 1400px) {
    .footer-grid {
        grid-template-columns:1.5fr 1fr 1fr 1fr 1fr;
        gap: 24px
    }
}

.footer-social {
    display: flex;
    gap: 8px
}

.social-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: background .2s, color .2s;
}

.social-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary)
}

/* ====== MOBILE BOTTOM NAV ====== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    z-index: 200;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .08)
}

.mob-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    color: var(--muted);
    font-size: 11px;
    gap: 3px;
    position: relative;
    transition: color .2s;
    border: none;
    background: none;
    cursor: pointer;
    text-decoration: none
}

.mob-nav-item.active, .mob-nav-item:hover {
    color: var(--primary)
}

.mob-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: opacity .2s
}

.mob-nav-icon svg {
    width: 24px;
    height: 24px;
    transition: opacity .2s
}

/* Icon background images for mobile nav - line icons (default/inactive) */
.mob-nav-item[data-nav="home"] .mob-nav-icon,
body[data-nav-active="home"] .mob-nav-icon[data-nav="home"] {
    background-image: url('/images/icons/ButtonBar/home-line.svg') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    width: 24px !important;
    height: 24px !important;
}

body[data-nav-active="home"] .mob-nav-icon[data-nav="home"] {
    background-image: url('/images/icons/ButtonBar/home-fill.svg') !important;
}

.mob-nav-item[data-nav="categories"] .mob-nav-icon,
body[data-nav-active="categories"] .mob-nav-icon[data-nav="categories"] {
    background-image: url('/images/icons/ButtonBar/category-line.svg') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    width: 24px !important;
    height: 24px !important;
}

body[data-nav-active="categories"] .mob-nav-icon[data-nav="categories"] {
    background-image: url('/images/icons/ButtonBar/category-fill.svg') !important;
}

.mob-nav-item[data-nav="cart"] .mob-nav-icon,
body[data-nav-active="cart"] .mob-nav-icon[data-nav="cart"] {
    background-image: url('/images/icons/ButtonBar/basket-line.svg') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    width: 24px !important;
    height: 24px !important;
}

body[data-nav-active="cart"] .mob-nav-icon[data-nav="cart"] {
    background-image: url('/images/icons/ButtonBar/basket-fill.svg') !important;
}

.mob-nav-item[data-nav="profile"] .mob-nav-icon,
body[data-nav-active="profile"] .mob-nav-icon[data-nav="profile"] {
    background-image: url('/images/icons/ButtonBar/user-line.svg') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    width: 24px !important;
    height: 24px !important;
}

body[data-nav-active="profile"] .mob-nav-icon[data-nav="profile"] {
    background-image: url('/images/icons/ButtonBar/user-fill.svg') !important;
}

/* Hide original inline SVG when using background image icons */
.mob-nav-icon .inline-svg {
    display: none !important
}

.mob-cart-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 14px);
    background: var(--red);
    color: #fff;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 10px;
    font-weight: 700;
    min-width: 16px;
    text-align: center
}

/* ====== TOAST ====== */
.toast {
    position: fixed;
    bottom: 90px;
    right: 24px;
    background: #22c55e;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(34, 197, 94, .4);
    transform: translateY(80px);
    opacity: 0;
    transition: transform .3s, opacity .3s;
    pointer-events: none
}

.toast.show {
    transform: translateY(0);
    opacity: 1
}

/* ====== RESULT PAGE ====== */
.result-page {
    padding: 20px 0 40px
}

.result-layout {
    display: grid;
    grid-template-columns:240px 1fr;
    gap: 24px;
    align-items: start
}

.result-layout > * {
    min-width: 0
}

.sidebar {
    background: var(--white);
    border-radius: var(--r);
    border: 1px solid var(--border);
    overflow: hidden;
    position: sticky;
    top: 130px
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border)
}

.sidebar-header h3 {
    font-size: 15px;
    font-weight: 700
}

.clear-filters {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600
}

.filter-group {
    border-bottom: 1px solid var(--border)
}

.filter-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    user-select: none;
    transition: background .15s
}

.filter-title:hover {
    background: #f8fafc
}

.toggle-icon {
    display: inline-flex;
    align-items: center;
    transition: transform .2s;
    color: var(--muted)
}

.toggle-icon.closed {
    transform: rotate(180deg)
}

.filter-body {
    padding: 8px 16px 14px
}

.price-range input[type=range] {
    width: 100%;
    accent-color: var(--primary);
    margin-bottom: 8px
}

.price-inputs {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted)
}

.check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 13px;
    cursor: pointer
}

.check-item input {
    accent-color: var(--primary);
    width: 15px;
    height: 15px
}

.color-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.color-opt {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s, transform .2s
}

.color-opt:hover {
    transform: scale(1.1)
}

.color-opt.selected {
    border-color: var(--primary)
}

.brand-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px
}

.brand-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--r);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color .2s;
    min-width: 80px
}

.brand-tab.active {
    border-color: var(--primary)
}

.brand-tab img {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px
}

.brand-tab span {
    font-size: 12px;
    font-weight: 600
}

.sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    background: var(--white);
    padding: 10px 14px;
    border-radius: var(--r);
    border: 1px solid var(--border);
}

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

.sort-options {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.sort-label {
    font-size: 12px;
    color: var(--muted)
}

.sort-opt {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 8px;
    border: none;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, color .15s
}

.sort-opt:hover {
    background: var(--primary-l);
    color: var(--primary)
}

.sort-opt.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600
}

.products-grid {
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px
}

.products-grid .product-card {
    width: 100%
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px
}

/* صفحه‌بندی نتایج محصولات: جهت راست‌به‌چپ */
.result-page .pagination,
.pagination.mob-result-pagination {
    direction: rtl
}

.pagination .page-ellipsis {
    padding: 0 4px;
    color: var(--muted, #64748b);
    font-size: 13px;
    unicode-bidi: isolate
}

.page-btn, .page-next {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: background .15s, border-color .15s
}

.page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary)
}

.page-btn:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary)
}

.mobile-filter-btn {
    display: none;
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    z-index: 150;
    box-shadow: 0 4px 20px rgba(249, 115, 22, .4)
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 160
}

.sidebar-overlay.visible {
    display: block
}

/* ====== PRODUCT DETAIL ====== */
.product-detail-page {
    padding: 20px 0 40px
}

.product-detail-layout {
    display: grid;
    grid-template-columns:1fr 1.2fr 320px;
    gap: 24px;
    align-items: start
}

.product-images {
    position: sticky;
    top: 130px
}

.main-image-wrap {
    background: var(--white);
    border-radius: var(--r);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 12px
}

.main-product-img {
    width: 100%;
    height: 320px;
    object-fit: contain;
    padding: 16px;
    transition: transform .3s
}

.main-product-img:hover {
    transform: scale(1.04)
}

.thumb-row {
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    gap: 8px
}

.thumb-img {
    border-radius: 8px;
    border: 2px solid var(--border);
    cursor: pointer;
    height: 70px;
    object-fit: cover;
    transition: border-color .2s
}

.thumb-img.active, .thumb-img:hover {
    border-color: var(--primary)
}

.product-info {
    background: var(--white);
    border-radius: var(--r);
    border: 1px solid var(--border);
    padding: 20px
}

.product-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 8px
}

.product-en-name {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 20px;
    direction: ltr;
    text-align: right
}

.product-options {
    display: flex;
    flex-direction: column;
    gap: 16px
}

.option-row {
    display: flex;
    align-items: center;
    gap: 14px
}

.option-row label {
    font-size: 13px;
    font-weight: 600;
    min-width: 40px
}

.color-picker {
    display: flex;
    gap: 8px
}

.cp-swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s, transform .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px
}

.cp-swatch:hover {
    transform: scale(1.1)
}

.cp-swatch.selected {
    border-color: var(--primary)
}

.size-picker {
    display: flex;
    gap: 8px
}

.sz-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 13px;
    cursor: pointer;
    transition: border-color .2s, background .2s
}

.sz-btn:hover {
    border-color: var(--primary);
    color: var(--primary)
}

.sz-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary)
}

.installment-box {
    background: #f8fafc;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap
}

.inst-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary)
}

.inst-content {
    flex: 1;
    font-size: 12px;
    color: var(--muted)
}

.inst-link {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600
}

.purchase-box {
    position: sticky;
    top: 130px
}

.seller-section {
    background: var(--white);
    border-radius: var(--r);
    border: 1px solid var(--border);
    padding: 18px
}

.seller-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px
}

.seller-row .label {
    font-size: 13px;
    color: var(--muted)
}

.sellers-link {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600
}

.seller-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px
}

.seller-name {
    font-size: 14px;
    font-weight: 700
}

.seller-rating {
    font-size: 12px;
    color: var(--green)
}

.seller-meta {
    margin-bottom: 16px
}

.meta-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
    padding: 5px 0
}

.meta-icon {
    font-size: 14px;
    flex-shrink: 0
}

.meta-icon-svg {
    flex-shrink: 0;
    color: var(--muted);
    margin-top: 1px
}

.inst-logo-svg {
    color: var(--muted);
    flex-shrink: 0
}

.warranty-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.price-section {
    margin-bottom: 14px
}

.price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px
}

.current-price {
    font-size: 22px;
    font-weight: 800
}

.price-unit {
    font-size: 13px;
    color: var(--muted)
}

.discount-badge {
    background: var(--red);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700
}

.original-price {
    font-size: 12px;
    color: var(--muted);
    text-decoration: line-through
}

.add-to-cart-btn {
    width: 100%;
    background: var(--primary);
    color: #fff;
    padding: 13px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    transition: background .2s, transform .15s;
    border: none;
    cursor: pointer
}

.add-to-cart-btn:hover:not(:disabled) {
    background: var(--primary-d);
    transform: translateY(-1px)
}

.add-to-cart-btn:disabled {
    background: var(--border);
    color: var(--muted);
    cursor: not-allowed;
    transform: none
}

.installment-btn {
    width: 100%;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 11px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s, color .2s
}

.installment-btn:hover {
    background: var(--primary);
    color: #fff
}

.related-products {
    padding: 32px 0 0
}

/* ============================================
   UTILITY
   ============================================ */
.d-none {
    display: none !important
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background .2s, transform .15s;
    font-family: 'IRANSans', Tahoma, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px
}

.btn-primary:hover {
    background: var(--primary-d);
    transform: translateY(-1px)
}

.btn-primary:disabled {
    background: var(--border);
    color: var(--muted);
    cursor: not-allowed;
    transform: none
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: background .2s, color .2s;
    font-family: 'IRANSans', Tahoma, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff
}

/* ============================================
   KM PAGE UTILITIES (checkout, profile, …)
   ============================================ */
.km-page {
    padding: 24px 0 60px
}

.km-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px
}

.km-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 20px
}

.km-breadcrumb a {
    color: var(--muted)
}

.km-breadcrumb a:hover {
    color: var(--primary)
}

.km-breadcrumb span {
    color: var(--muted)
}

.km-grid-2 {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 16px
}

.km-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px
}

.km-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text)
}

.km-input, .km-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: 'IRANSans', Tahoma, sans-serif;
    font-size: 13px;
    color: var(--text);
    background: var(--white);
    transition: border-color .2s, box-shadow .2s;
    outline: none
}

.km-input:focus, .km-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, .1)
}

.km-input[readonly], .km-input:disabled {
    background: var(--bg);
    color: var(--muted);
    cursor: default
}

select.km-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 32px
}

.km-textarea {
    resize: vertical;
    min-height: 80px
}

.checkout-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border)
}

.checkout-message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 10px;
    background: var(--primary-l);
    color: var(--primary)
}

.checkout-message.error, .checkout-message.is-error {
    background: #fee2e2;
    color: var(--red)
}

.checkout-message.success, .checkout-message.is-success {
    background: #dcfce7;
    color: #16a34a
}

.checkout-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 6px
}

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-page {
    max-width: 920px
}

.profile-page .page-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 24px
}

.profile-card {
    background: var(--white);
    border-radius: var(--r);
    border: 1px solid var(--border);
    padding: 22px
}

.profile-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0
}

.profile-nav a {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    padding: 8px 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    text-decoration: none;
    transition: color .2s, border-color .2s
}

.profile-nav a:hover {
    color: var(--primary)
}

.profile-nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary)
}

/* ============================================
   CHECKOUT PAGE
   ============================================ */
.checkout-page {
}

.checkout-layout {
    display: grid;
    grid-template-columns:1fr 360px;
    gap: 24px;
    align-items: start
}

.checkout-card {
    background: var(--white);
    border-radius: var(--r);
    border: 1px solid var(--border);
    padding: 22px;
    margin-bottom: 16px
}

.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px
}

.checkout-summary-row:last-of-type {
    border-bottom: none;
    font-weight: 700;
    font-size: 14px
}

/* ============================================
   CART PAGE
   ============================================ */
.cart-page {
    padding: 24px 0 60px
}

.cart-page-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 24px
}

.cart-count-badge {
    background: var(--primary);
    color: #fff;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600
}

.cart-layout {
    display: grid;
    grid-template-columns:1fr 320px;
    gap: 24px;
    align-items: start
}

.cart-summary-card {
    background: var(--white);
    border-radius: var(--r);
    border: 1px solid var(--border);
    padding: 20px;
    position: sticky;
    top: 130px
}

.csc-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border)
}

.csc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border)
}

.csc-shipping {
    color: var(--green);
    font-weight: 600
}

.csc-total {
    font-weight: 700;
    font-size: 14px;
    border-bottom: none;
    margin-top: 4px
}

.csc-checkout-btn {
    display: flex;
    width: 100%;
    background: var(--primary);
    color: #fff;
    padding: 13px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    margin: 16px 0 8px;
    transition: background .2s;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    font-family: 'IRANSans', Tahoma, sans-serif
}

.csc-checkout-btn:hover {
    background: var(--primary-d)
}

.csc-continue {
    display: block;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    padding: 4px 0
}

.csc-continue:hover {
    color: var(--primary)
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted)
}

.breadcrumb a {
    color: var(--muted)
}

.breadcrumb a:hover {
    color: var(--primary)
}

.bc-sep {
    color: var(--border)
}

/* ============================================
   VENDOR REGISTER PAGE
   ============================================ */
.vendor-reg-page {
}

.vendor-reg-header {
    text-align: center;
    margin-bottom: 28px
}

.vendor-reg-header h1 {
    font-size: 22px;
    font-weight: 800
}

.vendor-reg-header p {
    font-size: 13px;
    color: var(--muted);
    margin-top: 6px
}

.vr-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    position: relative;
    padding: 0 8px
}

.vr-steps::before {
    content: '';
    position: absolute;
    top: 19px;
    right: 8%;
    left: 8%;
    height: 2px;
    background: var(--border);
    z-index: 0
}

.vr-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px
}

.vr-step-num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--border);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all .3s;
    position: relative;
    z-index: 2
}

.vr-step-label {
    font-size: 11px;
    color: var(--muted);
    background: var(--bg);
    padding: 0 4px;
    position: relative;
    z-index: 2
}

.vr-step.active .vr-step-num {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary)
}

.vr-step.active .vr-step-label {
    color: var(--text);
    font-weight: 700
}

.vr-step.done .vr-step-num {
    background: var(--green);
    color: #fff;
    border-color: var(--green)
}

.vr-section {
    background: var(--white);
    border-radius: var(--r);
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 16px
}

.vr-section h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px
}

.vr-section p.hint {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 20px
}

.vr-form-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 20px
}

.vr-alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px
}

.vr-alert.error {
    background: #fee2e2;
    color: var(--red)
}

.vr-alert.success {
    background: #dcfce7;
    color: #16a34a
}

.vr-alert.info {
    background: var(--primary-l);
    color: var(--primary)
}

.vr-success {
    text-align: center;
    padding: 40px 20px
}

.vr-success-icon {
    font-size: 60px;
    color: var(--green);
    margin-bottom: 16px
}

.vr-success h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px
}

.vr-success p {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px
}

hr.vr-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .product-detail-layout {
        grid-template-columns:1fr 1fr
    }

    .purchase-box {
        grid-column: 1/-1;
        position: static
    }

    .cats-grid {
        gap: 16px
    }
}

@media (max-width: 768px) {
    body {
        font-size: 13px
    }

    /* Hide desktop header on mobile, show mobile header instead */
    .header {
        display: none !important
    }

    .mobile-header {
        display: block
    }

    /* Show bottom nav */
    .mobile-nav {
        display: flex
    }

    /* Profile / cart: hide site footer on mobile (dedicated page chrome) */
    body.km-hide-mob-site-footer .footer {
        display: none !important
    }

    /* Cart drawer hidden on mobile → goes to cart.html */
    .cart-drawer {
        display: none !important
    }

    .cart-overlay {
        display: none !important
    }

    /* Hero — full-width on mobile (no side margins / no border-radius) */
    .hero {
        padding: 0 !important;
        overflow: hidden !important
    }

    .hero .container {
        padding: 0 !important;
        overflow: hidden !important
    }

    .slider {
        border-radius: 0 !important;
        width: 100% !important;
        overflow: hidden !important
    }

    .slide-content {
        padding: 16px;
        flex-direction: row;
        align-items: center;
        min-height: 0;
        height: 180px;
        overflow: hidden;
    }

    .slide-content--banner {
        position: relative;
        height: auto !important;
        aspect-ratio: 430 / 180;
        padding: 0 !important
    }

    .slide-content--banner picture {
        position: absolute;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%
    }

    .slide-banner-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important
    }

    .slide-text {
        flex: 1;
        text-align: right
    }

    .slide-text h2 {
        font-size: 17px;
        margin-bottom: 6px
    }

    .slide-text p {
        font-size: 12px;
        margin-bottom: 10px;
        color: rgba(255, 255, 255, .75)
    }

    .slide-btn {
        padding: 7px 14px;
        font-size: 12px
    }

    .slide-products {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0
    }

    .slide-img {
        max-width: 130px;
        max-height: 130px;
        object-fit: contain;
        border-radius: 8px
    }

    .cats-grid {
        gap: 12px
    }

    .section-title {
        font-size: 15px
    }

    .banners-grid {
        grid-template-columns:1fr
    }

    .blog-grid {
        grid-template-columns:1fr
    }

    .blog-grid-h {
        grid-template-columns:1fr
    }

    .fts-grid {
        grid-template-columns:repeat(2, 1fr)
    }

    .footer-grid {
        grid-template-columns:1fr;
        gap: 0;
    }

    .footer-brand {
        padding-bottom: 18px;
        margin-bottom: 4px;
        border-bottom: 1px solid #e2e8f0;
    }

    .footer-col[data-footer-accordion] {
        border-bottom: 1px solid #e2e8f0;
    }

    .footer-col[data-footer-accordion]:last-of-type {
        border-bottom: none;
    }

    .footer-col[data-footer-accordion] .footer-col-head {
        margin-bottom: 0;
        padding: 14px 0;
        border-bottom: none;
    }

    .footer-col[data-footer-accordion] .footer-col-panel-wrap {
        grid-template-rows: 0fr;
        overflow: hidden;
    }

    .footer-col[data-footer-accordion].is-open .footer-col-panel-wrap {
        grid-template-rows: 1fr;
    }

    .footer-col[data-footer-accordion].is-open .footer-col-panel {
        padding-bottom: 14px;
    }

    .footer-body {
        padding-top: 28px;
        padding-bottom: 20px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 12px
    }

    /* Result page */
    .result-layout {
        grid-template-columns:1fr
    }

    .sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        overflow-y: auto;
        z-index: 170;
        border-radius: 0;
        transition: right .3s
    }

    .sidebar.open {
        right: 0
    }

    .mobile-filter-btn {
        display: block
    }

    .products-grid {
        grid-template-columns:repeat(2, 1fr)
    }

    /* Product detail */
    .product-detail-layout {
        grid-template-columns:1fr
    }

    .product-images {
        position: static
    }

    .purchase-box {
        position: static
    }
}

@media (max-width: 480px) {
    .cats-grid {
        gap: 8px;
        padding: 0 16px
    }

    .products-grid {
        grid-template-columns:repeat(2, 1fr);
        gap: 8px
    }

    .sort-options {
        display: none
    }

    .slide-text h2 {
        font-size: 17px
    }

    .fts-grid {
        grid-template-columns:1fr
    }
}

@media (max-width: 768px) {
    .cart-layout, .checkout-layout {
        grid-template-columns:1fr
    }

    .km-grid-2 {
        grid-template-columns:1fr
    }

    .cart-summary-card {
        position: static
    }

    .vr-step-label {
        font-size: 10px
    }

    .vr-steps::before {
        display: none
    }
}


/* ── Cart trust badges ──────────────────────────── */
.cart-trust {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 0 0 var(--r, 12px) var(--r, 12px);
    border: 1px solid var(--border, #e2e8f0);
    border-top: none;
}

.ct-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--muted, #64748b);
}

.ct-badge span:first-child {
    font-size: 18px
}

/* ── Cart summary extras ────────────────────────── */
.csc-discount {
    color: var(--green, #16a34a)
}

.csc-coupon {
    display: flex;
    gap: 8px;
    margin: 14px 0;
    padding-top: 12px;
    border-top: 1px solid var(--border, #e2e8f0);
}

.csc-coupon input {
    flex: 1;
    border: 1.5px solid var(--border, #e2e8f0);
    border-radius: 8px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 13px;
    direction: rtl;
    outline: none;
    transition: border-color .2s;
}

.csc-coupon input:focus {
    border-color: var(--primary, #f97316)
}

.csc-coupon button {
    background: var(--primary-l, #fff7ed);
    color: var(--primary, #f97316);
    border: 1.5px solid var(--primary, #f97316);
    border-radius: 8px;
    padding: 8px 14px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
}

.csc-coupon button:hover {
    background: var(--primary, #f97316);
    color: #fff
}

.csc-coupon button:disabled {
    opacity: .6;
    cursor: not-allowed
}

/* ── Installment logos ──────────────────────────── */
.inst-logos {
    display: flex;
    gap: 6px;
    margin-top: 4px
}

.inst-logo {
    font-size: 18px;
    line-height: 1
}

/* ── Cart Page — item rows ──────────────────────── */
.cart-list {
    background: #fff;
    border-radius: var(--r);
    border: 1px solid var(--border);
    overflow: hidden
}

.cart-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    transition: background .15s
}

.cart-row:last-child {
    border-bottom: none
}

.cart-row:hover {
    background: #fafafa
}

.cart-row-img {
    width: 76px;
    height: 76px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 4px
}

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

.cart-row-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.cart-row-title a {
    color: var(--text)
}

.cart-row-title a:hover {
    color: var(--primary)
}

.cart-row-meta {
    font-size: 11.5px;
    color: var(--muted);
    margin-bottom: 8px
}

.cart-row-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap
}

.cart-row-price {
    font-size: 14px;
    font-weight: 700
}

.cart-row-unit {
    font-size: 11px;
    color: var(--muted)
}

.cart-qty {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff
}

.cart-qty-btn {
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .13s, color .13s;
    color: var(--text)
}

.cart-qty-btn:hover {
    background: var(--primary-l);
    color: var(--primary)
}

.cart-qty-val {
    width: 30px;
    text-align: center;
    font-size: 13px;
    font-weight: 700
}

.cart-row-remove {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    margin-right: auto;
    transition: color .15s
}

.cart-row-remove:hover {
    color: var(--red)
}

.cart-empty-full {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: var(--r);
    border: 1px solid var(--border);
    grid-column: 1/-1
}

.cart-empty-full .ei {
    font-size: 64px;
    margin-bottom: 16px
}

.cart-empty-full h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px
}

.cart-empty-full p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 24px
}

.cef-btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    transition: background .2s
}

.cef-btn:hover {
    background: var(--primary-d)
}

/* ── Home Essentials (icon boxes) ────────────────── */
.essentials-grid {
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    gap: 16px;
    padding: 8px 0
}

.essential-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    background: #fff;
    border-radius: var(--r);
    border: 1px solid var(--border)
}

.essential-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: #F7F7F7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 24px
}

.essential-text strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 3px
}

.essential-text span {
    font-size: 12px;
    color: var(--muted)
}

@media (max-width: 768px) {
    .essentials-grid {
        grid-template-columns:repeat(2, 1fr)
    }

    .cart-row-img {
        width: 60px;
        height: 60px
    }

    .cart-row-title {
        font-size: 12.5px
    }
}

@media (max-width: 480px) {
    .essentials-grid {
        grid-template-columns:1fr
    }
}

/* ── Desktop: no padding-bottom for mobile nav ────── */
@media (min-width: 769px) {
    body {
        padding-bottom: 0
    }
}

/* ============================================
   MOBILE PRODUCT LIST — Digikala style
   ============================================ */

/* Filter chips bar */
.mob-filter-bar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.mob-filter-bar::-webkit-scrollbar {
    display: none
}

.mob-filter-bar-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    width: max-content;
    min-width: 100%;
    direction: rtl;
}

.mob-filter-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: #fff;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
    flex-shrink: 0;
}

.mob-filter-chip svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0
}

.mob-filter-chip:hover, .mob-filter-chip.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-l);
}

.mob-filter-chip.chip-sort {
    border-color: #cbd5e1
}

.mob-filter-chip.chip-filter svg {
    color: var(--primary)
}

.mob-active-filters {
    display: none;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 14px 10px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.mob-active-filters::-webkit-scrollbar {
    display: none
}

.mob-active-filters-inner {
    display: flex;
    gap: 8px;
    width: max-content
}

.mob-active-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    background: #fff3e0;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.mob-active-chip svg {
    width: 12px;
    height: 12px
}

/* Mobile product list (single column, horizontal card) */
.mob-product-list {
    display: none;
    flex-direction: column;
    gap: 0
}

#mob-result-pagination {
    display: none
}

@media (min-width: 769px) {
    #mob-result-pagination {
        display: none !important;
    }
}

.mob-result-pagination {
    padding: 16px;
    box-sizing: border-box;
}

.mob-product-card {
    display: flex;
    gap: 12px;
    padding: 14px 14px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: background .15s;
}

.mob-product-card:active {
    background: #fafafa
}

.mob-pc-img {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #f8fafc;
    object-fit: contain;
    padding: 4px;
}

.mob-pc-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px
}

.mob-pc-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mob-pc-colors {
    display: flex;
    gap: 5px;
    margin-top: 2px
}

.mob-pc-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, .1);
}

.mob-pc-price-wrap {
    margin-top: auto;
    padding-top: 4px
}

.mob-pc-original {
    font-size: 11px;
    color: var(--muted);
    text-decoration: line-through;
    margin-bottom: 2px
}

.mob-pc-price-row {
    display: flex;
    align-items: center;
    gap: 6px
}

.mob-pc-price {
    font-size: 15px;
    font-weight: 800
}

.mob-pc-unit {
    font-size: 11px;
    color: var(--muted)
}

.mob-pc-discount {
    background: var(--red);
    color: #fff;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
}

.mob-pc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 4px;
}

.mob-pc-unavailable {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600
}

/* Sort bottom sheet */
.km-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    z-index: 500;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.km-bottom-sheet.is-open {
    transform: translateY(0)
}

.km-bs-handle {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: var(--border);
    margin: 12px auto 0;
}

.km-bs-title {
    font-size: 15px;
    font-weight: 700;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.km-bs-close {
    color: var(--muted);
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1
}

.km-bs-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    cursor: pointer;
    transition: background .15s;
}

.km-bs-option:hover {
    background: #fafafa
}

.km-bs-option.active {
    color: var(--primary);
    font-weight: 700
}

.km-bs-option.active::after {
    content: '✓';
    color: var(--primary);
    font-weight: 900;
}

/* Filter full-screen sheet */
.km-filter-sheet {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 500;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    display: flex;
    flex-direction: column;
    direction: rtl;
    text-align: right;
}

.km-filter-sheet.is-open {
    transform: translateX(0)
}

.km-fs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.km-fs-title {
    font-size: 16px;
    font-weight: 700
}

.km-fs-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.km-fs-body {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px
}

.km-fs-section {
    border-bottom: 1px solid var(--border)
}

.km-fs-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
    padding: 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.km-fs-section-header svg {
    width: 16px;
    height: 16px;
    color: var(--muted);
    transition: transform .2s
}

.km-fs-section.open .km-fs-section-header svg {
    transform: rotate(90deg)
}

.km-fs-section-body {
    display: none;
    padding: 0 16px 16px
}

.km-fs-section.open .km-fs-section-body {
    display: block
}

.km-filter-sheet .check-item {
    flex-direction: row-reverse;
    justify-content: flex-end
}

.km-filter-sheet .km-multiselect .km-ms-opt {
    flex-direction: row-reverse
}

.km-fs-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
}

.km-toggle {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--border);
    cursor: pointer;
    position: relative;
    border: none;
    transition: background .2s;
    flex-shrink: 0;
}

.km-toggle.on {
    background: var(--primary)
}

.km-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: right .2s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}

.km-toggle.on::after {
    right: calc(100% - 21px)
}

.km-fs-footer {
    flex-shrink: 0;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    background: #fff;
}

.km-fs-clear {
    flex: 1;
    padding: 13px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    font-family: inherit;
}

.km-fs-apply {
    flex: 2;
    padding: 13px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s;
}

.km-fs-apply:hover {
    background: var(--primary-d)
}

.km-bs-overlay, .km-fs-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 499;
    display: none;
}

.km-bs-overlay.on, .km-fs-overlay.on {
    display: block
}

@media (max-width: 768px) {
    /* نمایش filter bar و list موبایل */
    .mob-filter-bar {
        display: block
    }

    /* اگر filter فعال باشه */
    .mob-active-filters.has-filters {
        display: block
    }

    /* محصولات در موبایل به صورت list */
    .products-grid {
        display: none !important
    }

    .mob-product-list {
        display: flex
    }

    #result-pagination {
        display: none !important
    }

    #mob-result-pagination {
        display: flex !important
    }

    /* مخفی کردن brand-tabs در موبایل (چون توی filter هست) */
    .brand-tabs {
        display: none
    }

    /* مخفی کردن sort-bar قدیمی در موبایل */
    .sort-bar {
        display: none
    }

    /* result-page padding */
    .result-page {
        padding: 0 0 80px
    }

    /* sidebar در موبایل از filter sheet هندل می‌شه */
    .sidebar {
        display: none
    }

    .mobile-filter-btn {
        display: none
    }
}

/* ============================================
   PROFILE — TAB-BASED LAYOUT
   ============================================ */
.profile-page-full {
    max-width: 960px
}

.profile-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px
}

.profile-page-header .page-title {
    margin-bottom: 0;
    font-size: 20px;
    font-weight: 800
}

.btn-danger-outline {
    border-color: #ef4444 !important;
    color: #ef4444 !important
}

.btn-danger-outline:hover {
    background: #ef4444 !important;
    color: #fff !important
}

/* Tabs nav */
.profile-tabs-nav {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none
}

.profile-tabs-nav::-webkit-scrollbar {
    display: none
}

.ptab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-family: 'IRANSans', Tahoma, sans-serif;
    transition: color .2s, border-color .2s
}

.ptab-btn:hover {
    color: var(--primary)
}

.ptab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary)
}

.ptab-btn svg {
    flex-shrink: 0;
    transition: stroke .2s
}

.ptab-btn.active svg {
    stroke: var(--primary)
}

/* Tab panes */
.profile-tab-pane {
    display: none
}

.profile-tab-pane.active {
    display: block
}

/* Address items */
.profile-addresses {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.profile-address-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color .2s
}

.profile-address-item:hover {
    border-color: var(--primary)
}

.profile-address-main {
    flex: 1;
    min-width: 0
}

.profile-address-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px
}

.profile-address-text {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6
}

.profile-address-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0
}

.addr-default-badge {
    font-size: 10px;
    background: var(--primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600
}

/* Small action buttons */
.km-btn-ghost {
    background: none;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    font-family: 'IRANSans', Tahoma, sans-serif;
    transition: border-color .15s, color .15s
}

.km-btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary)
}

.km-btn-danger {
    background: none;
    border: 1px solid #fca5a5;
    border-radius: 7px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--red);
    cursor: pointer;
    font-family: 'IRANSans', Tahoma, sans-serif;
    transition: background .15s, color .15s
}

.km-btn-danger:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red)
}

/* Orders table inside profile */
.vp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px
}

.vp-table th {
    text-align: right;
    padding: 9px 12px;
    border-bottom: 2px solid var(--border);
    font-weight: 700;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap
}

.vp-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle
}

.vp-table tr:last-child td {
    border-bottom: none
}

.vp-table tbody tr:hover td {
    background: #fafafa
}

/* ── Order / Ticket modals ── */
.km-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px
}

.km-modal {
    background: #fff;
    border-radius: 14px;
    max-width: 640px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
    display: flex;
    flex-direction: column
}

.km-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
    border-radius: 14px 14px 0 0
}

.km-modal-header h3 {
    font-size: 15px;
    font-weight: 700
}

.km-modal-header button {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    transition: background .15s
}

.km-modal-header button:hover {
    background: var(--bg);
    color: var(--text)
}

.km-modal-body {
    padding: 20px;
    flex: 1
}

/* Order info grid inside modal */
.km-order-info-grid {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 10px 16px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 4px
}

.km-oi-field {
}

.km-oi-full {
    grid-column: 1/-1
}

.km-oi-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: .3px
}

.km-oi-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--text)
}

/* Reply form inside ticket modal */
.km-ticket-reply-wrap {
    border-top: 1px solid var(--border);
    margin-top: 16px;
    padding-top: 16px
}

/* ── Ticket items ── */
.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.ticket-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s
}

.ticket-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(249, 115, 22, .08)
}

.ticket-item-info {
    flex: 1;
    min-width: 0
}

.ticket-item-subject {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.ticket-item-date {
    font-size: 11px;
    color: var(--muted)
}

.ticket-badge {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0
}

.ticket-badge.open {
    background: #dcfce7;
    color: #16a34a
}

.ticket-badge.closed {
    background: #f1f5f9;
    color: var(--muted)
}

.ticket-badge.pending {
    background: #fff7ed;
    color: var(--primary)
}

/* ── Ticket conversation ── */
.ticket-conv {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.ticket-msg {
    display: flex;
    flex-direction: column;
    max-width: 82%
}

.ticket-msg-user {
    align-self: flex-end;
    align-items: flex-end
}

.ticket-msg-admin {
    align-self: flex-start;
    align-items: flex-start
}

.ticket-msg-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.7
}

.ticket-msg-user .ticket-msg-bubble {
    background: var(--primary);
    color: #fff;
    border-radius: 12px 12px 4px 12px
}

.ticket-msg-admin .ticket-msg-bubble {
    background: #f1f5f9;
    color: var(--text);
    border-radius: 12px 12px 12px 4px
}

.ticket-msg-date {
    font-size: 10.5px;
    color: var(--muted);
    margin-top: 4px
}

/* ── Wallet placeholder ── */
.wallet-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 52px 20px;
    gap: 10px;
    color: var(--muted)
}

.wallet-placeholder svg {
    color: #cbd5e1;
    margin-bottom: 6px
}

.wallet-ph-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text) !important
}

.wallet-placeholder p {
    font-size: 13px
}

/* ── Wallet balance bar ── */
.wallet-balance-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, #f97316cc 100%);
    color: #fff;
    border-radius: var(--r);
    padding: 20px 22px;
    margin-bottom: 16px
}

.wallet-balance-icon svg {
    stroke: #fff;
    opacity: .85
}

.wallet-balance-label {
    font-size: 12px;
    opacity: .85;
    margin-bottom: 4px
}

.wallet-balance-amount {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.5px
}

.wallet-balance-err {
    font-size: 12px;
    color: #fde68a
}

/* ── Wallet sub-tabs ── */
.wallet-subtabs-nav {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0
}

.wstab-btn {
    background: none;
    border: none;
    font-family: 'IRANSans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    padding: 8px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s
}

.wstab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary)
}

.wstab-btn:hover {
    color: var(--primary)
}

.wallet-subtab-pane {
    display: none
}

.wallet-subtab-pane.active {
    display: block
}

/* ── Wallet description ── */
.wallet-desc {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 18px;
    padding: 10px 14px;
    background: #fff7ed;
    border-radius: var(--r);
    border-right: 3px solid var(--primary)
}

/* ── Wallet transactions ── */
.wallet-tx-list {
    display: flex;
    flex-direction: column
}

.wallet-tx-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px;
    border-bottom: 1px solid var(--border);
    gap: 12px
}

.wallet-tx-item:last-child {
    border-bottom: none
}

.wallet-tx-right {
    flex: 1;
    min-width: 0
}

.wallet-tx-type {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px
}

.wallet-tx-date {
    font-size: 11px;
    color: var(--muted)
}

.wallet-tx-desc {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.wallet-tx-amount {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0
}

.tx-credit {
    color: #16a34a
}

.tx-debit {
    color: #ef4444
}

/* ====== SEARCH MODAL ====== */
/* Desktop: transparent overlay (click-capture, no backdrop) */
.search-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s
}

.search-modal-overlay.is-open {
    opacity: 1;
    pointer-events: all
}

/* Desktop: wraps around search-box — coords & paddingTop set by JS */
.search-modal {
    position: fixed;
    background: #fff;
    border-radius: 20px;
    z-index: 1101;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s, transform .15s;
    transform: translateY(-4px);
    overflow: hidden
}

.search-modal.is-open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0)
}

/* sm-bar: always hidden until modal opens */
.sm-bar {
    display: none
}

/* show sm-bar inside open modal on desktop */
.search-modal.is-open .sm-bar {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    gap: 8px;
    direction: ltr;
    flex-shrink: 0
}

.sm-close-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    transition: background .15s, color .15s
}

.sm-close-btn:hover {
    background: #f5f5f5;
    color: var(--text)
}

.sm-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 24px;
    padding: 0 14px;
    gap: 8px;
    transition: border-color .2s
}

/*.sm-input-wrap:focus-within{border-color:var(--primary);background:#fff}*/
.sm-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'IRANSans', Tahoma, sans-serif;
    font-size: 13px;
    direction: rtl;
    background: transparent;
    color: var(--text);
    padding: 9px 0
}

.sm-input::placeholder {
    color: #bbb
}

.sm-submit-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    transition: color .15s
}

.sm-submit-btn:hover {
    color: var(--primary)
}

.search-modal.is-open .sm-bar + .sm-results {
    border-top: 1px solid var(--border)
}

.sm-results {
    max-height: 340px;
    overflow-y: auto
}

.sm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    cursor: pointer;
    transition: background .12s;
    text-decoration: none;
    color: var(--text);
    direction: rtl
}

.sm-item:hover, .sm-item:focus {
    background: #fff7ed;
    outline: none
}

.sm-item-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999
}

.sm-item-icon.cat-icon {
    background: #fff3e6;
    color: var(--primary)
}

.sm-item-text {
    font-size: 14px;
    font-family: 'IRANSans', Tahoma, sans-serif
}

.sm-empty {
    padding: 24px 18px;
    text-align: center;
    color: #bbb;
    font-size: 13px;
    font-family: 'IRANSans', Tahoma, sans-serif
}

.sm-loading {
    padding: 20px 18px;
    text-align: center
}

.sm-loading-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 3px;
    animation: sm-bounce .9s infinite
}

.sm-loading-dot:nth-child(2) {
    animation-delay: .15s
}

.sm-loading-dot:nth-child(3) {
    animation-delay: .3s
}

@keyframes sm-bounce {
    0%, 80%, 100% {
        transform: translateY(0)
    }
    40% {
        transform: translateY(-6px)
    }
}

/* Mobile: full-screen modal */
@media (max-width: 768px) {
    .search-modal-overlay {
        background: rgba(0, 0, 0, .45);
        transition: opacity .2s
    }

    .search-modal {
        position: fixed;
        top: 0 !important;
        left: 0 !important;
        right: 0;
        width: 100% !important;
        padding-top: 0 !important;
        transform: none !important;
        border-radius: 0;
        border: none;
        box-shadow: none;
        height: 100vh;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        transition: opacity .2s;
        z-index: 9999
    }

    .search-modal-overlay {
        z-index: 9998
    }

    .search-modal.is-open {
        transform: none !important
    }

    .sm-bar {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        gap: 10px;
        border-bottom: 1px solid var(--border);
        direction: ltr;
        flex-shrink: 0
    }

    .sm-close-btn {
        flex-shrink: 0;
        background: none;
        border: none;
        color: #666;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px;
        border-radius: 8px;
        transition: background .15s, color .15s
    }

    .sm-close-btn:hover {
        background: #f5f5f5;
        color: var(--text)
    }

    .sm-input-wrap {
        flex: 1
    }

    .sm-input {
        width: 100%;
        border: none;
        outline: none;
        font-family: 'IRANSans', Tahoma, sans-serif;
        font-size: 16px;
        direction: rtl;
        background: transparent;
        color: var(--text)
    }

    .sm-input::placeholder {
        color: #bbb
    }

    .sm-submit-btn {
        flex-shrink: 0;
        background: none;
        border: none;
        color: #aaa;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px;
        border-radius: 8px;
        transition: background .15s, color .15s
    }

    .sm-results {
        flex: 1;
        max-height: none;
        overflow-y: auto
    }

    .sm-item {
        padding: 14px 16px
    }

    .mob-search-wrap {
        cursor: pointer;
        height: 45px
    }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .profile-tabs-nav {
        border-bottom-width: 1.5px
    }

    .ptab-btn {
        padding: 10px 11px;
        font-size: 12px;
        gap: 4px
    }

    .ptab-btn svg {
        display: none
    }

    .profile-address-item {
        flex-wrap: wrap
    }

    .profile-address-actions {
        width: 100%;
        justify-content: flex-end;
        padding-top: 8px;
        border-top: 1px solid var(--border);
        margin-top: 6px
    }

    .km-modal {
        max-height: 95vh;
        border-radius: 14px
    }

    .km-order-info-grid {
        grid-template-columns:1fr
    }

    .km-oi-full {
        grid-column: auto
    }

    .profile-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px
    }
}

/* —— Customer layout helpers (no inline styles in Blade) —— */
.top-banner__link {
    display: block;
    line-height: 0
}

.top-banner__img {
    width: 100%;
    display: block;
    max-height: 80px;
    object-fit: cover
}

.top-banner__text-link {
    color: inherit;
    text-decoration: none
}

.mob-search-hint--inline {
    opacity: 1;
    position: static;
    justify-content: flex-start;
    color: #bbb;
    font-size: 14px;
    gap: 6px;
    display: flex;
    align-items: center
}

.footer-addr-icon {
    vertical-align: middle;
    margin-left: 4px
}

.slide-content--gradient-purple {
    background: linear-gradient(135deg, #7c3aed, #4f46e5)
}

/* Inner pages vertical padding (blog, landing, …) */
.km-content-page {
    padding-top: 24px;
    padding-bottom: 48px
}
