/* ============================================
   STOREFRONT — Design System & Styles
   ============================================ */

/* --- CSS Variables (Design Constructor applies these) --- */
:root {
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-secondary: #475569;
  --color-accent: #f59e0b;
  --color-bg: #ffffff;
  --color-surface: #f8fafc;
  --color-surface-elevated: #ffffff;
  --color-border: #e2e8f0;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-success: #16a34a;
  --color-warning: #f59e0b;
  --color-error: #dc2626;

  --font-heading: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-size-base: 15px;

  --header-height: 72px;
  --logo-height: 40px;
  --radius: 4px;
  --radius-sm: 3px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  --container: 1240px;
  --transition: 0.2s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-primary-hover); }

img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Top Bar --- */
.topbar {
  background: var(--topbar-bg, #0f172a);
  color: var(--topbar-text, #94a3b8);
  font-size: 0.8rem;
  height: 45px;
  position: relative;
  z-index: 101;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.topbar-left {
  display: flex;
  gap: 2px;
}
.topbar-left a {
  color: var(--topbar-text, #94a3b8);
  padding: 5px 12px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  letter-spacing: 0.01em;
}
.topbar-left a:hover { color: #fff; background: rgba(255,255,255,0.07); }
.topbar-more {
  position: relative;
}
.topbar-more-btn {
  background: none;
  border: none;
  color: var(--topbar-text, #94a3b8);
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.82rem;
  letter-spacing: 2px;
  transition: color 0.15s, background 0.15s;
}
.topbar-more-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.07);
}
.topbar-more-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 102;
  padding: 6px 0;
  margin-top: 4px;
}
.topbar-more.open .topbar-more-dropdown {
  display: block;
}
.topbar-more-dropdown a {
  display: block;
  padding: 8px 16px;
  color: var(--color-text-secondary);
  font-size: 0.84rem;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.topbar-more-dropdown a:hover {
  background: var(--color-surface);
  color: var(--color-primary);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-email {
  color: var(--topbar-text, #94a3b8) !important;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
.topbar-email:hover { color: #fff !important; }
.topbar-email i { margin-right: 5px; font-size: 0.72rem; }
.topbar-phone {
  color: var(--topbar-text, #e2e8f0) !important;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.topbar-phone i { margin-right: 6px; font-size: 0.75rem; }

/* --- Header --- */
.header {
  background: var(--color-surface-elevated);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Row 1: Logo + Catalog Btn + Search + Actions */
.header-main {
  position: relative;
}
.header-main-inner {
  display: flex;
  align-items: center;
  height: 72px;
  gap: 16px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text);
  flex-shrink: 0;
}
.header-logo img {
  height: var(--logo-height);
  max-height: 48px;
  max-width: 180px;
  width: auto;
  object-fit: contain;
}
.header-logo svg.svg-colorized {
  height: var(--logo-height);
  max-height: 48px;
  max-width: 180px;
  width: auto;
}
.footer-brand-name svg.svg-colorized {
  height: 32px;
  max-width: 160px;
}
.header-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
}
.header-logo-text { white-space: nowrap; }

/* Catalog Button (marketplace style) */
.hdr-catalog-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 22px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 0;
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}
.hdr-catalog-btn:hover {
  background: var(--color-primary-hover, #1d4ed8);
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}
.hdr-catalog-btn.active {
  background: var(--color-primary-hover, #1d4ed8);
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}
.hdr-catalog-icon {
  width: 18px; height: 14px;
  display: flex; flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.hdr-catalog-icon span {
  display: block; width: 100%; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hdr-catalog-btn.active .hdr-catalog-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.hdr-catalog-btn.active .hdr-catalog-icon span:nth-child(2) {
  opacity: 0;
}
.hdr-catalog-btn.active .hdr-catalog-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Search (full-width, marketplace style) */
.header-search {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.header-search-form {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--color-border);
  border-radius: 0;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--color-surface);
}
.header-search-form:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}
.header-search input {
  flex: 1;
  width: 100%;
  padding: 10px 18px;
  border: none;
  background: transparent;
  font-size: 0.92rem;
  outline: none;
}
.header-search input::placeholder {
  color: #9ca3af;
}
.header-search-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  background: var(--color-primary);
  border: none;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.header-search-submit:hover { background: var(--color-primary-hover, #1d4ed8); }

/* Live Search Dropdown */
.live-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  z-index: 999;
  margin-top: 6px;
  overflow: hidden;
  display: none;
  max-height: 480px;
  overflow-y: auto;
}
.live-search-dropdown.active {
  display: block;
  animation: lsIn 0.15s ease;
}
@keyframes lsIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ls-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--color-text);
  transition: background 0.15s;
  border-bottom: 1px solid var(--color-border);
}
.ls-item:last-of-type { border-bottom: none; }
.ls-item:hover { background: var(--color-bg); }
.ls-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
.ls-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ls-info {
  flex: 1;
  min-width: 0;
}
.ls-name {
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ls-cat {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.ls-price {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.ls-current-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}
.ls-old-price {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-decoration: line-through;
}
.ls-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--color-primary);
  font-size: 0.88rem;
  font-weight: 500;
  border-top: 1px solid var(--color-border);
  transition: background 0.15s;
}
.ls-all:hover { background: var(--color-bg); }
.ls-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  padding: 0 6px;
}
.ls-empty {
  padding: 20px 14px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}
.live-search-dropdown.mobile {
  position: relative;
  margin-top: 0;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.header-contacts {
  flex-shrink: 0;
}
.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.header-phone i { color: var(--color-primary); font-size: 0.85rem; }
.header-phone:hover { color: var(--color-primary); }

/* Action buttons (marketplace style with labels) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.header-action-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 10px;
  color: #4b5563;
  font-size: 1.15rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.header-action-btn.has-label {
  width: auto;
  height: auto;
  flex-direction: column;
  gap: 2px;
  padding: 6px 12px;
  border-radius: 12px;
}
.header-action-btn:hover { background: var(--color-surface); color: var(--color-primary); }
.header-action-btn i { font-size: 1.2rem; }
.action-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: #6b7280;
  line-height: 1;
  transition: color var(--transition);
}
.header-action-btn:hover .action-label { color: var(--color-primary); }
.header-action-btn .badge {
  position: absolute;
  top: 0; right: 0;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-action-btn.mobile-only { display: none; }

/* Thin category links bar */
.header-navbar {
  display: none;
  background: var(--color-surface-elevated);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  transform: translateY(0);
  opacity: 1;
  max-height: 42px;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1),
              opacity 0.3s ease,
              max-height 0.35s cubic-bezier(0.4,0,0.2,1);
}
.header-navbar.navbar-hidden {
  transform: translateY(-100%);
  opacity: 0;
  max-height: 0;
  border-color: transparent;
}
.header-navbar-inner {
  display: flex;
  align-items: stretch;
  height: 40px;
}
.navbar-menu {
  display: flex;
  align-items: stretch;
  list-style: none;
  gap: 0;
  flex: 1;
  min-width: 0;
  position: relative;
}
.navbar-item {
  position: relative;
  flex-shrink: 0;
}
.navbar-item > a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 14px;
  color: #4b5563;
  font-weight: 500;
  font-size: 0.82rem;
  white-space: nowrap;
  transition: color 0.2s;
  position: relative;
}
.navbar-item > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px 2px 0 0;
  transform: scaleX(0);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.navbar-item > a:hover,
.navbar-item:hover > a {
  color: var(--color-primary);
}
.navbar-item > a:hover::after,
.navbar-item:hover > a::after {
  transform: scaleX(1);
}

/* "More" overflow dropdown */
.navbar-more { position: relative; overflow: visible !important; }
.navbar-more-toggle {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 14px;
  color: #4b5563;
  font-weight: 500;
  font-size: 0.82rem;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  background: none;
  border: none;
  font-family: inherit;
  gap: 5px;
}
.navbar-more-toggle:hover { color: var(--color-primary); background: rgba(37,99,235,0.04); }
.navbar-more-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-primary);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 120;
  padding: 8px 0;
}
.navbar-more:hover > .navbar-more-dropdown,
.navbar-more.open > .navbar-more-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.navbar-more-link {
  display: block;
  padding: 9px 18px;
  color: var(--color-text);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.navbar-more-link:hover {
  background: var(--color-surface);
  color: var(--color-primary);
}

/* ========== Mega Catalog (marketplace style) ========== */
.mega-catalog {
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  z-index: 200;
  background: #fff;
  border-top: 2px solid var(--color-primary);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  border-radius: 0 0 16px 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s cubic-bezier(0.4,0,0.2,1);
  max-height: 70vh;
  overflow: hidden;
}
.mega-catalog.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mega-catalog-inner {
  display: flex;
  min-height: 420px;
  max-height: 70vh;
}
.mega-catalog-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  padding: 8px 0;
  background: var(--color-surface);
}
.mega-cat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: var(--color-text);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  text-decoration: none;
  position: relative;
}
.mega-cat-item i:first-child {
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: color 0.15s;
}
.mega-cat-item span { flex: 1; }
.mega-cat-arrow {
  font-size: 0.6rem !important;
  color: #cbd5e1 !important;
  transition: color 0.15s, transform 0.15s !important;
}
.mega-cat-item:hover,
.mega-cat-item.active {
  background: #fff;
  color: var(--color-primary);
}
.mega-cat-item:hover i:first-child,
.mega-cat-item.active i:first-child {
  color: var(--color-primary);
}
.mega-cat-item.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--color-primary);
  border-radius: 0 3px 3px 0;
}
.mega-catalog-content {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
  position: relative;
}
.mega-cat-panel {
  display: none;
}
.mega-cat-panel.active {
  display: block;
  animation: megaPanelIn 0.2s ease;
}
@keyframes megaPanelIn {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.mega-cat-panel-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}
.mega-cat-panel-header a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-primary);
  transition: gap 0.2s;
}
.mega-cat-panel-header a:hover { gap: 12px; }
.mega-cat-panel-header a i { font-size: 0.7rem; }
.mega-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 24px;
}
.mega-cat-subitem {
  display: block;
  padding: 8px 12px;
  color: var(--color-text);
  font-size: 0.88rem;
  font-weight: 400;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.mega-cat-subitem:hover {
  background: var(--color-surface);
  color: var(--color-primary);
}

/* Old mega-dropdown (kept for reference / not used) */
.mega-dropdown { display: none; }
.mega-dropdown-inner { display: none; }
.mega-dropdown-link { display: none; }
.mega-dropdown-all { display: none; }

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}
.hamburger-icon span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* Mobile Search Bar */
.mobile-search-bar {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-surface-elevated);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  z-index: 101;
  padding: 10px 0;
}
.mobile-search-bar.active { display: block; }
.mobile-search-inner { display: flex; align-items: center; gap: 10px; }
.mobile-search-form { flex: 1; position: relative; }
.mobile-search-form i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--color-text-muted); font-size: 0.9rem; }
.mobile-search-form input { width: 100%; padding: 10px 16px 10px 40px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); font-size: 0.95rem; outline: none; }
.mobile-search-form input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.mobile-search-close { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: none; border: none; font-size: 1.15rem; color: var(--color-text-muted); border-radius: 50%; flex-shrink: 0; cursor: pointer; }
.mobile-search-close:hover { background: var(--color-surface); }

