:root {
  --primary: #d97706;
  --primary-hover: #b45309;
  --primary-light: #fef3c7;
  --secondary: #2563eb;
  --dark: #0f172a;
  --dark-surface: #1e293b;
  --light-bg: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --text: #334155;
  --text-muted: #64748b;
  --success: #16a34a;
  --danger: #dc2626;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 20px -2px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px -5px rgba(0,0,0,0.15);
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', sans-serif;
}

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

.hidden {
  display: none !important;
}

.loading-spinner {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-muted);
}

.error-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 20px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  color: #dc2626;
  font-weight: 600;
}

body {
  font-family: var(--font-main);
  background-color: var(--light-bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* TOP BANNER */
.top-banner {
  background: var(--dark);
  color: #cbd5e1;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.top-banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.top-banner-links {
  display: flex;
  align-items: center;
  gap: 16px;
}
.top-banner-links a {
  color: #94a3b8;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.top-banner-links a:hover {
  color: #ffffff;
}
.phone-link {
  color: var(--primary) !important;
  font-weight: 700;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.header-main-bar {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon {
  font-size: 28px;
  background: var(--primary-light);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}
.logo-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--dark);
  letter-spacing: -0.5px;
}
.logo-title .tld {
  color: var(--primary);
}
.logo-subtitle {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* SEARCH */
.search-box {
  position: relative;
  flex: 1;
  max-width: 500px;
}
.search-box input {
  width: 100%;
  padding: 10px 38px 10px 40px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: #f1f5f9;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}
.search-box input:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
}
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 380px;
  overflow-y: auto;
  z-index: 200;
}
.search-product-suggestion { display:flex; gap:10px; align-items:center; padding:9px 11px; color:var(--dark); text-decoration:none; border-bottom:1px solid #edf2f7; }
.search-product-suggestion:hover { background:#fff7ed; }
.search-product-suggestion img { width:48px; height:48px; object-fit:contain; border-radius:7px; background:#f8fafc; flex:0 0 auto; }
.search-product-suggestion span { min-width:0; display:flex; flex-direction:column; gap:3px; }
.search-product-suggestion strong { font-size:13px; line-height:1.25; }
.search-product-suggestion small { color:var(--text-muted); font-size:11px; }
.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}
.search-item:hover {
  background: var(--light-bg);
}
.search-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
}

/* ACTIONS */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.action-btn:hover {
  background: #e2e8f0;
}
.cart-btn {
  background: var(--dark);
  color: #ffffff;
  border-color: var(--dark);
}
.cart-btn:hover {
  background: #1e293b;
}
.cart-badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
}
.admin-badge-btn {
  background: var(--primary-light);
  color: var(--primary-hover);
  border-color: #fde68a;
}

/* HERO SECTION */
.hero-section {
  padding: 36px 0 44px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
}
.hero-grid {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-text-block {
  max-width: 920px;
  text-align: center;
  margin: 0 auto;
}
.badge-pill {
  display: inline-block;
  background: rgba(217, 119, 6, 0.2);
  border: 1px solid var(--primary);
  color: #fef08a;
  padding: 4px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 14px;
}
.hero-subtitle {
  font-size: 17px;
  color: #94a3b8;
  margin-bottom: 26px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}
.hero-benefits {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.benefit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.05);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.08);
}
.benefit-icon {
  font-size: 24px;
}
.benefit-item strong {
  display: block;
  font-size: 13px;

}
.benefit-item span {
  font-size: 11px;
  color: #94a3b8;
}

/* MARKETPLACE COMPARISON CARD */
.marketplace-card {
  background: #ffffff;
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--primary);
}
.mp-card-header {
  margin-bottom: 20px;
}
.mp-tag {
  background: var(--primary-light);
  color: var(--primary-hover);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;

  text-transform: uppercase;
}
.mp-card-header h3 {
  font-family: var(--font-display);
  font-size: 20px;
  margin-top: 4px;
  color: var(--dark);
}
.comparison-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.comp-col {
  flex: 1;
}
.comp-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}
.comp-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--success);
}
.line-through {
  text-decoration: line-through;
  color: var(--danger);
  font-size: 20px;
}
.comp-note {
  font-size: 11px;
  color: var(--text-muted);
}
.vs-divider {
  font-weight: 800;
  color: var(--text-muted);
  font-size: 12px;
  background: #e2e8f0;
  padding: 6px 10px;
  border-radius: 99px;
}
.savings-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 20px;
}

/* BUTTONS */
.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}
.btn-primary.full-width {
  width: 100%;
}
.btn-primary.small {
  padding: 8px 14px;
  font-size: 13px;
}
.btn-secondary {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--dark);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-secondary:hover {
  background: #f1f5f9;
}
.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-size: 13px;
}

/* CATALOG SECTION */
.catalog-section {
  padding: 40px 0 60px;
}

/* GENDER TABS */
.gender-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.gender-tab {
  background: none;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 3px solid transparent;
  margin-bottom: -6px;
  white-space: nowrap;
  transition: all 0.2s;
}
.gender-tab:hover {
  color: var(--dark);
}
.gender-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-count {
  background: #e2e8f0;
  color: var(--dark);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 99px;
}
.gender-tab.active .tab-count {
  background: var(--primary-light);
  color: var(--primary-hover);
}

/* CATEGORY PILLS */
.category-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.cat-pill {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.cat-pill:hover, .cat-pill.active {
  background: var(--dark);
  color: #ffffff;
  border-color: var(--dark);
}

/* FILTER BAR */
.filter-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
#btn-toggle-filters {
  color: #fff;
  background: linear-gradient(135deg, #0f172a 0%, #243b63 100%);
  border: 2px solid #f59e0b;
  padding: 11px 18px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .2);
}
#btn-toggle-filters:hover {
  color: #fff;
  background: linear-gradient(135deg, #1e293b 0%, #365584 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .28);
}
.sort-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}
.sort-selector select {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
  font-size: 14px;
  outline: none;
}

