/* ========================================
   AISHA — Design System
   Brand: #FF6E00 orange + #1C2047 navy
   ======================================== */

/* --- Design Tokens --- */
:root {
    /* Brand Colors */
    --color-primary:        #1C2047;   /* navy — text, headings, dark UI */
    --color-primary-light:  #2d3260;
    --color-accent:         #FF6E00;   /* orange — CTA, active, badges */
    --color-accent-hover:   #e66000;
    --color-accent-light:   #fff3eb;   /* orange tint for backgrounds */

    /* Surfaces */
    --color-bg:             #FFFFFF;
    --color-white:          #FFFFFF;
    --color-card:           #FFFFFF;
    --color-surface:        #F0F2F6;
    --color-overlay:        rgba(28, 32, 71, 0.06);

    /* Text */
    --color-text:           #1C2047;
    --color-text-secondary: #6B7280;
    --color-text-muted:     #A0A8B4;

    /* UI Elements */
    --color-border:         #E4E7EF;
    --color-search-bg:      #F0F1F5;
    --color-star:           #FFA500;
    --color-badge:          #FF6E00;
    --color-heart-active:   #E84A5F;
    --product-card-accent:  #E8F0FA;
    --product-card-border:  #E8F0FA;

    /* Tab states */
    --color-tab-active-bg:  #FF6E00;
    --color-tab-active-text:#FFFFFF;
    --color-tab-bg:         #F0F1F5;
    --color-tab-text:       #6B7280;

    /* Nav */
    --color-nav-active:     #FF6E00;
    --color-nav-inactive:   #B0B5C4;

    /* Promo */
    --color-promo-bg:       #1C2047;

    /* Typography */
    --font-primary:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display:  'Inter', -apple-system, sans-serif;

    /* Spacing (4pt grid) */
    --space-xs:  4px;
    --space-sm:  8px;
    --space-md:  12px;
    --space-lg:  16px;
    --space-xl:  20px;
    --space-2xl: 24px;
    --space-3xl: 32px;

    /* Border Radius */
    --radius-sm:   8px;
    --radius-md:   12px;
    --radius-lg:   16px;
    --radius-xl:   20px;
    --radius-2xl:  24px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-xs:     none;
    --shadow-card:   none;
    --shadow-nav:    none;
    --shadow-button: none;
    --shadow-search: 0 0 0 2px #FF6E00;

    /* Transitions */
    --transition-fast:   0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow:   0.4s ease;

    /* Layout */
    --app-max-width:  430px;
    --header-height:  60px;
    --nav-height:     64px;
}

/* --- Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-primary);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a    { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; font-size: inherit; color: inherit; }
input { border: none; outline: none; font-family: inherit; font-size: inherit; }
img  { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }

/* ─── App Container ─── */
.app {
    width: 100%;
    max-width: var(--app-max-width);
    min-height: 100vh;
    background: var(--color-white);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ─── Header ─── */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    height: var(--header-height);
    background: var(--color-white);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
}

.header__brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header__logo-img {
    height: 46px;
    width: auto;
    object-fit: contain;
    margin-bottom: 6px;
}

.header__tagline {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    font-weight: 500;
    line-height: 1.2;
}

.header__icons {
    display: flex;
    align-items: center;
    gap: 2px;
}

.header__notify {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--color-primary);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.header__notify:active {
    background: var(--color-overlay);
    transform: scale(0.92);
}

.header__notify-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-white);
}

.header__cart {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--color-primary);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.header__cart:active {
    transform: scale(0.92);
}

.header__cart-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 17px;
    height: 17px;
    background: var(--color-accent);
    color: var(--color-white);
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── Search ─── */
.search {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg) var(--space-md);
    background: var(--color-white);
    position: sticky;
    top: var(--header-height);
    z-index: 99;
    border-bottom: 1px solid var(--color-border);
}

.search__input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--color-search-bg);
    border-radius: 13px;
    padding: 0 var(--space-lg);
    height: 44px;
    transition: box-shadow var(--transition-fast);
}