/* --- Mobile Menu Overlay --- */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }
.mobile-menu {
  position: absolute;
  top: 0;
  left: 0;
  width: min(340px, 85vw);
  height: 100%;
  background: #fff;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
}
.mobile-menu-overlay.active .mobile-menu { transform: translateX(0); }

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.mobile-menu-title { font-weight: 700; font-size: 1.1rem; color: var(--color-text); }
.mobile-menu-close {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; font-size: 1.2rem;
  color: var(--color-text-muted); border-radius: 50%;
  cursor: pointer; transition: background 0.15s;
}
.mobile-menu-close:hover { background: var(--color-surface); }

.mobile-menu-search {
  padding: 12px 20px;
  border-bottom: 1px solid var(--color-border);
}
.mobile-menu-search form {
  position: relative;
}
.mobile-menu-search i {
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--color-text-muted); font-size: 0.85rem;
}
.mobile-menu-search input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  font-size: 0.9rem;
  outline: none;
  box-sizing: border-box;
}
.mobile-menu-search input:focus { border-color: var(--color-primary); }

.mobile-menu-actions {
  padding: 8px 20px;
  display: flex;
  gap: 0;
  flex-direction: column;
}
.mobile-menu-action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--color-border);
}
.mobile-menu-action-item i { width: 20px; text-align: center; color: var(--color-text-muted); font-size: 1rem; }
.mobile-badge {
  margin-left: auto;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
}

.mobile-menu-divider {
  height: 1px;
  background: var(--color-border);
  margin: 4px 20px;
}

.mobile-menu-nav {
  padding: 4px 20px;
  display: flex;
  flex-direction: column;
}
.mobile-menu-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 500;
  border-bottom: 1px solid var(--color-border);
}
.mobile-menu-nav-link.catalog-link {
  color: var(--color-primary);
  font-weight: 700;
}
.mobile-menu-nav-link i { width: 18px; text-align: center; color: var(--color-text-muted); font-size: 0.9rem; }
.mobile-menu-nav-link.catalog-link i { color: var(--color-primary); }

.mobile-menu-category {
  position: relative;
  display: flex;
  flex-wrap: wrap;
}
.mobile-menu-category > .mobile-menu-nav-link {
  flex: 1;
  min-width: 0;
}
.mobile-menu-toggle {
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.7rem;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}
.mobile-menu-toggle:hover { color: var(--color-primary); }
.mobile-menu-category.open > .mobile-menu-toggle i { transform: rotate(180deg); }

.mobile-menu-sub {
  width: 100%;
  display: none;
  flex-direction: column;
  padding-left: 28px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.mobile-menu-category.open > .mobile-menu-sub { display: flex; }
.mobile-menu-sub a {
  padding: 10px 14px;
  color: var(--color-text);
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: color 0.15s;
}
.mobile-menu-sub a:last-child { border-bottom: none; }
.mobile-menu-sub a:hover { color: var(--color-primary); }

.mobile-menu-pages {
  padding: 4px 20px;
  display: flex;
  flex-direction: column;
}
.mobile-menu-pages a {
  padding: 10px 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--color-border);
}
.mobile-menu-pages a:hover { color: var(--color-primary); }

.mobile-menu-footer {
  margin-top: auto;
  padding: 16px 20px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}
.mobile-menu-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text) !important;
  margin-bottom: 8px;
}
.mobile-menu-phone i { color: var(--color-primary); }
.mobile-menu-email,
.mobile-menu-hours {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.mobile-menu-email i,
.mobile-menu-hours i { width: 16px; text-align: center; font-size: 0.75rem; }

/* --- Hero / Banner --- */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
  color: #fff;
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}
.hero.hero-with-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero.hero-with-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,23,42,0.75) 0%, rgba(15,23,42,0.35) 100%);
}
.hero.hero-with-image .hero-inner { position: relative; z-index: 1; }
.hero-inner {
  display: flex;
  align-items: center;
  gap: 48px;
}
.hero-content { flex: 1; }
.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  line-height: 1.15;
}
.hero-content p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 28px;
  max-width: 500px;
}
.hero-image {
  flex: 1;
  text-align: center;
}
.hero-image-placeholder {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4/3;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin: 0 auto;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-hover); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-white {
  background: #fff;
  color: var(--color-primary);
}
.btn-white:hover { background: #f1f5f9; color: var(--color-primary); }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
}
.btn-block { width: 100%; }

