:root {
    --bg: oklch(0.9848 0.0013 106.4);
    --surface: oklch(1 0 89.9);
    --fg: oklch(0.2101 0.0318 264.7);
    --muted: oklch(0.551 0.0234 264.4);
    --border: oklch(0.9276 0.0058 264.5);
    --accent: oklch(0.5224 0.0763 57.2);
    --accent-hover: oklch(0.4724 0.0763 57.2);
    --accent-deep: oklch(0.30 0.045 57.2);
    --accent-soft: oklch(0.955 0.03 57.2);
    --amber: oklch(0.7686 0.1647 70.1);
    --amber-deep: oklch(0.6086 0.1647 70.1);
    --amber-soft: oklch(0.955 0.045 70.1);
    --success: oklch(0.7227 0.192 149.6);
    --danger: oklch(0.6368 0.2078 25.3);
    --font-display: 'Vazirmatn', serif;
    --font-body: 'Vazirmatn', -apple-system, system-ui, sans-serif;
    --r-lg: 28px;
    --r-md: 20px;
    --r-sm: 14px;
    --shadow-soft: 0 1px 2px oklch(0.3 0.02 60 / .05), 0 12px 32px oklch(0.3 0.02 60 / .08);
    --shadow-lift: 0 2px 6px oklch(0.3 0.02 60 / .08), 0 24px 56px oklch(0.3 0.02 60 / .14);
    --header-h: 72px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    background: var(--bg);
    color: var(--fg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: 0;
    background: none;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

::selection {
    background: var(--amber-soft);
    color: var(--accent-deep);
}

.wrap {
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: 20px;
}

.section {
    padding-block: clamp(44px, 7vw, 84px);
}

.sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
}

.sec-head h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(24px, 3.6vw, 32px);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.sec-head .sub {
    color: var(--muted);
    font-size: 14px;
}

/* ============ Header ============ */
.site-header {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 60;
    height: var(--header-h);
    background: color-mix(in oklch, var(--surface) 82%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, box-shadow .3s;
}

.site-header.scrolled {
    border-color: var(--border);
    box-shadow: 0 8px 24px oklch(0.3 0.02 60/.06);
}

.header-in {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 24px);
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    flex-shrink: 0;
    background: linear-gradient(160deg, var(--accent), var(--accent-deep));
    color: var(--surface);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-soft);
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    flex-shrink: 0;
    object-fit: cover;
    box-shadow: var(--shadow-soft);
}

.brand-mark svg {
    width: 22px;
    height: 22px;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.2;
}

.brand-tag {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: .02em;
}

.search-box {
    flex: 1;
    max-width: 520px;
    margin-inline: auto;
    position: relative;
}

.search-box .hint {
    position: absolute;
    inset-inline-start: 46px;
    top: 50%;
    translate: 0 -50%;
    color: var(--muted);
    font-size: 13.5px;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.search-box .hint b {
    color: var(--accent);
    font-weight: 600;
}

.search-box input {
    width: 100%;
    height: 46px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    padding-inline: 46px 16px;
    font-family: inherit;
    font-size: 14px;
    color: var(--fg);
    transition: border-color .25s, box-shadow .25s;
}

.search-box input::placeholder {
    color: var(--muted);
}

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

.search-box:focus-within .hint {
    display: none;
}

.search-ico {
    position: absolute;
    inset-inline-start: 16px;
    top: 50%;
    translate: 0 -50%;
    color: var(--muted);
    width: 19px;
    height: 19px;
    pointer-events: none;
}

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

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--fg);
    transition: transform .18s, box-shadow .25s, border-color .25s;
}

.icon-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.icon-btn:active {
    transform: translateY(0) scale(.96);
}

.icon-btn svg {
    width: 19px;
    height: 19px;
}

.menu-btn {
    display: none;
}

/* ============ Hero ============ */
.hero {
    position: relative;
    min-height: 500px;
    height: auto;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    margin-top: var(--header-h);
}

.hero-media {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-deep), var(--accent));
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    animation: heroIn 1.6s cubic-bezier(.22, 1, .36, 1) both;
}

.hero-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-deep) 0%, var(--accent) 100%);
}