.search__input-wrapper:focus-within {
    box-shadow: var(--shadow-search);
}

.search__icon {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.search__input {
    flex: 1;
    background: transparent;
    height: 100%;
    font-size: 0.875rem;
    color: var(--color-text);
}

.search__input::placeholder {
    color: var(--color-text-muted);
}

.search__filter {
    width: 44px;
    height: 44px;
    background: var(--color-search-bg);
    color: var(--color-primary);
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.search__filter:active {
    transform: scale(0.93);
    background: var(--color-border);
}

/* Clear-search button inside the input */
.search__clear {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-border, #e5e7eb);
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.search__clear:active { transform: scale(0.9); }

/* Active filter chips under the search bar */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 var(--space-lg) 4px;
    margin-top: -2px;
}
.active-filters__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px 6px 12px;
    background: #fff3eb;
    border: 1px solid #ffd9bf;
    color: #FF6E00;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.active-filters__chip i {
    font-size: 0.72rem;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,110,0,0.14);
}
.active-filters__chip:active { transform: scale(0.96); }
.active-filters__clear-all {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: none;
    border: 1px solid var(--color-border, #e5e7eb);
    color: #6b7280;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

/* Empty state with reset button */
.products__empty .btn { margin-top: 14px; }

/* ─── Main ─── */
.main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: calc(var(--nav-height) + var(--space-xl));
    -webkit-overflow-scrolling: touch;
    background: var(--color-bg);
}

.main::-webkit-scrollbar { display: none; }
.main { -ms-overflow-style: none; scrollbar-width: none; }

/* ─── Promo Slider ─── */
.promo-slider {
    padding: var(--space-lg) var(--space-lg) 0;
    margin-bottom: var(--space-md);
}

.promo-slider__track {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

/* Horizontal rail holding every slide side-by-side; it slides as one block so
   the current banner leaves left while the next enters from the right. */
.promo-slider__rail {
    display: flex;
    transition: transform 0.45s ease-in-out;
    will-change: transform;
}

.promo-slide {
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--color-promo-bg);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    min-height: 160px;
    overflow: hidden;
}

/* Image-only banner */
.promo-slide--img {
    display: block;
    padding: 0;
    background: #111;
    min-height: unset;
    aspect-ratio: 16 / 7;
    border-radius: var(--radius-xl);
}

@media (prefers-reduced-motion: reduce) {
    .promo-slider__rail { transition: none; }
}

.promo-slide--img a {
    display: block;
    position: absolute;
    inset: 0;
}

.promo-slide--img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-xl);
}

.promo-slide__content {
    display: flex;
    flex-direction: column;
    z-index: 2;
    flex: 1;
}

.promo-slide__label {
    color: rgba(255,255,255,.7);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: var(--space-xs);
}

.promo-slide__percent {
    color: var(--color-white);
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.promo-slide__percent-sign {
    font-size: 1.6rem;
    vertical-align: super;
}

.promo-slide__upto {
    color: var(--color-accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

.promo-slide__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--color-accent);
    color: var(--color-white);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    width: fit-content;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.promo-slide__link:active { opacity: .85; transform: scale(.97); }

.promo-slide__image {
    position: absolute;
    right: -10px;
    top: 0;
    bottom: 0;
    width: 52%;
    z-index: 1;
}

.promo-slide__image::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 0;
    bottom: 0;
    width: 80px;
    background: linear-gradient(to right, var(--color-promo-bg), transparent);
    z-index: 2;
}

.promo-slide__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
}



.promo-slider__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: var(--space-md);
}

.promo-slider__dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--color-text-muted);
    opacity: 0.35;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.promo-slider__dot--active {
    width: 20px;
    border-radius: 3px;
    background: var(--color-accent);
    opacity: 1;
}

/* ─── Section Header ─── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-lg) var(--space-sm);
}

.section-header__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
}

.section-header__link {
    font-size: 0.8rem;
    color: var(--color-accent);
    font-weight: 600;
}

/* ─── Categories ─── */
.categories {
    display: flex;
    gap: 8px;
    padding: 12px 16px 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
}

