/**
 * KIDIKI.RU — Design System & Component Library
 * Modern E-commerce Redesign 2024
 * 
 * Architecture: Mobile-first, CSS Variables, BEM-like naming
 * Stack: Vanilla CSS (no frameworks), CSS Grid + Flexbox
 */

/* ============================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */

:root {
  /* Primary Colors - Trust & Care */
  --color-primary-50: #f0f9ff;
  --color-primary-100: #e0f2fe;
  --color-primary-200: #bae6fd;
  --color-primary-300: #7dd3fc;
  --color-primary-400: #38bdf8;
  --color-primary-500: #0ea5e9;
  --color-primary-600: #0284c7;
  --color-primary-700: #0369a1;
  --color-primary-800: #075985;
  --color-primary-900: #0c4a6e;

  /* Accent Colors - Promotions & CTAs */
  --color-accent-50: #fef2f2;
  --color-accent-100: #fee2e2;
  --color-accent-200: #fecaca;
  --color-accent-300: #fca5a5;
  --color-accent-400: #f87171;
  --color-accent-500: #ef4444;
  --color-accent-600: #dc2626;
  --color-accent-700: #b91c1c;
  --color-accent-800: #991b1b;
  --color-accent-900: #7f1d1d;

  /* Semantic Colors */
  --color-success-50: #f0fdf4;
  --color-success-500: #22c55e;
  --color-success-600: #16a34a;
  --color-success-700: #15803d;
  
  --color-warning-50: #fffbeb;
  --color-warning-500: #f59e0b;
  --color-warning-600: #d97706;
  --color-warning-700: #b45309;
  
  --color-error-50: #fef2f2;
  --color-error-500: #ef4444;
  --color-error-600: #dc2626;
  --color-error-700: #b91c1c;
  
  --color-info-50: #eff6ff;
  --color-info-500: #3b82f6;
  --color-info-600: #2563eb;
  --color-info-700: #1d4ed8;

  /* Neutral Colors */
  --color-neutral-0: #ffffff;
  --color-neutral-50: #fafafa;
  --color-neutral-100: #f5f5f5;
  --color-neutral-200: #e5e5e5;
  --color-neutral-300: #d4d4d4;
  --color-neutral-400: #a3a3a3;
  --color-neutral-500: #737373;
  --color-neutral-600: #525252;
  --color-neutral-700: #404040;
  --color-neutral-800: #262626;
  --color-neutral-900: #171717;

  /* Alias Tokens */
  --color-bg-primary: var(--color-neutral-0);
  --color-bg-secondary: var(--color-neutral-50);
  --color-bg-tertiary: var(--color-neutral-100);
  --color-bg-hover: var(--color-neutral-100);
  --color-bg-active: var(--color-neutral-200);
  
  --color-text-primary: var(--color-neutral-900);
  --color-text-secondary: var(--color-neutral-600);
  --color-text-tertiary: var(--color-neutral-500);
  --color-text-inverse: var(--color-neutral-0);
  --color-text-link: var(--color-primary-600);
  --color-text-link-hover: var(--color-primary-700);
  
  --color-border-light: var(--color-neutral-200);
  --color-border-medium: var(--color-neutral-300);
  --color-border-strong: var(--color-neutral-400);

  /* Typography Scale (rem-based, base 16px) */
  --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  
  --font-size-2xs: 0.625rem;   /* 10px */
  --font-size-xs: 0.75rem;     /* 12px */
  --font-size-sm: 0.875rem;    /* 14px */
  --font-size-base: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;    /* 18px */
  --font-size-xl: 1.25rem;     /* 20px */
  --font-size-2xl: 1.5rem;     /* 24px */
  --font-size-3xl: 1.875rem;   /* 30px */
  --font-size-4xl: 2.25rem;    /* 36px */
  --font-size-5xl: 3rem;       /* 48px */
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Spacing Scale */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */

  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.25rem;  /* 20px */
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-drawer: 300;
  --z-modal: 400;
  --z-popover: 500;
  --z-toast: 600;
  --z-tooltip: 700;

  /* Layout */
  --header-height: 4rem;
  --header-height-mobile: 3.5rem;
  --container-max-width: 1440px;
  --container-padding: var(--space-4);
}

/* ============================================
   2. RESET & BASE STYLES
   ============================================ */

@font-face {
  font-family: 'symbol';
  src: url('/resourses/fonts/symbol.woff2') format('woff2'),
       url('/resourses/fonts/symbol.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  min-height: 100vh;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

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

ul, ol {
  list-style: none;
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   3. UTILITY CLASSES
   ============================================ */

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   4. COMPONENTS
   ============================================ */

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-tight);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  min-height: 44px;
  min-width: 44px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--primary {
  background-color: var(--color-accent-500);
  color: var(--color-text-inverse);
}

.btn--primary:hover:not(:disabled) {
  background-color: var(--color-accent-600);
}

.btn--primary:active:not(:disabled) {
  background-color: var(--color-accent-700);
}

.btn--secondary {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

.btn--secondary:hover:not(:disabled) {
  background-color: var(--color-bg-active);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-medium);
}

.btn--outline:hover:not(:disabled) {
  background-color: var(--color-bg-tertiary);
  border-color: var(--color-border-strong);
}

.btn--ghost {
  background-color: transparent;
  color: var(--color-text-link);
}

.btn--ghost:hover:not(:disabled) {
  background-color: var(--color-primary-50);
}

.btn--sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
  min-height: 36px;
}

.btn--lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-size-lg);
}

.btn--block {
  width: 100%;
}

/* ----- Form Inputs ----- */
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.form-field__label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.form-field__label--required::after {
  content: ' *';
  color: var(--color-accent-500);
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-medium);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 44px;
}

.form-input::placeholder {
  color: var(--color-text-tertiary);
}

.form-input:hover {
  border-color: var(--color-border-strong);
}

.form-input:focus {
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px var(--color-primary-100);
}

.form-input--error {
  border-color: var(--color-error-500);
}

.form-input--error:focus {
  box-shadow: 0 0 0 3px var(--color-error-100);
}

.form-field__error {
  font-size: var(--font-size-sm);
  color: var(--color-error-600);
}

/* ----- Checkbox & Radio ----- */
.checkbox, .radio {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  min-height: 44px;
  padding: var(--space-2) 0;
}

.checkbox__input, .radio__input {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  cursor: pointer;
  accent-color: var(--color-primary-600);
}

.checkbox__label, .radio__label {
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
}

/* ----- Select ----- */
.form-select {
  width: 100%;
  padding: var(--space-3) var(--space-10) var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  background-size: 1.25rem;
  border: 1px solid var(--color-border-medium);
  border-radius: var(--radius-lg);
  appearance: none;
  cursor: pointer;
  min-height: 44px;
}

.form-select:focus {
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px var(--color-primary-100);
}

/* ----- Cards ----- */
.card {
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border-medium);
}

.card__image {
  aspect-ratio: 1;
  background-color: var(--color-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition-slow);
}

.card:hover .card__image img {
  transform: scale(1.03);
}

.card__content {
  padding: var(--space-4);
}

/* ----- Product Card ----- */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
}

.product-card__badges {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  z-index: 1;
}

.product-card__badges .badge {
  font-size: 0.6375rem;
  padding: 0.2125rem 0.425rem;
}