@keyframes heroIn {
    from {
        transform: scale(1.12);
        opacity: .6;
    }

    to {
        transform: scale(1.02);
        opacity: 1;
    }
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 12, 6, .15) 0%, rgba(20, 12, 6, .20) 35%, rgba(20, 12, 6, .78) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-top: 55px;
    padding-bottom: 30px;
    color: #faf6f1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    letter-spacing: .04em;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(8px);
    padding: 7px 16px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.hero-eyebrow svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 700;
    color: #fff;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.2;
    letter-spacing: -.02em;
    margin-bottom: 10px;
    max-width: 900px;
    text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}

.hero-tag {
    font-size: clamp(14px, 1.8vw, 18px);
    line-height: 1.9;
    color: rgba(255, 255, 255, .90);
    margin-bottom: 18px;
    max-width: 650px;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 9px;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .22);
    backdrop-filter: blur(10px);
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 13px;
    color: #fff;
}

.stat-pill svg {
    width: 17px;
    height: 17px;
    color: var(--amber);
}

.stat-pill b {
    font-weight: 600;
}

.stat-pill .dim {
    opacity: .82;
    font-size: 12px;
    margin-inline-start: 4px;
}

/* ============ Chips ============ */
.chips {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 20px 2px 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

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

.chip {
    flex-shrink: 0;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--fg);
    font-size: 13.5px;
    font-weight: 500;
    transition: all .22s;
    cursor: pointer;
}

.chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 6px 16px color-mix(in oklch, var(--accent) 35%, transparent);
}

.chip .cnt {
    font-size: 11.5px;
    color: var(--muted);
    margin-inline-start: 4px;
}

.chip.active .cnt {
    color: rgba(255, 255, 255, .8);
}

/* ============ Categories ============ */
.cat-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 1fr);
    gap: 14px;
    overflow-x: auto;
    padding: 2px 2px 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.cat-scroll::-webkit-scrollbar {
    display: none;
}

.cat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    transition: transform .25s, box-shadow .3s, border-color .25s;
    cursor: pointer;
}

.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
    border-color: var(--accent);
}

.cat-card:active {
    transform: scale(.98);
}

.cat-card.active {
    border-color: var(--accent);
}

.cat-card.active .cat-ico {
    background: var(--accent);
    color: #fff;
}

.cat-ico {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    transition: background .25s, color .25s;
    font-size: 24px;
}

.cat-card b {
    font-size: 14px;
    font-weight: 600;
}

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

/* ============ Products ============ */
.products {
    position: relative;
}

.grid-prod {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 20px;
}

.cat-header {
    grid-column: 1/-1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    font-size: 19px;
    font-weight: 700;
    color: var(--fg);
}

.cat-header:first-child {
    margin-top: 0;
}

.cat-header::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.p-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
    transition: transform .3s, box-shadow .35s;
    text-align: start;
    cursor: pointer;
}

.p-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lift);
}

.p-card.oos {
    opacity: .62;
    filter: saturate(.55);
}

.p-media {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--accent-soft);
}

.p-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}

.p-card:hover .p-media img {
    transform: scale(1.07);
}

.p-badges {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    z-index: 2;
}

.p-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 999px;
    letter-spacing: .02em;
    backdrop-filter: blur(6px);
}

.p-badge svg {
    width: 12px;
    height: 12px;
}

.pb-off {
    background: var(--danger);
    color: #fff;
}

.pb-oos {
    background: #fafafa;
    color: var(--danger);
    border: 1px solid color-mix(in oklch, var(--danger) 30%, var(--border));
}

.p-fav {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    display: grid;
    place-items: center;
    color: var(--fg);
    box-shadow: var(--shadow-soft);
    transition: transform .2s, color .2s;
}

.p-fav:hover {
    transform: scale(1.1);
}

.p-fav.active {
    color: var(--danger);
}

.p-fav.active svg {
    fill: var(--danger);
    stroke: var(--danger);
}

.p-fav svg {
    width: 18px;
    height: 18px;
}

.p-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.p-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.p-name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.p-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--muted);
}

.p-meta .rate {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--fg);
}