.categories::-webkit-scrollbar { display: none; }

.categories__tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 16px;
    height: 42px;
    border-radius: 13px;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    background: var(--color-search-bg);
    color: var(--color-text-secondary);
    border: 1.5px solid transparent;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.categories__tab i {
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.categories__tab:active {
    transform: scale(0.95);
    opacity: 0.85;
}

.categories__tab--active {
    background: var(--color-accent);
    color: #fff;
    font-weight: 600;
    border-color: transparent;
}

/* ─── Products Grid ─── */
.products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px 12px 8px;
}

/* ─── Product Card ─── */
.product-card {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--product-card-border);
    transition: transform var(--transition-fast);
}

.product-card:active { transform: scale(0.97); }

/* ── Image zone ── */
.product-card__image-wrapper {
    position: relative;
    height: 155px;
    background: #ffffff;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Actions group — top-right of card image (column: fav → share → chat) */
.product-card__actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    z-index: 3;
}

/* Shared style for all action buttons (chat, share, favourite) */
.product-card__action-btn,
.product-card__favorite {
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,.88);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    color: var(--color-text-muted);
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.product-card__action-btn:active,
.product-card__favorite:active { transform: scale(0.86); }

/* Chat icon — same speech-bubble glyph as the bottom-nav «Чат», inherits the
   muted action-button colour. */
.product-card__chat-icon {
    width: 11px;
    height: 11px;
    display: block;
    color: inherit;
}
.product-card__favorite--active { color: var(--color-heart-active); }
.product-card__favorite--active i { animation: heartPop 0.28s ease; will-change: transform; }

@keyframes heartPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Badge — top-left capsule */
.product-card__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-block;
    width: auto;
    height: auto;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1.4;
    z-index: 3;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
}