.product-card__actions {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: 1;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

@media (hover: hover) {
  .product-card:hover .product-card__actions {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (hover: none) {
  .product-card__actions {
    opacity: 1;
    transform: translateX(0);
  }
  .product-card__action-btn {
    width: 29px;
    height: 29px;
  }
  .product-card__action-btn svg {
    width: 14px;
    height: 14px;
  }
}

.product-card__action-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-medium);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.product-card__action-btn:hover {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  border-color: var(--color-border-strong);
}

.product-card__action-btn--active {
  color: var(--color-accent-500);
  border-color: var(--color-accent-500);
}

.product-card__image {
  aspect-ratio: 1;
  width: 100%;
  flex-shrink: 0;
  overflow: hidden;
  padding: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg-primary);
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card__image img {
  transform: scale(1.03);
}

.product-card__variants {
  display: flex;
  gap: var(--space-2);
  padding: 0 var(--space-4);
  margin-top: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
}

.product-card__variants::-webkit-scrollbar {
  display: none;
}

.product-card__variant {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
}

.product-card__variant--active {
  border-color: var(--color-primary-500);
}

.product-card__variant img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__info {
  padding: var(--space-4);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

.product-card__title:hover {
  color: var(--color-text-link);
}

.product-card__rating {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
  min-height: 1rem;
}

.product-card__rating-stars {
  display: flex;
  color: var(--color-warning-500);
}

.product-card__rating-count {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
}

.product-card__price {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.product-card__price-current {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

.product-card__price-old {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
  text-decoration: line-through;
  min-height: 1.125rem;
}

.product-card__price-discount {
  font-size: var(--font-size-xs);
  color: var(--color-accent-600);
  font-weight: var(--font-weight-medium);
}

.product-card__buy {
  margin-top: var(--space-3);
}

/* ----- Badges ----- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  border-radius: var(--radius-md);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge--new {
  background-color: var(--color-success-500);
  color: var(--color-text-inverse);
}

.badge--sale {
  background-color: var(--color-accent-500);
  color: var(--color-text-inverse);
}

.badge--hit {
  background-color: var(--color-warning-500);
  color: var(--color-text-inverse);
}

.badge--out-of-stock {
  background-color: var(--color-neutral-300);
  color: var(--color-text-secondary);
}

/* ----- Rating ----- */
.rating {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.rating__stars {
  display: flex;
  gap: 2px;
}

.rating__star {
  width: 16px;
  height: 16px;
  color: var(--color-neutral-300);
}

.rating__star--filled {
  color: var(--color-warning-500);
}

.rating__value {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.rating__count {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
}

/* ----- Tabs ----- */
.tabs {
  display: flex;
  flex-direction: column;
}

.tabs__list {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--color-border-light);
  overflow-x: auto;
  scrollbar-width: none;
}

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

.tabs__tab {
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  min-height: 44px;
}

.tabs__tab:hover {
  color: var(--color-text-primary);
}

.tabs__tab--active {
  color: var(--color-primary-600);
  border-bottom-color: var(--color-primary-600);
}

.tabs__panel {
  padding: var(--space-6) 0;
}

.tabs__panel[hidden] {
  display: none;
}

/* ----- Accordion ----- */
.accordion {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.accordion__item {
  border-bottom: 1px solid var(--color-border-light);
}

.accordion__item:last-child {
  border-bottom: none;
}

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  text-align: left;
  background-color: var(--color-bg-primary);
  transition: background-color var(--transition-fast);
  min-height: 44px;
}

.accordion__trigger:hover {
  background-color: var(--color-bg-secondary);
}

.accordion__icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-base);
  flex-shrink: 0;
  margin-left: var(--space-3);
}

.accordion__item--open .accordion__icon {
  transform: rotate(180deg);
}

.accordion__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.accordion__item--open .accordion__content {
  max-height: 1000px;
}

.accordion__inner {
  padding: 0 var(--space-4) var(--space-4);
}

/* ----- Breadcrumbs ----- */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-1);
  padding: var(--space-3) 0;
  font-size: var(--font-size-sm);
}

.breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.breadcrumbs__link {
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.breadcrumbs__link:hover {
  color: var(--color-text-link);
}

.breadcrumbs__current {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}

.breadcrumbs__separator {
  color: var(--color-text-tertiary);
}

/* ----- Pagination ----- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.pagination__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 var(--space-3);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-medium);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.pagination__btn:hover:not(:disabled) {
  background-color: var(--color-bg-tertiary);
  border-color: var(--color-border-strong);
}

.pagination__btn--active {
  background-color: var(--color-primary-600);
  color: var(--color-text-inverse);
  border-color: var(--color-primary-600);
}

.pagination__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ----- Drawer / Sheet ----- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear var(--transition-slow), opacity var(--transition-slow);
}

.drawer--open {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.drawer__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.drawer__panel {
  position: absolute;
  background-color: var(--color-bg-primary);
  transition: transform var(--transition-slow);
}

.drawer--left .drawer__panel,
.drawer--right .drawer__panel {
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
}

.drawer--left .drawer__panel {
  left: 0;
  transform: translateX(-100%);
}

.drawer--right .drawer__panel {
  right: 0;
  transform: translateX(100%);
}

.drawer--bottom .drawer__panel {
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 90vh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  transform: translateY(100%);
}

.drawer--open .drawer__panel {
  transform: translateX(0) translateY(0);
}

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
}

.drawer__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

.drawer__close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.drawer__close:hover {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

.drawer__content {
  padding: var(--space-4);
  overflow-y: auto;
  max-height: calc(100% - 73px);
}

/* ----- Catalog Navigation (Drawer) ----- */
.catalog-nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.catalog-nav__item {
  border-bottom: 1px solid var(--color-border-light);
}

.catalog-nav__item:last-child {
  border-bottom: none;
}

.catalog-nav__row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.catalog-nav__row--active {
  background-color: var(--color-primary-50);
  border-radius: var(--radius-lg);
  margin: 0 calc(-1 * var(--space-2));
  padding: 0 var(--space-2);
}

.catalog-nav__link {
  flex: 1;
  display: block;
  padding: 0.75rem 0;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.catalog-nav__link:hover {
  color: var(--color-primary-600);
}

.catalog-nav__row--active .catalog-nav__link {
  color: var(--color-primary-600);
  font-weight: var(--font-weight-semibold);
}

.catalog-nav__toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.catalog-nav__toggle:hover {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

.catalog-nav__toggle svg {
  transition: transform var(--transition-fast);
}

.catalog-nav__item--open > .catalog-nav__row .catalog-nav__toggle svg {
  transform: rotate(180deg);
}

.catalog-nav__sublist {
  list-style: none;
  padding: 0 0 0.5rem 1rem;
  margin: 0;
  border-left: 2px solid var(--color-border-light);
  margin-left: 0.5rem;
}

.catalog-nav__sublink {
  display: block;
  padding: 0.375rem 0.5rem;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.catalog-nav__sublink:hover {
  color: var(--color-primary-600);
  background-color: var(--color-bg-secondary);
}

.catalog-nav__sublink--active {
  color: var(--color-primary-600);
  font-weight: var(--font-weight-medium);
  background-color: var(--color-primary-50);
}

.catalog-nav__sublink--all {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  color: var(--color-primary-600, #0284c7);
}

.catalog-nav__sublink--all:hover {
  color: var(--color-primary-700, #0369a1);
}

[data-catalog-toggle] {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

[data-catalog-toggle]:active {
  background: var(--color-bg-tertiary, #f5f5f5);
  border-radius: var(--radius-md, 8px);
}

/* ----- Modal ----- */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear var(--transition-slow), opacity var(--transition-slow);
}

.modal--open {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  background-color: var(--color-bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform var(--transition-slow);
}

.modal--open .modal__panel {
  transform: scale(1);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-border-light);
}

.modal__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
}

.modal__close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.modal__close:hover {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

.modal__content {
  padding: var(--space-5);
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

.modal__footer {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-border-light);
  background-color: var(--color-bg-secondary);
}

/* Mobile: Modal becomes bottom sheet */
@media (max-width: 640px) {
  .modal {
    align-items: flex-end;
    padding: 0;
  }
  
  .modal__panel {
    max-width: 100%;
    max-height: 95vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    transform: translateY(100%);
  }
  
  .modal--open .modal__panel {
    transform: translateY(0);
  }
}

/* ----- Toast ----- */
.toast-container {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 400px;
  width: calc(100% - var(--space-8));
}

@media (max-width: 640px) {
  .toast-container {
    left: var(--space-4);
    right: var(--space-4);
    max-width: none;
  }
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background-color: var(--color-bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--color-primary-500);
  animation: toast-in var(--transition-slow) ease-out;
}

.toast--success {
  border-left-color: var(--color-success-500);
}

.toast--error {
  border-left-color: var(--color-error-500);
}

.toast--warning {
  border-left-color: var(--color-warning-500);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.toast__content {
  flex: 1;
}

.toast__title {
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-1);
}

.toast__message {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.toast__close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  transition: color var(--transition-fast);
}

.toast__close:hover {
  color: var(--color-text-primary);
}

/* ----- Skeleton Loading ----- */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-neutral-200) 25%,
    var(--color-neutral-100) 50%,
    var(--color-neutral-200) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton--text {
  height: 1em;
  margin-bottom: var(--space-2);
}

.skeleton--title {
  height: 1.5em;
  width: 70%;
  margin-bottom: var(--space-3);
}

.skeleton--image {
  aspect-ratio: 1;
  width: 100%;
}

.skeleton--circle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
}

.skeleton--button {
  height: 44px;
  width: 120px;
}

/* ----- Sticky Buy Bar (Mobile PDP) ----- */
.sticky-buy-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background-color: var(--color-bg-primary);
  border-top: 1px solid var(--color-border-light);
  padding: var(--space-3) var(--space-4);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sticky-buy-bar__price {
  flex: 1;
}

.sticky-buy-bar__price-current {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
}

.sticky-buy-bar__price-old {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
  text-decoration: line-through;
}

.sticky-buy-bar__btn {
  flex-shrink: 0;
}

/* ----- Promo Blocks ----- */
.promo-hero {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary-600) 0%, var(--color-primary-800) 100%);
  color: var(--color-text-inverse);
}

.promo-hero__content {
  padding: var(--space-8) var(--space-6);
}

.promo-hero__title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-4);
}

.promo-hero__description {
  font-size: var(--font-size-lg);
  opacity: 0.9;
  margin-bottom: var(--space-6);
  max-width: 500px;
}

.promo-hero__image {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  object-fit: cover;
  opacity: 0.3;
}

.promo-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border-light);
}

.promo-card__image {
  aspect-ratio: 16/9;
  background-color: var(--color-neutral-200);
}

.promo-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-card__content {
  padding: var(--space-4);
}

.promo-card__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
}

.promo-card__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-2);
}

.promo-card__description {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* ----- Empty States ----- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-12) var(--space-6);
}

.empty-state__icon {
  width: 80px;
  height: 80px;
  margin-bottom: var(--space-6);
  color: var(--color-text-tertiary);
}

.empty-state__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-3);
}

.empty-state__description {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  max-width: 400px;
  margin-bottom: var(--space-6);
}

/* ============================================
   5. LAYOUT COMPONENTS
   ============================================ */

/* ----- Header ----- */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background-color: var(--color-bg-primary);
  border-bottom: 1px solid var(--color-border-light);
  transition: box-shadow 0.25s ease;
}

.header--compact {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header__top {
  background-color: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border-light);
  font-size: var(--font-size-sm);
  max-height: 40px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease, border-width 0.3s ease;
  opacity: 1;
}

.header--compact .header__top {
  max-height: 0;
  opacity: 0;
  border-bottom-width: 0;
}

.header__top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
}

.header__top-left,
.header__top-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header__top-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.header__top-link:hover {
  color: var(--color-text-link);
}

.header__main {
  padding: var(--space-3) 0;
  transition: padding 0.25s ease;
}

.header--compact .header__main {
  padding: 0.375rem 0;
}

.header__main-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header__logo-tagline {
  display: none;
}

.header__logo img {
  height: 40px;
  width: auto;
  transition: height 0.25s ease;
}

.header--compact .header__logo img {
  height: 30px;
}

