/* ============================================================
KOP.in.ua — Styles v10.1 FINAL
Підтримка 5 тем + випадаюче меню мови + мобільний каталог + карусель
============================================================ */

/* === ТЕМИ — CSS ЗМІННІ === */
:root,
[data-theme="light"] {
  --bg-body: #f5f5f5; --bg-card: #ffffff; --bg-alt: #f9f9f9;
  --bg-header: #ffffff; --bg-footer: #2c2c2c;
  --text-main: #333333; --text-secondary: #555555; --muted: #888888;
  --accent: #4a4a4a; --accent-hover: #333333; --accent-light: #666666;
  --success: #28a745; --danger: #dc3545; --warning: #ffc107; --info: #17a2b8;
  --border: #e0e0e0; --border-light: #eeeeee;
  --shadow: 0 2px 4px rgba(0,0,0,.08); --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
  --radius: 4px; --radius-lg: 8px; --transition: .2s ease;
}
[data-theme="dark"] {
  --bg-body: #1a1a1a; --bg-card: #2d2d2d; --bg-alt: #252525;
  --bg-header: #2d2d2d; --bg-footer: #0f0f0f;
  --text-main: #f5f5f5; --text-secondary: #cccccc; --muted: #999999;
  --accent: #64b5f6; --accent-hover: #42a5f5; --accent-light: #90caf9;
  --border: #404040; --border-light: #333333;
  --shadow: 0 2px 4px rgba(0,0,0,.3); --shadow-lg: 0 4px 12px rgba(0,0,0,.5);
}
[data-theme="ocean"] {
  --bg-body: #e3f2fd; --bg-card: #ffffff; --bg-alt: #f5f9ff;
  --bg-header: #ffffff; --bg-footer: #0d47a1;
  --text-main: #0d47a1; --text-secondary: #1565c0; --muted: #5c6bc0;
  --accent: #1976d2; --accent-hover: #1565c0; --accent-light: #42a5f5;
  --border: #bbdefb; --border-light: #e3f2fd;
  --shadow: 0 2px 4px rgba(13,71,161,.1); --shadow-lg: 0 4px 12px rgba(13,71,161,.2);
}
[data-theme="forest"] {
  --bg-body: #e8f5e9; --bg-card: #ffffff; --bg-alt: #f1f8e9;
  --bg-header: #ffffff; --bg-footer: #1b5e20;
  --text-main: #1b5e20; --text-secondary: #2e7d32; --muted: #558b2f;
  --accent: #388e3c; --accent-hover: #2e7d32; --accent-light: #66bb6a;
  --border: #c8e6c9; --border-light: #e8f5e9;
  --shadow: 0 2px 4px rgba(27,94,32,.1); --shadow-lg: 0 4px 12px rgba(27,94,32,.2);
}
[data-theme="sunset"] {
  --bg-body: #fff3e0; --bg-card: #ffffff; --bg-alt: #fff8e1;
  --bg-header: #ffffff; --bg-footer: #bf360c;
  --text-main: #bf360c; --text-secondary: #d84315; --muted: #e64a19;
  --accent: #f4511e; --accent-hover: #e64a19; --accent-light: #ff7043;
  --border: #ffccbc; --border-light: #fbe9e7;
  --shadow: 0 2px 4px rgba(191,54,12,.1); --shadow-lg: 0 4px 12px rgba(191,54,12,.2);
}
/* === RESET === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 14px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background var(--transition), color var(--transition);
}
a {
  color: var(--text-main);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--accent);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
button {
  cursor: pointer;
  font-family: inherit;
}
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}
main {
  flex: 1;
}

/* === КНОПКИ === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  font-family: inherit;
  line-height: 1.4;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}
.btn-secondary {
  background: var(--bg-alt);
  color: var(--text-main);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--border-light);
}
.btn-lg {
  padding: 12px 28px;
  font-size: 15px;
}
.btn-load-more {
  padding: 12px 36px;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 500;
}
.btn-load-more:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* === HEADER === */
.header {
  background: var(--bg-header);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background var(--transition);
}
.header-top {
  background: var(--bg-alt);
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
}
.header-top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.header-contacts {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.header-phone, .site-phone {
  color: var(--text-main);
  font-weight: 600;
  font-size: 14px;
}
.header-phone:hover, .site-phone:hover {
  color: var(--accent);
}
.header-schedule, .site-schedule {
  color: var(--muted);
  font-size: 12px;
}
.header-links {
  display: flex;
  gap: 20px;
  align-items: center;
}
.header-links a {
  color: var(--text-secondary);
  font-size: 13px;
}
.header-links a:hover {
  color: var(--accent);
}
.header-feedback-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  padding: 0;
}
.header-feedback-link:hover {
  color: var(--accent-hover);
}
.header-main {
  padding: 16px 0;
}
.header-main-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* === LOGO === */
.logo {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.logo:hover {
  color: var(--text-main);
}
.logo-dot {
  color: var(--accent);
}
.logo-light {
  color: #fff;
}
.logo-light:hover {
  color: #fff;
}

/* === КАТАЛОГ DROPDOWN (десктоп) === */
.catalog-dropdown {
  position: relative;
}
.btn-catalog {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 14px;
  transition: background var(--transition);
}
.btn-catalog:hover {
  background: var(--accent-hover);
}
.catalog-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  max-width: 320px;
  max-height: 500px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  z-index: 50;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) var(--bg-alt);
}
.catalog-menu.open {
  display: block;
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.catalog-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--text-main);
  border-radius: 4px;
  font-size: 14px;
  transition: background var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-item:hover {
  background: var(--bg-alt);
  color: var(--accent);
}
.catalog-menu::-webkit-scrollbar { width: 8px; }
.catalog-menu::-webkit-scrollbar-track { background: var(--bg-alt); border-radius: 4px; }
.catalog-menu::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 4px; }
.catalog-menu::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* === СТРЕЛКИ КАРУСЕЛІ ТОВАРІВ (мобільні) === */
.carousel-wrap { position: relative; }
.carousel-arrow {
  display: none;                 /* приховано за замовчуванням */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 22px;
  line-height: 1;
  align-items: center;
  justify-content: center;
  z-index: 6;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  opacity: .95;
  padding: 0;
  transition: background .2s, opacity .2s;
}
.carousel-arrow:active { background: var(--bg-alt); }
.carousel-arrow.left  { left: 6px; }
.carousel-arrow.right { right: 6px; }
.carousel-arrow.show  { display: flex; }   /* видимість керує JS */
@media (max-width: 480px) {
  .carousel-arrow { width: 34px; height: 34px; font-size: 18px; }
}
/* === ПОШУК === */
.search-bar {
  flex: 1;
  max-width: 500px;
}
.search-form {
  display: flex;
  gap: 0;
}
.search-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 14px;
  outline: none;
  background: var(--bg-card);
  color: var(--text-main);
  transition: border-color var(--transition);
}
.search-form input:focus {
  border-color: var(--accent);
}
.btn-search {
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 500;
  font-size: 14px;
  transition: background var(--transition);
}
.btn-search:hover {
  background: var(--accent-hover);
}

/* === HEADER ACTIONS === */
.header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}
.header-action-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 14px;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.header-action-btn:hover {
  background: var(--bg-alt);
  color: var(--accent);
}
.action-label {
  font-weight: 500;
}
.action-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* === ВИПАДАЮЧЕ МЕНЮ МОВИ === */
.header-lang {
  position: relative;
}
.lang-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition);
}
.lang-dropdown-btn:hover {
  background: var(--border-light);
  border-color: var(--accent);
}
.lang-dropdown-btn::after {
  content: '▼';
  font-size: 10px;
  margin-left: 4px;
  transition: transform var(--transition);
}
.lang-dropdown-btn.open::after {
  transform: rotate(180deg);
}
.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 1000;
  overflow: hidden;
}
.lang-dropdown-menu.open {
  display: block;
}
.lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.lang-dropdown-item:hover {
  background: var(--bg-alt);
  color: var(--accent);
}
.lang-dropdown-item.active {
  background: var(--accent);
  color: #fff;
}
.lang-dropdown-item .flag {
  font-size: 16px;
}

/* === БУРГЕР === */
.burger-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
}
.burger-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: .3s;
}
.burger-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.active span:nth-child(2) { opacity: 0; }
.burger-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === МОБІЛЬНЕ МЕНЮ (ВИПРАВЛЕНО: nav-link тепер блокові) === */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 16px 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s;
}
.mobile-nav.nav-open {
  display: flex;
  max-height: 100vh;
  overflow-y: auto;
}
.nav-link {
  display: block;               /* ВИПРАВЛЕНО: було inline */
  padding: 12px 20px;
  color: var(--text-main);
  font-size: 15px;
  border-bottom: 1px solid var(--border-light);
}
.nav-link:hover {
  background: var(--bg-alt);
  color: var(--accent);
}
.mobile-nav-divider {
  height: 8px;
  background: var(--bg-alt);
  margin: 8px 0;
}

/* === МОБІЛЬНИЙ КАТАЛОГ (ОНОВЛЕНО) === */
/* Заголовок каталогу всередині мобільного меню */
#mobile-catalog-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px 16px 16px;
}
#mobile-catalog-links::before {
  content: '📁 Каталог товарів';
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-secondary);
  padding: 4px 0 2px;
}
#mobile-catalog-links .nav-link {
  display: flex;               /* блокові картки замість inline-тексту */
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.3;
  white-space: normal;
  overflow: hidden;
}
#mobile-catalog-links .nav-link:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
}

/* === SECTION HEADER === */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}
.section-header .section-title {
  margin-bottom: 0;
}

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

/* === FILTER BAR === */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.filter-bar select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  outline: none;
  font-family: inherit;
}
.filter-bar select:focus {
  border-color: var(--accent);
}
.products-count {
  color: var(--muted);
  font-size: 13px;
}

/* === PRODUCTS GRID === */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* === КАРУСЕЛЬ ТОВАРІВ (ОНОВЛЕНО) === */
/* На мобільних сітка перетворюється на горизонтальну карусель */
.products-carousel,
.products-grid.is-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.products-carousel::-webkit-scrollbar,
.products-grid.is-carousel::-webkit-scrollbar {
  height: 6px;
}
.products-carousel::-webkit-scrollbar-track,
.products-grid.is-carousel::-webkit-scrollbar-track {
  background: var(--bg-alt);
  border-radius: 3px;
}
.products-carousel::-webkit-scrollbar-thumb,
.products-grid.is-carousel::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 3px;
}
.products-carousel .product-card,
.products-grid.is-carousel .product-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
}