.p-meta .rate svg {
    width: 13px;
    height: 13px;
    color: var(--amber-deep);
    fill: var(--amber);
}

.p-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.p-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 6px;
}

.p-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

.p-price small {
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 400;
    margin-inline-start: 2px;
}

.p-price-old {
    font-size: 12px;
    color: var(--muted);
    text-decoration: line-through;
    margin-inline-end: 6px;
}

.p-price-new {
    font-size: 17px;
    font-weight: 700;
    color: var(--accent);
}

.p-actions {
    display: flex;
    gap: 8px;
}

.p-act {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    display: grid;
    place-items: center;
    color: var(--muted);
    transition: all .22s;
}

.p-act svg {
    width: 17px;
    height: 17px;
}

.p-act:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-2px);
}

.p-act:active {
    transform: scale(.94);
}

.p-act.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.p-act.primary:hover {
    background: var(--accent-hover);
}

.p-act.active {
    color: var(--danger);
    border-color: color-mix(in oklch, var(--danger) 40%, var(--border));
}

.p-act.active svg {
    fill: var(--danger);
    stroke: var(--danger);
}

.empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 60px 20px;
    text-align: center;
    color: var(--muted);
}

.empty-state svg {
    width: 44px;
    height: 44px;
    color: var(--border);
}

.empty-state b {
    color: var(--fg);
    font-size: 16px;
}

/* skeleton */
.skel {
    position: relative;
    overflow: hidden;
    background: color-mix(in oklch, var(--border) 55%, var(--surface));
}

.skel::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent);
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* ============ Smart Pick ============ */
.smart-card {
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    color: #fdf6ee;
    background: linear-gradient(140deg, var(--accent-deep), var(--accent) 120%);
    padding: clamp(28px, 5vw, 52px);
    box-shadow: var(--shadow-lift);
}

.smart-card h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(24px, 3.6vw, 34px);
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.smart-card p {
    color: rgba(255, 255, 255, .85);
    font-size: 15px;
    max-width: 46ch;
    margin-bottom: 22px;
}

.smart-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.smart-mini button {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 12px;
    transition: all .22s;
    backdrop-filter: blur(6px);
    cursor: pointer;
}

.smart-mini button:hover {
    background: rgba(255, 255, 255, .2);
    transform: translateY(-3px);
}

.smart-mini img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
}

.smart-mini b {
    font-size: 12.5px;
    font-weight: 600;
}

/* ============ About ============ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(24px, 4vw, 48px);
    align-items: center;
    max-width: 640px;
    margin-inline: auto;
}

.about-copy h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(24px, 3.6vw, 32px);
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.about-copy .lead {
    font-size: 16px;
    color: var(--fg);
    line-height: 1.9;
    margin-bottom: 14px;
}

.about-facts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 26px;
}

.fact {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 14px 16px;
}

.fact b {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: var(--accent);
    flex-wrap: wrap;
}

.fact b svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

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

.about-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px 22px;
    margin-bottom: 26px;
}

.about-list li {
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--fg);
}

.about-list svg {
    width: 16px;
    height: 16px;
    color: var(--success);
    flex-shrink: 0;
    margin-top: 3px;
}

.map-card {
    margin-top: 26px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--surface);
    display: flex;
    align-items: stretch;
}

.map-pin {
    flex: 1;
    min-height: 120px;
    position: relative;
    background:
        radial-gradient(circle at 30% 30%, var(--amber-soft), transparent 55%),
        repeating-linear-gradient(0deg, color-mix(in oklch, var(--border) 60%, var(--surface)) 0 2px, transparent 2px 26px),
        repeating-linear-gradient(90deg, color-mix(in oklch, var(--border) 60%, var(--surface)) 0 2px, transparent 2px 26px);
    display: grid;
    place-items: center;
}

.map-pin svg {
    width: 34px;
    height: 34px;
    color: var(--danger);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .18));
}

/* ============ Footer ============ */
.site-footer {
    background: var(--accent-deep);
    color: #e9e0d6;
    margin-top: clamp(40px, 6vw, 72px);
}

.footer-in {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    padding-block: 52px 40px;
}