/* FILTER DRAWER */
.filter-drawer {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.filter-group {
  margin-bottom: 16px;
}
.filter-title {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}
.size-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.size-chip {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.size-chip:hover {
  border-color: var(--primary);
}
.size-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.external-size-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
  min-width: 0;
}
.external-size-filter-title {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
}
.external-size-filter-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 7px;
  scrollbar-width: thin;
}
.external-size-chip {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}
.external-size-chip:hover,
.external-size-chip.active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.checkout-delivery-provider-group {
  overflow: hidden;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
}
.checkout-delivery-provider-title {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .02em;
}
.checkout-delivery-card {
  padding: 11px 10px;
  border: 0;
  border-top: 1px solid rgba(15,23,42,.11);
  border-radius: 0;
  background: rgba(255,255,255,.55);
}
.checkout-delivery-card:first-child { border-top: 0; }
.checkout-delivery-card.active { background:#fff; box-shadow:inset 4px 0 0 currentColor; }

/* Фирменные палитры служб доставки */
.checkout-delivery-provider-group.delivery-provider-cdek { color:#008f32; border-color:#00b33c; background:#edfff3; }
.delivery-provider-cdek .checkout-delivery-provider-title { color:#fff; background:#00b33c; }
.delivery-provider-cdek .checkout-delivery-card { color:#10251a; }
.delivery-provider-cdek .checkout-delivery-card.active { color:#008f32; }
.delivery-provider-cdek .pickup-inline-button { border-color:#00a83b; color:#008f32; }

.checkout-delivery-provider-group.delivery-provider-yandex { color:#111; border-color:#ffcc00; background:#fff9d7; }
.delivery-provider-yandex .checkout-delivery-provider-title { color:#111; background:#ffcc00; }
.delivery-provider-yandex .checkout-delivery-card { color:#201b00; }
.delivery-provider-yandex .checkout-delivery-card.active { color:#b38600; }
.delivery-provider-yandex .pickup-inline-button { border-color:#d3a900; color:#806600; }

.checkout-delivery-provider-group.delivery-provider-russian-post { color:#0055a5; border-color:#0055a5; background:#edf6ff; }
.delivery-provider-russian-post .checkout-delivery-provider-title { color:#fff; background:#0055a5; }
.delivery-provider-russian-post .checkout-delivery-card { color:#10233b; }
.delivery-provider-russian-post .checkout-delivery-card.active { color:#0055a5; }
.delivery-provider-russian-post .pickup-inline-button { border-color:#0055a5; color:#0055a5; }

.checkout-delivery-provider-group.delivery-provider-fivepost { color:#d50072; border-color:#d50072; background:#fff0f7; }
.delivery-provider-fivepost .checkout-delivery-provider-title { color:#fff; background:#d50072; }
.delivery-provider-fivepost .checkout-delivery-card { color:#30101f; }
.delivery-provider-fivepost .checkout-delivery-card.active { color:#d50072; }
.delivery-provider-fivepost .pickup-inline-button { border-color:#d50072; color:#b1005e; }

.checkout-delivery-provider-group.delivery-provider-other { color:#475569; border-color:#94a3b8; background:#f8fafc; }
.delivery-provider-other .checkout-delivery-provider-title { color:#fff; background:#64748b; }
.delivery-provider-other .checkout-delivery-card { color:#1e293b; }
.checkout-delivery-main {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}
.checkout-delivery-name {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}
.checkout-delivery-name small {
  color: var(--text-muted);
}
.checkout-delivery-price {
  flex: 0 0 auto;
  text-align: right;
}

.delivery-calculate-cta {
  border: 0;
  border-radius: 10px;
  padding: 11px 18px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(234, 88, 12, .28);
}
.delivery-calculate-cta:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(234, 88, 12, .38); }
.cart-add-more { margin: 12px 0 4px; border: 1px solid var(--primary); background:#fff; color:var(--primary); border-radius:9px; padding:10px 16px; font-weight:750; cursor:pointer; }
.pickup-selector-modal { width:min(920px, calc(100vw - 24px)); max-height:90vh; }
.pickup-selector-modal .modal-body { overflow:auto; }
.pickup-modal-subtitle { margin-top:3px; color:var(--text-muted); font-size:13px; }
.pickup-address-search { margin:12px 0; position:sticky; top:0; z-index:2; background:#fff; }
@media (max-width: 640px) {
  .delivery-calculate-cta { width:100%; font-size:15px; padding:13px 14px; }
  .pickup-selector-modal { width:calc(100vw - 12px); max-height:94vh; }
}
.pickup-inline-button {
  margin: 9px 0 0 28px;
  padding: 7px 11px;
  border: 1px solid var(--primary);
  border-radius: 7px;
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}
.pickup-inline-summary {
  margin: 7px 0 0 28px;
  color: var(--text-muted);
  font-size: 12px;
}
.pickup-inline-panel {
  margin: 10px 0 0 28px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.pickup-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 9px;
}
.pickup-tab {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}
.pickup-tab.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.pickup-points-list {
  display: flex;
  max-height: 280px;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}
.pickup-point-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.pickup-point-option.active {
  border-color: var(--success);
  background: #f0fdf4;
}
.pickup-point-option span,
.pickup-point-option small {
  color: var(--text-muted);
}
.pickup-map {
  width: 100%;
  height: 360px;
  overflow: hidden;
  border-radius: 8px;
  background: #eef2f7;
}
.pickup-map-empty {
  padding: 30px 15px;
  color: var(--text-muted);
  text-align: center;
}

.color-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.color-chip {
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.color-chip.active {
  background: var(--dark);
  color: #ffffff;
  border-color: var(--dark);
}
.filter-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* PRODUCT GRID */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}
.product-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
.card-badge-discount {
  display: none !important;
}
.card-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.filter-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.filter-option-chip {
  width: auto;
  max-width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-option-chip:hover {
  border-color: var(--primary);
}
.filter-option-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

@media (max-width: 768px) {
  #modal-filters-popup .modal-card {
    width: calc(100vw - 16px);
    padding: 14px;
  }
  #modal-filters-popup .modal-header h2 {
    font-size: 20px;
    line-height: 1.2;
  }
  #popup-filters-body {
    padding: 14px 8px 8px !important;
  }
  #modal-filters-popup .filter-chips-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  #modal-filters-popup .filter-option-chip {
    width: 100%;
  }
  #modal-filters-popup .filter-actions {
    gap: 12px;
  }
}
.card-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-size-alignment-slot {
  display: flex;
  flex-direction: column;
}
.card-sku {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  margin: 4px 0 8px;
  color: var(--dark);
  cursor: pointer;

}
.card-title:hover {
  color: var(--primary);
}
.card-sizes-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.card-sizes-slider { min-width:0; }
#card-size-length-popup { position:fixed; z-index:2147483646; padding:6px 10px; border-radius:7px; background:#0f172a; color:white; font-size:13px; font-weight:700; line-height:1.2; pointer-events:none; box-shadow:0 4px 12px #0004; }
#card-size-length-popup::after { content:''; position:absolute; left:50%; top:100%; transform:translateX(-50%); border:5px solid transparent; border-top-color:#0f172a; }
.admin-delete-toolbar { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin:12px 0; }
.admin-record-delete { display:block; color:var(--danger); margin-top:6px; }
#admin-notices { position:fixed; top:16px; right:16px; z-index:2147483647; display:flex; flex-direction:column; gap:8px; max-width:min(440px, calc(100vw - 32px)); pointer-events:none; }
.admin-notice { padding:14px 18px; border:1px solid #94a3b8; border-radius:12px; background:#0f172a; color:white; box-shadow:0 4px 20px #0003; font-size:14px; overflow-wrap:anywhere; }
.size-table-sku-picker { margin-top:12px; padding:12px; background:white; border:1px solid var(--border); border-radius:10px; }
.size-table-sku-picker p { margin:6px 0 10px; font-size:13px; color:var(--text-muted); }
.size-table-sku-buttons { display:flex; flex-wrap:wrap; gap:8px; max-height:220px; overflow-y:auto; }
.size-table-sku-buttons button { min-height:36px; }
#admin-sku-photo-preview { position:fixed; width:100px; height:100px; z-index:2147483646; pointer-events:none; background:white; outline:1px solid var(--border); border-radius:8px; overflow:hidden; box-shadow:0 4px 16px #0003; }
#admin-sku-photo-preview img { display:block; width:100px; height:100px; object-fit:contain; }
.admin-delete-toolbar button { color:var(--danger); }
.mini-size-tag {
  font-size: 10px;
  background: #f1f5f9;
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--text-muted);
}
.card-prices {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}
.card-price-current {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
}
.card-price-old {
  font-size: 14px;
  text-decoration: line-through;
  color: var(--text-muted);
}
.card-actions {
  display: flex;
  gap: 8px;
}
.card-buy-message,
.product-purchase-message {
  margin: 0 0 9px;
  padding: 8px 10px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.product-purchase-message {
  margin: 9px 0 0;
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
}
.page-btn {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  flex: 0 0 40px;
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
}
.page-btn.active {
  background: var(--dark);
  color: #ffffff;
  border-color: var(--dark);
}
.catalog-load-more { display:flex; align-items:center; justify-content:center; width:min(420px, 100%); min-height:48px; margin:24px auto 4px; font-size:15px; }
@media (max-width: 768px) {
  .catalog-load-more { width:100%; margin:18px 0 4px; }
  .pagination { justify-content:flex-start; gap:6px; overflow-x:auto; scrollbar-width:none; padding:8px 4px; margin-top:24px; scroll-padding-inline:4px; }
  .pagination::-webkit-scrollbar { display:none; }
  .page-btn { width:40px; min-width:40px; height:40px; min-height:40px; flex-basis:40px; padding:0; border-radius:8px; font-size:14px; }
}

/* ADVANTAGES SECTION */
.advantages-section {
  background: #ffffff;
  padding: 50px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.adv-card {
  text-align: center;
  padding: 20px;
}
.adv-icon {
  font-size: 36px;
  margin-bottom: 12px;
}
.adv-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 8px;

}
.adv-card p {
  font-size: 14px;
  color: var(--text-muted);
}

/* FOOTER */
.site-footer {
  background: var(--dark);
  color: #94a3b8;
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-logo .logo-title {
  color: #ffffff;
}
.footer-desc {
  font-size: 14px;
  margin-top: 12px;
}
.footer-grid h4 {
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 16px;
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 10px;
  font-size: 14px;
}
.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--primary);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  font-size: 13px;
  text-align: center;
}

/* MODALS & DRAWERS */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
/* MODAL & PRODUCT RESPONSIVE FIXES */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}

/* MODAL Z-INDEX STACKING ORDER */
#modal-admin {
  z-index: 1000 !important;
}

#modal-user-cabinet {
  z-index: 1100 !important;
}

#modal-cart {
  z-index: 1200 !important;
}

#modal-info-page,
#modal-size-table,
#modal-product,
#modal-filters-popup,
#modal-payment-gateway {
  z-index: 1500 !important;
}

#modal-review-photo-viewer {
  z-index: 1800 !important;
}

#modal-pickup-selector {
  z-index: 1900 !important;
}

#modal-lightbox {
  z-index: 2000 !important;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow-lg);
  box-sizing: border-box;
}

.product-modal-card {
  max-width: 900px;
  width: calc(100vw - 24px);
}

.admin-modal-card {
  max-width: 98vw !important;
  width: 98vw !important;
  height: 96vh !important;
  max-height: 96vh !important;
  border-radius: 12px;
  padding: 24px;
}

.fullscreen-modal-card {
  max-width: calc(100vw - 24px) !important;
  width: calc(100vw - 24px) !important;
  height: 96vh !important;
  max-height: 96vh !important;
  border-radius: 12px;
  padding: 24px;
}

/* The editor must cover the dashboard navigation instead of being covered by it. */
.admin-sidebar {
  position: relative;
  z-index: 1 !important;
}

@media (min-width: 900px) {
  #modal-info-page .modal-card.fullscreen-modal-card {
    margin-left: 0 !important;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
  }
}

.cart-modal-card {
  max-width: 700px;
  width: calc(100vw - 24px);
}
.cart-item {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto 82px 28px;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-photo {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
}
.cart-item-info {
  min-width: 0;
}
.cart-item-name {
  display: block;
  color: var(--dark);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
}
.cart-item-meta {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}
.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cart-item-quantity button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}
.cart-item-quantity span {
  width: 20px;
  text-align: center;
  font-weight: 700;
}
.cart-item-total {
  width: 82px;
  text-align: right;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}
.cart-item-remove {
  width: 28px;
  height: 32px;
  border: 0;
  background: none;
  color: var(--danger);
  font-size: 22px;
  cursor: pointer;
}

.cart-added-notice {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 5000;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100vw - 24px);
  padding: 12px 18px;
  border-radius: 12px;
  background: #166534;
  color: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .25);
  font-size: 14px;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.94);
  transition: opacity .2s ease, transform .2s ease;
}
.cart-added-notice.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.cart-added-notice-icon {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #fff;
  color: #166534;
  font-size: 15px;
  font-weight: 900;
}
.cart-attention {
  animation: cartAttention 4.8s ease;
}

.customer-feedback-section,
.admin-customer-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.customer-feedback-section > summary,
.admin-customer-card > summary {
  cursor: pointer;
  font-weight: 800;
}

.customer-feedback-card {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px;
  margin-bottom: 8px;
  background: #fff;
}

.customer-feedback-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.customer-feedback-delete {
  color: var(--danger) !important;
  margin-top: 9px;
  padding-left: 0;
}

.admin-customer-profile-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  gap: 8px;
  margin: 12px 0;
}

.admin-customer-profile-form small {
  grid-column: 1 / -1;
  color: var(--text-muted);
}

.admin-customer-feedback-list {
  display: grid;
  gap: 7px;
  margin: 6px 0 12px;
}

.admin-customer-feedback-item {
  padding: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 12px;
}

.admin-customer-link {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.admin-feedback-customer-linker {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 9px;
  padding: 8px;
  border-radius: 8px;
  background: #f8fafc;
}

.admin-feedback-customer-linker label {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
}

.admin-customer-highlight {
  outline: 3px solid rgba(229, 120, 0, .35);
  box-shadow: 0 0 0 6px rgba(229, 120, 0, .08);
}

@media (max-width: 900px) {
  .admin-customer-profile-form {
    grid-template-columns: 1fr;
  }

  .admin-customer-profile-form small {
    grid-column: auto;
  }

  .customer-feedback-card-head {
    flex-direction: column;
  }

  .admin-feedback-customer-linker {
    align-items: stretch;
    flex-direction: column;
  }
}
@keyframes cartAttention {
  0%, 100% { box-shadow: none; transform: scale(1); }
  18%, 52%, 86% { box-shadow: 0 0 0 5px rgba(245, 158, 11, .35); transform: scale(1.06); }
  35%, 69% { box-shadow: 0 0 0 2px rgba(245, 158, 11, .18); transform: scale(1); }
}

/* CUSTOM PROMO BADGES ON PRODUCT CARDS */
.card-img-wrapper {
  position: relative;
}

.promo-badge-custom {
  position: absolute;
  z-index: 10;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  pointer-events: none;
  white-space: nowrap;
}

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

.modal-close {
  background: #f1f5f9;
  border: none;
  font-size: 22px;
  width: 32px;
  height: 32px;
  border-radius: 99px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 20;
  transition: all 0.2s;
}
.modal-close:hover {
  background: #e2e8f0;
}

/* CATEGORY NAVBAR */
.category-navbar {
  background: #ffffff;
  border-top: 1px solid #dbe3ee;
  border-bottom: 1px solid #dbe3ee;
  padding: 11px 0;
  overflow-x: auto;
  white-space: nowrap;
}
.navbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-cat-link {
  color: #172033;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-cat-link:hover, .nav-cat-link.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(230, 126, 0, 0.22);
}

.feedback-captcha {
  min-height: 100px;
  margin: 12px 0 4px;
}
.feedback-captcha.hidden { min-height: 0; margin: 0; }

.saved-address-picker {
  padding: 10px;
  border: 1px solid #dbe3ee;
  border-radius: 9px;
  background: #f8fafc;
}

.customer-address-form {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-items: end;
  padding: 16px !important;
  border: 1px solid var(--border);
  border-radius: 10px !important;
  margin: 10px 0 !important;
  background: #fff;
}
.customer-address-form label { min-width: 0; font-size: 13px; font-weight: 700; }
.customer-address-form .customer-address-wide,
.customer-address-form .customer-address-actions { grid-column: 1 / -1; }
.customer-address-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.customer-address-actions label { margin-right:auto; font-weight:600; }

.feedback-page-layout { display:grid; grid-template-columns:minmax(250px, 330px) minmax(0, 1fr); gap:24px; align-items:start; }
.feedback-product-card { position:sticky; top:18px; background:#fff; border:1px solid var(--border); border-radius:16px; padding:16px; box-shadow:var(--shadow-sm); }
.feedback-product-card img { width:100%; aspect-ratio:1/1; object-fit:contain; border-radius:12px; background:#f8fafc; }
.feedback-list-panel { background:#fff; border:1px solid var(--border); border-radius:16px; padding:22px; box-shadow:var(--shadow-sm); }
.feedback-page-tabs { display:flex; gap:8px; border-bottom:1px solid var(--border); margin-bottom:18px; }
.feedback-page-tab { padding:10px 14px; color:var(--text-muted); font-weight:800; text-decoration:none; border-bottom:3px solid transparent; }
.feedback-page-tab.active { color:var(--dark); border-bottom-color:var(--primary); }
.feedback-page-review, .feedback-page-question {
  padding:18px;
  margin-bottom:14px;
  border:1px solid #dbe4ef;
  border-radius:14px;
  background:#fff;
  box-shadow:0 3px 12px rgba(15,23,42,.06);
}
.feedback-page-review:last-child, .feedback-page-question:last-child { margin-bottom:0; }
.feedback-page-photo-strip { display:flex; gap:8px; overflow-x:auto; padding:4px 0 14px; }
.feedback-page-photo-strip img { width:82px; height:106px; object-fit:cover; border-radius:8px; cursor:pointer; flex:0 0 auto; }
.product-stock-status { display:inline-flex; align-items:center; gap:7px; margin:8px 0; padding:7px 11px; border-radius:999px; font-size:13px; font-weight:800; }
.product-stock-status.available { color:#166534; background:#dcfce7; }
.product-stock-status.unavailable { color:#991b1b; background:#fee2e2; }
.checkout-bottom-summary { background:#fff8ed; border:2px solid #f2b35f; border-radius:12px; padding:14px; margin:14px 0; }
.checkout-bottom-row { display:flex; justify-content:space-between; gap:14px; margin-bottom:7px; font-size:14px; }
.checkout-bottom-pickup { color:var(--text-muted); font-size:12px; line-height:1.45; margin:3px 0 10px; }
.checkout-bottom-total { display:flex; justify-content:space-between; gap:14px; border-top:1px solid #f2c889; padding-top:10px; font-size:18px; font-weight:900; }

@media (max-width: 768px) {
  form[onsubmit^="saveCustomerAddress"],
  form[onsubmit^="addCustomerAddress"],
  form[onsubmit^="saveAdminCustomerAddress"] {
    grid-template-columns: 1fr !important;
  }
  .customer-address-form { grid-template-columns:1fr !important; }
  .feedback-page-layout { grid-template-columns:1fr; }
  .feedback-product-card { position:static; }
}

/* STANDALONE PAGE VIEWS */
.page-view {
  min-height: 65vh;
}
.page-padding {
  padding-top: 24px;
  padding-bottom: 40px;
}
.page-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
  width: 100%;
}
.admin-page-card {
  max-width: none;
  margin: 0;
}

#view-admin-container > .container {
  width: 100%;
  max-width: none;
  padding-left: 12px;
  padding-right: 12px;
}
.page-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
}
.page-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}
.breadcrumbs {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.breadcrumbs a {
  color: var(--primary);
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}
.bc-sep {
  margin: 0 6px;
  color: var(--border);
}

.product-description,
.product-video-review,
.product-category-navigation {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.product-description h2,
.product-video-review h2 {
  margin: 0 0 14px;
  font-size: 20px;
}
.product-description-content {
  color: var(--text);
  line-height: 1.7;
}
.product-description-content img {
  max-width: 100%;
  height: auto;
}
.desktop-product-description { display:block; }
.mobile-product-description { display:none; }
.review-upload-progress {
  display:inline-flex;
  align-items:center;
  gap:9px;
  margin-top:8px;
  padding:9px 12px;
  border:1px solid #bfdbfe;
  border-radius:10px;
  color:#1e3a5f;
  background:#eff6ff;
  font-size:12px;
  font-weight:700;
}
.review-upload-spinner {
  width:17px;
  height:17px;
  border:3px solid #bfdbfe;
  border-top-color:#2563eb;
  border-radius:50%;
  animation:review-upload-spin .75s linear infinite;
}
.review-upload-dots::after {
  content:'…';
  display:inline-block;
  width:1.4em;
  overflow:hidden;
  vertical-align:bottom;
  animation:review-upload-dots 1.2s steps(4,end) infinite;
}
@keyframes review-upload-spin { to { transform:rotate(360deg); } }
@keyframes review-upload-dots { 0% { width:0; } 100% { width:1.4em; } }
.wb-mobile-feedback-links { display:grid; gap:8px; margin-top:12px; }

.mobile-sticky-filter-btn { display:none; }
.product-video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.product-video-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 145px;
  padding: 11px 20px;
  border-radius: 9px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease, opacity .15s ease;
}
.product-video-btn:hover { transform: translateY(-1px); opacity: .92; }
.product-video-btn.youtube { background: #ff0000; }
.product-video-btn.rutube { background: #14191f; }

/* PRODUCT MODAL & PAGE GRID */
.product-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.main-gallery-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.thumb-img {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  background: #f8fafc;
}
.thumb-img.active {
  border-color: var(--primary);
}

.product-modal-info {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.product-modal-info h2, .product-modal-info h1 {
  font-size: 18px;
  line-height: 1.35;
  margin: 6px 0 10px 0;
  word-break: break-word;
  overflow-wrap: break-word;
  color: var(--dark);
}

.comparison-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0;
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.savings-alert {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  color: #166534;
  margin-bottom: 12px;
  word-break: break-word;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 12px 0;
  table-layout: fixed;
}
.specs-table td {
  padding: 5px 0;
  border-bottom: 1px dashed var(--border);
  word-break: break-word;
  overflow-wrap: break-word;
}
.specs-table tr td:first-child {
  color: var(--text-muted);
  width: 45%;
}
.specs-table tr td:last-child {
  font-weight: 600;
  text-align: right;
  width: 55%;
}

.size-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.size-table th, .size-table td {
  border: 1px solid var(--border);
  padding: 8px;
  text-align: center;
  font-size: 13px;
}
.customer-size-table {
  max-width: 480px;
  margin: 16px auto;
}
.tip-box {
  background: var(--primary-light);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--primary-hover);
  font-weight: 600;
}

.hidden {
  display: none !important;
}

/* FORM STYLES */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 14px;
  outline: none;
}
.form-input:focus {
  border-color: var(--primary);
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 768px) {
  .modal-backdrop {
    padding: 8px;
  }
  .modal-card {
    padding: 16px 14px;
    max-height: 94vh;
    border-radius: var(--radius-md);
  }
  .product-modal-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .main-gallery-img {
    max-height: 240px;
  }
  .product-modal-info h2, .product-modal-info h1 {
    font-size: 16px;
  }
  .comparison-row {
    padding: 8px 10px;
    font-size: 12px;
  }
  .grid-3, .footer-grid, .hero-grid {
    grid-template-columns: 1fr;
  }
  .search-box {
    max-width: 100%;
  }
  .btn-label {
    display: none;
  }
  .page-card {
    padding: 16px;
  }
}

/* FULLSCREEN LIGHTBOX */
.lightbox-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-content img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  font-size: 28px;
  width: 48px;
  height: 48px;
  border-radius: 99px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2010;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(255, 255, 255, 0.4);
}
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-counter {
  color: #cbd5e1;
  font-size: 14px;
  margin-top: 10px;
  background: rgba(0,0,0,0.5);
  padding: 4px 12px;
  border-radius: 99px;
}

/* SIZE TOOLTIPS & BUTTON BADGE */
.btn-size-table-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  padding: 5px 11px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-size-table-badge:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37,99,235,0.25);
}

.size-chips-grid, .card-sizes-tags, .form-group {
  overflow: visible !important;
}

.size-chip {
  position: relative !important;
  overflow: visible !important;
}

.size-chip[data-cm]::after {
  content: attr(data-cm);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 2000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.size-chip[data-cm]::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2000;
}

.size-chip[data-cm]:hover::after,
.size-chip[data-cm]:focus::after,
.size-chip[data-cm]:hover::before,
.size-chip[data-cm]:focus::before {
  opacity: 1;
  visibility: visible;
}

.size-chip.out-of-stock, .card-size-btn.out-of-stock {
  opacity: 0.35 !important;
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  border-color: #cbd5e1 !important;
  text-decoration: line-through;
  cursor: help !important;
}

.size-error-highlight {
  border: 2px solid var(--danger) !important;
  background: #fef2f2 !important;
  border-radius: 8px;
  padding: 4px;
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* MESSENGER BADGES */
.messenger-icons-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.msg-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  color: #ffffff;
  transition: transform 0.2s, opacity 0.2s;
}
.msg-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}
.max-btn { background: #8b5cf6; }
.tg-btn { background: #0284c7; }
.wa-btn { background: #16a34a; }
.vk-btn { background: #2563eb; }
.msg-btn[data-full-label] { font-size: 0 !important; }
.msg-btn[data-full-label] svg { margin-right: 4px; }
.msg-btn[data-full-label]::after { content: attr(data-full-label); font-size: 11px; }
.customer-order-status {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 99px;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}
.customer-order-status.sent { background: #86efac; border: 1px solid #22c55e; }
.customer-order-status.other { background: #fdba74; border: 1px solid #f97316; }
.customer-order-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.customer-cancel-order {
  color: #991b1b;
  border-color: #fecaca;
  background: #fff7f7;
}

/* REVIEWS & QUESTIONS WB COMPONENT */
.product-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  padding: 2px 6px;
  border-radius: 6px;
  transition: background 0.15s ease;
  width: fit-content;
  max-width: max-content;
}
.product-rating-badge:hover {
  background: #f1f5f9;
}
.product-rating-badge .star-icon {
  color: #f59e0b;
}
.reviews-questions-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.rq-tabs {
  display: flex;
  gap: 16px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.rq-tab-btn {
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 10px 4px;
  cursor: pointer;
  position: relative;
}
.rq-tab-btn.active {
  color: var(--primary);
}
.rq-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.review-item, .question-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}
.review-header, .question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.review-user {
  font-weight: 700;
  font-size: 14px;
}
.review-photos-grid {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.review-photo-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
}
.question-answer-box {
  background: #eff6ff;
  border-left: 3px solid var(--secondary);
  padding: 10px 12px;
  margin-top: 8px;
  border-radius: 4px;
  font-size: 13px;
}

/* ADMIN 8 TABS */
.admin-nav-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.admin-tab-btn {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.admin-tab-btn:hover {
  background: #e2e8f0;
}
.admin-tab-btn.active {
  background: var(--dark);
  color: #ffffff;
  border-color: var(--dark);
}

/* ==========================================================================
   WILDBERRIES STYLE REVIEWS & QUESTIONS COMPONENT (MATCHING SCREENSHOTS 1-5)
   ========================================================================== */

.wb-rq-container {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-main);
}

/* WB Tabs Navigation (Screenshot 1 & 2) */
.wb-rq-header-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 20px;
}
.wb-tab-title {
  font-size: 24px;
  font-weight: 800;
  color: #8c959f;
  cursor: pointer;
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  user-select: none;
  transition: color 0.2s ease;
}
.wb-tab-title.active {
  color: #1c1c1e;
}
.wb-tab-count {
  font-size: 13px;
  font-weight: 600;
  color: #8c959f;
  margin-top: -2px;
}
.wb-tab-title.active .wb-tab-count {
  color: #1c1c1e;
}

/* WB Ratings Summary Bar (Screenshot 2) */
.wb-rating-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.wb-rating-left-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.wb-rating-score-box {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wb-laurel-icon {
  font-size: 26px;
  color: #8b5cf6;
}
.wb-rating-score-num {
  font-size: 28px;
  font-weight: 900;
  color: #1c1c1e;
  letter-spacing: -0.5px;
}
.wb-rating-subtext {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.wb-rating-sub-title {
  font-size: 13px;
  font-weight: 700;
  color: #1c1c1e;
}
.wb-rating-sub-count {
  font-size: 12px;
  color: #8c959f;
}
.wb-badge-buyer-choice {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #c084fc;
  color: #9333ea;
  background: #fcf5ff;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 99px;
}
.wb-badge-size-match {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f4f9;
  color: #64748b;
  font-weight: 600;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 99px;
}
.wb-link-all-photos {
  color: #8c959f;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}
.wb-link-all-photos:hover {
  color: #9333ea;
}

/* WB Photo Strip (Screenshot 2) */
.wb-photo-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}
.wb-photo-strip-thumb {
  position: relative;
  width: 72px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}
.wb-photo-strip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}
.wb-photo-strip-thumb:hover img {
  transform: scale(1.05);
}
.wb-photo-count-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* WB Cards Horizontal Slider & WB Cards */
.wb-slider-wrapper {
  position: relative;
  margin-bottom: 20px;
}
.wb-cards-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.wb-cards-row::-webkit-scrollbar {
  height: 6px;
}
.wb-cards-row::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 99px;
}
.wb-card-review-item {
  min-width: 320px;
  max-width: 360px;
  background: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}
.wb-card-user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.wb-card-user-name {
  font-weight: 700;
  font-size: 14px;
  color: #1c1c1e;
}
.wb-card-user-date {
  font-size: 12px;
  color: #8c959f;
  margin-left: 6px;
  font-weight: 400;
}
.wb-card-stars {
  color: #ff9e00;
  font-size: 14px;
  letter-spacing: 1px;
}
.wb-card-text {
  font-size: 13px;
  color: #2d3748;
  line-height: 1.5;
  margin-bottom: 12px;
}
.wb-card-tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.wb-tag-chip {
  background: #f1f5f9;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* WB Questions Tab Specific (Screenshot 1) */
.wb-question-input-bar {
  background: #f4f5f7;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  color: #8c959f;
  margin-bottom: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.wb-card-question-item {
  min-width: 320px;
  max-width: 360px;
  background: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}
.wb-seller-answer-box {
  background: #f4f5f7;
  border-radius: 12px;
  padding: 12px;
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.5;
}
.wb-seller-title {
  font-weight: 700;
  color: #8c959f;
  margin-bottom: 4px;
}
.wb-seller-text {
  color: #2d3748;
}

/* WB Purple Action Buttons (Screenshot 1 & 2) */
.wb-purple-btn {
  background: #f5e6ff;
  color: #a827e1;
  font-weight: 700;
  font-size: 13px;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.wb-purple-btn:hover {
  background: #ebd0ff;
}

/* WB Mobile Cards Grid Layout (Screenshot 5) */
.wb-mobile-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.wb-mobile-card {
  background: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.wb-mobile-card:active {
  transform: scale(0.98);
}
.wb-mobile-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wb-mobile-score {
  font-size: 20px;
  font-weight: 900;
  color: #1c1c1e;
}
.wb-mobile-subtext {
  font-size: 11px;
  color: #8c959f;
  margin-top: 2px;
}

/* ==========================================================================
   WB REVIEW PHOTO LIGHTROOM / VIEWER MODAL (MATCHING SCREENSHOTS 3 & 4)
   ========================================================================== */

.wb-photo-modal-card {
  background: #ffffff;
  width: 95vw;
  max-width: 1180px;
  height: 90vh;
  max-height: 800px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.wb-photo-modal-header {
  height: 52px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  z-index: 10;
}
.wb-back-btn {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 700;
  color: #1c1c1e;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wb-back-btn:hover {
  color: #a827e1;
}
.wb-photo-modal-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  overflow: hidden;
}

/* Left Image Box with Floating Navigation Arrows */
.wb-modal-photo-col {
  background: #f8fafc;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
}
.wb-modal-main-img {
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
  border-radius: 8px;
}
.wb-nav-arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-size: 20px;
  font-weight: bold;
  color: #1c1c1e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: all 0.2s ease;
}
.wb-nav-arrow-btn:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.08);
}
.wb-nav-arrow-btn.prev {
  left: 16px;
}
.wb-nav-arrow-btn.next {
  right: 16px;
}

/* Right Details Panel */
.wb-modal-details-col {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  border-left: 1px solid var(--border);
}
.wb-modal-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.wb-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #64748b;
}
.wb-author-info {
  display: flex;
  flex-direction: column;
}
.wb-author-name {
  font-weight: 700;
  font-size: 15px;
  color: #1c1c1e;
}
.wb-author-meta {
  font-size: 12px;
  color: #8c959f;
}
.wb-variant-pill {
  font-size: 12px;
  color: #8c959f;
  margin-bottom: 12px;
}
.wb-modal-review-text-box {
  font-size: 13px;
  line-height: 1.6;
  color: #1c1c1e;
  margin-bottom: 20px;
}
.wb-text-section-title {
  font-weight: 700;
  margin-top: 10px;
  color: #1c1c1e;
}

/* Review Thumbnails Row inside Right Panel */
.wb-review-photos-thumbnails {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.wb-review-thumb-item {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
}
.wb-review-thumb-item.active {
  border-color: #a827e1;
}
.wb-review-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Seller Response Card in Modal */
.wb-modal-seller-response {
  background: #f4f5f7;
  border-radius: 12px;
  padding: 14px;
  font-size: 12px;
  line-height: 1.5;
  margin-top: auto;
}

@media (max-width: 768px) {
  .wb-photo-modal-body {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
  .wb-mobile-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   STAR RATING PICKER FOR SUBMITTING REVIEWS
   ========================================================================== */
.star-rating-picker {
  display: flex;
  gap: 6px;
  font-size: 26px;
  color: #d1d5db;
  cursor: pointer;
  user-select: none;
  margin: 6px 0 12px 0;
}
.star-rating-picker .star {
  transition: color 0.15s ease, transform 0.15s ease;
}
.star-rating-picker .star.active,
.star-rating-picker .star:hover,
.star-rating-picker .star.hovered {
  color: #ff9e00;
}
.star-rating-picker .star:hover {
  transform: scale(1.2);
}

/* ==========================================================================
   MOBILE 2-COLUMN PRODUCT GRID & COMPACT ELEMENTS
   ========================================================================== */
@media (max-width: 768px) {
  .site-header {
    padding: 8px 0 !important;
  }
  .header-inner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .header-main-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .brand-logo {
    gap: 6px !important;
  }
  .logo-icon {
    width: 34px !important;
    height: 34px !important;
    font-size: 18px !important;
  }
  .logo-title {
    font-size: 15px !important;
  }
  .logo-subtitle {
    display: none !important;
  }
  .header-actions {
    gap: 4px !important;
  }
  .action-btn {
    padding: 6px 8px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
  }
  .btn-label {
    font-size: 10px !important;
  }
  .search-box {
    width: 100% !important;
    max-width: 100% !important;
  }
  .search-box input {
    padding: 8px 30px 8px 34px !important;
    font-size: 13px !important;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 4px !important;
    width: calc(100% + 24px);
    margin-left: -12px;
  }
  .product-card {
    padding: 0 !important;
    border-radius: 12px !important;
  }
  .card-img-wrapper {
    height: 150px !important;
  }
  .card-title {
    font-size: 12px !important;
    line-height: 1.3 !important;
    height: auto !important;
    overflow: visible !important;
    overflow-wrap: anywhere;
    margin-bottom: 4px !important;
  }
  .card-sku {
    font-size: 10px !important;
  }
  .card-sizes-tags {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100%;
    min-width: 0;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    gap: 4px !important;
  }
  .card-info {
    padding: 8px 6px 6px;
    min-width: 0;
  }
  .product-card { min-width:0; }
  .card-sizes-tags::-webkit-scrollbar { display:none; width:0; height:0; }
  .card-sizes-slider { display:flex; align-items:flex-start; position:relative; width:calc(100% + 12px); margin:0 0 6px -6px; padding:0 0 7px; touch-action:pan-y; }
  .card-sizes-slider.has-overflow::after,
  .card-sizes-slider.has-overflow::before { content:''; position:absolute; bottom:0; height:3px; border-radius:3px; pointer-events:none; }
  .card-sizes-slider.has-overflow::after { left:2px; right:2px; background:#dbe2ea; }
  .card-sizes-slider.has-overflow::before { z-index:1; left:var(--size-scroll-thumb-left, 0); width:var(--size-scroll-thumb-width, 32px); background:#64748b; }
  .card-sizes-slider .card-sizes-tags { flex:1; width:0; }
  .card-sizes-slider {
    --size-fade-left-edge: #000;
    --size-fade-left-mid: #000;
    --size-fade-right-mid: #000;
    --size-fade-right-edge: #000;
  }
  .card-sizes-slider.fade-left {
    --size-fade-left-edge: transparent;
    --size-fade-left-mid: rgba(0,0,0,.28);
  }
  .card-sizes-slider.fade-right {
    --size-fade-right-mid: rgba(0,0,0,.28);
    --size-fade-right-edge: transparent;
  }
  .card-sizes-slider .card-sizes-tags {
    -webkit-mask-image: linear-gradient(to right,
      var(--size-fade-left-edge) 0,
      var(--size-fade-left-mid) 16px,
      #000 48px,
      #000 calc(100% - 48px),
      var(--size-fade-right-mid) calc(100% - 16px),
      var(--size-fade-right-edge) 100%);
    mask-image: linear-gradient(to right,
      var(--size-fade-left-edge) 0,
      var(--size-fade-left-mid) 16px,
      #000 48px,
      #000 calc(100% - 48px),
      var(--size-fade-right-mid) calc(100% - 16px),
      var(--size-fade-right-edge) 100%);
  }
  .card-sizes-tags .size-chip {
    padding: 0 1px !important;
    font-size: 13px !important;
    font-weight: 700;
    width: 40px !important;
    min-width: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    line-height: 38px !important;
    flex: 0 0 40px !important;
    scroll-snap-align: start;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
  .card-price-current {
    font-size: 15px !important;
  }
  .card-price-old {
    font-size: 11px !important;
  }
  .card-actions {
    flex-direction: column !important;
    gap: 8px !important;
    width: 100%;
  }
  .card-actions .btn-primary,
  .card-actions .btn-secondary {
    width: 100% !important;
    min-height: 44px;
    font-size: 14px !important;
    line-height: 20px;
    padding: 11px 4px !important;
  }

  .cart-modal-card {
    width: calc(100vw - 8px) !important;
    max-width: calc(100vw - 8px) !important;
    max-height: 96vh !important;
    padding: 14px 12px !important;
  }
  .cart-modal-card .modal-header {
    padding-right: 34px;
  }
  .cart-modal-card .modal-header h2 {
    font-size: 21px !important;
    line-height: 1.15;
  }
  .cart-items-list {
    min-width: 0;
  }
  .cart-item {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    grid-template-areas:
      "photo info remove"
      "photo quantity total";
    align-items: center;
    gap: 7px 8px;
    padding: 10px 0;
  }
  .cart-item-photo {
    grid-area: photo;
    width: 52px;
    height: 64px;
  }
  .cart-item-info {
    grid-area: info;
  }
  .cart-item-name {
    font-size: 12px;
    line-height: 1.3;
    overflow-wrap: break-word;
  }
  .cart-item-meta {
    font-size: 10px;
    line-height: 1.3;
  }
  .cart-item-quantity {
    grid-area: quantity;
    gap: 4px;
  }
  .cart-item-quantity button {
    width: 26px;
    height: 26px;
    padding: 0;
  }
  .cart-item-quantity span {
    width: 16px;
    font-size: 13px;
  }
  .cart-item-total {
    grid-area: total;
    width: auto;
    font-size: 13px;
  }
  .cart-item-remove {
    grid-area: remove;
    align-self: start;
    width: 24px;
    height: 28px;
    padding: 0;
  }
  .cart-added-notice {
    top: 50%;
    width: max-content;
    padding: 10px 13px;
    font-size: 13px;
  }

  /* Compact Categories & Subcategories */
  .category-navbar {
    padding: 6px 0 !important;
  }
  .navbar-inner {
    flex-wrap: wrap !important;
    gap: 6px !important;
    justify-content: center !important;
  }
  .nav-cat-link {
    font-size: 12px !important;
    padding: 4px 10px !important;
    border-radius: 99px !important;
  }
  .category-pills {
    margin-top: 8px !important;
    margin-bottom: 12px !important;
    gap: 4px !important;
    flex-wrap: wrap !important;
  }
  .cat-pill {
    font-size: 11px !important;
    padding: 4px 10px !important;
  }

  /* Hide bulky inline filters bar on mobile */
  .filter-controls-bar {
    display: none !important;
  }

  /* Sticky filter button only active when catalog section is reached */
  .mobile-sticky-filter-btn {
    position: fixed;
    top: 50%;
    right: 0;
    z-index: 980;
    background: var(--dark);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    padding: 16px 10px;
    border-radius: 0 12px 12px 0;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    display: none;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    transform: translateY(-50%) rotate(180deg);
    letter-spacing: 0.04em;
    cursor: pointer;
  }
  .mobile-sticky-filter-btn.visible {
    display: flex;
  }
}

/* Horizontal Quick Sizes Bar for Mobile */
.mobile-quick-sizes-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 10px 0;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.mobile-quick-sizes-bar::-webkit-scrollbar {
  display: none;
}
.quick-size-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.quick-size-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* ==========================================================================
   FLOATING MESSENGER WIDGET & SCROLL TO TOP STACK
   ========================================================================== */
.floating-widgets-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 990;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.scroll-top-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--dark);
  color: #ffffff;
  border: none;
  font-size: 18px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.scroll-top-btn:hover {
  background: #1e293b;
  transform: translateY(-2px);
}
.floating-messenger-container {
  position: relative;
}
.floating-messenger-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  border: none;
  font-size: 24px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}
.floating-messenger-btn:hover {
  transform: scale(1.08);
  background: #1d4ed8;
}
.floating-messenger-menu {
  position: absolute;
  bottom: 64px;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  padding: 12px;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 995;
  animation: popIn 0.2s ease-out;
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.messenger-menu-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  padding-left: 4px;
}
.msg-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  transition: background 0.15s ease;
}
.msg-menu-item:hover {
  background: #f1f5f9;
}
.msg-menu-item.tg { color: #0088cc; }
.msg-menu-item.wa { color: #25d366; }
.msg-menu-item.vk { color: #0077ff; }
.msg-menu-item.max { color: #9333ea; }
.msg-menu-item.phone { color: #16a34a; }
.messenger-error-note {
  margin-top: 4px;
  padding: 9px 8px 2px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

/* Responsive Model Features Placement */
@media (min-width: 769px) {
  .mobile-features-box { display: none !important; }
  .desktop-features-box { display: block !important; }
  .mobile-product-description { display:none !important; }
  .desktop-product-description { display:block !important; }
}
@media (max-width: 768px) {
  .mobile-features-box { display: block !important; }
  .desktop-features-box { display: none !important; }
  .mobile-product-description { display:block !important; }
  .desktop-product-description { display:none !important; }
  .top-banner-content { justify-content:center; text-align:center; }
  .top-banner-links { width:100%; justify-content:center; }
  .top-banner-delivery { justify-content:center; text-align:center; }
}

/* Admin Panel Vertical Column Sidebar Layout */
.admin-layout {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  align-items: flex-start;
}

.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.admin-tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.admin-tab-btn:hover {
  background: #edf2f7;
  color: var(--primary);
}

.admin-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.25);
}

.admin-content {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}
.admin-product-edit-form { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:16px; }
.admin-product-editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  margin: -4px 0 14px;
  padding: 4px 0 10px;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--border);
}
.admin-product-save-status { margin-right:auto; font-size:13px; font-weight:700; }
.admin-product-save-status.success { color:#15803d; }
.admin-product-save-status.error { color:#dc2626; }
.admin-product-save-btn:disabled { opacity:.65; cursor:wait; }
.admin-help { color:var(--text-muted); font-size:13px; margin:6px 0 14px; }
.admin-unique-content-header { display:flex; justify-content:space-between; align-items:end; gap:18px; margin-bottom:8px; }
.admin-unique-content-header p { color:var(--text-muted); font-size:13px; margin-top:5px; }
.admin-unique-search-label { width:min(430px, 100%); font-size:12px; font-weight:700; }
.admin-unique-content-transfer { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:12px 0 8px; }
.admin-unique-content-transfer-buttons { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.admin-unique-content-transfer-status { color:#166534; font-size:13px; font-weight:700; white-space:pre-line; text-align:right; }
.admin-unique-content-transfer-status.error { color:#b91c1c; }
.admin-unique-content-list { display:grid; gap:10px; }
.admin-unique-content-card { border:1px solid var(--border); border-radius:11px; background:#fff; overflow:hidden; }
.admin-unique-content-card[hidden] { display:none; }
.admin-unique-content-card > summary { cursor:pointer; padding:13px 15px; display:flex; justify-content:space-between; align-items:center; gap:14px; font-size:14px; }
.admin-unique-content-card > summary::marker { color:var(--primary); }
.admin-unique-content-badges { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.admin-status-badge { display:inline-flex; align-items:center; border-radius:999px; padding:4px 8px; font-size:11px; font-weight:800; white-space:nowrap; }
.admin-status-badge.available { color:#166534; background:#dcfce7; }
.admin-status-badge.archived { color:#991b1b; background:#fee2e2; }
.admin-status-badge.complete { color:#1e40af; background:#dbeafe; }
.admin-status-badge.empty { color:#854d0e; background:#fef9c3; }
.admin-unique-content-form { border-top:1px solid var(--border); background:#f8fafc; padding:15px; display:grid; gap:13px; }
.admin-unique-content-form label { font-size:13px; font-weight:800; }
.admin-unique-content-form label small { display:block; margin-top:4px; color:var(--text-muted); font-weight:400; }
.admin-unique-content-form textarea { resize:vertical; line-height:1.5; }
.admin-unique-content-actions { display:flex; align-items:center; justify-content:flex-end; gap:12px; }
.admin-unique-save-status { margin-right:auto; color:#15803d; font-size:12px; font-weight:700; }
.admin-unique-save-status.error { color:#dc2626; }
.admin-empty-state { padding:24px; color:var(--text-muted); text-align:center; border:1px dashed var(--border); border-radius:10px; }
.product-additional-description { margin-top:22px; padding-top:18px; border-top:1px solid var(--border); }
.product-additional-description .product-description-content p { margin:0 0 12px; }
.product-additional-description .product-description-content p:last-child { margin-bottom:0; }
.admin-delivery-form { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px; }
.admin-settings-card { background:#f8fafc; border:1px solid var(--border); border-radius:12px; padding:15px; display:grid; gap:9px; }
.admin-settings-card h5 { color:var(--primary); font-size:16px; margin:0 0 4px; }
.admin-settings-card label { font-size:12px; font-weight:700; }
.admin-settings-card textarea { min-height:82px; font-family:monospace; }
.admin-settings-wide { grid-column:1 / -1; }
.delivery-markup-table { display:grid; gap:7px; overflow-x:auto; }
.delivery-markup-head, .delivery-markup-row { display:grid; grid-template-columns:minmax(260px, 2fr) repeat(3, minmax(105px, .7fr)) 75px; gap:8px; align-items:center; min-width:750px; }
.delivery-markup-head { font-size:12px; color:var(--text-muted); font-weight:700; }
.delivery-markup-row { border-top:1px solid var(--border); padding-top:7px; font-size:13px; }
.delivery-markup-row input[type="number"] { width:100%; border:1px solid var(--border); border-radius:7px; padding:8px; }
.admin-checkbox { display:flex; align-items:center; gap:8px; }
.admin-sort-button { border:0; background:transparent; font:inherit; font-weight:800; color:inherit; cursor:pointer; padding:0; }
.admin-inline-sizes { width:145px; border:1px solid var(--border); border-radius:6px; padding:6px; font-size:12px; }
.admin-edit-icon { border:1px solid var(--border); background:#fff; border-radius:7px; width:34px; height:34px; cursor:pointer; font-size:16px; }
.sync-category-confirm { background:#fff7ed; border:1px solid #fdba74; border-radius:10px; padding:12px; margin:12px 0; }
.video-review-modal-card { width:min(920px,94vw); }
.video-review-frame-wrap { position:relative; width:100%; aspect-ratio:16/9; background:#000; }
.video-review-frame-wrap iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
.product-video-btn { cursor:pointer; border:0; }
.admin-categories-table input { min-width:140px; }
.sync-ok { background:#f0fdf4; color:#166534; border:1px solid #86efac; border-radius:9px; padding:10px; margin:12px 0; }
.sync-preview-list { display:grid; gap:8px; margin:12px 0; max-height:480px; overflow:auto; }
.sync-preview-list details { border:1px solid var(--border); border-radius:8px; padding:9px 11px; background:#fff; }
.sync-preview-list summary { cursor:pointer; }
.sync-preview-list li { margin:6px 0; overflow-wrap:anywhere; }
.sync-old { color:#b91c1c; text-decoration:line-through; }
.sync-new { color:#166534; }
.sync-action { margin-left:8px; border-radius:999px; padding:2px 7px; font-size:11px; }
.sync-action.created { background:#dcfce7; color:#166534; }
.sync-action.updated { background:#fef3c7; color:#92400e; }
.sync-apply-button { margin-top:12px; font-size:15px; padding:11px 18px; }
.sync-import-result { margin-top:12px; border:1px solid var(--border); border-radius:10px; padding:12px; background:#fff; }
.sync-import-result details { margin:7px 0; }
.sync-import-result details div { padding:7px 12px; color:var(--text-muted); overflow-wrap:anywhere; }
.delivery-default-dimensions { display:grid; grid-template-columns:repeat(4, minmax(120px, 1fr)); gap:10px; }

@media (max-width: 768px) {
  .admin-unique-content-header { align-items:stretch; flex-direction:column; }
  .admin-unique-content-transfer { align-items:stretch; flex-direction:column; }
  .admin-unique-content-transfer-buttons { display:grid; grid-template-columns:1fr 1fr; }
  .admin-unique-content-transfer-status { text-align:left; }
  .admin-unique-content-card > summary { align-items:flex-start; flex-direction:column; }
  .admin-unique-content-badges { justify-content:flex-start; }
  .admin-unique-content-actions { align-items:stretch; flex-direction:column; }
  .admin-unique-content-actions .btn-primary { width:100%; }
  .admin-delivery-form { grid-template-columns:1fr; }
  .delivery-default-dimensions { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
  }
  .admin-tab-btn {
    padding: 10px 12px;
    font-size: 13px;
  }
  .admin-product-edit-form { grid-template-columns:1fr; }
  .admin-product-editor-toolbar { align-items:stretch; flex-direction:column; }
  .admin-product-save-btn { width:100%; }
}
.server-seo-content {
  max-width: 1180px;
  margin: 24px auto;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
}

.server-seo-content img {
  width: min(100%, 420px);
  height: auto;
  object-fit: contain;
}