/* === КАРТКА ТОВАРУ === */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-light);
}
.product-card-img {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-light);
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
  display: block;
}
.product-card:hover .product-card-img img {
  transform: scale(1.03);
}
.product-card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-card-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.4;
  min-height: 36px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-title a {
  color: var(--text-main);
  text-decoration: none;
  transition: color var(--transition);
}
.product-card-title a:hover {
  color: var(--accent);
}
.product-card-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}
.product-card-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
}
.product-card-btn {
  flex: 1;
  padding: 8px 10px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  transition: background var(--transition);
  border: none;
}
.product-card-btn:hover {
  background: var(--accent-hover);
  color: #fff;
}
.btn-icon {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 15px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}
.btn-icon:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* === FOOTER === */
.footer {
  background: var(--bg-footer);
  color: #fff;
  padding: 40px 0 0;
  margin-top: auto;
  transition: background var(--transition);
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-brand p {
  color: rgba(255,255,255,.6);
  font-size: 13px;
  margin-top: 12px;
  line-height: 1.6;
}
.footer-links h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: rgba(255,255,255,.5);
  font-weight: 600;
}
.footer-links a {
  display: block;
  color: rgba(255,255,255,.8);
  padding: 4px 0;
  font-size: 13px;
  transition: color var(--transition);
}
.footer-links a:hover {
  color: #fff;
}
.footer-links p {
  color: rgba(255,255,255,.6);
  font-size: 13px;
  padding: 4px 0;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.5);
}

/* === TOAST === */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}
.toast {
  background: var(--bg-card);
  border-left: 4px solid var(--success);
  padding: 12px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  animation: toastIn .25s ease;
  font-size: 13px;
  color: var(--text-main);
}
.toast-error { border-left-color: var(--danger); }
.toast-info { border-left-color: var(--info); }
.toast-warning { border-left-color: var(--warning); }
.toast-hide {
  opacity: 0;
  transform: translateX(100%);
  transition: .25s;
}
.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* === BREADCRUMBS === */
.breadcrumbs {
  background: var(--bg-alt);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.breadcrumb-list {
  display: flex;
  gap: 8px;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  align-items: center;
}
.breadcrumb-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb-list li:not(:last-child)::after {
  content: '›';
  color: var(--muted);
  font-size: 14px;
}
.breadcrumb-list a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}
.breadcrumb-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.breadcrumb-list li:last-child {
  color: var(--text-main);
  font-weight: 500;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-top {
    display: none;
  }
  .header-main-inner {
    flex-wrap: wrap;
    gap: 12px;
  }
  .search-bar {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
  }
  .burger-btn {
    display: flex;
  }
  .catalog-dropdown {
    display: none;
  }
  .action-label {
    display: none;
  }
  .header-action-btn {
    padding: 8px;
  }
  .header-actions {
    gap: 8px;
  }
  .section-title {
    font-size: 22px;
  }
  /* ✅ СІТКА 2 КОЛОНКИ замість каруселі — гортається вниз */
  .products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    overflow: visible;
    padding-bottom: 0;
  }
  .products-grid .product-card {
    width: 100%;
    min-width: 0;
  }
  .product-card-title {
    font-size: 12px;
    min-height: 34px;
  }
  .product-card-price {
    font-size: 15px;
  }
  .product-card-body {
    padding: 10px;
  }
  .product-card-btn {
    padding: 7px 8px;
    font-size: 11px;
  }
  .btn-icon {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}
@media (max-width: 480px) {
  /* На дуже малих екранах каталог в одну колонку */
  #mobile-catalog-links {
    grid-template-columns: 1fr;
  }
  /* ✅ СІТКА 2 КОЛОНКИ замість каруселі */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .products-grid .product-card {
    width: 100%;
    min-width: 0;
  }
  .product-card-title {
    font-size: 11px;
    min-height: 30px;
  }
  .product-card-price {
    font-size: 13px;
    margin-bottom: 6px;
  }
  .product-card-actions {
    flex-direction: column;
  }
  .product-card-btn {
    width: 100%;
  }
  .btn-icon {
    width: 100%;
    height: 32px;
  }
  .logo {
    font-size: 22px;
  }
  .section-title {
    font-size: 20px;
  }
}

/* ============================================================
МОДАЛКИ (Кошик, Порівняння, Зворотний зв'язок)
============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay[aria-hidden="false"] {
  display: flex;
}
.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 24px;
  animation: slideUp 0.3s ease;
}
.modal-large { max-width: 700px; }
.modal-xlarge { max-width: 900px; }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-secondary);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition);
  z-index: 10;
}
.modal-close:hover {
  background: var(--bg-alt);
  color: var(--danger);
}
.modal-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  padding-right: 40px;
}
.modal-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === КОШИК === */
.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}
.cart-empty p { margin-bottom: 12px; }
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.cart-item-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius);
}
.cart-item-info {
  flex: 1;
  min-width: 0;
}
.cart-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.qty-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.cart-item-qty input {
  width: 40px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  font-size: 14px;
  background: var(--bg-card);
  color: var(--text-main);
}
.cart-item-remove {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.cart-item-remove:hover {
  background: var(--danger);
  color: #fff;
}
.cart-summary {
  padding: 16px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
}
.summary-row.total {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  border-top: 2px solid var(--border);
  margin-top: 8px;
  padding-top: 12px;
}
.cart-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* === ПОРІВНЯННЯ === */
.compare-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.compare-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 8px;
  min-height: 36px;
}
.compare-remove {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
}
.compare-remove:hover {
  background: var(--danger-hover);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.compare-table th,
.compare-table td {
  padding: 12px;
  text-align: center;
  border: 1px solid var(--border);
  vertical-align: top;
}
.compare-table th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--text-main);
}
.compare-table td {
  color: var(--text-secondary);
}