.product-card__badge--new  { background: var(--color-primary); color: #fff; }
.product-card__badge--sale { background: var(--color-accent);  color: #fff; }
.product-card__badge--hit  { background: var(--color-primary); color: #fff; }

/* ── Info section ── */
.product-card__info {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    background: var(--product-card-accent);
}

.product-card__name {
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Footer: price (left) · rating (center) · cart (right), vertically centered */
.product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.product-card__prices {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.product-card__old-price {
    font-size: 0.63rem;
    color: rgba(28,32,71,0.55);
    text-decoration: line-through;
    line-height: 1;
}

.product-card__price {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.2px;
    line-height: 1.2;
}

/* Rating — sits in the footer row, vertically centered. Display only. */
.product-card__rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    line-height: 1;
    color: var(--color-primary);
    pointer-events: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.product-card__rating i {
    font-size: 0.52rem;
    color: #f5a623;
    display: block;
    line-height: 1;
    vertical-align: middle;
    margin: 0;
    transform: none;
}
.product-card__rating-num {
    display: block;
    line-height: 1;
    font-size: 0.56rem;
    margin: 0;
}
.product-card__rating--empty { color: #9aa0ad; }
.product-card__rating--empty i { color: #cfd3dd; }

/* Cart button — right side of the footer row, vertically centered */
.product-card__cart-btn {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    background: transparent;
    color: var(--color-primary);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    line-height: 1;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.product-card__cart-btn--in-cart {
    color: var(--color-accent);
}

.product-card__cart-btn:active {
    transform: scale(0.88);
    opacity: .85;
}

/* ─── Bottom Navigation ─── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--app-max-width);
    height: var(--nav-height);
    background: #ffffff;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    box-shadow: none;
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom, 0);
    border-top: 1px solid #eeeeee;
    overflow: hidden;
    will-change: transform;
}

.bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--color-nav-inactive);
    transition: color var(--transition-fast);
    position: relative;
    height: 100%;
    padding: 12px 16px 0;
    -webkit-tap-highlight-color: transparent;
    min-width: 52px;
}

.nav-icon-zone {
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.bottom-nav__item i { font-size: 1.2rem; }
.bottom-nav__item svg.nav-icon-cat  { width: 1.1rem; height: 1.1rem; display: block; }
.bottom-nav__item svg.nav-icon-chat { width: 21px; height: 25px; display: block; }

.bottom-nav__item--active {
    color: var(--color-accent);
}

.bottom-nav__item--active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 0 0 4px 4px;
}

.bottom-nav__item:active { opacity: 0.6; }

.bottom-nav__icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav__badge {
    position: absolute;
    top: -1px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    border: 2px solid #ffffff;
    animation: badgePulse 1.6s ease-in-out infinite;
    will-change: opacity, transform;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1;    transform: scale(1);    }
    50%       { opacity: 0.55; transform: scale(1.12); }
}

.bottom-nav__notify-badge {
    position: absolute;
    top: 4px;
    right: 12px;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-white);
}

/* ─── Loading Skeleton ─── */
.skeleton {
    background: linear-gradient(90deg, #f0f1f5 25%, #e5e7ed 50%, #f0f1f5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
    will-change: background-position;
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ─── Empty States ─── */
.products__empty,
.page-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.products__empty {
    grid-column: 1 / -1;
    /* Fill the free space between the search bar and the bottom nav so the
       empty state sits centered vertically. */
    min-height: calc(100dvh - var(--header-height) - var(--nav-height) - 80px);
    padding: 24px var(--space-xl);
}

.page-empty {
    grid-column: 1 / -1;
    min-height: calc(100dvh - var(--header-height) - var(--nav-height));
    padding: var(--space-xl);
}

.products__empty i,
.page-empty i {
    font-size: 2.5rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.products__empty p,
.page-empty p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn--primary {
    background: var(--color-accent);
    color: var(--color-white);
    box-shadow: var(--shadow-button);
}

.btn--primary:hover  { background: var(--color-accent-hover); }
.btn--primary:active { transform: scale(0.97); }

.btn--full {
    width: 100%;
    padding: var(--space-lg);
}


/* ─── Filter Modal ─── */
.filter-modal {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--app-max-width);
    height: 100%;
    background: rgba(28,32,71,.45);
    z-index: 300;
    display: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.filter-modal--open {
    display: block;
    opacity: 1;
}

.filter-modal__panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    padding: var(--space-2xl);
    transform: translateY(100%);
    transition: transform var(--transition-normal);
    max-height: 75vh;
    overflow-y: auto;
}

.filter-modal--open .filter-modal__panel { transform: translateY(0); }

.filter-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.filter-modal__title {
    font-size: 1.05rem;
    font-weight: 700;
}

.filter-modal__close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border-radius: var(--radius-full);
}

.filter-group { margin-bottom: var(--space-xl); }

.filter-group__label {
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    display: block;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group__options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.filter-chip {
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.82rem;
    background: var(--color-tab-bg);
    color: var(--color-tab-text);
    transition: all var(--transition-fast);
    font-weight: 500;
    white-space: nowrap;
    text-align: center;
    cursor: pointer;
    line-height: 1.3;
}

.filter-chip--active {
    background: var(--color-accent);
    color: var(--color-white);
}

.price-range {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.price-range__input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-search-bg);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    text-align: center;
}

.price-range__separator {
    color: var(--color-text-muted);
    font-weight: 500;
}

.filter-modal__actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.filter-modal__reset {
    flex: 1;
    padding: var(--space-lg);
    background: var(--color-search-bg);
    color: var(--color-text);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    transition: background var(--transition-fast);
}

.filter-modal__reset:hover { background: #e4e6eb; }

.filter-modal__apply {
    flex: 1;
    padding: var(--space-lg);
    background: var(--color-accent);
    color: var(--color-white);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0;
    transition: background var(--transition-fast);
    box-shadow: var(--shadow-button);
}

.filter-modal__apply:hover { background: var(--color-accent-hover); }

/* ─── Price Slider ─── */
.price-slider-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.price-slider__val { font-size: 0.88rem; font-weight: 600; color: var(--color-accent); }
.price-slider-wrap { padding: 8px 0; }
.price-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 100px; outline: none; cursor: pointer; background: #E5E7EB; }
.price-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #FF6E00; cursor: pointer; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(255,110,0,0.35); }
.price-slider::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #FF6E00; cursor: pointer; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(255,110,0,0.35); border: none; }

/* ════════════════════════════════════════
   Sub-page shared styles
   ════════════════════════════════════════ */

/* Back / page header variants */
.header__back {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: var(--color-primary);
    border-radius: var(--radius-full);
    transition: background var(--transition-fast);
}

.header__back:active { background: var(--color-overlay); }

.header__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
}

.header--centered-title .header__title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.header__action {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.header__action:active { color: var(--color-accent); }

/* ─── Product Detail ─── */
.detail__image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: var(--color-surface);
    overflow: hidden;
}

.detail__image { width: 100%; height: 100%; object-fit: cover; }

.detail__fav-btn {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 42px;
    height: 42px;
    background: var(--color-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--color-text-muted);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-fast);
}

.detail__fav-btn--active { color: var(--color-heart-active); }

.detail__content { padding: var(--space-xl); }

.detail__header { margin-bottom: var(--space-md); }

.detail__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.detail__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
}

.detail__rating i { color: var(--color-star); }

.detail__reviews { color: var(--color-text-muted); }

.detail__price-row {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.detail__price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-accent);
}

.detail__old-price {
    font-size: 1rem;
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.detail__description {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
    margin-bottom: var(--space-xl);
}

.detail__option { margin-bottom: var(--space-lg); }

.detail__option-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--color-text-secondary);
}

.detail__chips { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

.detail__chip {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--color-tab-bg);
    color: var(--color-tab-text);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
}

.detail__chip--active {
    background: var(--color-accent);
    color: var(--color-white);
}

.detail__qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.detail__qty {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--color-search-bg);
    border-radius: var(--radius-md);
    padding: var(--space-xs) var(--space-sm);
}

.detail__qty-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-accent);
    background: var(--color-white);
    transition: background var(--transition-fast);
    border: none;
    cursor: pointer;
}

.detail__qty-btn:active { background: var(--color-border); }

.detail__qty-value {
    font-size: 1rem;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.detail__related { padding: var(--space-xl); padding-top: 0; }

.detail__related-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

/* ─── Cart Page ─── */
.cart-list { padding: 0 var(--space-xl); }

.cart-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
    align-items: flex-start;
}

.cart-item:last-child { border-bottom: none; }

.cart-item__image {
    width: 84px;
    height: 106px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-surface);
    flex-shrink: 0;
    position: relative;
}

.cart-item__image img { width: 100%; height: 100%; object-fit: cover; }

.cart-item__image--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 1.5rem;
}