/* --- Section --- */
.section {
  padding: 56px 0;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-header h2 {
  font-size: 1.5rem;
}

/* --- Home Reviews --- */
.home-reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.home-review-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s;
}
.home-review-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.home-review-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.home-review-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.home-review-author {
  font-weight: 600;
  font-size: 0.9rem;
}
.home-review-date {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.home-review-stars {
  color: #f59e0b;
  font-size: 0.8rem;
  display: flex;
  gap: 2px;
}
.home-review-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
}
.home-review-product {
  font-size: 0.78rem;
  color: var(--color-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}
.home-review-product:hover {
  text-decoration: underline;
}
@media (max-width: 1024px) {
  .home-reviews-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .home-reviews-grid { grid-template-columns: 1fr; }
}

/* --- Product Card --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.product-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 16px 0;
  min-height: 28px;
}
.product-card-top > .compare-card-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: #fff;
  color: #9ca3af;
  font-size: 0.72rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.product-card-top > .compare-card-btn:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.product-card-top > .compare-card-btn.active {
  color: #fff;
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.product-card-badges {
  display: flex;
  gap: 6px;
}
.product-badge {
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
}
.badge-new { background: var(--color-primary); color: #fff; }
.badge-sale { background: var(--color-error); color: #fff; }
.badge-hit { background: var(--color-accent); color: #fff; }
.product-card-image {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  color: var(--color-text-muted);
  font-size: 2.5rem;
  overflow: hidden;
}
.product-card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.product-card-body {
  padding: 0 16px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-card-category {
  font-size: 0.78rem;
  color: #999;
  margin-bottom: 4px;
}
.product-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-title a {
  color: var(--color-text);
  text-decoration: none;
}
.product-card-title a:hover { color: var(--color-primary); }
.product-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.product-card-price-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.price-old {
  font-size: 0.82rem;
  color: #aaa;
  text-decoration: line-through;
  line-height: 1.2;
}
.price-current {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
}
.product-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.product-card-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: #fff;
  color: #555;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.product-card-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(37,99,235,0.04);
}
.product-card-btn.cart-btn:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.product-card-stock-out {
  font-size: 0.78rem;
  color: #aaa;
  margin-left: auto;
}

/* Wishlist button as card action icon */
.wishlist-card-btn {
  color: #bbb;
}
.wishlist-card-btn:hover {
  color: var(--color-error) !important;
  border-color: var(--color-error) !important;
  background: rgba(239,68,68,0.04) !important;
}
.wishlist-card-btn.active {
  color: var(--color-error);
  border-color: var(--color-error);
}
.compare-card-btn.active {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.product-action-icon.active[title="Сравнить"] {
  color: var(--color-primary);
}
/* Cart button added state */
.cart-btn.added {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Wishlist button on product page */
.wishlist-btn-page {
  flex-shrink: 0;
  width: 52px;
  min-width: 52px;
  padding: 0;
  font-size: 1.2rem;
  color: var(--color-text-muted);
  transition: all 0.2s ease;
}
.wishlist-btn-page.active,
.wishlist-btn-page:hover { color: var(--color-error); border-color: var(--color-error); }

/* Wishlist page */
.wishlist-count-text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-state i {
  font-size: 3.5rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  display: block;
}
.empty-state h2 {
  margin-bottom: 8px;
  font-size: 1.3rem;
}
.empty-state p {
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

/* --- Compare Page --- */
.compare-count-text {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.compare-wrap {
  margin-bottom: 40px;
}
.compare-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-bottom: none;
}
.compare-col {
  background: #fff;
}
.compare-product-card {
  position: relative;
  text-align: center;
  padding: 20px 12px 16px;
}
.compare-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.compare-remove-btn:hover {
  color: #fff;
  background: var(--color-error);
  border-color: var(--color-error);
}
.compare-product-img {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
}
.compare-product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.compare-product-img i {
  font-size: 2.5rem;
  color: var(--color-text-muted);
  line-height: 120px;
}
.compare-product-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 8px;
  line-height: 1.35;
  transition: color 0.2s;
}
.compare-product-name:hover {
  color: var(--color-primary);
}
.compare-product-price {
  margin-bottom: 10px;
}
.compare-product-price .price-current {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-heading);
}
.compare-product-price .price-old {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-decoration: line-through;
  display: block;
  margin-bottom: 2px;
}
.compare-cart-btn {
  font-size: 0.82rem;
  padding: 7px 16px;
}
.compare-out-of-stock {
  font-size: 0.82rem;
  color: var(--color-error);
}

/* Characteristics */
.compare-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-heading);
  padding: 18px 0 10px;
  border-bottom: 2px solid var(--color-heading);
  margin-bottom: 0;
}
.compare-row {
  border-bottom: 1px solid var(--color-border);
}
.compare-row-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 12px 0 2px;
}
.compare-row-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
}
.compare-val {
  font-size: 0.9rem;
  color: var(--color-heading);
  font-weight: 500;
  padding: 2px 0 12px;
}

/* --- Categories Grid --- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.category-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  transition: all var(--transition);
}
.category-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.category-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
}
.category-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}
.category-card-count {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* --- Catalog Categories Page --- */
.page-heading {
  font-size: 2rem;
  margin-bottom: 28px;
}
.catalog-categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.catalog-cat-card {
  display: block;
  padding: 24px 20px;
  text-align: left;
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: all var(--transition);
  color: var(--color-text);
}
.catalog-cat-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--color-text);
}
.catalog-cat-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
.catalog-cat-header .category-card-icon {
  margin: 0;
  flex-shrink: 0;
}
.catalog-cat-info { min-width: 0; }
.catalog-cat-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}
.catalog-cat-count {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.catalog-cat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.catalog-cat-tag {
  padding: 3px 10px;
  font-size: 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.catalog-cat-tag-more {
  padding: 3px 10px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* --- Subcategory Tiles --- */
.subcategory-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.subcategory-tile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
  max-width: 100%;
}
.subcategory-tile:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(37,99,235,0.04);
}
.subcategory-tile-count {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  background: var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1px 7px;
  font-weight: 600;
  min-width: 22px;
  text-align: center;
}
.subcategory-tile:hover .subcategory-tile-count {
  background: rgba(37,99,235,0.1);
  color: var(--color-primary);
}

/* --- Price Slider --- */
.price-slider-wrap { margin-bottom: 4px; }
.price-slider-track {
  position: relative;
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  margin: 18px 0 20px;
}
.price-slider-range {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--color-primary);
  border-radius: 3px;
}
.price-slider-thumb {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  margin: 0;
  height: 6px;
}
.price-slider-thumb::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  background: #fff;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  transition: box-shadow 0.15s;
}
.price-slider-thumb::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
}
.price-slider-thumb::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: #fff;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.price-inputs {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.price-input-box {
  flex: 1;
  position: relative;
}
.price-input-label { display: none; }
.price-input-box input {
  width: 100%;
  padding: 12px 14px;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
  background: transparent;
}
.price-input-box input:focus { background: var(--color-surface); }
.price-input-sep {
  font-size: 0;
  flex-shrink: 0;
  width: 1px;
  align-self: stretch;
  background: var(--color-border);
}

/* --- Filter group collapse --- */
.filter-group.collapsed .filter-group-body { display: none; }
.filter-group.collapsed .arrow i { transform: rotate(0deg) !important; }
.arrow i { transition: transform 0.2s; }