.footer-brand p {
    font-size: 13.5px;
    color: rgba(233, 224, 214, .75);
    line-height: 1.9;
    max-width: 34ch;
    margin-top: 12px;
}

.footer-brand .brand-mark {
    background: var(--amber);
    color: var(--accent-deep);
}

.footer-col h4 {
    font-size: 13px;
    letter-spacing: .08em;
    color: var(--amber);
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    font-size: 13.5px;
    color: rgba(233, 224, 214, .8);
    transition: color .2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-col a:hover {
    color: #fff;
}

.footer-col a svg {
    width: 15px;
    height: 15px;
    opacity: .7;
}

.qr-box {
    background: var(--surface);
    border-radius: var(--r-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: fit-content;
    color: var(--fg);
}

.qr-box img {
    width: 96px;
    height: 96px;
    border-radius: 10px;
}

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

.footer-bar {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding-block: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: rgba(233, 224, 214, .78);
}

/* ============ Modals ============ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    background: oklch(0.2 0.02 60/.55);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}

.modal.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--surface);
    border-radius: var(--r-lg);
    max-width: 920px;
    width: 100%;
    max-height: min(88vh, 820px);
    overflow-y: auto;
    box-shadow: var(--shadow-lift);
    transform: translateY(16px) scale(.98);
    transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}

.modal.open .modal-card {
    transform: none;
}

.modal-close {
    position: sticky;
    top: 14px;
    margin-inline-start: calc(100% - 56px);
    z-index: 5;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    color: var(--fg);
    box-shadow: var(--shadow-soft);
    transition: all .2s;
}

.modal-close:hover {
    background: var(--accent);
    color: #fff;
    transform: rotate(90deg);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.detail-gallery {
    position: relative;
}

.detail-hero {
    position: relative;
    aspect-ratio: 1/1.05;
    overflow: hidden;
    background: var(--accent-soft);
}

.detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-thumbs {
    position: absolute;
    bottom: 14px;
    inset-inline: 14px;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.detail-thumbs button {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color .2s;
    background: var(--surface);
    padding: 0;
}

.detail-thumbs button.active {
    border-color: var(--amber);
}

.detail-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info {
    padding: 34px 30px 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-info .p-badges {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.detail-info h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(24px, 3vw, 30px);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: var(--muted);
}

.detail-desc {
    font-size: 14.5px;
    color: var(--muted);
    line-height: 1.9;
}

.detail-specs {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 14px;
    margin-top: 10px;
}

.detail-specs h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--fg);
}

.detail-specs-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 13px;
}

.detail-specs-row:last-child {
    border-bottom: 0;
}

.detail-specs-row b {
    color: var(--fg);
    font-weight: 500;
}

.detail-specs-row span {
    color: var(--muted);
}

.detail-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.detail-price .p-price {
    font-size: 22px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .01em;
    transition: transform .18s, box-shadow .25s, background .25s;
    padding: 13px 28px;
}

.btn:active {
    transform: scale(.97);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .24);
}

.btn-primary svg {
    width: 17px;
    height: 17px;
}

.btn-ghost {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg);
    border-color: var(--accent);
}

.detail-ctas {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.detail-ctas .btn {
    flex: 1;
}

.similar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.similar .p-card .p-desc {
    display: none;
}

.similar .p-card .p-meta {
    display: none;
}

.similar .p-card .p-actions {
    display: none;
}

/* ============ Toast ============ */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    translate: -50% 0;
    z-index: 120;
    background: var(--accent-deep);
    color: #fff;
    font-size: 13.5px;
    padding: 12px 22px;
    border-radius: 999px;
    box-shadow: var(--shadow-lift);
    display: flex;
    align-items: center;
    gap: 9px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
    transition: all .35s cubic-bezier(.22, 1, .36, 1);
}

.toast.show {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.toast svg {
    width: 16px;
    height: 16px;
    color: var(--amber);
}

/* ============ Reveal on scroll ============ */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
    .footer-in {
        grid-template-columns: 1fr 1fr;
    }

    .detail {
        grid-template-columns: 1fr;
    }

    .detail-hero {
        aspect-ratio: 16/10;
    }

    .smart-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .search-box .hint {
        display: none;
    }

    .menu-btn {
        display: grid;
    }

    .brand-tag {
        display: none;
    }

    .header-actions {
        gap: 8px;
    }

    .hero {
        min-height: 70vh;
        align-items: flex-end;
    }

    .hero h1 {
        font-size: clamp(32px, 10vw, 52px);
    }

    .hero-stats .stat-pill {
        font-size: 13px;
        padding: 9px 14px;
    }

    .cat-scroll {
        grid-auto-columns: minmax(126px, 1fr);
    }

    .footer-in {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .about-list {
        grid-template-columns: 1fr;
    }

    .section {
        padding-block: 38px;
    }

    .smart-mini {
        grid-template-columns: repeat(3, 1fr);
    }

    .detail-info {
        padding: 24px 20px;
    }

    .grid-prod {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 14px;
    }
}

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

    .grid-prod {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .p-card .p-body {
        padding: 12px;
    }

    .p-name {
        font-size: 14px;
    }

    .p-desc {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .p-price {
        font-size: 14px;
    }

    .p-price small {
        font-size: 10px;
    }

    .p-fav {
        width: 32px;
        height: 32px;
    }

    .p-fav svg {
        width: 15px;
        height: 15px;
    }

    .cat-card {
        padding: 14px 10px;
    }

    .cat-ico {
        width: 42px;
        height: 42px;
    }

    .cat-card b {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ============ Cart ============ */
.icon-btn {
    position: relative;
}

.cart-btn {
    color: var(--accent);
}

.cart-badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    min-width: 20px;
    height: 20px;
    padding-inline: 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: grid;
    place-items: center;
    border: 2px solid var(--surface);
    box-shadow: var(--shadow-soft);
}

.cart-fab {
    position: fixed;
    bottom: 18px;
    left: 50%;
    translate: -50% 0;
    z-index: 90;
    display: none;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: var(--shadow-lift);
    transform: translateY(90px);
    opacity: 0;
    transition: transform .4s cubic-bezier(.22, 1, .36, 1), opacity .3s, background .2s;
    max-width: calc(100vw - 32px);
}

.cart-fab.show {
    display: inline-flex;
    transform: none;
    opacity: 1;
}

.cart-fab:hover {
    background: var(--accent-hover);
}

.cart-fab svg {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

.fab-count {
    background: #fff;
    color: var(--accent-deep);
    min-width: 22px;
    height: 22px;
    padding-inline: 7px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 12.5px;
    flex-shrink: 0;
}

.fab-total {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.cart-card {
    max-width: 540px;
}

.cart-body {
    padding: 14px 24px 28px;
}

.cart-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-top: 42px;
}

.cart-head h2 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.cart-sub {
    color: var(--muted);
    font-size: 13px;
    margin-inline-start: auto;
}

.cart-back {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    color: var(--muted);
    transition: all .2s;
    flex-shrink: 0;
}

.cart-back:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.cart-back svg {
    width: 17px;
    height: 17px;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 46vh;
    overflow-y: auto;
    padding-inline-end: 4px;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--bg);
}

.ci-media {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--accent-soft);
    flex-shrink: 0;
}

.ci-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ci-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}

.ci-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

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

.ci-price small {
    font-size: 10.5px;
}

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

.ci-total {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--accent);
    white-space: nowrap;
}

.ci-total small {
    font-size: 10.5px;
    color: var(--muted);
    font-weight: 500;
    margin-inline-start: 2px;
}

.ci-remove {
    font-size: 12px;
    color: var(--danger);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    opacity: .85;
    transition: opacity .2s;
}

.ci-remove:hover {
    opacity: 1;
}

.ci-remove svg {
    width: 13px;
    height: 13px;
}

.qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    padding: 3px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 17px;
    font-weight: 600;
    color: var(--accent);
    transition: background .2s, transform .15s;
    line-height: 1;
}