.header__search {
  flex: 1;
  max-width: 600px;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.search-form__input {
  flex: 1;
  padding: 0.75rem 2.75rem 0.75rem 1.25rem;
  font-size: var(--font-size-base);
  border: 1px solid var(--color-border-light, #e5e7eb);
  border-radius: var(--radius-full, 9999px);
  background-color: var(--color-bg-secondary, #f5f5f5);
  transition: all var(--transition-fast);
  min-height: 44px;
  color: var(--color-text-primary);
}

.search-form__input::placeholder {
  color: var(--color-text-tertiary, #9ca3af);
}

.search-form__input:focus {
  outline: none;
  border-color: var(--color-border-medium, #d1d5db);
  background-color: var(--color-bg-primary, #fff);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.search-form__btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0;
  background: none;
  border: none;
  color: var(--color-text-tertiary, #9ca3af);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: color var(--transition-fast);
}

.search-form__btn:hover {
  color: var(--color-text-secondary, #666);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.header__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-secondary);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  min-width: 60px;
  min-height: 44px;
}

.header__action:hover {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

.header__action-icon {
  width: 24px;
  height: 24px;
  position: relative;
}

.header__action-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background-color: var(--color-accent-500);
  color: var(--color-text-inverse);
  font-size: var(--font-size-2xs);
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__action-label {
  font-size: var(--font-size-xs);
  transition: opacity 0.2s ease, max-height 0.25s ease;
  max-height: 1.5em;
  overflow: hidden;
}

.header--compact .header__action--phone {
  display: none;
}

.header--compact .header__action-label {
  max-height: 0;
  opacity: 0;
}

.header--compact .header__action {
  padding: var(--space-1) var(--space-2);
  min-width: auto;
  min-height: 36px;
}

.header--compact .search-form__input {
  min-height: 38px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.header__nav {
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border-light);
}

.header__nav-inner {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.header__menu-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  background-color: var(--color-primary-500);
  color: var(--color-text-inverse);
  border-radius: var(--radius-lg);
  margin: var(--space-2) 0;
  min-height: 44px;
}

.header__menu-btn:hover {
  background-color: var(--color-primary-600);
}

.header__nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  overflow-x: auto;
  scrollbar-width: none;
}

.header__nav-links::-webkit-scrollbar {
  display: none;
}

.header__nav-link {
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  white-space: nowrap;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.header__nav-link:hover {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-link);
}

/* Mobile Header */
/* Mobile search trigger — hidden on desktop */
.header__search-trigger { display: none; }

/* Mobile search overlay */
.mobile-search {
  display: none;
}

@media (max-width: 768px) {
  .header__top {
    display: none;
  }
  
  .header__main {
    padding: var(--space-3) 0;
  }

  .header__main-inner {
    flex-wrap: nowrap;
    gap: var(--space-2);
  }
  
  .header__logo img {
    height: 32px;
  }

  .header__logo-tagline {
    display: block;
    font-size: 0.6875rem;
    line-height: 1.3;
    color: var(--color-text-secondary, #666);
    white-space: nowrap;
    margin-left: 0.25rem;
  }
  
  .header__search {
    display: none;
  }

  .header__search-trigger {
    display: flex;
  }

  .header__actions {
    margin-left: auto;
  }
  
  .header__action {
    padding: var(--space-2);
    min-width: 44px;
  }
  
  .header__action-label {
    display: none;
  }

  .header,
  .page {
    max-width: 100vw;
    overflow-x: clip;
  }

  .header__main .container,
  .header__top .container {
    max-width: 100%;
    overflow: hidden;
  }

  .header__main-inner {
    min-width: 0;
  }

  .header__logo {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .header__logo-tagline {
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header__actions {
    flex-shrink: 0;
    gap: 0;
    min-width: 0;
  }

  .header__action {
    min-width: 38px;
    padding: 0.375rem;
  }

  .mobile-search {
    display: block;
    max-height: 0;
    overflow: hidden;
    background: var(--color-bg-primary, #fff);
    border-bottom: none;
    transition: max-height 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
    padding: 0;
  }

  .mobile-search--open {
    max-height: 80px;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border-light, #e5e5e5);
  }

  .mobile-search__form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .mobile-search__input {
    flex: 1;
    padding: 0.625rem 1rem;
    border: 1px solid var(--color-border-light, #e5e5e5);
    border-radius: var(--radius-full, 9999px);
    font-size: 0.9375rem;
    background: var(--color-bg-secondary, #f8f9fa);
    outline: none;
    min-height: 44px;
    -webkit-appearance: none;
  }

  .mobile-search__input:focus {
    border-color: var(--color-primary-400, #38bdf8);
    background: #fff;
    box-shadow: 0 0 0 3px var(--color-primary-50, #f0f9ff);
  }

  .mobile-search__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--color-text-secondary, #666);
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
  }

  .header__nav {
    display: none;
  }

  .footer {
    max-width: 100vw;
    overflow-x: clip;
  }

  .footer .container {
    max-width: 100%;
    overflow: hidden;
  }

  .footer__grid > * {
    min-width: 0;
  }

  .footer__link {
    overflow-wrap: break-word;
  }

  /* PDP hardening: prevent horizontal drift on data-heavy products */
  .product-detail,
  .product-detail__gallery,
  .product-detail__info,
  .product-detail__quick-links,
  [data-tabs],
  .tabs__list,
  .tabs__panel {
    max-width: 100%;
    min-width: 0;
  }

  .product-detail__quick-links {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .product-detail__quick-links > a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  [data-tabs] {
    overflow-x: hidden;
  }

  .tabs__panel {
    overflow-x: auto;
  }

  .tabs__panel table {
    width: 100% !important;
    table-layout: fixed;
  }

  .tabs__panel td,
  .tabs__panel th {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .tabs__panel iframe,
  .tabs__panel img,
  .tabs__panel video {
    max-width: 100% !important;
    height: auto;
  }
}

/* ----- Footer ----- */
.footer {
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border-light);
  margin-top: auto;
}

.footer__main {
  padding: var(--space-12) 0 var(--space-8);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.footer__column-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-4);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__link {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  padding: var(--space-1) 0;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.footer__link:hover {
  color: var(--color-text-link);
}

.footer__social {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md, 8px);
  color: #fff;
  transition: opacity 0.2s, transform 0.2s;
}

.footer__social-link:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.footer__social-link--tg { background: #26A5E4; }
.footer__social-link--vk { background: #0077FF; }
.footer__social-link--tt { background: #000000; }
.footer__social-link--ig { background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }

.footer__bottom {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer__payment {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.footer__payment-title {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.footer__payment-icons {
  display: flex;
  gap: var(--space-2);
}

.footer__payment-icon {
  width: 40px;
  height: 26px;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-medium);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
}

.footer__copyright {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
  text-align: center;
}

@media (min-width: 640px) {
  .footer__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ----- Product Grid ----- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

@media (min-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1280px) {
  .product-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ----- Cart Items (Mobile Card View) ----- */
.cart-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4);
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
}

.cart-item__image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background-color: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item__image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

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

.cart-item__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item__variant {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.cart-item__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.cart-item__price {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
  line-height: 1;
}

.cart-item__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.quantity-control__btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg-secondary);
  color: var(--color-text-primary);
  font-size: var(--font-size-lg);
  transition: background-color var(--transition-fast);
}

.quantity-control__btn:hover {
  background-color: var(--color-bg-tertiary);
}

.quantity-control__input {
  width: 48px;
  height: 36px;
  text-align: center;
  border: none;
  background-color: var(--color-bg-primary);
  font-weight: var(--font-weight-medium);
  -moz-appearance: textfield;
}

.quantity-control__input::-webkit-outer-spin-button,
.quantity-control__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-item__remove {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.cart-item__remove:hover {
  background-color: var(--color-error-50);
  color: var(--color-error-600);
}

/* Desktop Cart Table */
.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table__header {
  display: none;
}

.cart-table__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-4);
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
  align-items: center;
}

@media (min-width: 768px) {
  .cart-table__header {
    display: grid;
    grid-template-columns: 100px 2fr 120px 140px 120px 50px;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background-color: var(--color-bg-secondary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
  }
  
  .cart-table__row {
    grid-template-columns: 100px 2fr 120px 140px 120px 50px;
    padding: var(--space-4);
  }
}

/* ----- Filter Group ----- */
.filter-group {
  margin-bottom: var(--space-6);
}

.filter-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.filter-group__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

.filter-group__toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.filter-group__toggle:hover {
  background-color: var(--color-bg-tertiary);
}

.filter-group__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.filter-group__items {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.filter-group__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.filter-group__range {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.filter-group__range-input {
  flex: 1;
  min-width: 0;
}

.filter-group__range-separator {
  color: var(--color-text-tertiary);
}

/* ============================================
   6. PAGE LAYOUTS
   ============================================ */

/* ----- Main Layout ----- */
div.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-x: clip;
}

.page__content {
  flex: 1;
  padding: var(--space-6) 0;
}

/* ----- Two Column Layout (Category) ----- */
.two-column {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 1024px) {
  .two-column {
    grid-template-columns: 260px 1fr;
  }
}

.two-column__sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .two-column__sidebar {
    display: block;
  }
}

.two-column__mobile-filters {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

@media (min-width: 1024px) {
  .two-column__mobile-filters {
    display: none;
  }
}

/* ----- Product Detail Layout ----- */
.product-detail {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .product-detail {
    grid-template-columns: 100px 1fr 360px;
    align-items: start;
  }
}

.product-detail__gallery {
  order: 1;
}

.product-detail__thumbs-panel {
  order: 2;
  position: relative;
  display: block;
  min-width: 0;
}

.product-detail__thumb-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--color-text-primary, #1a1a1a);
  cursor: pointer;
  transition: opacity var(--transition-fast, .2s), background var(--transition-fast, .2s), color var(--transition-fast, .2s);
}

.product-detail__thumb-nav[disabled] {
  opacity: .35;
  cursor: default;
}

.product-detail__thumb-nav--prev {
  left: 6px;
}

.product-detail__thumb-nav--next {
  right: 6px;
}

.product-detail__thumbnails {
  display: flex;
  flex-direction: row;
  gap: var(--space-2);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-medium, #d1d5db) transparent;
  padding-bottom: 0.25rem;
  min-width: 0;
}

.product-detail__thumbnails::-webkit-scrollbar {
  height: 4px;
}

.product-detail__thumbnails::-webkit-scrollbar-track {
  background: transparent;
}

.product-detail__thumbnails::-webkit-scrollbar-thumb {
  background-color: var(--color-border-medium, #d1d5db);
  border-radius: 4px;
}

.product-detail__thumbnail {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition-fast);
  background: #fff;
  padding: 0;
}

.product-detail__thumbnail--active {
  border-color: var(--color-primary-500);
}

.product-detail__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 1024px) {
  .product-detail__thumbs-panel {
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100px;
    gap: 0.5rem;
  }

  .product-detail__thumb-nav {
    position: static;
    top: auto;
    transform: none;
    z-index: auto;
    flex: 0 0 auto;
    width: 100%;
    height: 36px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--color-border-light, #e5e5e5);
  }

  .product-detail__thumbnails {
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 600px;
    padding-right: 0.25rem;
    padding-bottom: 0;
  }

  .product-detail__thumbnails::-webkit-scrollbar {
    width: 4px;
    height: auto;
  }

  .product-detail__thumbnail {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
  }
}

.product-detail__gallery {
  position: relative;
  aspect-ratio: 1;
  background-color: #fff;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.product-detail__gallery img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-detail__info {
  order: 3;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.product-detail__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

@media (min-width: 768px) {
  .product-detail__title {
    font-size: var(--font-size-2xl);
  }
}

.product-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.product-detail__brand-link {
  color: var(--color-text-link, #0284c7);
  font-weight: 600;
}

.product-detail__brand-link:hover {
  color: var(--color-primary-700, #0369a1);
  text-decoration: underline;
}

.product-detail__price-block {
  padding: var(--space-4);
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-xl);
}

.product-detail__price {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.product-detail__price-current {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
}

.product-detail__price-old {
  font-size: var(--font-size-lg);
  color: var(--color-text-tertiary);
  text-decoration: line-through;
  white-space: nowrap;
}

.product-detail__price-discount {
  font-size: var(--font-size-sm);
  color: var(--color-accent-600);
  font-weight: var(--font-weight-medium);
  max-width: none;
  white-space: nowrap;
  line-height: 1.3;
}

.product-detail__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.product-detail__variants {
  margin-top: var(--space-4);
}

.product-detail__variants-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-2);
}

.product-detail__variants-list {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: var(--space-2);
}

.product-detail__variants-list::-webkit-scrollbar {
  display: none;
}

.product-detail__variant {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border: 2px solid var(--color-border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.product-detail__variant--active {
  border-color: var(--color-primary-500);
}

.product-detail__variant img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----- Checkout Layout ----- */
.checkout {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 1024px) {
  .checkout {
    grid-template-columns: 1fr 380px;
  }
}

.checkout__section {
  padding: var(--space-6);
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
}

.checkout__section-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-4);
}

.checkout__form-row {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .checkout__form-row--2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .checkout__form-row--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.checkout__summary {
  position: sticky;
  top: calc(var(--header-height) + var(--space-6));
}

.checkout__summary-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.checkout__summary-row--total {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  border-bottom: none;
  padding-top: var(--space-4);
  margin-top: var(--space-2);
  border-top: 2px solid var(--color-border-medium);
}

/* ----- Person Type Cards ----- */
.person-type-card {
  flex: 1;
  min-width: 160px;
  padding: 1rem;
  border: 1px solid var(--color-border-medium);
  border-radius: var(--radius-xl);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.person-type-card--active,
.person-type-card.active {
  border-color: var(--color-primary-500);
  border-width: 2px;
  background-color: var(--color-primary-50);
}

/* ----- Radio Card Highlight ----- */
.radio-card {
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.radio-card:has(input:checked) {
  border-color: var(--color-primary-500) !important;
  border-width: 2px;
  background-color: var(--color-primary-50);
}

.checkout__address-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 1024px) {
  .checkout__address-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.button-dropdown {
  position: relative;
  display: inline-block;
}

.button-dropdown-menu-below {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 60;
  min-width: 180px;
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
  padding: 0.375rem;
  list-style: none;
  background: #fff;
  border: 1px solid var(--color-border-light, #e5e7eb);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.button-dropdown.is-open .button-dropdown-menu-below {
  display: block;
}

@media (max-width: 899px) {
  .cart-item {
    overflow: hidden;
  }

  .cart-item__content {
    min-width: 0;
  }

  .cart-item__bottom {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 0.5rem;
  }

  .cart-item__actions {
    min-width: 0;
    gap: 0.5rem;
    justify-self: start;
  }

  .quantity-control {
    max-width: 100%;
  }

  .cart-item__price {
    min-width: 0;
    overflow-wrap: break-word;
  }

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

  .checkout__section {
    padding: 1rem;
    min-width: 0;
  }

  .checkout__summary {
    position: static;
    top: auto;
    min-width: 0;
  }

  .checkout__summary-row {
    gap: 0.5rem;
    min-width: 0;
  }

  .checkout__summary-row > span {
    min-width: 0;
  }

  .checkout__summary-row > span:last-child {
    margin-left: auto;
    text-align: right;
  }

  .checkout__summary-row--total {
    flex-wrap: wrap;
  }

  .checkout__summary-row--total > span:last-child {
    width: 100%;
    margin-left: 0;
    text-align: left;
    font-size: 1.375rem !important;
  }

  .checkout-person-type {
    flex-direction: column;
    align-items: stretch;
  }

  .checkout-city {
    display: block;
    margin-top: 0.5rem;
  }

  .checkout-city__dropdown {
    max-width: 100%;
  }

  .checkout-city__dropdown > [data-link] {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
  }

  .checkout-city__dropdown .button-dropdown-menu-below {
    position: static;
    margin-top: 0.5rem;
    max-height: none;
    box-shadow: none;
  }

  .person-type-card {
    min-width: 0;
    width: 100%;
  }
}

/* Additional safety net for real devices where viewport/meta can be inconsistent.
   Keeps checkout blocks inside the screen even with legacy wrappers. */
@media (max-width: 1200px) {
  .checkout,
  .checkout__section,
  .checkout__summary {
    min-width: 0;
  }

  .checkout-person-type {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.75rem !important;
  }

  .checkout-person-type .person-type-card {
    min-width: 0 !important;
    width: 100%;
  }

  .checkout__summary-row {
    min-width: 0;
    gap: 0.5rem;
  }

  .checkout__summary-row > span {
    min-width: 0;
    overflow-wrap: break-word;
  }

  .checkout__summary-row > span:last-child {
    margin-left: auto;
    text-align: right;
  }

  .checkout__summary-row--total {
    flex-wrap: wrap;
  }

  .checkout__summary-row--total > span:last-child {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }

  .checkout .form-input:focus {
    box-shadow: inset 0 0 0 2px var(--color-primary-200, #bae6fd);
  }
}

/* ----- News / Articles Grid ----- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 639px) {
  .news-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.news-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background-color: var(--color-bg-primary);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.news-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background-color: var(--color-bg-secondary);
}

.news-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.news-card:hover .news-card__image img {
  transform: scale(1.05);
}

.news-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg-secondary);
}

.news-card__content {
  padding: 1rem 0.25rem;
}

.news-card__category {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}

.news-card__date {
  display: inline-block;
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  margin-bottom: 0.375rem;
}

.news-card__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 640px) {
  .news-card__title {
    font-size: var(--font-size-lg);
  }
}

.news-card__excerpt {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-top: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* News Filter Tabs */
.news-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.news-tab {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-medium);
  background-color: var(--color-bg-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.news-tab:hover {
  border-color: var(--color-primary-500);
  color: var(--color-primary-600);
}

.news-tab--active {
  background-color: var(--color-accent-500);
  border-color: var(--color-accent-500);
  color: var(--color-neutral-0);
}

/* ----- Account Layout ----- */
.account {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .account {
    grid-template-columns: 240px 1fr;
  }
}

.account__sidebar {
  display: none;
}

@media (min-width: 768px) {
  .account__sidebar {
    display: block;
  }
}

.account__menu {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.account__menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  min-height: 44px;
}

.account__menu-item:hover {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

.account__menu-item--active {
  background-color: var(--color-primary-50);
  color: var(--color-primary-700);
  font-weight: var(--font-weight-medium);
}

.account__content {
  padding: var(--space-6);
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
}

/* ----- Order Card ----- */
.order-card {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.order-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  background-color: var(--color-bg-secondary);
  cursor: pointer;
}

.order-card__number {
  font-weight: var(--font-weight-semibold);
}

.order-card__date {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.order-card__status {
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  border-radius: var(--radius-md);
}

.order-card__status--delivered {
  background-color: var(--color-success-100);
  color: var(--color-success-700);
}

.order-card__status--processing {
  background-color: var(--color-warning-100);
  color: var(--color-warning-700);
}

.order-card__status--cancelled {
  background-color: var(--color-error-100);
  color: var(--color-error-700);
}

.order-card__total {
  font-weight: var(--font-weight-bold);
}

.order-card__content {
  padding: var(--space-4);
}

.order-card__items {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.order-card__item {
  display: flex;
  gap: var(--space-3);
}

.order-card__item-image {
  width: 60px;
  height: 60px;
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.order-card__item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.order-card__item-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-1);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.order-card__item-meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

/* ----- Comparison Table ----- */
.compare-table {
  overflow-x: auto;
  margin: 0 calc(-1 * var(--container-padding));
  padding: 0 var(--container-padding);
}

.compare-table__grid {
  display: grid;
  grid-template-columns: 120px repeat(var(--compare-columns, 3), minmax(180px, 1fr));
  gap: 1px;
  background-color: var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-width: max-content;
}

.compare-table__cell {
  padding: var(--space-4);
  background-color: var(--color-bg-primary);
}

.compare-table__cell--header {
  background-color: var(--color-bg-secondary);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.compare-table__product {
  text-align: center;
}

.compare-table__product-image {
  width: 100px;
  height: 100px;
  margin: 0 auto var(--space-3);
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.compare-table__product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.compare-table__product-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-2);
}

.compare-table__product-price {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
}

/* ============================================
   7. RESPONSIVE BREAKPOINTS
   ============================================ */

/* xs: 0-479px (default, mobile-first) */
/* sm: 480px+ */
@media (min-width: 480px) {
  :root {
    --container-padding: var(--space-5);
  }
}

/* md: 768px+ */
@media (min-width: 768px) {
  :root {
    --container-padding: var(--space-6);
  }
}

/* lg: 1024px+ */
@media (min-width: 1024px) {
  :root {
    --container-padding: var(--space-8);
  }
}

/* xl: 1280px+ */
@media (min-width: 1280px) {
  :root {
    --container-padding: var(--space-10);
  }
}

/* ============================================
   8. BOTTOM NAVIGATION (Mobile)
   ============================================ */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background-color: var(--color-bg-primary);
  border-top: 1px solid var(--color-border-light);
  padding-bottom: env(safe-area-inset-bottom);
  display: none;
}

.bottom-nav__list {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 64px;
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  height: 100%;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  min-width: 64px;
}

.bottom-nav__item:hover,
.bottom-nav__item--active {
  color: var(--color-primary-600);
}

.bottom-nav__icon {
  width: 24px;
  height: 24px;
  position: relative;
}

.bottom-nav__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background-color: var(--color-accent-500);
  color: var(--color-text-inverse);
  font-size: var(--font-size-2xs);
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav__label {
  font-size: var(--font-size-2xs);
  font-weight: var(--font-weight-medium);
}

/* Show bottom nav on mobile */
@media (max-width: 767px) {
  .bottom-nav {
    display: block;
  }
  
  .page__content {
    padding-top: 0;
    padding-bottom: calc(64px + var(--space-6));
  }
}

/* ============================================
   LEGACY COMPATIBILITY
   Standalone rules extracted from Foundation,
   kid.css — loaded instead of those files.
   ============================================ */

/* --- Foundation Reveal Modal (extracted) --- */
.reveal-modal-bg {
  position: fixed;
  height: 100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 98;
  display: none;
  top: 0;
  left: 0;
}

.reveal-modal {
  visibility: hidden;
  display: none;
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  margin-left: 0 !important;
  z-index: 100;
  height: auto;
  width: 80%;
  max-height: 90vh;
  overflow-y: auto;
  background-color: white;
  padding: 1.25rem;
  box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04));
  border: none;
  border-radius: var(--radius-xl, 16px);
}

.reveal-modal .column,
.reveal-modal .columns { min-width: 0; }
.reveal-modal > :first-child { margin-top: 0; }
.reveal-modal > :last-child { margin-bottom: 0; }

.reveal-modal .close-reveal-modal {
  font-size: 1.5rem;
  line-height: 1;
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--color-text-secondary, #666);
  font-weight: bold;
  cursor: pointer;
}

@media (min-width: 641px) {
  .reveal-modal {
    padding: 1.875rem;
  }
  .reveal-modal.tiny  { width: 30%; }
  .reveal-modal.small { width: 40%; }
  .reveal-modal.medium { width: 60%; }
  .reveal-modal.large  { width: 70%; }
  .reveal-modal.xlarge { width: 95%; }
}

.reveal-modal .gBlue.mHeader {
  background: var(--color-primary-600, #0284c7);
  color: white;
  padding: 1rem 1.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: var(--radius-xl, 16px) var(--radius-xl, 16px) 0 0;
  margin: -1.25rem -1.25rem 1.25rem;
}

@media (min-width: 641px) {
  .reveal-modal .gBlue.mHeader {
    margin: -1.875rem -1.875rem 1.25rem;
  }
}

.reveal-modal .mFooter {
  padding: 1rem 0 0;
}

/* --- KIMI modal unification layer --- */
.reveal-modal {
  padding: 0;
  border: 1px solid var(--color-border-light, #e5e7eb);
}

.reveal-modal .gBlue.mHeader {
  margin: 0;
  border-radius: var(--radius-xl, 16px) var(--radius-xl, 16px) 0 0;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem 3rem 0.75rem 1.25rem;
}

.reveal-modal .close-reveal-modal {
  top: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full, 9999px);
  color: rgba(255, 255, 255, 0.92);
}

.reveal-modal .row.form-input,
.reveal-modal form > .row {
  padding: 1.25rem;
}

.reveal-modal .form-input input,
.reveal-modal .form-input textarea,
.reveal-modal .form-input select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--color-border-light, #d1d5db);
  border-radius: var(--radius-lg, 12px);
  background: #fff;
  box-shadow: none;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
}

.reveal-modal .form-input textarea {
  min-height: 110px;
}

.reveal-modal .form-input span {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary, #6b7280);
}

.reveal-modal .mFooter {
  padding: 0 1.25rem 1.25rem;
}

.reveal-modal .mFooter .btn,
.reveal-modal .mFooter button,
.reveal-modal .mFooter input[type="submit"],
.reveal-modal .mFooter .button {
  width: 100%;
  min-height: 46px;
  border: none;
  border-radius: var(--radius-lg, 12px);
  background: var(--color-accent-500, #ef4444);
  color: #fff;
  font-weight: 600;
  text-align: center;
}

.reveal-modal.tiny { max-width: 560px; }
.reveal-modal.small { max-width: 760px; }
.reveal-modal.medium { max-width: 920px; }
.reveal-modal.large { max-width: 1200px; }

#relateds .row {
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  display: block;
  max-height: calc(100dvh - 8.75rem);
  overflow-y: auto;
}

#relateds.reveal-modal {
  position: fixed;
  left: 50% !important;
  right: auto !important;
  transform: translate(-50%, -50%);
  margin-left: 0 !important;
  top: 50% !important;
  max-width: 760px;
  width: min(760px, calc(100vw - 2rem)) !important;
  max-height: calc(100dvh - 2rem);
  border-radius: var(--radius-2xl, 18px);
  overflow: hidden;
}

#relateds .gBlue.mHeader {
  background: var(--color-bg-secondary, #f3f4f6);
  color: var(--color-text-primary, #111827);
  border-bottom: 1px solid var(--color-border-light, #e5e7eb);
}

#relateds .close-reveal-modal {
  color: var(--color-text-secondary, #6b7280);
}

#relateds .relateds-added {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem;
}

#relateds .relateds-added__media {
  min-width: 0;
}

#relateds .relateds-added__media img {
  width: 100%;
  max-width: 220px;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-xl, 14px);
  background: #fff;
}

#relateds .relateds-added__content h3 {
  margin: 0 0 0.75rem;
  font-size: 1.8rem;
  line-height: 1.2;
}

#relateds .relateds-added__price {
  margin: 0 0 1rem;
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--color-text-primary, #111827);
}

#relateds .relateds-added__content .btn {
  min-height: 46px;
  padding-left: 1rem;
  padding-right: 1rem;
}

#relateds .products-header {
  padding: 0 1.25rem;
  margin-bottom: 0.75rem;
}

#relateds ul.products {
  padding: 0 1.25rem 1.25rem;
  gap: 0.875rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#relateds .row h3 {
  margin: 0 0 0.375rem;
  font-size: 1.125rem;
  font-weight: 600;
}

#relateds .button-flat-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-lg, 12px);
  background: var(--color-primary-600, #0284c7);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 767px) {
  #relateds.reveal-modal {
    width: calc(100vw - 1rem) !important;
    max-width: none;
    left: 50% !important;
    right: auto !important;
    margin: 0 !important;
    margin-left: 0 !important;
    transform: translateX(-50%);
    top: 0.5rem !important;
    max-height: calc(100dvh - 1rem);
  }

  #relateds .relateds-added {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  #relateds .relateds-added__media {
    display: flex;
    justify-content: center;
  }

  #relateds .relateds-added__media img {
    max-width: 200px;
  }

  #relateds .relateds-added__content h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
  }

  #relateds .relateds-added__price {
    font-size: 1.05rem;
  }

  #relateds .relateds-added__content .btn {
    width: 100%;
  }

  #relateds .row {
    max-height: calc(100dvh - 7rem);
  }

  #relateds .products-header {
    padding: 0 1rem;
  }

  #relateds ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 1rem 1rem;
    gap: 0.75rem;
  }
}

#productsWrapper.reveal-modal {
  max-width: 1220px;
}

#productsWrapper .products-title small {
  font-size: 1.125rem;
  font-weight: 600;
}

#productsWrapper .quickviews {
  padding: 1.25rem 0;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

#productsWrapper .products-more .prev,
#productsWrapper .products-more .next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--color-border-light, #d1d5db);
  border-radius: 10px;
  color: var(--color-text-primary, #111827);
  background: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0;
}

#productsWrapper .products-more .prev::before,
#productsWrapper .products-more .next::before {
  font-size: 18px;
  line-height: 1;
}

#productsWrapper .products-more .prev::before { content: "\2039"; }
#productsWrapper .products-more .next::before { content: "\203A"; }

@media (max-width: 1023px) {
  #productsWrapper .quickviews { padding: 0.75rem 0; }
}

/* --- Minimal Foundation grid --- */
.row {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.row::before, .row::after {
  content: " ";
  display: table;
}
.row::after { clear: both; }

.column,
.columns {
  position: relative;
  padding-left: 0.9375em;
  padding-right: 0.9375em;
  width: 100%;
  float: left;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .column,
  .columns {
    float: none;
    width: 100%;
  }
}

@media (min-width: 768px) {
  .medium-3  { width: 25%; }
  .medium-4  { width: 33.33333%; }
  .medium-6  { width: 50%; }
  .medium-8  { width: 66.66667%; }
  .medium-9  { width: 75%; }
  .medium-12 { width: 100%; }
}

@media (min-width: 1024px) {
  .large-1  { width: 8.33333%; }
  .large-2  { width: 16.66667%; }
  .large-3  { width: 25%; }
  .large-4  { width: 33.33333%; }
  .large-5  { width: 41.66667%; }
  .large-6  { width: 50%; }
  .large-7  { width: 58.33333%; }
  .large-8  { width: 66.66667%; }
  .large-9  { width: 75%; }
  .large-10 { width: 83.33333%; }
  .large-11 { width: 91.66667%; }
  .large-12 { width: 100%; }
}

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.no-padding  { padding: 0; }

/* --- Collapse animation (viewed products toggle) --- */
.collapse { display: none; }
.collapse.in { display: block; }
.collapsing {
  position: relative;
  height: 0;
  overflow: hidden;
  transition: height 0.35s ease;
}
.fade { opacity: 0; transition: opacity 0.15s linear; }
.fade.in { opacity: 1; }

/* --- PDP structure (from kid.css) --- */
.products-images { margin-top: 1rem; }
.products-images .mainPreview { min-height: 400px; position: relative; }
.products-images .mainPreview a { display: block; max-height: 490px; }
.products-images .mainPreview.quick { min-height: 300px; }
.products-images .mainPreview.quick img { max-width: 90%; max-height: 300px; }

.products-colors { position: relative; margin-top: 1rem; }
.products-colors div.top,
.products-colors div.bottom {
  width: 24px;
  margin: 0 auto;
  display: block;
  cursor: pointer;
  text-align: center;
}
.products-colors div.top { height: 30px; }
.products-colors div.bottom { height: 18px; }

.products-busket { margin-top: 0; }
.products-busket-block > div {
  margin-bottom: 5px;
  padding: 5px;
}

/* --- Back-to-top button --- */
#back-top {
  position: fixed !important;
  bottom: 5rem !important;
  right: 1.5rem !important;
  left: auto !important;
  z-index: 9999;
  margin: 0 !important;
  margin-left: 0 !important;
}
#back-top a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent-600, #dc2626);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: transform 0.2s, box-shadow 0.2s;
}
#back-top a:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  background: var(--color-accent-700, #b91c1c);
}
#back-top svg {
  display: block;
}

@media (max-width: 767px) {
  #back-top {
    bottom: 6rem !important;
    right: 1rem !important;
  }
}

/* --- Utility classes (from kid.css) --- */
.dn { display: none; }
.hidden { display: none; }
.db { display: block; }
.cp { cursor: pointer; }

/* ============================================
   PAGE-SPECIFIC STYLES (clean, no !important)
   ============================================ */

/* ===== PDP (Product Detail Page) ===== */

.products-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary, #1a1a1a);
}

.products-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.products-links a {
  color: var(--color-text-link, #0284c7);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.products-links a:hover {
  border-bottom-color: var(--color-text-link, #0284c7);
}

.products-brands-info {
  font-size: 0.8125rem;
  border-collapse: collapse;
  width: 100%;
}

.products-brands-info td {
  padding: 0.25rem 0.5rem;
  border: none;
  vertical-align: middle;
}

.products-colors {
  max-height: 500px;
  overflow-y: auto;
}

.products-colors ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  height: auto;
  overflow: visible;
}

.products-colors ul > li {
  padding: 0;
}

.products-colors ul > li div {
  border: 2px solid transparent;
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  padding: 0.25rem;
  transition: border-color 0.2s;
  text-align: center;
}

.products-colors ul > li div.active,
.products-colors ul > li div:hover {
  border-color: var(--color-primary-500, #0ea5e9);
}

.products-colors-preview {
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
}

.products-images {
  text-align: center;
}

.products-images .mainPreview img {
  max-width: 100%;
  max-height: 450px;
  object-fit: contain;
  border-radius: var(--radius-lg, 12px);
}

.products-busket-block {
  background: var(--color-bg-secondary, #f8f9fa);
  border-radius: var(--radius-xl, 16px);
  padding: 1.5rem;
  border: none;
}

.products-busket .price.big {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text-primary, #1a1a1a);
}

.products-busket strike.price.big {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-tertiary, #999);
}

/* PDP Action Buttons — KIMI style */
.pdp-btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-full, 9999px);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
  line-height: 1.4;
  background-image: none;
  text-shadow: none;
}

.pdp-btn--buy,
.products-btn-cart,
.products-busket .add-to-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--space-4, 1rem) var(--space-6, 1.5rem);
  background-color: var(--color-accent-500, #ef4444);
  color: var(--color-text-inverse, #fff);
  border: none;
  border-radius: var(--radius-lg, 0.75rem);
  font-size: var(--font-size-lg, 1.125rem);
  font-weight: var(--font-weight-medium, 500);
  line-height: var(--line-height-tight, 1.25);
  cursor: pointer;
  text-align: center;
  margin: 0.75rem 0;
  transition: all var(--transition-base, 0.15s ease);
  min-height: 44px;
  background-image: none;
  text-shadow: none;
  text-decoration: none;
}

.pdp-btn--buy:hover,
.products-btn-cart:hover,
.products-busket .add-to-cart:hover {
  background-color: var(--color-accent-600, #dc2626);
  color: var(--color-text-inverse, #fff);
}

.pdp-btn--buy:active,
.products-btn-cart:active,
.products-busket .add-to-cart:active {
  background-color: var(--color-accent-700, #b91c1c);
}

.pdp-btn--compare,
.products-busket .compare {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-link, #0284c7);
  border: 1.5px solid var(--color-border-light, #e5e5e5);
  border-radius: var(--radius-full, 9999px);
  background: transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.pdp-btn--compare:hover,
.products-busket .compare:hover {
  background: var(--color-primary-50, #f0f9ff);
  border-color: var(--color-primary-300, #7dd3fc);
  color: var(--color-primary-700, #0369a1);
}

.products-busket .dividir {
  height: 1px;
  background: var(--color-border-light, #e5e5e5);
  margin: 0.75rem 0;
  clear: none;
  padding: 0;
}

.products-busket .symbol,
.symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 0.25rem;
  font-family: 'symbol', sans-serif;
  font-size: 190%;
  color: var(--color-primary-600, #0284c7);
}

/* PDP Feature Items — minimalist icon layout */
.pdp-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.25rem 0;
}

.pdp-feature-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--color-primary-600, #0284c7);
  margin-top: 1px;
}

.pdp-feature-icon--success {
  color: #22c55e;
}

.pdp-feature-icon--warning {
  color: #f59e0b;
}

.pdp-feature__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.pdp-feature__text a {
  color: var(--color-text-primary, #1a1a1a);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
}

.pdp-feature__text a:hover {
  color: var(--color-primary-600, #0284c7);
}

.pdp-feature__text small {
  color: var(--color-text-secondary, #666);
  font-size: 0.8125rem;
}

.pdp-feature > span:not(.pdp-feature__text) {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-text-primary, #1a1a1a);
  line-height: 1.5;
}

.products-busket .social-block {
  display: flex;
  gap: 0.5rem;
}

.products-header {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary, #1a1a1a);
  margin-bottom: 1rem;
}

.dl-horizontal.dl-special {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 1rem;
  margin-bottom: 0.25rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border-light, #e5e5e5);
  font-size: 0.875rem;
  background: none;
}

.dl-horizontal.dl-special dt {
  color: var(--color-text-secondary, #666);
  background: none;
  width: auto;
}

.dl-horizontal.dl-special dd {
  margin: 0;
  font-weight: 500;
  background: none;
}

.products-related-block .products-header {
  font-size: 1.125rem;
}

ul.products-related {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  height: auto;
  overflow: visible;
}

ul.products-related > li {
  padding: 0;
}

.products-more {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.products-more-carousel {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  flex: 1;
}

.products-more-carousel a {
  flex-shrink: 0;
}

.products-more-carousel img {
  width: 55px;
  height: 55px;
  object-fit: cover;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--color-border-light, #e5e5e5);
}

.text_review {
  max-height: 300px;
  overflow-y: auto;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text-secondary, #666);
}

@media (max-width: 899px) {
  .products-colors { display: none; }
}

@media (max-width: 767px) {
  .products-title {
    font-size: 1.25rem;
  }
  .products-brands-info {
    margin-bottom: 1rem;
  }
  .products-images .mainPreview {
    min-height: 250px;
  }
  .products-images .mainPreview img {
    max-height: 300px;
  }
  .products-busket-block {
    padding: 1rem;
  }
  .products-busket .price.big {
    font-size: 1.5rem;
  }
  .dl-horizontal.dl-special {
    grid-template-columns: 1fr 1fr;
    font-size: 0.8125rem;
  }
}

/* ===== Cart & Checkout ===== */

table.cart {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: #fff;
  margin: 0 0 30px 0;
}

table.cart thead th,
table.cart th {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 2px solid var(--color-border-light, #e5e5e5);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--color-text-secondary, #666);
  white-space: nowrap;
}

table.cart tbody td,
table.cart td {
  padding: 1rem 0.75rem;
  border-bottom: 1px solid var(--color-border-light, #e5e5e5);
  vertical-align: middle;
}

table.cart td a { font-size: 0.875rem; }
table.cart td.name { width: 60%; padding-right: 25px; }
table.cart td.price { white-space: nowrap; font-size: 0.9375rem; }
table.cart td.itogo { white-space: nowrap; font-size: 0.9375rem; font-weight: 600; }
table.cart .sfoto { width: 1%; padding: 8px 4px 8px 0; }
table.cart .quan { padding-left: 0; white-space: nowrap; }

table.cart img {
  border-radius: var(--radius-md, 8px);
  max-width: 60px;
}

table.cart .amount {
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
}

table.cart .product-quantity input[type="number"] {
  width: 60px;
  padding: 0.375rem 0.5rem;
  border: 1px solid var(--color-border-light, #e5e5e5);
  border-radius: var(--radius-md, 8px);
  font-size: 0.875rem;
  text-align: center;
}
table.cart .product-quantity { border-bottom: none; }

table.cart .itemRemove img { opacity: 0.5; transition: opacity 0.2s; }
table.cart .itemRemove:hover img { opacity: 1; }

.cart-wrapper {
  background: var(--color-bg-primary, #fff);
  border-radius: var(--radius-xl, 16px);
  overflow: hidden;
}

.cart-sibar .total {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Old .button class compat (cart/checkout pages) */
.button {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-full, 9999px);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  line-height: 1.4;
}

.button.button-flat-caution.redGradient,
a.button.button-flat-caution.redGradient {
  background: var(--color-primary-600, #0284c7);
  color: white;
}

.button.button-flat-caution.redGradient:hover,
a.button.button-flat-caution.redGradient:hover {
  background: var(--color-primary-700, #0369a1);
}

.button.button-flat {
  background: var(--color-bg-secondary, #f8f9fa);
  color: var(--color-text-primary, #1a1a1a);
  border: 1px solid var(--color-border-light, #e5e5e5);
}

.button.button-flat:hover {
  background: var(--color-bg-tertiary, #eee);
}

/* Checkout forms */
.checkout-form input[type="text"],
.checkout-form input[type="email"],
.checkout-form input[type="tel"],
.checkout-form textarea,
.checkout-form select,
.form-input input[type="text"],
.form-input input[type="email"],
.form-input input[type="tel"],
.form-input textarea,
.form-input select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--color-border-light, #e5e5e5);
  border-radius: var(--radius-md, 8px);
  font-size: 0.875rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.checkout-form input:focus,
.checkout-form textarea:focus,
.checkout-form select:focus,
.form-input input:focus,
.form-input textarea:focus,
.form-input select:focus {
  border-color: var(--color-primary-400, #38bdf8);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-50, #f0f9ff);
}

/* ===== Info pages sidebar nav ===== */
.catalog-layout__sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.catalog-layout__sidebar ul li {
  border-bottom: 1px solid var(--color-border-light, #e5e5e5);
}

.catalog-layout__sidebar ul li a {
  display: block;
  padding: 0.625rem 0.5rem;
  font-size: 0.8125rem;
  color: var(--color-text-primary, #1a1a1a);
  text-decoration: none;
  transition: all 0.2s;
  border-radius: var(--radius-sm, 6px);
}

.catalog-layout__sidebar ul li a:hover {
  background: var(--color-primary-50, #f0f9ff);
  color: var(--color-text-link, #0284c7);
}

.sidebar-promo .product-card a:hover,
.sidebar-promo .product-card a {
  background: none;
}

.catalog-layout__sidebar ul li.active a {
  background: var(--color-primary-50, #f0f9ff);
  color: var(--color-primary-600, #0284c7);
  font-weight: 600;
}

/* Content pages text styling */
.description {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-text-primary, #1a1a1a);
}

.description h2, .description h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.description ul, .description ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.description li {
  margin-bottom: 0.25rem;
}

.description table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.875rem;
}

.description table th,
.description table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border-light, #e5e5e5);
  text-align: left;
}

.description table th {
  background: var(--color-bg-secondary, #f8f9fa);
  font-weight: 600;
}

.s-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text-secondary, #666);
}

.s-text h1 {
  font-size: 1.5rem;
  color: var(--color-text-primary, #1a1a1a);
  margin-bottom: 1rem;
}

/* Normalize anchors */
a { text-decoration: none; }

/* Breadcrumbs */
.breadcrumbs {
  list-style: none;
  padding: var(--space-3, 0.75rem) 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-secondary, #666);
}

.breadcrumbs li a {
  color: var(--color-text-link, #0284c7);
  text-decoration: none;
}

.breadcrumbs li a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .breadcrumbs {
    padding: var(--space-1) 0;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 20px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 20px), transparent 100%);
  }
  .breadcrumbs li {
    flex: 0 0 auto;
  }
  .product-detail__price-discount {
    order: 3;
    flex: 0 0 100%;
    margin-top: 2px;
  }
  .page__content {
    padding-top: 0;
  }
}

@media (min-width: 768px) {
  .header__action--phone {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: var(--space-4, 1rem);
  }
}

@media (max-width: 767px) {
  .header__action--phone {
    display: none;
  }
}

/* ===== Catalog Layout ===== */
.catalog-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
  min-width: 0;
}

.catalog-layout__content {
  min-width: 0;
}

.catalog-layout__sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  font-size: 0.875rem;
}

.catalog-layout__sidebar::-webkit-scrollbar { width: 4px; }
.catalog-layout__sidebar::-webkit-scrollbar-thumb {
  background: var(--color-border-light, #e5e5e5);
  border-radius: 2px;
}

.brand-mobile-filter-toggle {
  display: none;
}

.brand-mobile-filter-open {
  overflow: hidden;
}

@media (max-width: 899px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-layout__sidebar {
    position: static;
    max-height: none;
    display: none;
  }

  .catalog-layout__sidebar.is-open {
    display: block;
    margin-bottom: 0.75rem;
  }

  .catalog-layout__sidebar.brand-mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1200;
    width: min(86vw, 320px);
    height: 100vh;
    padding: 0.75rem 0.75rem 1rem;
    overflow-y: auto;
    background: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    margin: 0;
    border-radius: 0;
    display: block;
    transform: translateX(-104%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
  }

  .catalog-layout__sidebar.brand-mobile-sidebar.is-open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .brand-mobile-filter-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1190;
    background: rgba(17, 24, 39, 0.42);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .brand-mobile-filter-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .brand-mobile-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border-light, #e5e7eb);
  }

  .brand-mobile-sidebar__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-text-primary, #111827);
  }

  .brand-mobile-sidebar__close {
    border: 0;
    background: transparent;
    color: var(--color-text-link, #0284c7);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0;
    cursor: pointer;
  }

  .brand-mobile-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 38px;
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--color-border-light, #d1d5db);
    border-radius: 10px;
    background: #fff;
    color: var(--color-text-primary, #111827);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
  }

  .brand-mobile-filter-toggle__icon {
    display: block;
    flex: 0 0 16px;
  }

  .brand-mobile-filter-toggle__label {
    line-height: 1;
  }

  .brand-mobile-filter-toggle[aria-expanded='true'] {
    background: var(--color-surface-secondary, #f3f4f6);
  }

  .brand-mobile-filter-toggle--hero {
    margin: 0 0 0 auto;
  }
}

/* ===== Subcategory Grid (Parent Category Page) ===== */
.subcategory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 479px) {
  .subcategory-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

.subcategory-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-primary, #fff);
  border: 1px solid var(--color-border-light, #e5e5e5);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text-primary, #1a1a1a);
  transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s;
}

.subcategory-card:hover {
  border-color: var(--color-primary-300, #7dd3fc);
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1));
  transform: translateY(-2px);
}

.subcategory-card__image {
  aspect-ratio: 4/3;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1rem;
}

.subcategory-card__image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.subcategory-card__body {
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  border-top: 1px solid var(--color-border-light, #e5e5e5);
}

.subcategory-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  color: var(--color-text-primary, #1a1a1a);
}

.subcategory-card__count {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--color-primary-600, #0284c7);
  font-weight: 500;
  margin-top: auto;
}

.subcategory-card__count strong {
  font-weight: 700;
}

/* Parent sidebar nav */
.parent-sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.parent-sidebar-nav ul li {
  border-bottom: 1px solid var(--color-border-light, #e5e5e5);
}

.parent-sidebar-nav ul li a {
  display: block;
  padding: 0.625rem 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-primary, #1a1a1a);
  text-decoration: none;
  border-radius: var(--radius-sm, 6px);
  transition: all 0.2s;
}

.parent-sidebar-nav ul li a:hover {
  background: var(--color-primary-50, #f0f9ff);
  color: var(--color-text-link, #0284c7);
}

/* Sidebar promo block */
.sidebar-promo {
  margin-top: 1.5rem;
}

.sidebar-promo__title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary-500, #0ea5e9);
  color: var(--color-text-primary, #1a1a1a);
}

.sidebar-promo ul.products {
  padding-right: 0.5rem;
  gap: 0;
}

.sidebar-promo .product-card {
  border: none;
  box-shadow: none;
  border-radius: 0;
  background-color: transparent;
}

.sidebar-promo .product-card:hover {
  box-shadow: none;
  background-color: transparent;
}

.sidebar-promo li.items {
  border-bottom: 1px solid var(--color-border-light, #e5e7eb);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  background: none !important;
}

.sidebar-promo li.items:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.sidebar-promo li.items:hover {
  background: none !important;
}

.sidebar-promo hr,
.sidebar-promo .carousel {
  display: none;
}

/* ===== Filter Sidebar ===== */
.filter-block {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border-light, #e5e5e5);
}

.filter-block:last-child { border-bottom: none; }

.filter-block.negative-margin {
  margin-left: 0;
  margin-right: 0;
}

.filter-header {
  margin-bottom: 0.5rem;
}

.filter-header b {
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-header b .dotted {
  border-bottom: 1px dotted;
}

.filter-header b img {
  display: none;
}

.filter-chevron {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.125rem;
  color: var(--color-text-secondary, #666);
  transition: transform 0.25s ease;
}

.filter-header b[data-toggle].collapsed .filter-chevron {
  transform: rotate(-90deg);
}

.filter-body {
  padding-top: 0.25rem;
}

.filter-body.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.filter-body label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0;
  font-size: 0.8125rem;
  color: var(--color-text-primary, #1a1a1a);
  cursor: pointer;
}

.filter-body label:hover {
  color: var(--color-text-link, #0284c7);
}

.filter-body input[type="checkbox"],
.filter-body input[type="radio"] {
  accent-color: var(--color-primary-600, #0284c7);
}

.filter-body input[type="text"] {
  width: 100%;
  padding: 0.375rem 0.5rem;
  border: 1px solid var(--color-border-light, #e5e5e5);
  border-radius: var(--radius-sm, 6px);
  font-size: 0.8125rem;
  outline: none;
  transition: border-color 0.2s;
}

.filter-body input[type="text"]:focus {
  border-color: var(--color-primary-400, #38bdf8);
}

.filter-dn {
  display: none;
}

.filter-more {
  font-size: 0.75rem;
  color: var(--color-text-link, #0284c7);
  cursor: pointer;
}

.data-slider {
  margin: 0.5rem 0;
}

/* Foundation grid compatibility for filters */
.filter-body .columns,
.filter-body [class*="small-"],
.filter-body [class*="medium-"],
.filter-body [class*="large-"] {
  box-sizing: border-box;
  padding: 0 0.25rem;
}

.filter-body .small-12 { width: 100%; }
.filter-body .medium-6 { width: 50%; }
.filter-body .large-6 { width: 50%; }
.filter-body .large-9 { width: 75%; }

.list-view {
  min-width: 0;
  max-width: 100%;
}

/* Catalog product grid */
ul.products {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 640px) {
  ul.products {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

ul.products::before,
ul.products::after { display: none; }

ul.products > li,
ul.products > li.items {
  display: block;
  float: none;
  width: auto;
  padding: 0;
  margin: 0;
  list-style: none;
  clear: none;
  min-width: 0;
}

ul.products > li.items .product-card {
  height: 100%;
}

/* Catalog toolbar */
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.75rem 0;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary, #666);
  flex-wrap: wrap;
  max-width: 100%;
  min-width: 0;
}

.catalog-toolbar noindex {
  display: contents;
}

.catalog-toolbar__left,
.catalog-toolbar__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* DSizerListView sort/pager */
.list-view .sorter,
.list-view .summary,
.sorter,
.sizer-header {
  font-size: 0.875rem;
  color: var(--color-text-secondary, #666);
}

.sorter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.sorter ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sorter ul li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sizer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.sizer .activeSize {
  font-weight: 600;
  color: var(--color-text-primary, #1a1a1a);
  padding: 0.25rem 0.5rem;
}

.sorter a,
.sizer a {
  color: var(--color-text-link, #0284c7);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm, 6px);
  transition: background 0.2s;
}

.sorter a:hover,
.sizer a:hover {
  background: var(--color-primary-50, #f0f9ff);
}

.sorter a.asc::after { content: ' ↑'; }
.sorter a.desc::after { content: ' ↓'; }

@media (max-width: 479px) {
  .catalog-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== Kimi Pager ===== */
.list-view .pager {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0 0;
  padding: 0;
}

.list-view .pager .yiiPager,
.yiiPager {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-view .pager li {
  list-style: none;
}

.list-view .pager li.hidden {
  display: none;
}

.list-view .pager li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.625rem;
  border-radius: var(--radius-md, 10px);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text-primary, #1a1a1a);
  background: var(--color-bg-primary, #fff);
  border: 1px solid var(--color-border-light, #e5e5e5);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.list-view .pager li a:hover {
  background: var(--color-bg-secondary, #f5f5f7);
  border-color: var(--color-border-medium, rgba(0,0,0,0.18));
  text-decoration: none;
}

.list-view .pager li.selected a {
  background: var(--color-primary-600, #0284c7);
  color: #fff;
  border-color: var(--color-primary-600, #0284c7);
  pointer-events: none;
}

.js-view-more {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full, 9999px);
  background: var(--color-primary-600, #0284c7);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  margin: 1.5rem 0;
}

.js-view-more:hover {
  background: var(--color-primary-700, #0369a1);
}

/* Product card color swatches */
.product-card__colors {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem var(--space-3, 0.75rem);
  overflow-x: auto;
  min-width: 0;
  max-width: 100%;
}

.product-card__color-swatch {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm, 6px);
  overflow: hidden;
  border: 1px solid var(--color-border-light, #e5e5e5);
  transition: border-color 0.2s;
}

.product-card__color-swatch--active {  border-color: var(--color-primary-400, #38bdf8);  box-shadow: 0 0 0 1px var(--color-primary-400, #38bdf8);}
.product-card__color-swatch:hover {
  border-color: var(--color-primary-400, #38bdf8);
}

.product-card__color-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Brands Page ===== */

.brands-page {
  max-width: 1100px;
  margin: 0 auto;
}

.brands-hero {
  margin-bottom: 2rem;
}

.brands-hero__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-primary, #1a1a1a);
  margin-bottom: 0.75rem;
}

.brands-hero__text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-secondary, #666);
  max-width: 900px;
}

.brands-featured {
  margin-bottom: 2rem;
}

.brands-featured__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  border: 1px solid var(--color-border-light, #e5e7eb);
  border-radius: var(--radius-lg, 0.75rem);
  overflow: hidden;
  background: var(--color-border-light, #e5e7eb);
}

.brands-featured__card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  background: var(--color-bg-primary, #fff);
  min-height: 72px;
  transition: background 0.15s ease;
}

.brands-featured__card:hover {
  background: var(--color-bg-secondary, #f8f9fa);
}

.brands-featured__card img {
  max-height: 40px;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(30%);
  transition: filter 0.2s ease;
}

.brands-featured__card:hover img {
  filter: grayscale(0%);
}

.brands-alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  border-top: 1px solid var(--color-border-light, #e5e7eb);
  border-bottom: 1px solid var(--color-border-light, #e5e7eb);
}

.brands-alpha-nav__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary, #666);
  text-decoration: none;
  border-radius: var(--radius-md, 0.5rem);
  transition: all 0.15s ease;
}

.brands-alpha-nav__item:hover {
  color: var(--color-text-primary, #1a1a1a);
  background: var(--color-bg-secondary, #f5f5f5);
}

.brands-alpha-nav__item--active {
  background: var(--color-accent-500, #ef4444);
  color: #fff;
}

.brands-alpha-nav__item--active:hover {
  background: var(--color-accent-600, #dc2626);
  color: #fff;
}

.brands-directory {
  display: flex;
  flex-direction: column;
}

.brands-group {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border-light, #e5e7eb);
}

.brands-group__letter {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary, #1a1a1a);
  padding-top: 0.125rem;
}

.brands-group__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.375rem 1.5rem;
}

.brands-group__link {
  font-size: 0.9375rem;
  color: var(--color-text-primary, #1a1a1a);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.15s ease;
}

.brands-group__link:hover {
  color: var(--color-primary-600, #0284c7);
}

@media (max-width: 767px) {
  .brands-featured__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .brands-group {
    grid-template-columns: 40px 1fr;
  }

  .brands-group__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem 1rem;
  }

  .brands-hero__title {
    font-size: 1.5rem;
  }

  .brands-alpha-nav__item {
    min-width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .brands-featured__grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

/* ===== Social Share Block ===== */
.social-share {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
  margin-top: 1rem;
  border-top: 1px solid var(--color-border-light, #e5e5e5);
}

.social-share__label {
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 600;
  color: var(--color-text-primary, #1a1a1a);
  white-space: nowrap;
}

.social-share__icons {
  display: flex;
  gap: 0.625rem;
}

.social-share__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md, 8px);
  color: #fff;
  transition: opacity 0.2s, transform 0.2s;
}

.social-share__link:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.social-share__link--tg { background: #26A5E4; }
.social-share__link--vk { background: #0077FF; }
.social-share__link--tt { background: #000000; }
.social-share__link--ig { background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }

/* ===== Mega-Menu (Desktop Catalog Dropdown) ===== */
.mega-menu-wrap {
  position: relative;
}

.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10000;
  background: var(--color-bg-primary, #fff);
  border: 1px solid var(--color-border-light, #e5e5e5);
  border-radius: 0 0 var(--radius-lg, 12px) var(--radius-lg, 12px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  min-width: 720px;
  max-width: 900px;
  max-height: calc(100vh - 160px);
  overflow: hidden;
}

.mega-menu--open {
  display: flex;
}

.mega-menu__cats {
  flex: 0 0 260px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  border-right: 1px solid var(--color-border-light, #e5e5e5);
  padding: 0.5rem 0;
  scrollbar-width: thin;
}

.mega-menu__cats::-webkit-scrollbar { width: 3px; }
.mega-menu__cats::-webkit-scrollbar-thumb { background: var(--color-border-light); border-radius: 2px; }

.mega-menu__cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--color-text-primary, #1a1a1a);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}

.mega-menu__cat:hover,
.mega-menu__cat--active {
  background: var(--color-primary-50, #f0f9ff);
  color: var(--color-primary-600, #0284c7);
}

.mega-menu__cat svg {
  flex-shrink: 0;
  color: var(--color-text-tertiary, #a3a3a3);
}

.mega-menu__cat--active svg {
  color: var(--color-primary-400, #38bdf8);
}

.mega-menu__cat-title {
  flex: 1;
  min-width: 0;
}

.mega-menu__panels {
  flex: 1;
  min-width: 0;
  padding: 1rem 1.25rem;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

.mega-menu__panel {
  display: none;
}

.mega-menu__panel--active {
  display: block;
}

.mega-menu__subcats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.125rem 1.5rem;
}

.mega-menu__subcat {
  display: block;
  padding: 0.5rem 0.625rem;
  font-size: 0.8125rem;
  color: var(--color-text-primary, #1a1a1a);
  text-decoration: none;
  border-radius: var(--radius-sm, 6px);
  transition: background 0.15s, color 0.15s;
}

.mega-menu__subcat:hover {
  background: var(--color-primary-50, #f0f9ff);
  color: var(--color-primary-600, #0284c7);
}

.mega-menu__view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary-600, #0284c7);
  text-decoration: none;
  border-radius: var(--radius-md, 8px);
  transition: background 0.15s;
}

.mega-menu__view-all:hover {
  background: var(--color-primary-50, #f0f9ff);
}

.header__menu-btn--mobile { display: none; }
.header__menu-btn--desktop { display: flex; }

@media (max-width: 899px) {
  .mega-menu { display: none !important; }
  .mega-menu-wrap { display: none; }
  .header__menu-btn--mobile { display: flex; }
  .header__menu-btn--desktop { display: none; }
}

/* ===== Subcategory Chips (on parent category product listings) ===== */
.subcategory-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.subcategory-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  color: var(--color-text-primary, #1a1a1a);
  background: var(--color-bg-secondary, #f8f9fa);
  border: 1px solid var(--color-border-light, #e5e5e5);
  border-radius: var(--radius-full, 9999px);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.subcategory-chip:hover {
  background: var(--color-primary-50, #f0f9ff);
  border-color: var(--color-primary-300, #7dd3fc);
  color: var(--color-primary-600, #0284c7);
}

.subcategory-chip--all {
  font-weight: 600;
  background: var(--color-primary-600, #0284c7);
  color: #fff;
  border-color: var(--color-primary-600, #0284c7);
}

.subcategory-chip--all:hover {
  background: var(--color-primary-700, #0369a1);
  border-color: var(--color-primary-700, #0369a1);
  color: #fff;
}

/* ===== HOMEPAGE ===== */
.homepage-section {
  margin-bottom: 2rem;
}
.homepage-section__title {
  margin: 0 0 1rem;
  padding: 0;
  font-size: 1.5rem;
  font-weight: 700;
}
.homepage-section__title a {
  color: var(--color-text, #1e293b);
  text-decoration: none;
}
.homepage-section__title a:hover {
  color: var(--color-primary, #0ea5e9);
}

ul.products--homepage {
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 1rem;
}

/* Product Day */
.product-day {
  margin: 1.5rem 0;
  background: #fff;
  border: 1px solid var(--color-border-light, #e5e7eb);
  border-radius: var(--radius-lg, 0.75rem);
  padding: 1.5rem;
}
.product-day__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.product-day__info {
  flex: 1;
}
.product-day__title {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}
.product-day__title a {
  color: var(--color-text, #1e293b);
  text-decoration: none;
}
.product-day__desc {
  color: var(--color-text-muted, #64748b);
  font-size: 0.875rem;
  margin: 0.5rem 0;
}
.product-day__price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary, #0ea5e9);
  margin-top: 0.5rem;
}
.product-day__image {
  flex-shrink: 0;
}
.product-day__image img {
  width: 150px;
  height: auto;
  border-radius: var(--radius-md, 0.5rem);
}
.product-day__action {
  flex-shrink: 0;
}

.homepage-bottom {
  margin-top: 2rem;
}
.homepage-bottom h2 a {
  color: var(--color-text, #1e293b);
  text-decoration: none;
}
.homepage-bottom h2 a:hover {
  color: var(--color-primary, #0ea5e9);
}

@media (max-width: 1024px) {
  ul.products--homepage {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}
@media (max-width: 768px) {
  ul.products--homepage {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .product-day__inner {
    flex-direction: column;
    text-align: center;
  }
}
@media (max-width: 480px) {
  ul.products--homepage {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ===== Quickview alignment to PDP (scoped) ===== */
#productsWrapper .gBlue.mHeader {
  background: var(--color-bg-secondary, #f3f4f6);
  color: var(--color-text-primary, #1f2937);
  border-bottom: 1px solid var(--color-border-light, #e5e7eb);
}

#productsWrapper .close-reveal-modal {
  color: var(--color-text-secondary, #6b7280);
}

#productsWrapper .quickviews > .medium-4.large-4.columns {
  background-color: var(--color-bg-secondary, #f8fafc) !important;
  border-radius: var(--radius-xl, 16px);
  padding: 0.875rem;
}

#productsWrapper .quickviews > .medium-4.large-4.columns > * {
  margin-left: 0;
  margin-right: 0;
}

#productsWrapper .products-images .mainPreview.quick {
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: var(--radius-xl, 16px);
  padding: 0.5rem;
}

#productsWrapper .products-images .mainPreview.quick img {
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
}

#productsWrapper .products-colors ul {
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  height: auto !important;
  max-height: 500px;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 4px;
}

#productsWrapper .products-colors ul > li {
  width: 100%;
  margin-bottom: 0.5rem;
}

#productsWrapper .products-colors ul > li div {
  padding: 0.375rem;
}

#productsWrapper .products-colors ul > li div small {
  display: none;
}

#productsWrapper .products-colors-preview {
  width: 112px;
  height: 112px;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

#productsWrapper .products-more {
  margin-top: 0.875rem;
  justify-content: center;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

#productsWrapper .products-more .prev,
#productsWrapper .products-more .next {
  position: static !important;
}

#productsWrapper .products-more-carousel {
  width: calc(100% - 84px) !important;
  height: auto !important;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto !important;
  overflow-y: hidden;
  white-space: nowrap;
  align-items: center;
  gap: 0.5rem;
}

#productsWrapper .products-more-carousel > span,
#productsWrapper .products-more-carousel > a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#productsWrapper .products-more-carousel img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: var(--radius-lg, 12px);
}

#productsWrapper .products-brands-info a {
  color: var(--color-text-link, #0284c7);
  font-weight: 600;
}

#productsWrapper .products-brands-info a:hover {
  color: var(--color-primary-700, #0369a1);
  text-decoration: underline;
}

#productsWrapper .products-brands-info td:first-child {
  width: 44%;
  color: var(--color-text-secondary, #6b7280);
}

#productsWrapper .products-brands-info td {
  padding-left: 0.375rem;
  padding-right: 0.375rem;
}

#productsWrapper .products-brands-info td:last-child {
  color: var(--color-text-primary, #111827);
  font-weight: 500;
}

#productsWrapper .products-brands-info small {
  line-height: 1.35;
}

#productsWrapper .quickview-country-flag {
  display: inline-block;
  width: 14px;
  height: 10px;
  object-fit: cover;
  margin-left: 6px;
  vertical-align: baseline;
  border-radius: 2px;
}

#productsWrapper .products-busket-block > div {
  padding-left: 0.375rem;
  padding-right: 0.375rem;
}

#productsWrapper .quickviews > .medium-4.large-4.columns .row {
  margin-left: 0;
  margin-right: 0;
}

#productsWrapper .quickviews > .medium-4.large-4.columns .row > .columns {
  padding-left: 0;
  padding-right: 0;
}

/* ===== Brand page: category-like blocks ===== */
.brand-hero {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.brand-hero__country {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary, #6b7280);
}

.brand-hero__country img {
  width: 16px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 0.25rem;
}

.brand-hero__about-content {
  color: var(--color-text-primary, #1f2937);
  line-height: 1.55;
}

.brand-hero__about-content.is-collapsed {
  max-height: 5.6em;
  overflow: hidden;
}

.brand-hero__about-toggle {
  display: inline-block;
  margin-top: 0.5rem;
  border: 0;
  background: transparent;
  color: var(--color-text-link, #0284c7);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.brand-hero__logo {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.brand-hero__logo img {
  max-width: 150px;
  width: 100%;
  height: auto;
}

.brand-category-block {
  margin-bottom: 1.5rem;
}

.brand-category-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--color-border-light, #e5e7eb);
}

.brand-category-block__title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.brand-category-block__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary, #111827);
  text-decoration: none;
}

.brand-category-block__count {
  font-size: 0.875rem;
  color: var(--color-text-secondary, #6b7280);
  text-decoration: none;
}

.brand-category-block__all {
  flex: 0 0 auto;
  padding: 0.35rem 0.8rem;
  font-size: 0.875rem;
}

@media (max-width: 767px) {
  .brand-hero {
    grid-template-columns: 1fr;
  }

  .brand-hero__logo {
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
  }

  .brand-hero__logo img {
    width: auto;
    max-width: 150px;
  }

  .brand-category-block__head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.btn--success,
.add-to-cart--done {
  background-color: #22c55e;
  color: #fff;
  border-color: #22c55e;
}

.btn--success:hover,
.add-to-cart--done:hover {
  background-color: #16a34a;
  border-color: #16a34a;
  color: #fff;
}