.filter-search-wrap { margin-bottom: 10px; }
.filter-search {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition);
}
.filter-search:focus { border-color: var(--color-primary); }
.filter-options-scroll.has-scroll {
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.filter-options-scroll.has-scroll::-webkit-scrollbar { width: 4px; }
.filter-options-scroll.has-scroll::-webkit-scrollbar-track { background: transparent; }
.filter-options-scroll.has-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.filter-options-scroll.expanded { max-height: none; }
.filter-toggle-all {
  display: inline-block;
  margin-top: 8px;
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.filter-toggle-all:hover { text-decoration: underline; }

/* --- Filter popup (next to checkbox) --- */
.products-wrap { position: relative; }
.filter-popup {
  position: absolute;
  z-index: 2000;
  background: var(--color-primary);
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-8px);
  transition: opacity 0.2s, transform 0.2s ease-out;
}
.filter-popup.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(-50%) translateX(0);
}
.filter-popup:hover {
  background: var(--color-primary-hover, #1d4ed8);
  box-shadow: 0 6px 24px rgba(37,99,235,0.4);
}
.filter-popup i {
  font-size: 0.75rem;
  transition: transform 0.2s;
}
.filter-popup:hover i {
  transform: translateX(2px);
}

/* --- Mobile filter button --- */
.mobile-filter-btn { display: none; }
.filter-sidebar-apply { display: none; }

/* --- Filter overlay (mobile) --- */
.filter-overlay {
  display: none;
}

/* --- Advantages / Features --- */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.advantage-item {
  text-align: center;
  padding: 28px 16px;
}
.advantage-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  background: rgba(37,99,235,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 1.3rem;
}
.advantage-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.advantage-text {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* --- Catalog Page --- */
.catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
}
.catalog-layout .product-grid {
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
}

/* Sidebar Filters */
.filters-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
}
.filter-group {
  margin-bottom: 0;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
}
.filter-group:first-child { padding-top: 4px; }
.filter-group-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 2px 0;
}
.filter-group-title .arrow { font-size: 0.65rem; color: var(--color-text-muted); }
.filter-group:not(.collapsed) .arrow i { transform: rotate(180deg); }
.filter-group-body { margin-top: 16px; }

.filter-checkbox {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  justify-content: space-between;
  padding: 10px 0;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--color-text);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.filter-checkbox:last-child { border-bottom: none; }
.filter-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  cursor: pointer;
}

/* Price Range */
.price-range {
  display: flex;
  gap: 10px;
  align-items: center;
}
.price-range input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
}
.price-range input:focus { border-color: var(--color-primary); }
.price-range span { color: var(--color-text-muted); font-size: 0.85rem; }

/* Toolbar */
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0;
  gap: 12px;
}
.catalog-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.catalog-toolbar-left::-webkit-scrollbar { display: none; }
.catalog-sort-tabs {
  display: flex;
  gap: 0;
}
.catalog-sort-tab {
  padding: 10px 18px;
  font-size: 0.88rem;
  color: #888;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.catalog-sort-tab:hover {
  color: var(--color-text);
}
.catalog-sort-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 500;
}
.catalog-sort-select {
  display: none;
  align-items: center;
  gap: 8px;
  position: relative;
}
.catalog-sort-select i {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}
.catalog-sort-select select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm, 6px);
  padding: 8px 32px 8px 12px;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--color-text);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}
.catalog-sort-select select:focus {
  border-color: var(--color-primary);
}
.catalog-toolbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding-bottom: 8px;
}
.catalog-count {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-right: 8px;
  display: none;
}
.catalog-view-toggle {
  display: flex;
  gap: 2px;
}
.catalog-view-toggle button {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: #ccc;
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.2s;
}
.catalog-view-toggle button:hover { color: #888; }
.catalog-view-toggle button.active {
  color: var(--color-text);
}

/* --- List View --- */
.product-grid.list-view {
  grid-template-columns: 1fr;
  gap: 16px;
}
.product-grid.list-view .product-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-rows: auto 1fr;
}
.product-grid.list-view .product-card-top {
  grid-column: 1 / -1;
  padding: 8px 16px 0;
}
.product-grid.list-view .product-card-image {
  grid-row: 2;
  aspect-ratio: 1;
  padding: 12px;
}
.product-grid.list-view .product-card-body {
  grid-row: 2;
  padding: 12px 20px 16px;
  display: flex;
  flex-direction: column;
}
.product-grid.list-view .product-card-title {
  -webkit-line-clamp: 1;
  font-size: 1.05rem;
}
.product-grid.list-view .price-current {
  font-size: 1.4rem;
}
.product-grid.list-view .product-card-actions {
  margin-top: auto;
}
.product-grid.list-view .wishlist-btn {
  top: 8px;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
}
.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background: #fff;
  transition: all var(--transition);
}
.pagination a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.pagination .active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.pagination .dots {
  border: none;
  background: none;
  color: var(--color-text-muted);
}

/* --- Product Page --- */
.product-page {
  padding: 20px 0 56px;
}
.product-layout-3col {
  display: grid;
  grid-template-columns: 400px 1fr 320px;
  gap: 36px;
  align-items: start;
}
.product-layout-3col > * { min-width: 0; }
.product-gallery {
  position: sticky;
  top: calc(var(--header-height) + 20px);
}
.product-gallery-main {
  aspect-ratio: 1;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
}
.product-gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.product-gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 0;
}
.product-gallery-thumbs::-webkit-scrollbar { display: none; }
.product-gallery-thumb {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  font-size: 1.2rem;
  color: var(--color-text-muted);
  overflow: hidden;
}
.product-gallery-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}
.product-gallery-thumb.active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}
.product-gallery-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.gallery-counter {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}
.gallery-arrows {
  display: flex;
  gap: 6px;
}
.gallery-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.72rem;
  transition: all 0.2s;
}
.gallery-arrow:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(37,99,235,0.04);
}
.product-gallery-main:hover {
  border-color: var(--color-primary);
}
.gallery-zoom-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.product-gallery-main:hover .gallery-zoom-hint {
  opacity: 1;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  z-index: 10;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.1); }
.lightbox-content {
  max-width: 85vw;
  max-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 1.3rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-counter {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  font-weight: 500;
}
.lightbox-thumbs {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  max-width: 80vw;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px;
}
.lightbox-thumbs::-webkit-scrollbar { display: none; }
.lightbox-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.2);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, opacity 0.2s;
  opacity: 0.6;
}
.lightbox-thumb.active {
  border-color: #fff;
  opacity: 1;
}
.lightbox-thumb:hover { opacity: 0.9; }
.lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.1rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-content { max-width: 95vw; max-height: 70vh; }
  .lightbox-content img { max-height: 70vh; }
  .lightbox-thumb { width: 44px; height: 44px; }
  .lightbox-close { top: 10px; right: 10px; font-size: 1.8rem; }
}