.qty-btn:hover {
    background: var(--accent-soft);
}

.qty-btn:active {
    transform: scale(.92);
}

.qty-num {
    min-width: 30px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
}

.qty-stepper.sm {
    padding: 2px;
}

.qty-stepper.sm .qty-btn {
    width: 26px;
    height: 26px;
    font-size: 15px;
}

.qty-stepper.sm .qty-num {
    min-width: 24px;
    font-size: 13px;
}

.buy-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
    width: 100%;
}

.buy-row .btn {
    flex: 1;
}

.buy-row .qty-stepper {
    flex-shrink: 0;
    align-self: center;
}

.cart-summary {
    border-top: 1px solid var(--border);
    margin-top: 16px;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 14px;
    color: var(--muted);
}

.cart-total-row b {
    font-size: 21px;
    color: var(--fg);
    font-weight: 800;
}

.cart-total-row b small {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    margin-inline-start: 3px;
}

.cart-cta {
    width: 100%;
}

.cart-empty {
    text-align: center;
    padding: 30px 10px 10px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.cart-empty svg {
    width: 46px;
    height: 46px;
    color: var(--border);
}

.cart-empty b {
    color: var(--fg);
    font-size: 16px;
}

.cart-empty span {
    font-size: 13.5px;
}

.cart-empty .btn {
    margin-top: 10px;
}

/* ============ Checkout form ============ */
.ck-summary {
    background: var(--accent-soft);
    border-radius: var(--r-sm);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 13.5px;
    margin-bottom: 18px;
    color: var(--accent-deep);
}

.ck-summary b {
    font-weight: 800;
    white-space: nowrap;
}

.ck-field {
    margin-bottom: 15px;
}

.ck-field label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 7px;
}