.cart-item__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 6px;
}

.cart-item__top {
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.cart-item__name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    margin: 0;
}

.cart-item__remove {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    background: none;
    padding: 0;
    margin-top: -2px;
}

.cart-item__remove:active { color: #e74c3c; }

.cart-item__variants {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cart-item__color {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-item__color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid transparent;
}

.cart-item__color-dot--light { border-color: #ddd; }

.cart-item__color-name {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.cart-item__size {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-search-bg);
    border-radius: 5px;
    padding: 2px 7px;
}

.cart-item__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.cart-item__qty {
    display: flex;
    align-items: center;
    background: var(--color-search-bg);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.cart-item__qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    background: var(--color-white);
    color: var(--color-accent);
    border: none;
    cursor: pointer;
}

.cart-item__qty-value {
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
    color: var(--color-primary);
}

.cart-item__price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-accent);
}

.cart-summary {
    padding: var(--space-xl);
    margin-top: var(--space-sm);
    border-top: 1px solid var(--color-border);
}

.cart-summary__row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.cart-summary__free { color: #28a745; font-weight: 500; }

.cart-summary__total {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    margin-bottom: var(--space-lg);
}

/* ─── Categories Page ─── */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    padding: var(--space-xl);
}

.cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-2xl) var(--space-lg);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: transform var(--transition-fast);
    border: 1px solid var(--color-border);
}

.cat-card:hover  { transform: translateY(-2px); }
.cat-card:active { transform: translateY(0); }