/* Center column */
.product-center {}
.product-badges-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.product-badges-row .product-badge {
  padding: 4px 14px;
  font-size: 0.72rem;
}
.product-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--color-text);
}
.product-meta-line {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.product-sku {
  color: #999;
}

/* Characteristics preview */
.product-chars-preview {
  margin-bottom: 24px;
}
.product-chars-preview-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--color-text);
}
.product-chars-preview-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  font-size: 0.88rem;
  line-height: 1.5;
}
.chars-preview-name {
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}
.chars-preview-sep {
  flex: 1;
  border-bottom: 1px dotted #ddd;
  min-width: 20px;
  align-self: baseline;
  margin-bottom: 4px;
}
.chars-preview-value {
  font-weight: 600;
  color: var(--color-text);
  text-align: right;
}
.chars-preview-more {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.chars-preview-more:hover { text-decoration: none; }

/* Right sidebar */
.product-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
}
.product-sidebar-card {
  background: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06), 0 0 1px rgba(0,0,0,0.04);
}
.product-price-block {
  margin-bottom: 20px;
}
.price-main-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.product-price-current {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.price-currency {
  font-size: 1.4rem;
  font-weight: 700;
  margin-left: 2px;
}
.product-price-old {
  display: block;
  font-size: 0.9rem;
  color: #b0b0b0;
  text-decoration: line-through;
  margin-top: 4px;
}
.product-discount-badge {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(239,68,68,0.3);
}
.product-buy-form {}
.product-qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.product-qty {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}
.product-qty:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}
.product-qty button {
  width: 36px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  user-select: none;
}
.product-qty button:hover {
  background: rgba(0,0,0,0.04);
  color: var(--color-text);
}
.product-qty button:active {
  background: rgba(37,99,235,0.08);
  color: var(--color-primary);
}
.product-qty input {
  width: 40px;
  height: 40px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  font-weight: 700;
  font-size: 0.95rem;
  outline: none;
  background: transparent;
  color: var(--color-text);
  -moz-appearance: textfield;
}
.product-qty input::-webkit-outer-spin-button,
.product-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.product-action-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: #c0c0c0;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  flex-shrink: 0;
}
.product-action-icon:hover { color: var(--color-error); border-color: var(--color-error); background: rgba(239,68,68,0.04); }
.product-action-icon.active { color: var(--color-error); border-color: var(--color-error); }
.product-buy-btn {
  width: 100%;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.product-buy-btn:hover {
  box-shadow: 0 4px 12px rgba(37,99,235,0.2);
}
.product-buy-btn.added-to-cart {
  background: var(--color-success, #16a34a);
  border-color: var(--color-success, #16a34a);
}
.product-buy-btn.added-to-cart:hover {
  background: #15803d;
  border-color: #15803d;
  box-shadow: 0 4px 12px rgba(22,163,74,0.25);
}
.product-messenger-order {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.messenger-order-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}
.messenger-order-btn:hover {
  border-color: var(--color-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.messenger-order-btn:active { transform: scale(0.98); }
.messenger-order-btn .messenger-logo {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 4px;
  object-fit: contain;
}
.messenger-max:hover {
  border-color: #0077FF;
  color: #0077FF;
}
.messenger-telegram:hover {
  border-color: #2AABEE;
  color: #2AABEE;
}

.product-info-list {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.product-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  transition: background 0.15s, color 0.15s;
}
a.product-info-item {
  text-decoration: none;
  color: var(--color-text-muted);
}
a.product-info-item:hover {
  background: rgba(0,0,0,0.03);
  color: var(--color-primary);
}
a.product-info-item:hover i { color: var(--color-primary); }
.product-info-item i {
  font-size: 0.85rem;
  width: 18px;
  text-align: center;
  color: rgba(0,0,0,0.25);
  transition: color 0.15s;
}
.product-info-item .info-success { color: var(--color-success); font-weight: 600; }
.product-info-item .info-success ~ i,
.product-info-item:first-child i { color: var(--color-success); }
.product-info-item .info-muted { color: var(--color-text-muted); }
.product-sidebar-note {
  margin-top: 14px;
  font-size: 0.73rem;
  color: rgba(0,0,0,0.3);
  line-height: 1.5;
}

/* Product tabs section */
.product-tabs-section {
  margin-top: 48px;
  border-top: 1px solid var(--color-border);
  padding-top: 8px;
}

/* Product description typography */
.product-description {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--color-text);
  padding: 8px 0 16px;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.product-description p {
  margin-bottom: 18px;
}
.product-description p:last-child { margin-bottom: 0; }
.product-description h2,
.product-description h3,
.product-description h4 {
  margin-top: 28px;
  margin-bottom: 12px;
  line-height: 1.4;
  color: var(--color-text);
}
.product-description h2 { font-size: 1.25rem; }
.product-description h3 { font-size: 1.1rem; }
.product-description h4 { font-size: 1rem; }
.product-description strong,
.product-description b {
  font-weight: 700;
  color: var(--color-text);
}
.product-description ul,
.product-description ol {
  margin: 16px 0;
  padding-left: 0;
  list-style: none;
}
.product-description ul li,
.product-description ol li {
  position: relative;
  padding: 4px 0 4px 24px;
  line-height: 1.7;
}
.product-description ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-text-muted);
}
.product-description ol {
  counter-reset: desc-counter;
}
.product-description ol li {
  counter-increment: desc-counter;
}
.product-description ol li::before {
  content: counter(desc-counter) '.';
  position: absolute;
  left: 0;
  font-weight: 600;
  color: var(--color-text-muted);
}
.product-description a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.product-description a:hover { text-decoration: none; }
.product-description table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9rem;
  table-layout: fixed;
}
.product-description .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.product-description table th,
.product-description table td {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  text-align: left;
  word-break: break-word;
  overflow-wrap: break-word;
}
.product-description table th {
  background: var(--color-surface);
  font-weight: 600;
}
.product-description table tr:nth-child(even) td {
  background: var(--color-surface);
}
.product-description img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 12px 0;
}
.product-description blockquote {
  margin: 16px 0;
  padding: 12px 20px;
  border-left: 3px solid var(--color-primary);
  background: var(--color-surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-secondary);
}

.product-short-desc {
  font-size: 0.95rem;
  color: var(--color-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}
.product-short-desc p { margin-bottom: 12px; }
.product-short-desc p:last-child { margin-bottom: 0; }
.product-short-desc h2,
.product-short-desc h3,
.product-short-desc h4 {
  margin-top: 20px;
  margin-bottom: 8px;
  line-height: 1.4;
  color: var(--color-text);
}
.product-short-desc h2 { font-size: 1.15rem; }
.product-short-desc h3 { font-size: 1.05rem; }
.product-short-desc strong,
.product-short-desc b { font-weight: 700; color: var(--color-text); }
.product-short-desc ul,
.product-short-desc ol { margin: 12px 0; padding-left: 0; list-style: none; }
.product-short-desc ul li,
.product-short-desc ol li {
  position: relative;
  padding: 3px 0 3px 24px;
  line-height: 1.7;
}
.product-short-desc ul li::before { content: '—'; position: absolute; left: 0; color: var(--color-text-muted); }
.product-short-desc ol { counter-reset: sd-counter; }
.product-short-desc ol li { counter-increment: sd-counter; }
.product-short-desc ol li::before {
  content: counter(sd-counter) '.';
  position: absolute; left: 0; font-weight: 600; color: var(--color-text-muted);
}
.product-short-desc a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }
.product-short-desc a:hover { text-decoration: none; }
.product-short-desc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.9rem; }
.product-short-desc table th,
.product-short-desc table td { padding: 8px 12px; border: 1px solid var(--color-border); text-align: left; }
.product-short-desc table th { background: var(--color-surface); font-weight: 600; }
.product-short-desc img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 8px 0; }
.product-short-desc blockquote {
  margin: 12px 0; padding: 10px 16px;
  border-left: 3px solid var(--color-primary);
  background: var(--color-surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic; color: var(--color-secondary);
}

/* Product Characteristics */
.product-chars-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
.product-chars-table tr { border-bottom: 1px solid var(--color-border); }
.product-chars-table td {
  padding: 10px 0;
  font-size: 0.9rem;
}
.product-chars-table td:first-child {
  color: var(--color-text-muted);
  width: 40%;
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb .sep { font-size: 0.7rem; }

/* --- Tabs --- */
.tabs {
  border-bottom: 2px solid var(--color-border);
  display: flex;
  gap: 0;
  margin-bottom: 24px;
}
.tab {
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}
.tab:hover { color: var(--color-text); }
.tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* --- Cart --- */
.cart-page { padding: 32px 0 56px; }
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}
.cart-items { display: flex; flex-direction: column; gap: 1px; }
.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}
.cart-item-image {
  width: 80px;
  height: 80px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  flex-shrink: 0;
  overflow: hidden;
}
.cart-item-info { flex: 1; min-width: 120px; }
.cart-item-info h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.cart-item-info h4 a { color: var(--color-text); text-decoration: none; }
.cart-item-info h4 a:hover { color: var(--color-primary); }
.cart-item-info p { font-size: 0.8rem; color: var(--color-text-muted); margin: 0; }
.cart-item-price { font-weight: 700; font-size: 1.05rem; white-space: nowrap; min-width: 100px; text-align: right; }
.cart-item-remove {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  padding: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.cart-item-remove:hover { color: var(--color-error); }

/* Cart Summary */
.cart-summary {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky;
  top: calc(var(--header-height) + 20px);
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.cart-summary h3 { font-size: 1.1rem; margin-bottom: 20px; }
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.9rem;
}
.cart-summary-row > span:first-child {
  flex-shrink: 0;
}
.cart-summary-row > span:last-child {
  text-align: right;
}
.cart-summary-row.total {
  border-top: 2px solid var(--color-border);
  margin-top: 12px;
  padding-top: 16px;
  font-size: 1.15rem;
  font-weight: 800;
}

/* --- Checkout --- */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  align-items: start;
}
.form-section {
  margin-bottom: 32px;
}
.form-section h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.form-row.full { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-secondary);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }

/* Radio cards */
.radio-cards { display: flex; flex-direction: column; gap: 10px; }
.radio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.radio-card:hover { border-color: var(--color-primary); }
.radio-card.selected {
  border-color: var(--color-primary);
  background: rgba(37,99,235,0.03);
}
.radio-card input[type="radio"] { accent-color: var(--color-primary); }
.radio-card-content { flex: 1; }
.radio-card-title { font-weight: 600; font-size: 0.9rem; }
.radio-card-desc { font-size: 0.8rem; color: var(--color-text-muted); }
.radio-card-price { font-weight: 700; white-space: nowrap; }

/* --- Footer --- */
.footer {
  margin-top: auto;
  background: var(--footer-bg, #0f172a);
  color: var(--footer-text, #cbd5e1);
  padding: 48px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand { }
.footer-brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.7;
  max-width: 320px;
}
.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: var(--footer-text, #94a3b8);
  font-size: 0.85rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: #fff; }
.footer-contacts p {
  font-size: 0.85rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #64748b;
}
.footer-company {
  display: inline;
  margin-left: 6px;
  opacity: 0.7;
}

/* --- Thank You Page --- */
.thankyou {
  text-align: center;
  padding: 80px 20px;
}
.thankyou-icon {
  width: 80px;
  height: 80px;
  background: rgba(22,163,74,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 2.5rem;
  color: var(--color-success);
}
.thankyou h1 { font-size: 2rem; margin-bottom: 12px; }
.thankyou p { color: var(--color-text-muted); font-size: 1rem; max-width: 500px; margin: 0 auto 28px; }

/* --- 404 Page --- */
.page-404 {
  text-align: center;
  padding: 80px 20px;
}
.page-404 h1 { font-size: 6rem; font-weight: 900; color: var(--color-primary); margin-bottom: 8px; }
.page-404 h2 { font-size: 1.5rem; margin-bottom: 12px; }
.page-404 p { color: var(--color-text-muted); margin-bottom: 28px; }

/* --- Static Pages --- */
.static-page { padding: 40px 0 60px; }
.static-page h1 { font-size: 2rem; margin-bottom: 24px; }
.static-page .content {
  max-width: 800px;
  line-height: 1.85;
  font-size: 0.95rem;
  color: var(--color-text);
}
.static-page .content p { margin-bottom: 18px; }
.static-page .content p:last-child { margin-bottom: 0; }
.static-page .content h2,
.static-page .content h3,
.static-page .content h4 {
  margin-top: 28px;
  margin-bottom: 12px;
  line-height: 1.4;
  color: var(--color-text);
}
.static-page .content h2 { font-size: 1.4rem; }
.static-page .content h3 { font-size: 1.2rem; }
.static-page .content h4 { font-size: 1.05rem; }
.static-page .content strong,
.static-page .content b {
  font-weight: 700;
  color: var(--color-text);
}
.static-page .content ul,
.static-page .content ol {
  margin: 16px 0;
  padding-left: 0;
  list-style: none;
}
.static-page .content ul li,
.static-page .content ol li {
  position: relative;
  padding: 4px 0 4px 24px;
  line-height: 1.7;
}
.static-page .content ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-text-muted);
}
.static-page .content ol {
  counter-reset: page-counter;
}
.static-page .content ol li {
  counter-increment: page-counter;
}
.static-page .content ol li::before {
  content: counter(page-counter) '.';
  position: absolute;
  left: 0;
  font-weight: 600;
  color: var(--color-text-muted);
}
.static-page .content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.static-page .content a:hover { text-decoration: none; }
.static-page .content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9rem;
}
.static-page .content table th,
.static-page .content table td {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  text-align: left;
}
.static-page .content table th {
  background: var(--color-surface);
  font-weight: 600;
}
.static-page .content table tr:nth-child(even) td {
  background: var(--color-surface);
}
.static-page .content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 12px 0;
}
.static-page .content blockquote {
  margin: 16px 0;
  padding: 12px 20px;
  border-left: 3px solid var(--color-primary);
  background: var(--color-surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-secondary);
}
.static-page .content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 28px 0;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .categories-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-content p { margin: 0 auto 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .navbar-item > a { padding: 0 10px; font-size: 0.83rem; }
  .header-contacts { display: none; }
  .product-layout-3col {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .product-gallery {
    position: static;
    min-width: 0;
  }
  .product-sidebar {
    grid-column: 1 / -1;
    position: static !important;
  }
  .product-sidebar-card {
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .catalog-layout { grid-template-columns: 1fr; min-width: 0; overflow: hidden; }
  .catalog-layout > * { min-width: 0; }
  .filters-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(340px, 85vw);
    height: 100%;
    background: #fff;
    z-index: 201;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.32,0.72,0,1);
    overflow-y: auto;
    padding: 20px;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
  }
  .filters-sidebar.open { transform: translateX(0); }
  .filter-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }
  .filter-overlay.active { opacity: 1; visibility: visible; }
  .filter-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: min(340px, 85vw);
    z-index: 202;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
  }
  .filter-overlay-title { font-weight: 700; font-size: 1.1rem; }
  .filter-overlay-close {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; font-size: 1.2rem;
    color: var(--color-text-muted); border-radius: 50%;
  }
  .filter-overlay-close:hover { background: var(--color-surface); }
  .filters-sidebar.open { padding-top: 72px; }
  .mobile-filter-btn { display: inline-flex; }
  .filter-sidebar-apply { display: block; }
  .filter-popup { display: none; }
  .catalog-layout .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .topbar { display: none; }
  .header-navbar { display: none; }
  .header-search { display: none; }
  .header-contacts { display: none; }
  .desktop-only { display: none !important; }
  .header-action-btn.mobile-only { display: flex; }
  .mobile-menu-btn { display: flex; }
  .mega-catalog { display: none !important; }

  .header-main-inner {
    height: 56px;
    gap: 0;
  }
  .header-logo {
    position: static;
    transform: none;
    min-width: 0;
    font-size: 1rem;
    z-index: 1;
    margin-left: 12px;
    margin-right: auto;
  }
  .header-logo img { max-height: 32px; max-width: 130px; }
  .header-logo svg.svg-colorized { max-height: 32px; max-width: 130px; }
  .header-logo-text { font-size: 0.9rem; }
  .header-logo-icon { width: 28px; height: 28px; font-size: 0.85rem; }
  .header-actions { gap: 0; flex-shrink: 0; }
  .header-action-btn { width: 36px; height: 36px; font-size: 1.05rem; }
  .header-action-btn.has-label { padding: 4px 6px; }
  .action-label { display: none; }

  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .advantages-grid { grid-template-columns: repeat(2, 1fr); }

  .catalog-categories-grid { grid-template-columns: 1fr; gap: 12px; }
  .catalog-cat-card { padding: 16px; }
  .catalog-cat-header { gap: 12px; }
  .catalog-cat-header .category-card-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
  .catalog-cat-title { font-size: 0.95rem; }
  .catalog-cat-tags { gap: 4px; margin-top: 8px; }
  .catalog-cat-tag { padding: 2px 8px; font-size: 0.7rem; }
  .page-heading { font-size: 1.5rem; margin-bottom: 20px; }

  .subcategory-tiles {
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }
  .subcategory-tile { padding: 6px 12px; font-size: 0.82rem; }

  .catalog-layout .product-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: none;
    margin-bottom: 12px;
    padding-bottom: 0;
  }
  .catalog-toolbar-left {
    flex: 1;
    min-width: 0;
  }
  .catalog-sort-tabs { display: none; }
  .catalog-sort-select { display: flex; }
  .catalog-toolbar-right { flex-shrink: 0; }
  .catalog-view-toggle { display: none; }
  .product-card-top > .compare-card-btn { width: 26px; height: 26px; font-size: 0.65rem; }
  .product-card-image { padding: 8px 12px; }
  .product-card-body { padding: 0 10px 14px; }
  .product-card-title { font-size: 0.82rem; }
  .price-current { font-size: 1.1rem; }
  .price-old { font-size: 0.75rem; }
  .product-card-btn { width: 36px; height: 36px; font-size: 0.85rem; }
  .product-grid.list-view { grid-template-columns: 1fr; }
  .product-grid.list-view .product-card { grid-template-columns: 140px 1fr; }

  .breadcrumb {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 12px 0;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 24px), transparent 100%);
  }
  .breadcrumb::-webkit-scrollbar { display: none; }
  .breadcrumb a,
  .breadcrumb span { white-space: nowrap; flex-shrink: 0; }

  .product-layout-3col { grid-template-columns: 1fr; gap: 16px; min-width: 0; }
  .product-layout-3col > * { min-width: 0; max-width: 100%; }
  .product-gallery { position: static; order: 1; }
  .product-center { order: 3; }
  .product-sidebar { position: static; order: 2; }
  .product-gallery-main { aspect-ratio: auto; max-height: 50vh; }
  .product-gallery-main img { max-height: 48vh; width: auto; margin: 0 auto; }
  .product-gallery-thumbs { gap: 6px; margin-top: 8px; }
  .product-gallery-thumb { width: 56px; height: 56px; }
  .product-title { font-size: 1.35rem; }
  .product-badges-row { margin-bottom: 8px; }
  .product-price-current { font-size: 1.5rem; }
  .price-currency { font-size: 1rem; }
  .product-buy-btn { font-size: 0.95rem; padding: 12px 14px; }
  .product-qty button { width: 34px; height: 36px; }
  .product-qty input { width: 36px; height: 36px; font-size: 0.88rem; }
  .product-sidebar-card { padding: 16px; box-shadow: none; border: 1px solid var(--color-border); }
  .product-info-list { margin-top: 14px; padding-top: 14px; }
  .product-tabs-section { margin-top: 24px; }
  .product-chars-preview { margin-bottom: 16px; overflow: hidden; }
  .product-chars-preview-row { gap: 4px; }
  .chars-preview-name {
    white-space: normal;
    word-break: break-word;
    max-width: 55%;
    flex-shrink: 1;
    font-size: 0.82rem;
  }
  .chars-preview-sep { min-width: 10px; }
  .chars-preview-value { font-size: 0.82rem; }
  .product-meta-line { margin-bottom: 12px; }
  .product-chars-table { display: block; }
  .product-chars-table tbody { display: block; }
  .product-chars-table tr {
    display: flex;
    flex-direction: column;
    padding: 14px 0;
  }
  .product-chars-table td {
    padding: 0;
    width: 100% !important;
  }
  .product-chars-table td:first-child {
    font-size: 0.82rem;
    margin-bottom: 4px;
  }
  .product-chars-table td:last-child {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
  }
  .tabs { overflow-x: hidden; flex-wrap: wrap; }
  .tab { padding: 8px 12px; font-size: 0.82rem; white-space: nowrap; flex-shrink: 0; }

  .cart-layout { grid-template-columns: 1fr; }
  .cart-item { gap: 12px; }
  .cart-item-image { width: 64px; height: 64px; }
  .cart-item .product-qty { order: 10; }
  .cart-item-price { order: 11; min-width: auto; text-align: left; }
  .cart-item-remove { order: 12; }

  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-layout .cart-summary {
    position: static;
    padding: 20px 16px;
  }
  .form-row { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .hero { padding: 40px 0; }
  .hero-content h1 { font-size: 1.8rem; }
  .hero-content p { font-size: 0.95rem; }

  /* Compare page — mobile */
  .compare-wrap {
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .compare-products {
    display: flex;
    gap: 0;
    border: 1px solid var(--color-border);
    border-bottom: none;
    min-width: min-content;
  }
  .compare-col {
    min-width: 160px;
    width: 160px;
    flex-shrink: 0;
    border-right: 1px solid var(--color-border);
  }
  .compare-col:last-child { border-right: none; }
  .compare-row-values {
    display: flex;
    gap: 0;
    min-width: min-content;
  }
  .compare-val {
    min-width: 160px;
    width: 160px;
    flex-shrink: 0;
  }
  .compare-product-card { padding: 14px 8px 12px; }
  .compare-product-img { width: 90px; height: 90px; margin-bottom: 8px; }
  .compare-product-name { font-size: 0.78rem; margin-bottom: 6px; }
  .compare-product-price .price-current { font-size: 0.95rem; }
  .compare-product-price .price-old { font-size: 0.72rem; }
  .compare-cart-btn { font-size: 0.78rem; padding: 6px 12px; }
  .compare-remove-btn { width: 26px; height: 26px; font-size: 0.65rem; }
  .compare-row-label { font-size: 0.75rem; padding: 10px 0 2px; }
  .compare-val { font-size: 0.85rem; padding: 2px 0 10px; }
  .compare-section-title { font-size: 0.95rem; padding: 14px 0 8px; }
  .page-heading { font-size: 1.4rem; }
  .compare-count-text { font-size: 0.82rem; margin-bottom: 14px; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; gap: 12px; }
  .catalog-layout .product-grid { grid-template-columns: 1fr; gap: 12px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .advantages-grid { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 1.5rem; }
  .subcategory-tiles { gap: 4px; }
  .subcategory-tile { padding: 5px 10px; font-size: 0.78rem; white-space: normal; word-break: break-word; }

  .product-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    grid-template-rows: auto 1fr;
  }
  .product-card .product-card-top {
    grid-column: 1 / -1;
    padding: 6px 10px 0;
  }
  .product-card .product-card-image {
    grid-row: 2;
    grid-column: 1;
    aspect-ratio: 1;
    padding: 8px;
  }
  .product-card .product-card-body {
    grid-row: 2;
    grid-column: 2;
    padding: 6px 10px 10px 0;
    display: flex;
    flex-direction: column;
  }
  .product-card-title { font-size: 0.85rem; margin-bottom: 4px; }
  .product-card-category { font-size: 0.7rem; }
  .price-current { font-size: 1.05rem; }
  .product-card-btn { width: 34px; height: 34px; font-size: 0.85rem; }

  .catalog-toolbar { gap: 6px; margin-bottom: 12px; }
  .catalog-sort-select select { padding: 7px 28px 7px 10px; font-size: 0.8rem; }

  .cart-summary { padding: 16px 14px; }
  .cart-summary h3 { font-size: 1rem; margin-bottom: 14px; }
  .cart-summary-row { font-size: 0.85rem; }
  .cart-summary .btn-block { font-size: 0.9rem; }
}

/* ── Reviews ────────────────────────────────────────── */
.reviews-list {
  display: flex; flex-direction: column; gap: 0;
  margin-bottom: 36px;
}
.review-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border, #eee);
}
.review-item:first-child { padding-top: 4px; }
.review-item:last-child { border-bottom: none; }