.ck-field .req {
    color: var(--danger);
}

.ck-field .opt {
    color: var(--muted);
    font-weight: 400;
    font-size: 12px;
}

.ck-field input,
.ck-field textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--fg);
    transition: border-color .2s, box-shadow .2s;
    resize: vertical;
}

.ck-field input::placeholder,
.ck-field textarea::placeholder {
    color: var(--muted);
}

.ck-field input:focus,
.ck-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.ck-help {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
}

.ck-err {
    display: block;
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
}

.ck-field.has-error input,
.ck-field.has-error textarea {
    border-color: var(--danger);
}

.ck-pay-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--r-sm);
    padding: 13px 16px;
    font-size: 13.5px;
    color: var(--muted);
    margin: 4px 0 16px;
}

.ck-pay-row b {
    color: var(--fg);
    font-size: 16px;
    font-weight: 800;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.ck-error {
    display: none;
    background: color-mix(in oklch, var(--danger) 9%, var(--surface));
    border: 1px solid color-mix(in oklch, var(--danger) 35%, var(--border));
    color: var(--danger);
    font-size: 13px;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    margin-bottom: 14px;
    text-align: center;
}

/* ============ Cart success ============ */
.cart-success {
    text-align: center;
    padding: 14px 6px 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.cs-ico {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: color-mix(in oklch, var(--success) 14%, var(--surface));
    color: var(--success);
    display: grid;
    place-items: center;
    margin-bottom: 4px;
}

.cs-ico svg {
    width: 30px;
    height: 30px;
}

.cart-success h2 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
}

.cart-success>p {
    color: var(--muted);
    font-size: 13.5px;
}

.cs-box {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 4px 16px;
    margin-top: 10px;
    text-align: start;
}

.cs-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 13px;
    color: var(--muted);
}

.cs-row:last-child {
    border-bottom: 0;
}

.cs-row b {
    color: var(--fg);
    font-weight: 700;
}

.cart-success .btn {
    margin-top: 14px;
    width: 100%;
}

/* ============ Pulse ============ */
.p-act.pulse {
    animation: pulseAnim .5s;
}

@keyframes pulseAnim {
    0% {
        transform: scale(.75);
    }

    60% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .cart-body {
        padding: 10px 16px 22px;
    }

    .cart-head {
        padding-top: 40px;
    }

    .cart-head h2 {
        font-size: 19px;
    }

    .buy-row {
        flex-direction: column;
    }

    .buy-row .qty-stepper {
        align-self: stretch;
        justify-content: space-between;
    }

    .buy-row .qty-btn {
        width: 42px;
        height: 38px;
    }

    .cart-fab {
        bottom: 14px;
        font-size: 13px;
        padding: 11px 16px;
    }
}