/* === ФОРМА ЗВОРОТНОГО ЗВ'ЯЗКУ === */
.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}
.form-group label .required {
  color: var(--danger);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  background: var(--bg-card);
  color: var(--text-main);
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-group.error input,
.form-group.error textarea {
  border-color: var(--danger);
}
.form-hint {
  font-size: 12px;
  color: var(--danger);
  min-height: 16px;
}
.btn-feedback-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-feedback-submit:hover {
  background: var(--accent-hover);
}
.btn-feedback-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === RESPONSIVE ДЛЯ МОДАЛОК === */
@media (max-width: 768px) {
  .modal-content {
    padding: 20px;
    max-height: 85vh;
  }
  .modal-title {
    font-size: 18px;
  }
  .cart-item {
    flex-wrap: wrap;
  }
  .cart-item-img {
    width: 50px;
    height: 50px;
  }
  .cart-actions {
    flex-direction: column;
  }
  .cart-actions .btn {
    width: 100%;
  }
  .compare-table {
    font-size: 12px;
  }
  .compare-img {
    width: 80px;
    height: 80px;
  }
}
@media (max-width: 480px) {
  .modal-overlay {
    padding: 10px;
  }
  .modal-content {
    padding: 16px;
  }
  .cart-item-qty {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
  }
}
/* ============================================================
   ТЕМИ — ЧИСТІ СЕЛЕКТОРИ (виправляє биті [data-theme= "… "])
   Додано в кінець style.css, щоб пресети працювали на сайті
   ============================================================ */
:root,
[data-theme="light"]{--bg-body:#f5f5f5;--bg-card:#fff;--bg-alt:#f9f9f9;--bg-header:#fff;--bg-footer:#2c2c2c;--text-main:#333;--text-secondary:#555;--muted:#888;--accent:#4a4a4a;--accent-hover:#333;--accent-light:#666;--success:#28a745;--danger:#dc3545;--warning:#ffc107;--info:#17a2b8;--border:#e0e0e0;--border-light:#eee;--shadow:0 2px 4px rgba(0,0,0,.08);--shadow-lg:0 4px 12px rgba(0,0,0,.12);--radius:4px;--radius-lg:8px;--transition:.2s ease;}
[data-theme="dark"]{--bg-body:#1a1a1a;--bg-card:#2d2d2d;--bg-alt:#252525;--bg-header:#2d2d2d;--bg-footer:#0f0f0f;--text-main:#f5f5f5;--text-secondary:#ccc;--muted:#999;--accent:#64b5f6;--accent-hover:#42a5f5;--accent-light:#90caf9;--border:#404040;--border-light:#333;--shadow:0 2px 4px rgba(0,0,0,.3);--shadow-lg:0 4px 12px rgba(0,0,0,.5);}
[data-theme="ocean"]{--bg-body:#e3f2fd;--bg-card:#fff;--bg-alt:#f5f9ff;--bg-header:#fff;--bg-footer:#0d47a1;--text-main:#0d47a1;--text-secondary:#1565c0;--muted:#5c6bc0;--accent:#1976d2;--accent-hover:#1565c0;--accent-light:#42a5f5;--border:#bbdefb;--border-light:#e3f2fd;}
[data-theme="forest"]{--bg-body:#e8f5e9;--bg-card:#fff;--bg-alt:#f1f8e9;--bg-header:#fff;--bg-footer:#1b5e20;--text-main:#1b5e20;--text-secondary:#2e7d32;--muted:#558b2f;--accent:#388e3c;--accent-hover:#2e7d32;--accent-light:#66bb6a;--border:#c8e6c9;--border-light:#e8f5e9;}
[data-theme="sunset"]{--bg-body:#fff3e0;--bg-card:#fff;--bg-alt:#fff8e1;--bg-header:#fff;--bg-footer:#bf360c;--text-main:#bf360c;--text-secondary:#d84315;--muted:#e64a19;--accent:#f4511e;--accent-hover:#e64a19;--accent-light:#ff7043;--border:#ffccbc;--border-light:#fbe9e7;}
[data-theme="prom"]{--bg-body:#fafafa;--bg-card:#fff;--bg-alt:#f5f5f5;--bg-header:#fff;--bg-footer:#212121;--text-main:#212121;--text-secondary:#616161;--muted:#9e9e9e;--accent:#ff6600;--accent-hover:#e65c00;--accent-light:#ff8533;--border:#e0e0e0;--border-light:#f5f5f5;}
[data-theme="rozetka"]{--bg-body:#fff;--bg-card:#fff;--bg-alt:#f5f5f5;--bg-header:#fff;--bg-footer:#1b1b1b;--text-main:#1b1b1b;--text-secondary:#616161;--muted:#9e9e9e;--accent:#00a046;--accent-hover:#008a3c;--accent-light:#33b46b;--border:#e0e0e0;--border-light:#f5f5f5;}
[data-theme="amazon"]{--bg-body:#eaeded;--bg-card:#fff;--bg-alt:#f2f3f3;--bg-header:#fff;--bg-footer:#131a22;--text-main:#0f1111;--text-secondary:#565959;--muted:#767676;--accent:#ff9900;--accent-hover:#e68a00;--accent-light:#ffb84d;--border:#d5dbdb;--border-light:#f2f3f3;}
[data-theme="ebay"]{--bg-body:#fff;--bg-card:#fff;--bg-alt:#f7f7f7;--bg-header:#fff;--bg-footer:#191919;--text-main:#191919;--text-secondary:#555;--muted:#999;--accent:#3665f3;--accent-hover:#2b5ae0;--accent-light:#6b8ff7;--border:#e5e5e5;--border-light:#f7f7f7;}
[data-theme="aliexpress"]{--bg-body:#f5f5f5;--bg-card:#fff;--bg-alt:#fafafa;--bg-header:#fff;--bg-footer:#1a1a1a;--text-main:#222;--text-secondary:#666;--muted:#999;--accent:#e62e04;--accent-hover:#cc2900;--accent-light:#f05a2e;--border:#e8e8e8;--border-light:#fafafa;}
[data-theme="etsy"]{--bg-body:#fdf7f2;--bg-card:#fff;--bg-alt:#faf5ee;--bg-header:#fff;--bg-footer:#2f2424;--text-main:#222;--text-secondary:#595959;--muted:#999;--accent:#f1641e;--accent-hover:#d95815;--accent-light:#f58a4f;--border:#e8ddd0;--border-light:#faf5ee;}
[data-theme="shopify"]{--bg-body:#f6f6f7;--bg-card:#fff;--bg-alt:#fafbfb;--bg-header:#fff;--bg-footer:#1a1a1a;--text-main:#212b36;--text-secondary:#5c5f62;--muted:#8c9196;--accent:#008060;--accent-hover:#006e52;--accent-light:#33a086;--border:#e1e3e5;--border-light:#fafbfb;}
[data-theme="woocommerce"]{--bg-body:#f7f7f7;--bg-card:#fff;--bg-alt:#f9f9f9;--bg-header:#fff;--bg-footer:#2c2c2c;--text-main:#3c3c3c;--text-secondary:#666;--muted:#999;--accent:#7f54b3;--accent-hover:#6d4699;--accent-light:#9d7cc7;--border:#e2e2e2;--border-light:#f9f9f9;}
[data-theme="magento"]{--bg-body:#f8f8f8;--bg-card:#fff;--bg-alt:#fafafa;--bg-header:#fff;--bg-footer:#31302b;--text-main:#41362f;--text-secondary:#666055;--muted:#999080;--accent:#f46f25;--accent-hover:#e0601a;--accent-light:#f7935a;--border:#e3e3e3;--border-light:#fafafa;}
[data-theme="prestashop"]{--bg-body:#fafafa;--bg-card:#fff;--bg-alt:#f7f7f7;--bg-header:#fff;--bg-footer:#333;--text-main:#363a41;--text-secondary:#6c757d;--muted:#adb5bd;--accent:#df0067;--accent-hover:#c5005b;--accent-light:#e93c8f;--border:#e5e5e5;--border-light:#f7f7f7;}
[data-theme="opencart"]{--bg-body:#f5f5f5;--bg-card:#fff;--bg-alt:#f9f9f9;--bg-header:#fff;--bg-footer:#2e3a4e;--text-main:#333;--text-secondary:#666;--muted:#999;--accent:#1e91cf;--accent-hover:#1a80b8;--accent-light:#54aadd;--border:#ddd;--border-light:#f9f9f9;}
[data-theme="corporate"]{--bg-body:#f7fafc;--bg-card:#fff;--bg-alt:#edf2f7;--bg-header:#fff;--bg-footer:#1a202c;--text-main:#1a202c;--text-secondary:#4a5568;--muted:#a0aec0;--accent:#1a365d;--accent-hover:#152a4a;--accent-light:#2c5282;--border:#e2e8f0;--border-light:#edf2f7;}
[data-theme="minimal"]{--bg-body:#fafafa;--bg-card:#fff;--bg-alt:#f5f5f5;--bg-header:#fff;--bg-footer:#171717;--text-main:#171717;--text-secondary:#525252;--muted:#a3a3a3;--accent:#171717;--accent-hover:#333;--accent-light:#404040;--border:#e5e5e5;--border-light:#f5f5f5;}
[data-theme="luxury"]{--bg-body:#fffef7;--bg-card:#fff;--bg-alt:#faf6eb;--bg-header:#fff;--bg-footer:#1a1a1a;--text-main:#2c2c2c;--text-secondary:#5a5a5a;--muted:#8f8f8f;--accent:#b8860b;--accent-hover:#9a7209;--accent-light:#d4a017;--border:#e8dcc8;--border-light:#faf6eb;}
[data-theme="tech"]{--bg-body:#0f0f23;--bg-card:#1a1a3e;--bg-alt:#252550;--bg-header:#1a1a3e;--bg-footer:#0a0a1a;--text-main:#e2e8f0;--text-secondary:#a5b4fc;--muted:#6366f1;--accent:#6366f1;--accent-hover:#4f46e5;--accent-light:#818cf8;--border:#2d2d5e;--border-light:#252550;}
[data-theme="midnight"]{--bg-body:#020617;--bg-card:#0f172a;--bg-alt:#1e293b;--bg-header:#0f172a;--bg-footer:#010409;--text-main:#e2e8f0;--text-secondary:#94a3b8;--muted:#64748b;--accent:#818cf8;--accent-hover:#6366f1;--accent-light:#a5b4fc;--border:#1e293b;--border-light:#1e293b;}
/* ============================================================
ТЕМИ — ВИПРАВЛЕНІ СЕЛЕКТОРИ (без пробілів)
============================================================ */
:root,
[data-theme="light"] {
  --bg-body: #f5f5f5;
  --bg-card: #ffffff;
  --bg-alt: #f9f9f9;
  --bg-header: #ffffff;
  --bg-footer: #2c2c2c;
  --text-main: #333333;
  --text-secondary: #555555;
  --muted: #888888;
  --accent: #4a4a4a;
  --accent-hover: #333333;
  --accent-light: #666666;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #17a2b8;
  --border: #e0e0e0;
  --border-light: #eeeeee;
  --shadow: 0 2px 4px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
  --radius: 4px;
  --radius-lg: 8px;
  --transition: .2s ease;
}
[data-theme="dark"] {
  --bg-body: #1a1a1a;
  --bg-card: #2d2d2d;
  --bg-alt: #252525;
  --bg-header: #2d2d2d;
  --bg-footer: #0f0f0f;
  --text-main: #f5f5f5;
  --text-secondary: #cccccc;
  --muted: #999999;
  --accent: #64b5f6;
  --accent-hover: #42a5f5;
  --accent-light: #90caf9;
  --border: #404040;
  --border-light: #333333;
  --shadow: 0 2px 4px rgba(0,0,0,.3);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.5);
}
[data-theme="ocean"] {
  --bg-body: #e3f2fd;
  --bg-card: #ffffff;
  --bg-alt: #f5f9ff;
  --bg-header: #ffffff;
  --bg-footer: #0d47a1;
  --text-main: #0d47a1;
  --text-secondary: #1565c0;
  --muted: #5c6bc0;
  --accent: #1976d2;
  --accent-hover: #1565c0;
  --accent-light: #42a5f5;
  --border: #bbdefb;
  --border-light: #e3f2fd;
  --shadow: 0 2px 4px rgba(13,71,161,.1);
  --shadow-lg: 0 4px 12px rgba(13,71,161,.2);
}
[data-theme="forest"] {
  --bg-body: #e8f5e9;
  --bg-card: #ffffff;
  --bg-alt: #f1f8e9;
  --bg-header: #ffffff;
  --bg-footer: #1b5e20;
  --text-main: #1b5e20;
  --text-secondary: #2e7d32;
  --muted: #558b2f;
  --accent: #388e3c;
  --accent-hover: #2e7d32;
  --accent-light: #66bb6a;
  --border: #c8e6c9;
  --border-light: #e8f5e9;
  --shadow: 0 2px 4px rgba(27,94,32,.1);
  --shadow-lg: 0 4px 12px rgba(27,94,32,.2);
}
[data-theme="sunset"] {
  --bg-body: #fff3e0;
  --bg-card: #ffffff;
  --bg-alt: #fff8e1;
  --bg-header: #ffffff;
  --bg-footer: #bf360c;
  --text-main: #bf360c;
  --text-secondary: #d84315;
  --muted: #e64a19;
  --accent: #f4511e;
  --accent-hover: #e64a19;
  --accent-light: #ff7043;
  --border: #ffccbc;
  --border-light: #fbe9e7;
  --shadow: 0 2px 4px rgba(191,54,12,.1);
  --shadow-lg: 0 4px 12px rgba(191,54,12,.2);
}
[data-theme="prom"] {
  --bg-body: #fafafa;
  --bg-card: #ffffff;
  --bg-alt: #f5f5f5;
  --bg-header: #ffffff;
  --bg-footer: #212121;
  --text-main: #212121;
  --text-secondary: #616161;
  --muted: #9e9e9e;
  --accent: #ff6600;
  --accent-hover: #e65c00;
  --accent-light: #ff8533;
  --border: #e0e0e0;
  --border-light: #f5f5f5;
  --shadow: 0 2px 4px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
}
[data-theme="rozetka"] {
  --bg-body: #ffffff;
  --bg-card: #ffffff;
  --bg-alt: #f5f5f5;
  --bg-header: #ffffff;
  --bg-footer: #1b1b1b;
  --text-main: #1b1b1b;
  --text-secondary: #616161;
  --muted: #9e9e9e;
  --accent: #00a046;
  --accent-hover: #008a3c;
  --accent-light: #33b46b;
  --border: #e0e0e0;
  --border-light: #f5f5f5;
  --shadow: 0 2px 4px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
}
[data-theme="amazon"] {
  --bg-body: #eaeded;
  --bg-card: #ffffff;
  --bg-alt: #f2f3f3;
  --bg-header: #ffffff;
  --bg-footer: #131a22;
  --text-main: #0f1111;
  --text-secondary: #565959;
  --muted: #767676;
  --accent: #ff9900;
  --accent-hover: #e68a00;
  --accent-light: #ffb84d;
  --border: #d5dbdb;
  --border-light: #f2f3f3;
  --shadow: 0 2px 4px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
}
[data-theme="ebay"] {
  --bg-body: #ffffff;
  --bg-card: #ffffff;
  --bg-alt: #f7f7f7;
  --bg-header: #ffffff;
  --bg-footer: #191919;
  --text-main: #191919;
  --text-secondary: #555555;
  --muted: #999999;
  --accent: #3665f3;
  --accent-hover: #2b5ae0;
  --accent-light: #6b8ff7;
  --border: #e5e5e5;
  --border-light: #f7f7f7;
  --shadow: 0 2px 4px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
}
[data-theme="aliexpress"] {
  --bg-body: #f5f5f5;
  --bg-card: #ffffff;
  --bg-alt: #fafafa;
  --bg-header: #ffffff;
  --bg-footer: #1a1a1a;
  --text-main: #222222;
  --text-secondary: #666666;
  --muted: #999999;
  --accent: #e62e04;
  --accent-hover: #cc2900;
  --accent-light: #f05a2e;
  --border: #e8e8e8;
  --border-light: #fafafa;
  --shadow: 0 2px 4px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
}
[data-theme="etsy"] {
  --bg-body: #fdf7f2;
  --bg-card: #ffffff;
  --bg-alt: #faf5ee;
  --bg-header: #ffffff;
  --bg-footer: #2f2424;
  --text-main: #222222;
  --text-secondary: #595959;
  --muted: #999999;
  --accent: #f1641e;
  --accent-hover: #d95815;
  --accent-light: #f58a4f;
  --border: #e8ddd0;
  --border-light: #faf5ee;
  --shadow: 0 2px 4px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
}
[data-theme="shopify"] {
  --bg-body: #f6f6f7;
  --bg-card: #ffffff;
  --bg-alt: #fafbfb;
  --bg-header: #ffffff;
  --bg-footer: #1a1a1a;
  --text-main: #212b36;
  --text-secondary: #5c5f62;
  --muted: #8c9196;
  --accent: #008060;
  --accent-hover: #006e52;
  --accent-light: #33a086;
  --border: #e1e3e5;
  --border-light: #fafbfb;
  --shadow: 0 2px 4px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
}
[data-theme="woocommerce"] {
  --bg-body: #f7f7f7;
  --bg-card: #ffffff;
  --bg-alt: #f9f9f9;
  --bg-header: #ffffff;
  --bg-footer: #2c2c2c;
  --text-main: #3c3c3c;
  --text-secondary: #666666;
  --muted: #999999;
  --accent: #7f54b3;
  --accent-hover: #6d4699;
  --accent-light: #9d7cc7;
  --border: #e2e2e2;
  --border-light: #f9f9f9;
  --shadow: 0 2px 4px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
}
[data-theme="magento"] {
  --bg-body: #f8f8f8;
  --bg-card: #ffffff;
  --bg-alt: #fafafa;
  --bg-header: #ffffff;
  --bg-footer: #31302b;
  --text-main: #41362f;
  --text-secondary: #666055;
  --muted: #999080;
  --accent: #f46f25;
  --accent-hover: #e0601a;
  --accent-light: #f7935a;
  --border: #e3e3e3;
  --border-light: #fafafa;
  --shadow: 0 2px 4px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
}
[data-theme="prestashop"] {
  --bg-body: #fafafa;
  --bg-card: #ffffff;
  --bg-alt: #f7f7f7;
  --bg-header: #ffffff;
  --bg-footer: #333333;
  --text-main: #363a41;
  --text-secondary: #6c757d;
  --muted: #adb5bd;
  --accent: #df0067;
  --accent-hover: #c5005b;
  --accent-light: #e93c8f;
  --border: #e5e5e5;
  --border-light: #f7f7f7;
  --shadow: 0 2px 4px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
}
[data-theme="opencart"] {
  --bg-body: #f5f5f5;
  --bg-card: #ffffff;
  --bg-alt: #f9f9f9;
  --bg-header: #ffffff;
  --bg-footer: #2e3a4e;
  --text-main: #333333;
  --text-secondary: #666666;
  --muted: #999999;
  --accent: #1e91cf;
  --accent-hover: #1a80b8;
  --accent-light: #54aadd;
  --border: #dddddd;
  --border-light: #f9f9f9;
  --shadow: 0 2px 4px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
}
[data-theme="corporate"] {
  --bg-body: #f7fafc;
  --bg-card: #ffffff;
  --bg-alt: #edf2f7;
  --bg-header: #ffffff;
  --bg-footer: #1a202c;
  --text-main: #1a202c;
  --text-secondary: #4a5568;
  --muted: #a0aec0;
  --accent: #1a365d;
  --accent-hover: #152a4a;
  --accent-light: #2c5282;
  --border: #e2e8f0;
  --border-light: #edf2f7;
  --shadow: 0 2px 4px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
}
[data-theme="minimal"] {
  --bg-body: #fafafa;
  --bg-card: #ffffff;
  --bg-alt: #f5f5f5;
  --bg-header: #ffffff;
  --bg-footer: #171717;
  --text-main: #171717;
  --text-secondary: #525252;
  --muted: #a3a3a3;
  --accent: #171717;
  --accent-hover: #333333;
  --accent-light: #404040;
  --border: #e5e5e5;
  --border-light: #f5f5f5;
  --shadow: 0 2px 4px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
}
[data-theme="luxury"] {
  --bg-body: #fffef7;
  --bg-card: #ffffff;
  --bg-alt: #faf6eb;
  --bg-header: #ffffff;
  --bg-footer: #1a1a1a;
  --text-main: #2c2c2c;
  --text-secondary: #5a5a5a;
  --muted: #8f8f8f;
  --accent: #b8860b;
  --accent-hover: #9a7209;
  --accent-light: #d4a017;
  --border: #e8dcc8;
  --border-light: #faf6eb;
  --shadow: 0 2px 4px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
}
[data-theme="tech"] {
  --bg-body: #0f0f23;
  --bg-card: #1a1a3e;
  --bg-alt: #252550;
  --bg-header: #1a1a3e;
  --bg-footer: #0a0a1a;
  --text-main: #e2e8f0;
  --text-secondary: #a5b4fc;
  --muted: #6366f1;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: #818cf8;
  --border: #2d2d5e;
  --border-light: #252550;
  --shadow: 0 2px 4px rgba(0,0,0,.3);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.5);
}
[data-theme="midnight"] {
  --bg-body: #020617;
  --bg-card: #0f172a;
  --bg-alt: #1e293b;
  --bg-header: #0f172a;
  --bg-footer: #010409;
  --text-main: #e2e8f0;
  --text-secondary: #94a3b8;
  --muted: #64748b;
  --accent: #818cf8;
  --accent-hover: #6366f1;
  --accent-light: #a5b4fc;
  --border: #1e293b;
  --border-light: #1e293b;
  --shadow: 0 2px 4px rgba(0,0,0,.3);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.5);
}
/* ============================================================
   ТЕМИ — ВИПРАВЛЕНІ СЕЛЕКТОРИ (без пробілів у лапках)
   ============================================================ */
[data-theme="dark"]{--bg-body:#1a1a1a;--bg-card:#2d2d2d;--bg-alt:#252525;--bg-header:#2d2d2d;--bg-footer:#0f0f0f;--text-main:#f5f5f5;--text-secondary:#ccc;--muted:#999;--accent:#64b5f6;--accent-hover:#42a5f5;--accent-light:#90caf9;--border:#404040;--border-light:#333;--shadow:0 2px 4px rgba(0,0,0,.3);--shadow-lg:0 4px 12px rgba(0,0,0,.5);}
[data-theme="ocean"]{--bg-body:#e3f2fd;--bg-card:#fff;--bg-alt:#f5f9ff;--bg-header:#fff;--bg-footer:#0d47a1;--text-main:#0d47a1;--text-secondary:#1565c0;--muted:#5c6bc0;--accent:#1976d2;--accent-hover:#1565c0;--accent-light:#42a5f5;--border:#bbdefb;--border-light:#e3f2fd;}
[data-theme="forest"]{--bg-body:#e8f5e9;--bg-card:#fff;--bg-alt:#f1f8e9;--bg-header:#fff;--bg-footer:#1b5e20;--text-main:#1b5e20;--text-secondary:#2e7d32;--muted:#558b2f;--accent:#388e3c;--accent-hover:#2e7d32;--accent-light:#66bb6a;--border:#c8e6c9;--border-light:#e8f5e9;}
[data-theme="sunset"]{--bg-body:#fff3e0;--bg-card:#fff;--bg-alt:#fff8e1;--bg-header:#fff;--bg-footer:#bf360c;--text-main:#bf360c;--text-secondary:#d84315;--muted:#e64a19;--accent:#f4511e;--accent-hover:#e64a19;--accent-light:#ff7043;--border:#ffccbc;--border-light:#fbe9e7;}
[data-theme="prom"]{--bg-body:#fafafa;--bg-card:#fff;--bg-alt:#f5f5f5;--bg-header:#fff;--bg-footer:#212121;--text-main:#212121;--text-secondary:#616161;--muted:#9e9e9e;--accent:#ff6600;--accent-hover:#e65c00;--accent-light:#ff8533;--border:#e0e0e0;--border-light:#f5f5f5;}
[data-theme="rozetka"]{--bg-body:#fff;--bg-card:#fff;--bg-alt:#f5f5f5;--bg-header:#fff;--bg-footer:#1b1b1b;--text-main:#1b1b1b;--text-secondary:#616161;--muted:#9e9e9e;--accent:#00a046;--accent-hover:#008a3c;--accent-light:#33b46b;--border:#e0e0e0;--border-light:#f5f5f5;}
[data-theme="amazon"]{--bg-body:#eaeded;--bg-card:#fff;--bg-alt:#f2f3f3;--bg-header:#fff;--bg-footer:#131a22;--text-main:#0f1111;--text-secondary:#565959;--muted:#767676;--accent:#ff9900;--accent-hover:#e68a00;--accent-light:#ffb84d;--border:#d5dbdb;--border-light:#f2f3f3;}
[data-theme="ebay"]{--bg-body:#fff;--bg-card:#fff;--bg-alt:#f7f7f7;--bg-header:#fff;--bg-footer:#191919;--text-main:#191919;--text-secondary:#555;--muted:#999;--accent:#3665f3;--accent-hover:#2b5ae0;--accent-light:#6b8ff7;--border:#e5e5e5;--border-light:#f7f7f7;}
[data-theme="aliexpress"]{--bg-body:#f5f5f5;--bg-card:#fff;--bg-alt:#fafafa;--bg-header:#fff;--bg-footer:#1a1a1a;--text-main:#222;--text-secondary:#666;--muted:#999;--accent:#e62e04;--accent-hover:#cc2900;--accent-light:#f05a2e;--border:#e8e8e8;--border-light:#fafafa;}
[data-theme="etsy"]{--bg-body:#fdf7f2;--bg-card:#fff;--bg-alt:#faf5ee;--bg-header:#fff;--bg-footer:#2f2424;--text-main:#222;--text-secondary:#595959;--muted:#999;--accent:#f1641e;--accent-hover:#d95815;--accent-light:#f58a4f;--border:#e8ddd0;--border-light:#faf5ee;}
[data-theme="shopify"]{--bg-body:#f6f6f7;--bg-card:#fff;--bg-alt:#fafbfb;--bg-header:#fff;--bg-footer:#1a1a1a;--text-main:#212b36;--text-secondary:#5c5f62;--muted:#8c9196;--accent:#008060;--accent-hover:#006e52;--accent-light:#33a086;--border:#e1e3e5;--border-light:#fafbfb;}
[data-theme="woocommerce"]{--bg-body:#f7f7f7;--bg-card:#fff;--bg-alt:#f9f9f9;--bg-header:#fff;--bg-footer:#2c2c2c;--text-main:#3c3c3c;--text-secondary:#666;--muted:#999;--accent:#7f54b3;--accent-hover:#6d4699;--accent-light:#9d7cc7;--border:#e2e2e2;--border-light:#f9f9f9;}
[data-theme="magento"]{--bg-body:#f8f8f8;--bg-card:#fff;--bg-alt:#fafafa;--bg-header:#fff;--bg-footer:#31302b;--text-main:#41362f;--text-secondary:#666055;--muted:#999080;--accent:#f46f25;--accent-hover:#e0601a;--accent-light:#f7935a;--border:#e3e3e3;--border-light:#fafafa;}
[data-theme="prestashop"]{--bg-body:#fafafa;--bg-card:#fff;--bg-alt:#f7f7f7;--bg-header:#fff;--bg-footer:#333;--text-main:#363a41;--text-secondary:#6c757d;--muted:#adb5bd;--accent:#df0067;--accent-hover:#c5005b;--accent-light:#e93c8f;--border:#e5e5e5;--border-light:#f7f7f7;}
[data-theme="opencart"]{--bg-body:#f5f5f5;--bg-card:#fff;--bg-alt:#f9f9f9;--bg-header:#fff;--bg-footer:#2e3a4e;--text-main:#333;--text-secondary:#666;--muted:#999;--accent:#1e91cf;--accent-hover:#1a80b8;--accent-light:#54aadd;--border:#ddd;--border-light:#f9f9f9;}
[data-theme="corporate"]{--bg-body:#f7fafc;--bg-card:#fff;--bg-alt:#edf2f7;--bg-header:#fff;--bg-footer:#1a202c;--text-main:#1a202c;--text-secondary:#4a5568;--muted:#a0aec0;--accent:#1a365d;--accent-hover:#152a4a;--accent-light:#2c5282;--border:#e2e8f0;--border-light:#edf2f7;}
[data-theme="minimal"]{--bg-body:#fafafa;--bg-card:#fff;--bg-alt:#f5f5f5;--bg-header:#fff;--bg-footer:#171717;--text-main:#171717;--text-secondary:#525252;--muted:#a3a3a3;--accent:#171717;--accent-hover:#333;--accent-light:#404040;--border:#e5e5e5;--border-light:#f5f5f5;}
[data-theme="luxury"]{--bg-body:#fffef7;--bg-card:#fff;--bg-alt:#faf6eb;--bg-header:#fff;--bg-footer:#1a1a1a;--text-main:#2c2c2c;--text-secondary:#5a5a5a;--muted:#8f8f8f;--accent:#b8860b;--accent-hover:#9a7209;--accent-light:#d4a017;--border:#e8dcc8;--border-light:#faf6eb;}
[data-theme="tech"]{--bg-body:#0f0f23;--bg-card:#1a1a3e;--bg-alt:#252550;--bg-header:#1a1a3e;--bg-footer:#0a0a1a;--text-main:#e2e8f0;--text-secondary:#a5b4fc;--muted:#6366f1;--accent:#6366f1;--accent-hover:#4f46e5;--accent-light:#818cf8;--border:#2d2d5e;--border-light:#252550;--shadow:0 2px 4px rgba(0,0,0,.3);--shadow-lg:0 4px 12px rgba(0,0,0,.5);}
[data-theme="midnight"]{--bg-body:#020617;--bg-card:#0f172a;--bg-alt:#1e293b;--bg-header:#0f172a;--bg-footer:#010409;--text-main:#e2e8f0;--text-secondary:#94a3b8;--muted:#64748b;--accent:#818cf8;--accent-hover:#6366f1;--accent-light:#a5b4fc;--border:#1e293b;--border-light:#1e293b;--shadow:0 2px 4px rgba(0,0,0,.3);--shadow-lg:0 4px 12px rgba(0,0,0,.5);}

/* === МІНІАТЮРИ ГАЛЕРЕЇ (клас .thumb, як у згенерованих сторінках) === */
.gallery-thumbs { display:flex; flex-direction:column; gap:8px; overflow-y:auto; max-height:500px; }
.gallery-thumbs .thumb {
  width:100%; aspect-ratio:1/1; border:2px solid var(--border); border-radius:var(--radius);
  overflow:hidden; cursor:pointer; background:var(--bg-alt); padding:0; transition:all var(--transition);
}
.gallery-thumbs .thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.gallery-thumbs .thumb:hover { border-color:var(--accent); }
.gallery-thumbs .thumb.active { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-light); }
@media (max-width:768px){
  .gallery-thumbs { flex-direction:row; overflow-x:auto; overflow-y:hidden; max-height:none; padding-bottom:4px; }
  .gallery-thumbs .thumb { flex:0 0 72px; width:72px; }
}
/* ============================================================
   FIX: шторка адмінки на десктопі завжди відкрита
   ============================================================ */
@media (min-width: 769px) {
  .admin-sidebar {
    left: 0 !important;
    transform: none !important;
    display: flex !important;
  }
  .sidebar-backdrop {
    display: none !important;
  }
  .admin-content {
    margin-left: 260px !important;
  }
}
/* === ПРОМО-БЕЙДЖІ (Топ / Знижка) — вверху справа === */
.product-card-img, .gallery-main { position: relative; }
.promo-badges{position:absolute;top:10px;right:10px;display:flex;flex-direction:column;align-items:flex-end;gap:6px;z-index:3;pointer-events:none}
.badge-top{background:linear-gradient(135deg,#ff6600,#ff9900);color:#fff;font-size:10px;font-weight:800;padding:5px 10px;border-radius:20px;box-shadow:0 2px 8px rgba(255,102,0,.45);text-transform:uppercase;letter-spacing:.5px;animation:badgePulse 2s infinite}
.badge-discount{background:linear-gradient(135deg,#dc2626,#ef4444);color:#fff;font-size:11px;font-weight:800;padding:5px 10px;border-radius:20px;box-shadow:0 2px 8px rgba(220,38,38,.45)}
@keyframes badgePulse{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
.price-new{font-weight:700;color:var(--accent,#e62e04)}
.price-old{color:var(--muted,#999);text-decoration:line-through;font-size:.75em;font-weight:400;margin-left:8px}
.product-price-big .price-old{font-size:.55em}
/* Адмінка: промо-інструменти */
.promo-tabs{display:flex;gap:4px;border-bottom:2px solid var(--border);margin-bottom:16px;flex-wrap:wrap}
.promo-tab{padding:10px 18px;background:none;border:none;border-bottom:2px solid transparent;margin-bottom:-2px;cursor:pointer;font-size:14px;font-weight:500;color:var(--text-secondary);font-family:inherit}
.promo-tab.active{color:var(--primary);border-bottom-color:var(--primary)}
.promo-block{display:none}.promo-block.active{display:block;animation:fadeIn .25s ease}
.prod-check-list{max-height:420px;overflow-y:auto;border:1px solid var(--border);border-radius:6px;background:var(--card);margin:10px 0}
.prod-check-item{display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--border-light);font-size:13px;cursor:pointer}
.prod-check-item:last-child{border-bottom:none}
.prod-check-item span{flex:1}
@media (max-width:768px){
 .order-filter-bar{flex-direction:column;align-items:stretch}
 .order-filter-bar .btn-a{width:100%;justify-content:center}
 .promo-badges{top:6px;right:6px}
}
.faq-item{border:1px solid var(--border);border-radius:8px;margin-bottom:8px;background:var(--bg-card)}
.faq-item summary{padding:12px 16px;cursor:pointer;font-weight:600}
.faq-item p{padding:0 16px 12px;color:var(--text-secondary)}
.related-card{display:flex;flex-direction:column;gap:6px;border:1px solid var(--border);border-radius:8px;padding:8px;text-decoration:none}
.related-card img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:6px}
.related-card span{font-size:12px;color:var(--text-main)}
/* Бічна панель фото — drawer, який зсуває контент */
.gallery-side {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100%;
  background: var(--bg-card);
  box-shadow: -4px 0 16px rgba(0,0,0,.25);
  transform: translateX(100%);
  transition: transform .3s ease;
  z-index: 1200;
  display: flex;
  flex-direction: column;
}
.gallery-side.open {
  transform: translateX(0);
}

/* Коли панель відкрита — зсуваємо основний контент */
body.has-gallery-side .product-layout {
  margin-right: 320px;
  transition: margin-right .3s ease;
}

/* На мобільному — шторка знизу, без зсуву контенту */
@media (max-width: 768px) {
  body.has-gallery-side .product-layout {
    margin-right: 0;
  }
  .gallery-side {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    max-height: 60%;
    transform: translateY(100%);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -6px 20px rgba(0,0,0,.4);
  }
  .gallery-side.open {
    transform: translateY(0);
  }
  .gallery-side-list {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
}
/* ============================================================
   СТОРІНКА ТОВАРУ v2 (виправлені стилі)
   ============================================================ */
.product-layout{display:grid;grid-template-columns:1fr 1fr;gap:32px;align-items:start;margin-bottom:32px;}
@media (max-width:900px){.product-layout{grid-template-columns:1fr;}}

/* Галерея */
.product-gallery{position:relative;min-width:0;}
.gallery-main{position:relative;border:1px solid var(--border);border-radius:10px;overflow:hidden;background:var(--card);aspect-ratio:1/1;}
.gallery-slider{position:absolute;inset:0;}
.gallery-slide{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;transition:opacity .3s;}
.gallery-slide.active{opacity:1;}
.gallery-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:4;width:40px;height:40px;border:none;border-radius:8px;background:rgba(0,0,0,.45);color:#fff;font-size:20px;cursor:pointer;}
.gallery-prev{left:10px;}
.gallery-next{right:10px;}
.gallery-topbar{position:absolute;top:0;left:0;right:0;display:flex;justify-content:space-between;align-items:center;padding:8px 10px;z-index:5;background:linear-gradient(rgba(0,0,0,.35),transparent);}
.gallery-counter{color:#fff;font-size:13px;font-weight:600;background:rgba(0,0,0,.45);padding:3px 10px;border-radius:12px;}
.gallery-controls{display:flex;gap:6px;}
.gallery-ctrl{width:36px;height:36px;border:none;border-radius:6px;background:rgba(0,0,0,.45);color:#fff;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;}
.gallery-ctrl:hover{background:rgba(0,0,0,.7);}

/* Мініатюри */
.gallery-thumbs{display:flex;gap:8px;margin-top:10px;overflow-x:auto;padding-bottom:4px;}
.gallery-thumbs .thumb{flex:0 0 72px;height:72px;border:2px solid var(--border);border-radius:8px;overflow:hidden;padding:0;background:none;cursor:pointer;}
.gallery-thumbs .thumb img{width:100%;height:100%;object-fit:cover;}
.gallery-thumbs .thumb.active{border-color:var(--accent,#e62e04);}

/* Бічна панель фото */
.gallery-side{position:fixed;top:0;right:-300px;width:280px;height:100%;background:var(--card);box-shadow:-4px 0 16px rgba(0,0,0,.25);transition:right .3s ease;z-index:1200;display:flex;flex-direction:column;}
.gallery-side.open{right:0;}
.gallery-side-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid var(--border);font-weight:600;}
.gallery-side-head button{border:none;background:none;font-size:20px;cursor:pointer;color:var(--text-secondary);}
.gallery-side-list{overflow-y:auto;padding:10px;display:flex;flex-direction:column;gap:8px;}
.side-thumb{border:2px solid var(--border);border-radius:6px;overflow:hidden;cursor:pointer;padding:0;background:none;}
.side-thumb img{width:100%;display:block;aspect-ratio:4/3;object-fit:cover;}
.side-thumb.active{border-color:var(--accent,#e62e04);}

/* Інфо */
.product-info{min-width:0;}
.product-info h1{font-size:24px;font-weight:700;margin:0 0 10px;}
.product-sku{color:var(--text-secondary);font-size:13px;margin-bottom:10px;}
.product-price-big{font-size:30px;font-weight:800;color:var(--accent,#e62e04);margin:8px 0 14px;}
.product-price-big .price-old{font-size:.55em;font-weight:400;color:var(--muted,#999);text-decoration:line-through;margin-left:8px;}
.product-actions-big{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px;}
.product-badges{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;}
.product-badges>div{border:1px solid var(--border);border-radius:8px;padding:10px;text-align:center;background:var(--card);}
.product-badges .b-icon{font-size:20px;margin-bottom:4px;}
.product-badges .b-title{font-weight:600;font-size:13px;}
.product-badges .b-desc{color:var(--text-secondary);font-size:12px;}

/* Таби */
.tabs-nav{display:flex;gap:4px;border-bottom:2px solid var(--border);flex-wrap:wrap;margin:24px 0 16px;}
.tab-btn{padding:10px 18px;background:none;border:none;border-bottom:2px solid transparent;margin-bottom:-2px;cursor:pointer;font-size:14px;font-weight:500;color:var(--text-secondary);font-family:inherit;}
.tab-btn:hover{color:var(--primary);}
.tab-btn.active{color:var(--primary);border-bottom-color:var(--primary);}
.tab-content{display:none;}
.tab-content.active{display:block;}
.specs-table{width:100%;border-collapse:collapse;font-size:14px;}
.specs-table th,.specs-table td{border:1px solid var(--border);padding:8px 12px;text-align:left;}
.specs-table th{background:var(--border-light);font-weight:600;width:40%;}

/* Лайтбокс (схований за замовчуванням!) */
.product-lightbox{position:fixed;inset:0;background:rgba(0,0,0,.92);display:none;align-items:center;justify-content:center;z-index:2000;}
.product-lightbox.open{display:flex;}
.product-lightbox #lightbox-img{max-width:92vw;max-height:82vh;object-fit:contain;}
.lb-topbar{position:absolute;top:0;left:0;right:0;display:flex;justify-content:space-between;align-items:center;padding:10px 14px;background:rgba(0,0,0,.5);z-index:5;}
.lb-counter{color:#fff;font-size:14px;font-weight:600;}
.lb-controls{display:flex;gap:8px;}
.lb-controls button{width:38px;height:38px;border:none;border-radius:6px;background:rgba(255,255,255,.15);color:#fff;font-size:17px;cursor:pointer;}
.lb-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border:none;border-radius:8px;background:rgba(255,255,255,.15);color:#fff;font-size:22px;cursor:pointer;z-index:6;}
.lb-prev{left:14px;}
.lb-next{right:14px;}

/* Модалки (якщо їх теж з'їло) */
.modal-overlay{position:fixed;inset:0;background:rgba(15,23,42,.55);display:none;align-items:center;justify-content:center;z-index:1500;padding:20px;}
.modal-overlay[aria-hidden="false"]{display:flex;}
.modal-content{background:var(--card);border:1px solid var(--border);border-radius:10px;max-width:560px;width:100%;max-height:90vh;overflow-y:auto;position:relative;padding:24px;}
.modal-content.modal-large{max-width:760px;}
.modal-content.modal-xlarge{max-width:1000px;}
.modal-close{position:absolute;top:10px;right:10px;width:32px;height:32px;border:none;border-radius:6px;background:var(--border-light);color:var(--text);cursor:pointer;font-size:16px;line-height:1;}
.modal-title{font-size:18px;font-weight:700;margin:0 0 16px;padding-right:40px;}
/* ========= FIX PATCH v3 (сторінка товару: мініатюри, модалки, ціна) ========= */
.gallery-thumbs{display:flex;gap:8px;margin-top:10px;overflow-x:auto;padding-bottom:4px;}
.gallery-thumbs .thumb{flex:0 0 72px;width:72px;height:72px;border:2px solid var(--border);border-radius:8px;overflow:hidden;padding:0;background:var(--card);cursor:pointer;}
.gallery-thumbs .thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.gallery-thumbs .thumb:hover{border-color:var(--accent);}
.gallery-thumbs .thumb.active{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-light,rgba(230,46,4,.2));}
.product-price-big{font-size:30px;font-weight:800;color:var(--accent,#e62e04);margin:8px 0 14px;}
.product-price-big .price-old{font-size:.55em;font-weight:400;color:var(--muted,#999);text-decoration:line-through;margin-left:8px;}
/* --- Модалки: кошик і порівняння --- */
.modal-overlay{position:fixed;inset:0;background:rgba(15,23,42,.55);display:none;align-items:center;justify-content:center;z-index:1500;padding:20px;}
.modal-overlay[aria-hidden="false"]{display:flex;}
.modal-content{background:var(--card,#fff);border:1px solid var(--border);border-radius:12px;max-width:560px;width:100%;max-height:90vh;overflow-y:auto;position:relative;padding:24px;box-shadow:0 20px 60px rgba(0,0,0,.25);}
.modal-content.modal-large{max-width:760px;}
.modal-content.modal-xlarge{max-width:1080px;}
.modal-close{position:absolute;top:10px;right:10px;width:32px;height:32px;border:none;border-radius:8px;background:var(--border-light,#eee);color:var(--text-main,#222);cursor:pointer;font-size:18px;line-height:1;}
.modal-title{font-size:20px;font-weight:700;margin:0 0 16px;padding-right:40px;}
.cart-empty{text-align:center;padding:20px 0;color:var(--text-secondary);}
.cart-item{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--border-light);}
.cart-item-img{width:64px;height:64px;object-fit:cover;border-radius:8px;border:1px solid var(--border);}
.cart-item-info{flex:1;min-width:0;}
.cart-item-name{font-weight:600;font-size:14px;margin-bottom:4px;}
.cart-item-price{color:var(--accent,#e62e04);font-weight:700;}
.cart-item-qty{display:flex;align-items:center;gap:6px;}
.qty-btn{width:28px;height:28px;border:1px solid var(--border);border-radius:6px;background:var(--card);cursor:pointer;font-size:14px;}
.cart-item-remove{border:none;background:none;color:var(--danger,#c00);font-size:18px;cursor:pointer;}
.cart-summary{margin-top:14px;}
.summary-row{display:flex;justify-content:space-between;padding:4px 0;font-size:14px;}
.summary-row.total{font-size:18px;font-weight:800;color:var(--accent,#e62e04);}
.cart-actions{display:flex;gap:10px;margin-top:16px;flex-wrap:wrap;}
.compare-table{width:100%;border-collapse:collapse;font-size:13px;}
.compare-table th,.compare-table td{border:1px solid var(--border);padding:8px;vertical-align:top;}
.compare-img{width:90px;height:90px;object-fit:cover;border-radius:8px;}
@media (max-width:768px){
  .gallery-thumbs .thumb{flex:0 0 72px;width:72px;height:72px;}
  .modal-content{padding:20px;max-height:85vh;}
  .cart-item{flex-wrap:wrap;}
  .cart-item-img{width:50px;height:50px;}
  .cart-actions{flex-direction:column;}
  .cart-actions .btn{width:100%;}
  .compare-table{font-size:12px;}
  .compare-img{width:80px;height:80px;}
}
/* FIX v4: мініатюри в рядок (перебиває старе flex-direction:column) */
.gallery-thumbs{display:flex;flex-direction:row;gap:8px;margin-top:10px;overflow-x:auto;overflow-y:hidden;max-height:none;padding-bottom:4px;}
.gallery-thumbs .thumb{flex:0 0 72px;width:72px;height:72px;border:2px solid var(--border);border-radius:8px;overflow:hidden;padding:0;background:var(--card);cursor:pointer;}
.gallery-thumbs .thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.gallery-thumbs .thumb.active{border-color:var(--accent);}
/* === ПАНЕЛЬ ФОТО v2.2 — лише поверх лайтбоксу === */
.gallery-side{
  position:fixed; top:0; right:-320px; width:300px; height:100%;
  background:var(--card); box-shadow:-4px 0 16px rgba(0,0,0,.35);
  transition:right .3s ease, transform .3s ease;
  z-index:2100; /* вище лайтбоксу (2000) */
  display:flex; flex-direction:column;
}
.gallery-side.open{ right:0; }
.gallery-side-head{ display:flex; justify-content:space-between; align-items:center; padding:12px 14px; border-bottom:1px solid var(--border); font-weight:600; }
.gallery-side-head button{ border:none; background:none; font-size:20px; cursor:pointer; color:var(--text-secondary); }
.gallery-side-list{ overflow-y:auto; padding:10px; display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.side-thumb{ border:2px solid transparent; border-radius:6px; overflow:hidden; padding:0; background:none; cursor:pointer; }
.side-thumb img{ width:100%; aspect-ratio:1/1; object-fit:cover; display:block; }
.side-thumb.active{ border-color:var(--accent); }
/* Мобільна версія: шторка знизу поверх лайтбоксу, дрібні картки */
@media (max-width:768px){
  .gallery-side{
    top:auto; bottom:0; left:0; right:0; width:100%; height:auto; max-height:70%;
    transform:translateY(100%); border-radius:14px 14px 0 0;
    box-shadow:0 -6px 20px rgba(0,0,0,.4);
  }
  .gallery-side.open{ right:0; transform:translateY(0); }
  .gallery-side-list{ grid-template-columns:repeat(4,1fr); gap:6px; }
}
/* === Товари: блоки інструментів показуються тільки активні === */
#sec-products [id^="prod-block-"] { display: none; }
#sec-products [id^="prod-block-"].active { display: block; }
/* === ПАНЕЛЬ ФОТО v2.3 — ПК: великі фото один під одним; ✕ не пересікаються === */
.lb-topbar{ z-index:50; }
.product-lightbox .gallery-side{
  position:fixed; top:0; right:0;
  width:min(420px, 92vw); height:100%;
  transform:translateX(105%); transition:transform .3s ease;
  background:var(--card,#141414); color:var(--text-main,#fff);
  z-index:60; /* ВИЩЕ за lb-topbar → кнопки не пересікаються */
  display:flex; flex-direction:column;
  box-shadow:-8px 0 24px rgba(0,0,0,.45);
}
.product-lightbox .gallery-side.open{ transform:translateX(0); }
.gallery-side-head{
  flex:0 0 auto;
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 14px; background:var(--card,#141414);
  border-bottom:1px solid var(--border,#2c2c2c);
  font-weight:700;
}
.gallery-side-head button{
  width:34px; height:34px; border:none; border-radius:8px;
  background:rgba(127,127,127,.25); color:inherit; font-size:18px; cursor:pointer;
}
.gallery-side-list{
  overflow-y:auto; padding:12px;
  display:grid; grid-template-columns:1fr; gap:10px; /* ПК: один під одним, на всю ширину */
}
.side-thumb{ border:2px solid transparent; border-radius:10px; overflow:hidden; padding:0; background:none; cursor:pointer; }
.side-thumb img{ width:100%; aspect-ratio:4/3; object-fit:cover; display:block; }
.side-thumb.active{ border-color:var(--accent,#e62e04); }

/* === МОБІЛЬНА ВЕРСІЯ: акуратна шторка знизу, дрібна сітка 3 в ряд === */
@media (max-width:768px){
  .product-lightbox .gallery-side{
    top:auto; bottom:0; left:0; right:0;
    width:100%; height:auto; max-height:62%;
    transform:translateY(105%);
    border-radius:16px 16px 0 0;
    box-shadow:0 -8px 24px rgba(0,0,0,.5);
  }
  .product-lightbox .gallery-side.open{ transform:translateY(0); }
  .gallery-side-list{ grid-template-columns:repeat(3,1fr); gap:8px; padding:10px; }
  .side-thumb img{ aspect-ratio:1/1; }
}
/* === FIX v6: панель «📷 Фото» — темний фон + білий текст і хрестик === */
.gallery-side{
  background:#141414 !important;
  color:#ffffff;
}
.gallery-side-head,
.gallery-side-head span{
  color:#ffffff !important;
}
.gallery-side-head button{
  color:#ffffff !important;
  background:rgba(255,255,255,.15) !important;
  border-radius:8px;
}
.gallery-side-head button:hover{
  background:rgba(255,255,255,.3) !important;
}
/* рамки мініатюр видимі на темному фоні */
.gallery-side .side-thumb{
  border:2px solid rgba(255,255,255,.25);
}
.gallery-side .side-thumb.active{
  border-color:var(--accent,#e62e04);
}
/* ============================================================
   FIX v7: панель «📷 Фото» — стовпчик зі скролом ТІЛЬКИ для ПК (≥769px).
   Мобільну версію (шторка знизу, сітка) НЕ чіпає.
   ============================================================ */
@media (min-width: 769px) {
  .gallery-side-list{
    display: flex !important;
    flex-direction: column !important;   /* фото одне під одним, по порядку */
    gap: 12px !important;               /* відступ між фото — не злипаються */
    overflow-y: auto !important;        /* скрол униз */
    -webkit-overflow-scrolling: touch;
    padding: 12px !important;
  }
  .gallery-side-list .side-thumb{
    flex: 0 0 auto !important;          /* кожне фото — окремий блок, не стискається */
    width: 100% !important;             /* ширину НЕ чіпаємо */
    aspect-ratio: auto !important;
    overflow: hidden !important;
    border-radius: 10px;
    border: 2px solid var(--border, #e0e0e0);   /* бортик між фото */
    background: var(--card, #fff);
    padding: 0;
    cursor: pointer;
  }
  .gallery-side-list .side-thumb img{
    width: 100% !important;
    height: auto !important;            /* фото вміщується повністю, не обрізається */
    aspect-ratio: auto !important;
    object-fit: contain !important;
    display: block;
  }
  .gallery-side-list .side-thumb.active{
    border-color: var(--accent, #e62e04);
    box-shadow: 0 0 0 2px var(--accent-light, rgba(230,46,4,.25));
  }
}
/* === Оверлей оформлення замовлення / успіху (поверх вмісту кошика) === */
.checkout-overlay{
  position:absolute; inset:0; z-index:30;
  background:var(--bg-card); border-radius:var(--radius-lg);
  padding:24px; overflow-y:auto;
}
.checkout-success{ text-align:center; padding:24px 0; }
.checkout-success .ok-icon{ font-size:56px; line-height:1; }
.checkout-success .order-num{ font-size:30px; font-weight:800; color:var(--accent); margin:8px 0 12px; }

/* === Оверлей оформлення замовлення / екран успіху === */
.checkout-overlay{
  position:absolute; inset:0; z-index:30;
  background:var(--bg-card,#fff); border-radius:var(--radius-lg,12px);
  padding:24px; overflow-y:auto;
}
.checkout-success{ text-align:center; padding:24px 0; }
.checkout-success .ok-icon{ font-size:56px; line-height:1; }
.checkout-success .order-num{
  font-size:30px; font-weight:800; color:var(--accent,#e62e04); margin:8px 0 12px;
}
/* === НАГЛЯДНІ ПОМИЛКИ ОФОРМЛЕННЯ ЗАМОВЛЕННЯ === */
.checkout-error-box{
  display:flex; align-items:center; gap:10px;
  background:#fef2f2;
  border:2px solid var(--danger,#dc3545);
  border-left-width:6px;
  color:#b91c1c;
  padding:14px 16px;
  border-radius:10px;
  font-size:15px;
  font-weight:700;
  line-height:1.4;
  animation:checkoutShake .35s ease;
}
@keyframes checkoutShake{
  0%{transform:translateX(0)}20%{transform:translateX(-8px)}
  40%{transform:translateX(8px)}60%{transform:translateX(-4px)}
  80%{transform:translateX(4px)}100%{transform:translateX(0)}
}
.form-group input.input-error,
.form-group textarea.input-error{
  border-color:var(--danger,#dc3545) !important;
  box-shadow:0 0 0 3px rgba(220,53,69,.25) !important;
  background:#fef2f2 !important;
}
.checkout-error-box{
background:#fef2f2; border:2px solid var(--danger,#dc3545);
color:#b91c1c; padding:14px 16px; border-radius:10px;
font-size:15px; font-weight:700; line-height:1.4;
animation:checkoutShake .35s ease;
}
@keyframes checkoutShake{0%{transform:translateX(0)}20%{transform:translateX(-6px)}40%{transform:translateX(6px)}60%{transform:translateX(-3px)}100%{transform:translateX(0)}}
.form-group input.input-error{
border-color:var(--danger,#dc3545)!important;
box-shadow:0 0 0 3px rgba(220,53,69,.25)!important;
background:#fef2f2!important;
}
/* ============================================================
   КНОПКА ВИДАЛЕННЯ З КОШИКА — акуратний значок кошика (ПК + мобільний)
   ============================================================ */
.cart-item-remove{
  width:34px;
  height:34px;
  padding:0;
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc3545' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3%206%205%206%2021%206'/%3E%3Cpath d='M19%206v14a2%202%200%200%201-2%202H7a2%202%200%200%201-2-2V6m3%200V4a2%202%200%200%201%202-2h4a2%202%200%200%201%202%202v2'/%3E%3Cline x1='10' y1='11' x2='10' y2='17'/%3E%3Cline x1='14' y1='11' x2='14' y2='17'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  color:transparent;      /* ховає старий символ × */
  font-size:0;
  line-height:0;
  cursor:pointer;
  transition:all var(--transition);
}
.cart-item-remove:hover{
  background:var(--danger) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3%206%205%206%2021%206'/%3E%3Cpath d='M19%206v14a2%202%200%200%201-2%202H7a2%202%200%200%201-2-2V6m3%200V4a2%202%200%200%201%202-2h4a2%202%200%200%201%202%202v2'/%3E%3Cline x1='10' y1='11' x2='10' y2='17'/%3E%3Cline x1='14' y1='11' x2='14' y2='17'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  border-color:var(--danger);
  transform:scale(1.06);
}
/* Мобільна версія — трохи менша */
@media (max-width:768px){
  .cart-item-remove{ width:30px; height:30px; border-radius:7px; background-size:14px 14px; }
  .cart-item-remove:hover{ background-size:14px 14px; }
}
/* Швидкі характеристики — виправлено відображення */
.quick-specs {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.quick-specs li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-alt, #f8fafc);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  gap: 12px;
}
.quick-specs li span {
  color: var(--text-secondary, #64748b);
  font-weight: 500;
  flex: 1;
}
.quick-specs li strong {
  color: var(--text, #1e293b);
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}
/* ============================================================
   ПРОМО-БЕЙДЖІ ТА ЦІНИ КАТАЛОГУ (ФІНАЛЬНИЙ ВИГЛЯД)
   ============================================================ */
.product-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
  overflow: hidden;
}

.promo-badges {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  z-index: 10;
  pointer-events: none;
}

.badge-top {
  background: linear-gradient(135deg, #ff6600, #ff9900);
  color: #fff !important;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
  box-shadow: 0 2px 6px rgba(255, 102, 0, .45);
}

.badge-discount {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff !important;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(220, 38, 38, .45);
}

.badge-new {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff !important;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, .45);
}

.product-card-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.price-new {
  color: var(--accent, #e62e04);
  font-weight: 800;
}

.price-old {
  color: var(--muted, #888888);
  font-size: 13px;
  font-weight: 400;
  text-decoration: line-through;
}

@media (max-width: 480px) {
  .promo-badges {
    top: 6px;
    right: 6px;
    gap: 3px;
  }
  .badge-top, .badge-discount, .badge-new {
    font-size: 9px;
    padding: 2px 6px;
  }
  .product-card-price {
    font-size: 15px;
  }
  .price-old {
    font-size: 11px;
  }
}
/* Бейджі ТОП та Знижки на сторінці товару */
.gallery-main {
  position: relative !important;
}

.gallery-main .promo-badges {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  z-index: 10;
  pointer-events: none;
}

.gallery-main .badge-top {
  background: linear-gradient(135deg, #ff6600, #ff9900);
  color: #fff !important;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
  box-shadow: 0 2px 8px rgba(255, 102, 0, .45);
}

.gallery-main .badge-discount {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff !important;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(220, 38, 38, .45);
}

.product-price-big .price-new {
  color: var(--accent, #e62e04);
  font-weight: 800;
}

.product-price-big .price-old {
  color: var(--muted, #888888);
  font-size: 18px;
  font-weight: 400;
  text-decoration: line-through;
  margin-left: 10px;
}
/* ============================================================
   ОНОВЛЕНІ КАРТКИ ТОВАРІВ (ФОКУС НА КОНВЕРСІЮ ТА «КУПИТИ»)
   ============================================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-lg, 8px);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  border-color: var(--accent, #ff6600);
}

.product-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-alt, #f8fafc);
  overflow: hidden;
  display: block;
}

.product-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform .3s ease;
  display: block;
}

.product-card:hover .product-card-img-wrap img {
  transform: scale(1.05);
}

/* Промо-бейджі */
.promo-badges {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  z-index: 5;
  pointer-events: none;
}

.badge-top {
  background: linear-gradient(135deg, #ff6600, #ff9900);
  color: #fff !important;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
  box-shadow: 0 2px 6px rgba(255, 102, 0, .35);
}

.badge-discount {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff !important;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(220, 38, 38, .35);
}

.badge-new {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff !important;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, .35);
}

/* Тіло картки */
.product-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Статус наявності */
.product-card-stock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #16a34a;
  margin-bottom: 6px;
}

.product-card-stock::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #16a34a;
  border-radius: 50%;
  display: inline-block;
}

/* Рейтинг */
.product-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #f59e0b;
  margin-bottom: 6px;
}

.product-card-rating span {
  color: var(--text-secondary, #64748b);
  font-size: 11px;
}

/* Заголовок */
.product-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
  min-height: 35px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-title a {
  color: var(--text-main, #1e293b);
  text-decoration: none;
}

.product-card-title a:hover {
  color: var(--accent, #ff6600);
}

/* Ціна */
.product-card-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: auto;
  margin-bottom: 10px;
}

.product-card-price .price-new {
  font-size: 17px;
  font-weight: 800;
  color: var(--accent, #ff6600);
}

.product-card-price .price-old {
  font-size: 12px;
  color: var(--muted, #94a3b8);
  text-decoration: line-through;
  font-weight: 400;
}

/* Кнопки дій: Купити + Порівняти */
.product-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.product-card-buy-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent, #ff6600);
  color: #ffffff;
  border: none;
  border-radius: var(--radius, 6px);
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, transform .1s ease;
  font-family: inherit;
}

.product-card-buy-btn:hover {
  background: var(--accent-hover, #e65c00);
  color: #fff;
}

.product-card-buy-btn:active {
  transform: scale(0.98);
}

.btn-icon-compare {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border, #cbd5e1);
  background: var(--bg-card, #fff);
  border-radius: var(--radius, 6px);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  transition: all .2s ease;
}

.btn-icon-compare:hover {
  background: var(--bg-alt, #f1f5f9);
  border-color: var(--accent, #ff6600);
}

/* ============================================================
   МОБІЛЬНА АДАПТАЦІЯ (СТРОГО 2 КОЛОНКИ НА СМАРТФОНАХ)
   ============================================================ */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .product-card-body {
    padding: 8px;
  }
  .product-card-title {
    font-size: 12px;
    min-height: 32px;
    margin-bottom: 6px;
  }
  .product-card-stock {
    font-size: 10px;
    margin-bottom: 4px;
  }
  .product-card-rating {
    display: none; /* Економія місця на мобільному */
  }
  .product-card-price .price-new {
    font-size: 14px;
  }
  .product-card-price .price-old {
    font-size: 11px;
  }
  .product-card-buy-btn {
    padding: 7px 6px;
    font-size: 12px;
  }
  .btn-icon-compare {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .products-grid {
    gap: 6px !important;
  }
  .product-card-buy-btn {
    font-size: 11px;
    padding: 6px 4px;
  }
}
/* ============================================================
   МОБІЛЬНА АДАПТАЦІЯ ДЛЯ МОДАЛКИ ПОРІВНЯННЯ ТОВАРІВ
   ============================================================ */
#compare-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 10px;
  padding-bottom: 12px;
}

/* Стилізація скролбару порівняння */
#compare-wrap::-webkit-scrollbar {
  height: 6px;
}
#compare-wrap::-webkit-scrollbar-track {
  background: var(--bg-alt, #f1f5f9);
  border-radius: 4px;
}
#compare-wrap::-webkit-scrollbar-thumb {
  background: var(--border, #cbd5e1);
  border-radius: 4px;
}

.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: var(--bg-card, #ffffff);
}

.compare-table th,
.compare-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  border-right: 1px solid var(--border, #e2e8f0);
  font-size: 13px;
  vertical-align: middle;
}

.compare-table tr:last-child th,
.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table th:last-child,
.compare-table td:last-child {
  border-right: none;
}

/* Заголовок параметра (перший стовпець) */
.compare-table thead th:first-child,
.compare-table tbody th {
  background: var(--bg-alt, #f8fafc);
  font-weight: 700;
  color: var(--text-main, #333333);
  white-space: nowrap;
}

/* Колонка товару */
.compare-table thead th:not(:first-child) {
  text-align: center;
  background: var(--bg-card, #ffffff);
  vertical-align: top;
}

.compare-table tbody td {
  text-align: center;
  color: var(--text-secondary, #475569);
}

.compare-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin: 0 auto 8px;
  display: block;
  background: var(--bg-alt, #f8fafc);
  border-radius: 8px;
  padding: 4px;
  border: 1px solid var(--border, #e2e8f0);
}

.compare-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
  min-height: 34px;
  color: var(--text-main, #1e293b);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compare-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fee2e2;
  color: var(--danger, #dc2626);
  border: 1px solid #fca5a5;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
}

.compare-remove:hover {
  background: var(--danger, #dc2626);
  color: #fff;
  border-color: var(--danger, #dc2626);
}

/* ============================================================
   АДАПТИВНІ СТИЛІ ДЛЯ СМАРТФОНІВ (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  /* Розміри самої модалки */
  #compare-modal .modal-content {
    width: 95vw !important;
    max-width: 95vw !important;
    padding: 16px 12px !important;
    max-height: 90vh !important;
  }

  #compare-modal .modal-title {
    font-size: 17px !important;
    margin-bottom: 12px !important;
  }

  /* Таблиця на мобільних пристроях */
  .compare-table {
    font-size: 12px !important;
    min-width: 320px;
  }

  .compare-table th,
  .compare-table td {
    padding: 8px 10px !important;
  }

  /* Перший фіксований стовпчик характеристик */
  .compare-table thead th:first-child,
  .compare-table tbody th {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg-alt, #f8fafc) !important;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    min-width: 110px !important;
    max-width: 120px !important;
    white-space: normal !important;
    word-break: break-word;
    font-size: 11px !important;
  }

  /* Стовпчики самих товарів */
  .compare-table thead th:not(:first-child),
  .compare-table tbody td {
    min-width: 140px !important;
    max-width: 150px !important;
  }

  .compare-img {
    width: 70px !important;
    height: 70px !important;
    padding: 2px !important;
  }

  .compare-name {
    font-size: 11px !important;
    min-height: 28px !important;
    margin-bottom: 6px !important;
  }

  .compare-remove {
    padding: 4px 8px !important;
    font-size: 10px !important;
    width: 100%;
  }

  /* Кнопка «Очистити порівняння» внизу */
  #clear-compare-btn {
    width: 100% !important;
    padding: 10px !important;
    font-size: 13px !important;
    margin-top: 10px !important;
  }
}

@media (max-width: 480px) {
  #compare-modal .modal-content {
    width: 96vw !important;
    padding: 14px 8px !important;
  }

  .compare-table thead th:first-child,
  .compare-table tbody th {
    min-width: 100px !important;
    font-size: 10.5px !important;
    padding: 6px 8px !important;
  }

  .compare-table thead th:not(:first-child),
  .compare-table tbody td {
    min-width: 130px !important;
    padding: 6px 8px !important;
  }
}
/* ============================================================
   ПРОФЕСІЙНІ КНОПКИ КАРТКИ З SVG-ІКОНКАМИ
   ============================================================ */
.product-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  width: 100%;
}

/* Спільний клас для SVG іконок */
.product-card-actions .btn-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform .15s ease;
}

/* Головна кнопка «Купити» */
.product-card-buy-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--accent, #ff6600);
  color: #ffffff !important;
  border: none;
  border-radius: 6px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(255, 102, 0, 0.25);
  transition: all .2s ease;
}

.product-card-buy-btn:hover {
  background: var(--accent-hover, #e65c00);
  box-shadow: 0 4px 10px rgba(255, 102, 0, 0.35);
}

.product-card-buy-btn:hover .btn-svg {
  transform: scale(1.1);
}

.product-card-buy-btn:active {
  transform: scale(0.97);
}

/* Кнопка порівняння (графік/діаграма) */
.btn-icon-compare {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 6px;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  transition: all .2s ease;
  padding: 0;
}

.btn-icon-compare:hover {
  background: var(--bg-alt, #f1f5f9);
  color: var(--accent, #ff6600);
  border-color: var(--accent, #ff6600);
}

.btn-icon-compare:hover .btn-svg {
  transform: scale(1.1);
}

.btn-icon-compare.active {
  background: #fff7ed;
  color: var(--accent, #ff6600);
  border-color: var(--accent, #ff6600);
}

/* ============================================================
   МОБІЛЬНИЙ ВИГЛЯД (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  .product-card-actions {
    flex-direction: row !important;
    gap: 5px !important;
  }

  .product-card-buy-btn {
    height: 34px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
    gap: 5px !important;
  }

  .product-card-buy-btn .btn-svg {
    width: 14px !important;
    height: 14px !important;
  }

  .btn-icon-compare {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
  }

  .btn-icon-compare .btn-svg {
    width: 14px !important;
    height: 14px !important;
  }
}

@media (max-width: 360px) {
  .product-card-buy-btn {
    height: 32px !important;
    font-size: 11.5px !important;
  }
  .btn-icon-compare {
    width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px !important;
  }
}
/* ============================================================
   ІНФОГРАФІКА-ПЛАШКИ НА ФОТО ТОВАРІВ
   ============================================================ */
.product-card-img,
.product-card-img-wrap {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Контейнер інфографіки внизу фото */
.card-infographics {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 4;
  pointer-events: none;
}

/* Окремий бейдж характеристики */
.info-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff !important;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
  line-height: 1.2;
  white-space: nowrap;
}

/* Акцентні кольори для різних типів параметрів */
.info-tag.tag-freq {
  background: rgba(30, 58, 138, 0.88); /* Темно-синій */
  border-color: #60a5fa;
  color: #93c5fd !important;
}

.info-tag.tag-size {
  background: rgba(20, 83, 45, 0.88); /* Темно-зелений */
  border-color: #4ade80;
  color: #bbf7d0 !important;
}

.info-tag.tag-type {
  background: rgba(124, 45, 18, 0.88); /* Темно-теракотовий */
  border-color: #fb923c;
  color: #fed7aa !important;
}

/* Мобільна адаптація інфографіки */
@media (max-width: 768px) {
  .card-infographics {
    bottom: 4px;
    left: 4px;
    right: 4px;
    gap: 3px;
  }
  .info-tag {
    font-size: 9px;
    padding: 2px 5px;
  }
}

@media (max-width: 360px) {
  .info-tag {
    font-size: 8px;
    padding: 1px 4px;
  }
}
/* Темні акуратні бейджі інфографіки (як на другому скріншоті) */
.info-tag.tag-stock-dark,
.info-tag.tag-shipping-dark {
  background: #1e293b !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
  font-weight: 700;
  border-radius: 4px;
}

/* Повністю ховаємо старий зелений напис під фото */
.product-card-body .product-card-stock {
  display: none !important;
}
/* ============================================================
   СУЧАСНЕ МОДАЛЬНЕ ВІКНО ПОРІВНЯННЯ ТОВАРІВ
   ============================================================ */

/* Шапка модалки */
.modal-header-modern {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 102, 0, 0.1);
  color: var(--accent, #ff6600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-title-wrap .modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main, #1e293b);
  padding-right: 30px;
}

/* Порожній стан (Empty state) */
.modal-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.empty-icon-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--bg-alt, #f8fafc);
  border: 2px dashed var(--border, #cbd5e1);
  color: var(--accent, #ff6600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  transition: transform 0.3s ease;
}

.modal-empty-state:hover .empty-icon-circle {
  transform: scale(1.05);
}

.empty-state-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main, #1e293b);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 14px;
  color: var(--text-secondary, #64748b);
  max-width: 420px;
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Таблиця порівняння */
.compare-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card, #ffffff);
}

.compare-table th, 
.compare-table td {
  padding: 12px 16px;
  border: 1px solid var(--border, #e2e8f0);
  font-size: 13.5px;
}

/* Перша колонка параметрів */
.spec-col-header, 
.spec-label {
  background: var(--bg-alt, #f8fafc);
  color: var(--text-main, #1e293b);
  font-weight: 600;
  text-align: left;
  min-width: 140px;
}

/* Колонка товару */
.compare-prod-col {
  min-width: 180px;
  max-width: 220px;
  vertical-align: top;
  background: var(--bg-card, #ffffff);
  padding: 14px 12px;
}

.compare-card-head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.compare-remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.compare-remove-btn:hover {
  background: #dc2626;
  color: #ffffff;
  transform: scale(1.1);
}

.compare-img {
  width: 85px;
  height: 85px;
  object-fit: contain;
  margin-bottom: 8px;
}

.compare-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main, #1e293b);
  margin-bottom: 6px;
  text-align: center;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compare-price-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent, #ff6600);
}

.spec-val {
  text-align: center;
  color: var(--text-secondary, #475569);
}

/* Мобільна адаптація */
@media (max-width: 768px) {
  .empty-icon-circle {
    width: 74px;
    height: 74px;
  }
  .empty-state-title {
    font-size: 16px;
  }
  .empty-state-desc {
    font-size: 13px;
    margin-bottom: 18px;
  }
  .spec-col-header, .spec-label {
    min-width: 110px;
    font-size: 12px;
    padding: 8px 10px;
  }
  .compare-prod-col {
    min-width: 140px;
  }
}