.review-header {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.review-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary, #2563eb) 0%, #60a5fa 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .95rem; flex-shrink: 0; text-transform: uppercase;
}
.review-meta { display: flex; flex-direction: column; gap: 2px; }
.review-author-name { font-weight: 600; font-size: .95rem; color: var(--color-text); }
.review-stars { color: #f5a623; font-size: .8rem; letter-spacing: 2px; }
.review-date {
  color: var(--color-text-muted); font-size: .78rem; margin-left: auto;
  white-space: nowrap;
}
.review-text {
  font-size: .93rem; line-height: 1.7; color: var(--color-text);
  padding-left: 50px;
}

.reviews-empty {
  text-align: center; padding: 48px 20px; color: var(--color-text-muted);
}
.reviews-empty i {
  font-size: 2.5rem; margin-bottom: 14px; display: block; opacity: .45;
}
.reviews-empty p { font-size: .95rem; }

.reviews-summary {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; margin-bottom: 20px;
  background: var(--color-bg, #f8f9fa); border-radius: var(--radius);
}
.reviews-avg-score { font-size: 2rem; font-weight: 700; line-height: 1; }
.reviews-avg-stars { color: #f5a623; font-size: .9rem; letter-spacing: 2px; }
.reviews-avg-count { font-size: .82rem; color: var(--color-text-muted); margin-top: 2px; }

/* Review form */
.review-form-wrapper {
  border-top: 1px solid var(--color-border, #eee);
  padding-top: 28px; margin-top: 12px;
}
.review-form-title {
  font-size: 1.15rem; font-weight: 700; margin-bottom: 20px;
}
.review-form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px; align-items: end;
  margin-bottom: 16px;
}
.review-form-group { display: flex; flex-direction: column; gap: 6px; }
.review-form-group label {
  display: block; font-size: .82rem; font-weight: 600;
  color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .3px;
}

.form-input {
  width: 100%; padding: 11px 16px;
  border: 1.5px solid var(--color-border, #ddd);
  border-radius: var(--radius); font-size: .93rem;
  background: #fff; transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box; font-family: inherit;
}
.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
  outline: none;
}
textarea.form-input { resize: vertical; min-height: 100px; }

.star-rating {
  display: flex; gap: 6px; cursor: pointer;
  padding: 6px 0;
}
.star-rating i {
  font-size: 1.5rem; color: #f5a623;
  transition: transform .15s, color .15s;
}
.star-rating i:hover { transform: scale(1.15); }
.star-rating i.far { color: #d4d4d4; }

.review-submit-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border: none; border-radius: var(--radius);
  background: var(--color-primary, #2563eb); color: #fff;
  font-size: .93rem; font-weight: 600; cursor: pointer;
  transition: background .2s, transform .1s; margin-top: 4px;
}
.review-submit-btn:hover { background: var(--color-primary-hover, #1d4ed8); }
.review-submit-btn:active { transform: scale(.97); }
.review-submit-btn:disabled {
  opacity: .6; cursor: not-allowed; transform: none;
}

.review-success-msg {
  padding: 16px 20px; border-radius: var(--radius); text-align: center;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff; font-weight: 500; margin-bottom: 20px;
  animation: reviewFadeIn .4s ease;
}
@keyframes reviewFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .review-form-row { grid-template-columns: 1fr; }
  .review-text { padding-left: 0; margin-top: 4px; }
  .review-avatar { width: 34px; height: 34px; font-size: .82rem; }
  .reviews-summary { flex-direction: column; text-align: center; gap: 8px; }
}

/* ── Product carousel (Related / Recently Viewed) ── */
.product-carousel-section {
  margin-top: 48px;
  margin-bottom: 16px;
}
.product-carousel-section .section-header {
  margin-bottom: 20px;
}
.product-carousel-section .section-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
}
.product-carousel {
  position: relative;
  overflow: hidden;
}
.product-carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.product-carousel-track::-webkit-scrollbar {
  display: none;
}
.product-carousel-track .product-card {
  flex: 0 0 calc(25% - 12px);
  min-width: 220px;
  scroll-snap-align: start;
}

@media (max-width: 1024px) {
  .product-carousel-track .product-card {
    flex: 0 0 calc(33.333% - 11px);
    min-width: 0;
  }
}
@media (max-width: 768px) {
  .product-carousel-section {
    margin-top: 32px;
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 16px;
  }
  .product-carousel-track {
    gap: 12px;
  }
  .product-carousel-track .product-card {
    flex: 0 0 calc(100% - 48px);
    min-width: 0;
  }
  .product-carousel-section .section-header h2 {
    font-size: 1.15rem;
  }
}

/* ─── Product Selector Widget ─── */
.product-selector-section {
  padding-top: 32px;
  padding-bottom: 32px;
}
.product-selector-widget {
  background: linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 80%, #000));
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.product-selector-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 32px 0;
}
.product-selector-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  flex-shrink: 0;
}
.product-selector-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.product-selector-subtitle {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  margin: 2px 0 0;
}
.product-selector-body {
  padding: 24px 32px 32px;
}
.product-selector-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.product-selector-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.product-selector-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.product-selector-select {
  padding: 10px 14px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='white' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.product-selector-select:focus {
  outline: none;
  border-color: rgba(255,255,255,0.5);
  background-color: rgba(255,255,255,0.18);
}
.product-selector-select option {
  background: #1e293b;
  color: #fff;
}
.product-selector-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.product-selector-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 32px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  background: #fff;
  color: var(--color-primary);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.product-selector-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.product-selector-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}
.product-selector-reset-btn:hover {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.5);
}

.selector-results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.selector-results-count {
  color: var(--color-text-muted);
  margin: 0;
  font-size: 0.92rem;
  white-space: nowrap;
}
.selector-results-count strong {
  color: var(--color-text);
  font-size: 1.05rem;
}
.selector-results-sort {
  display: flex;
  align-items: center;
  gap: 8px;
}
.selector-results-sort-label {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.selector-results-sort-select {
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  min-width: 180px;
}

@media (max-width: 768px) {
  .product-selector-section {
    padding-top: 24px;
    padding-bottom: 24px;
  }
  .product-selector-header {
    padding: 20px 20px 0;
    gap: 12px;
  }
  .product-selector-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  .product-selector-title {
    font-size: 1.15rem;
  }
  .product-selector-body {
    padding: 20px 20px 24px;
  }
  .product-selector-fields {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .product-selector-btn {
    flex: 1;
    justify-content: center;
  }
  .product-selector-actions {
    flex-wrap: wrap;
  }
  .selector-results-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 14px;
  }
  .selector-results-toolbar .selector-results-count {
    text-align: center;
  }
  .selector-results-sort {
    flex-direction: column;
    gap: 6px;
  }
  .selector-results-sort-select {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .product-selector-fields {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