.cat-card__icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: var(--space-xs);
    background: var(--color-accent-light);
    color: var(--color-accent);
}

.cat-card__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

.cat-card__count {
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

.cat-products__header {
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.cat-products__back {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm) 0;
}

.cat-products__back:hover { color: var(--color-accent); }

.cat-products__title {
    font-size: 1rem;
    font-weight: 700;
    margin-left: auto;
}

/* ─── Profile Page ─── */
.profile { padding: var(--space-xl); }

.profile__header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.profile__avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: var(--color-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-accent);
    flex-shrink: 0;
}

.profile__name { font-size: 1.15rem; font-weight: 700; }

.profile__email { font-size: 0.78rem; color: var(--color-text-muted); }

.profile__stats {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.profile__stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.profile__stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-accent);
}

.profile__stat-label {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    margin-top: 2px;
    text-align: center;
}

.profile__menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile__menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--color-text);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
    text-decoration: none;
    font-family: inherit;
}

.profile__menu-item:hover { background: var(--color-surface); }

.profile__menu-item i:first-child {
    width: 20px;
    text-align: center;
    color: var(--color-accent);
}

.profile__menu-item span { flex: 1; text-align: left; }

.profile__menu-item i:last-child {
    color: var(--color-text-muted);
    font-size: 0.72rem;
}

.profile__menu-item--danger { color: #e74c3c; }
.profile__menu-item--danger i:first-child { color: #e74c3c; }

/* ─── Notifications Page ─── */
.notif-list { padding: 0 var(--space-xl); }

.notif-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.notif-item:last-child { border-bottom: none; }

.notif-item__dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: transparent;
    flex-shrink: 0;
    margin-top: 6px;
}

.notif-item--unread .notif-item__dot { background: var(--color-accent); }

.notif-item__content { flex: 1; min-width: 0; }

.notif-item__title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.notif-item--unread .notif-item__title { color: var(--color-primary); }

.notif-item__text {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    line-height: 1.45;
    margin-bottom: var(--space-xs);
}

.notif-item__time {
    font-size: 0.68rem;
    color: var(--color-text-muted);
}

/* ─── Utility ─── */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}


/* ── Per-item variant picker (shared: product page + QS modal) ── */
.pv__block {
    background: #fafafa; border-radius: 14px;
    padding: 12px; display: flex; flex-direction: column; gap: 0;
}
.pv__row { padding: 10px 0; }
.pv__divider { border: none; border-top: 1px solid #efefef; margin: 0; }
.pv__row-label { font-size: 12px; font-weight: 700; color: #111; display: block; margin-bottom: 8px; }
.pv__row-opts { display: flex; flex-direction: column; gap: 12px; }
.pv__swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.pv__swatch {
    width: 28px; height: 28px; border-radius: 50%;
    border: none; cursor: pointer; outline: none;
    box-shadow: 0 2px 5px rgba(0,0,0,.15);
    transition: transform .15s; flex-shrink: 0;
}
.pv__swatch:active { transform: scale(.85); }
.pv__swatch--on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #FF6E00 !important; transform: scale(1.1); }
.pv__swatch--light { box-shadow: inset 0 0 0 1.5px #ddd; }
.pv__swatch--light.pv__swatch--on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #FF6E00 !important; }
.pv__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pv__chip {
    min-width: 36px; height: 30px; padding: 0 10px;
    border: 1.5px solid #e8e8e8; border-radius: 8px;
    background: #fff; font-size: 12px; font-weight: 600;
    color: #111; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: border-color .15s, background .15s, color .15s;
}
.pv__chip--on { border-color: #FF6E00; background: #FF6E00; color: #fff; }
.pv__warn { display: block; font-size: 11px; color: #e74c3c; margin-top: 6px; font-weight: 500; }

/* ─── Quick Order Bottom Sheet ─── */
.qs-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.52);
    z-index: 500;
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease;
}
.qs-overlay.open { opacity: 1; pointer-events: all; }

.qs-sheet {
    background: #fff;
    border-radius: 24px 24px 0 0;
    width: 100%; max-width: var(--app-max-width);
    max-height: 90vh;
    display: flex; flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}
.qs-overlay.open .qs-sheet { transform: translateY(0); }

.qs-header {
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 14px 16px 10px; position: relative;
}
.qs-drag {
    width: 36px; height: 4px;
    background: #e0e0e0; border-radius: 2px; cursor: grab;
}
.qs-close {
    position: absolute; top: 12px; right: 12px;
    width: 36px; height: 36px;
    background: #f5f5f5; border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; cursor: pointer; color: #777; transition: background 0.15s;
}
.qs-close:active { background: #e8e8e8; }

.qs-body {
    flex: 1 1 auto; min-height: 0; overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 8px 16px 16px;
    display: flex; flex-direction: column; gap: 14px;
}

/* Product row */
.qs-product {
    flex-shrink: 0;
    display: flex; gap: 14px; align-items: flex-start;
    padding-bottom: 14px; border-bottom: 1px solid #f0f0f0;
}
.qs-product__photo {
    flex-shrink: 0; width: 110px; height: 110px;
    border-radius: 14px; background: #f6f6f6;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.qs-product__photo img { width: 100%; height: 100%; object-fit: contain; }
.qs-product__info {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 6px; padding-top: 2px;
}
.qs-product__name {
    font-size: 15px; font-weight: 700; margin: 0;
    color: var(--color-primary, #1C2047); line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.qs-product__prices { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.qs-product__price {
    font-size: 22px; font-weight: 800;
    color: var(--color-primary, #1C2047); line-height: 1;
}
.qs-product__old-price {
    font-size: 13px; color: #bbb; text-decoration: line-through;
}
.qs-product__desc {
    font-size: 12px; color: var(--color-text-secondary, #6B7280);
    line-height: 1.45; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Gallery thumbnails */
.qs-thumbs {
    flex-shrink: 0;
    display: flex; justify-content: center; align-items: center;
    gap: 8px; overflow-x: auto; padding-bottom: 2px; width: 100%;
}
.qs-thumb {
    flex-shrink: 0; width: 48px; height: 48px;
    border-radius: 8px; overflow: hidden;
    border: 2px solid #f0f0f0; cursor: pointer;
    background: #f8f8f8; transition: border-color 0.15s;
}
.qs-thumb img { width: 100%; height: 100%; object-fit: contain; }
.qs-thumb--active { border-color: var(--color-accent, #FF6E00); }

/* ─── Photo Viewer Overlay ─── */
.photo-viewer-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 600;
    display: flex; align-items: center; justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}
.photo-viewer {
    width: 100%; max-width: 420px;
    background: #fff;
    border-radius: 24px;
    padding: 16px;
    position: relative;
    box-sizing: border-box;
}
.photo-viewer-close {
    position: absolute; top: 12px; right: 12px;
    width: 32px; height: 32px;
    border-radius: 50%; border: none;
    background: #f0f0f0; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; color: #333;
    z-index: 1;
}
.photo-viewer-close:hover { background: #e0e0e0; }
.photo-viewer-main {
    width: 100%; max-height: 70vh;
    object-fit: contain; border-radius: 16px;
    display: block;
}
.photo-viewer-thumbs {
    margin-top: 14px;
    display: flex; justify-content: center; align-items: center;
    gap: 10px; overflow-x: auto;
    padding-bottom: 4px; width: 100%;
}
.photo-viewer-thumb {
    flex-shrink: 0; width: 48px; height: 48px;
    border-radius: 8px; overflow: hidden;
    border: 2px solid #f0f0f0; cursor: pointer;
    background: #f8f8f8; transition: border-color 0.15s;
}
.photo-viewer-thumb img { width: 100%; height: 100%; object-fit: contain; }
.photo-viewer-thumb--active { border-color: var(--color-accent, #FF6E00); }

/* Sizes */
.qs-block { flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; }
#qsVariantsArea { flex-shrink: 0; }
.qs-block__label {
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.07em; color: var(--color-primary, #1C2047);
}
/* Color swatches */
.qs-colors { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.qs-color-swatch {
    width: 30px; height: 30px; border-radius: 50%;
    border: none; cursor: pointer; padding: 0; flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.10);
    transition: box-shadow 0.15s;
}
.qs-color-swatch--active {
    box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px var(--color-accent, #FF6E00);
}

.qs-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.qs-size-chip {
    height: 36px; min-width: 46px; padding: 0 16px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #e8e8e8; border-radius: 9px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    background: #fff; color: var(--color-primary, #1C2047);
    font-family: inherit; transition: all 0.15s;
}
.qs-size-chip:hover:not(.qs-size-chip--active) {
    border-color: var(--color-accent, #FF6E00);
    color: var(--color-accent, #FF6E00);
}
.qs-size-chip--active {
    border-color: var(--color-accent, #FF6E00);
    background: var(--color-accent, #FF6E00); color: #fff;
}

/* Qty + total block */
.qs-qty-row {
    display: flex; align-items: center;
    justify-content: space-between; gap: 12px;
    background: var(--color-accent-light, #fff3eb);
    border-radius: 14px; padding: 12px 14px;
}
.qs-qty {
    display: flex; align-items: center;
    background: #fff; border-radius: 10px; overflow: hidden;
}
.qs-qty__btn {
    width: 36px; height: 36px;
    background: none; border: none; cursor: pointer;
    font-size: 14px; color: var(--color-accent, #FF6E00);
    display: flex; align-items: center; justify-content: center;
    font-family: inherit; transition: background 0.15s;
}
.qs-qty__btn:active { background: #fff4ee; }
.qs-qty__num {
    min-width: 36px; text-align: center; line-height: 36px;
    font-size: 18px; font-weight: 700; color: var(--color-primary, #1C2047);
}
.qs-total-group {
    display: flex; align-items: baseline; gap: 6px;
    justify-content: flex-end; flex-wrap: nowrap;
}
.qs-total-label {
    font-size: 14px; color: var(--color-text-secondary, #6B7280);
    font-weight: 500; white-space: nowrap;
}
.qs-total-val {
    font-size: 22px; font-weight: 800;
    color: var(--color-primary, #1C2047); line-height: 1.1; white-space: nowrap;
}

/* Footer + button */
.qs-footer {
    position: sticky; bottom: 0; z-index: 2;
    flex-shrink: 0;
    display: flex; flex-direction: column; gap: 10px;
    padding: 12px 16px 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #f0f0f0;
}
.qs-btn {
    width: 100%; height: 52px;
    background: var(--color-primary, #1C2047); color: #fff;
    border: none; border-radius: 14px;
    font-size: 16px; font-weight: 700; cursor: pointer;
    font-family: inherit; letter-spacing: 0.01em;
    display: flex; align-items: center; justify-content: center;
    gap: 7px;
    transition: opacity 0.15s, background-color 0.25s ease;
}
.qs-btn--in-cart {
    background: #27ae60;
}
.product-card__cart-btn--in-cart i {
    font-size: 13px;
    -webkit-text-stroke: 0.5px currentColor;
}
.qs-btn--in-cart i {
    font-size: 15px;
    -webkit-text-stroke: 0.5px currentColor;
}
.qs-btn:active { opacity: 0.82; }

/* ─── Responsive ─── */
@media (max-width: 380px) {
    .promo-slide__percent { font-size: 2.6rem; }
    .products { gap: 8px; padding: 10px 10px 8px; }
    .product-card__image-wrapper { height: 140px; }
    .product-card__name  { font-size: 0.71rem; }
    .product-card__price { font-size: 0.82rem; }
}

@media (min-width: 431px) {
    body {
        background: #EAECF3;
        align-items: flex-start;
        padding: 24px 0;
    }

    .app {
        border-radius: var(--radius-2xl);
        min-height: calc(100vh - 48px);
        box-shadow: 0 2px 16px rgba(28,32,71,.06);
        overflow: hidden;
    }

    .bottom-nav {
        border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
    }
}

@media (min-width: 768px) {
    :root { --app-max-width: 480px; }

    .products { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
