/**
 * =====================================================
 * style.css - Головний стиль сайту 3dshka.net
 * =====================================================
 * Максимально простий та зрозумілий CSS
 * Змінні кольорів - зверху, міняйте під себе
 */

:root {
  --primary: #ea580c;
  --primary-hover: #c2410c;
  --primary-light: #fed7aa;
  --secondary: #1e293b;
  --bg: #ffffff;
  --bg-muted: #f8fafc;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #16a34a;
  --success-bg: #dcfce7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --info: #2563eb;
  --info-bg: #dbeafe;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
}

/* Темна тема */
[data-theme="dark"] {
  --bg: #0f172a;
  --bg-muted: #1e293b;
  --bg-card: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: 0 1px 3px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.4);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* ===== LAYOUT ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #dc2626);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}
.logo span { color: var(--primary); }
.logo small { display: block; font-size: 10px; font-weight: 400; color: var(--text-muted); line-height: 1; }

/* Пошук */
.search-box {
  flex: 1;
  max-width: 400px;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 8px 16px 8px 40px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-muted);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
}
.search-box input:focus { border-color: var(--primary); }
.search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

/* Навігація хедеру */
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--bg-muted); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { opacity: .9; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .9; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  font-size: 16px;
}
.btn-icon.btn-sm { width: 28px; height: 28px; font-size: 14px; }

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.badge-dark { background: var(--secondary); color: #fff; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .3s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.card-img {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--bg-muted), var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.card-img .color-dot {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}
.card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-body { padding: 16px; }
.card-body h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
.card-body .category-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.card-body .price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
}
.card-body .price { font-size: 18px; font-weight: 700; }
.card-body .old-price { font-size: 14px; color: var(--text-muted); text-decoration: line-through; }
.card-footer { padding: 0 16px 16px; }

/* Зірковий рейтинг */
.star-rating .star { color: #d1d5db; }
.star-rating .star.filled { color: #f59e0b; }

/* Специфікації товару */
.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.spec-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--bg-muted);
  border-radius: 6px;
  font-size: 12px;
}
.spec-item .spec-label { color: var(--text-muted); font-size: 10px; text-transform: uppercase; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary), #dc2626);
  color: #fff;
  padding: 48px 0;
  text-align: center;
}
.hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.hero p { font-size: 16px; opacity: .9; max-width: 600px; margin: 0 auto 20px; }

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

/* ===== SIDEBAR FILTERS ===== */
.with-sidebar {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 24px 0;
}
@media (max-width: 768px) {
  .with-sidebar { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .sidebar.open { display: block; }
}
.sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 80px;
}
.sidebar h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.filter-group { margin-bottom: 20px; }
.filter-group label { display: block; font-size: 13px; margin-bottom: 4px; color: var(--text-muted); }
.filter-group select,
.filter-group input[type="number"] {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
}
.filter-group select:focus,
.filter-group input:focus { outline: none; border-color: var(--primary); }
.filter-btn { width: 100%; }

/* ===== CATEGORY NAV ===== */
.category-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.category-nav a {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text);
  transition: all .2s;
}
.category-nav a:hover,
.category-nav a.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
}

/* ===== PRODUCT DETAIL ===== */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 32px 0;
}
@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; }
}
.product-images {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-main-image {
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  max-height: 500px;
}
.product-main-image img {
  width: 100%;
  height: 100%;
  max-height: 500px;
  object-fit: contain;
  display: block;
}
.product-thumbnails {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.product-thumbnails .thumb-item {
  cursor: pointer;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.product-thumbnails .thumb-item:hover {
  border-color: var(--primary);
}
.product-thumbnails .thumb-item.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}
.product-thumbnails .thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-info h1 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.product-info .price-big { font-size: 28px; font-weight: 800; color: var(--primary); margin: 12px 0; }
.product-info .old-price-big { font-size: 18px; color: var(--text-muted); text-decoration: line-through; }

/* Конфігуратор */
.configurator {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 20px;
}
.configurator h4 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.config-group { margin-bottom: 12px; }
.config-group .config-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.config-options { display: flex; gap: 6px; flex-wrap: wrap; }
.config-options .opt-btn {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  background: var(--bg);
  color: var(--text);
  transition: all .2s;
}
.config-options .opt-btn:hover,
.config-options .opt-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.color-circle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.color-circle:hover,
.color-circle.active {
  border-color: var(--primary);
  transform: scale(1.1);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Квадрат кольору (на сторінці товару — з назвою) */
.color-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.color-square {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all .2s;
  display: block;
}
.color-square:hover,
.color-square.active {
  border-color: var(--primary);
  transform: scale(1.08);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.color-name {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
  max-width: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.color-label.color-selected .color-name {
  color: var(--primary);
  font-weight: 600;
}

/* ===== CART ===== */
.cart-table {
  width: 100%;
  border-collapse: collapse;
}
.cart-table th, .cart-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.cart-table th { font-size: 12px; text-transform: uppercase; color: var(--text-muted); }
.qty-controls { display: flex; align-items: center; gap: 4px; }
.qty-controls button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-controls span { width: 30px; text-align: center; font-weight: 600; }
.cart-summary {
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 20px;
  max-width: 400px;
  margin-left: auto;
}
.cart-summary .total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text-muted);
}
.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 24px 0;
}
.page-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  background: var(--bg);
}
.page-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-dots { padding: 6px 8px; color: var(--text-muted); }

/* ===== FLASH MESSAGE ===== */
.flash-msg {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin: 16px 0;
  font-size: 14px;
}
.flash-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success); }
.flash-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger); }
.flash-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning); }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--secondary);
  color: #94a3b8;
  padding: 32px 0;
  margin-top: 48px;
}
.site-footer a { color: #e2e8f0; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
.footer-col h4 { color: #fff; font-size: 14px; margin-bottom: 8px; }
.footer-col p, .footer-col a { font-size: 13px; line-height: 1.8; }

/* ===== ADMIN ===== */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
}
.admin-sidebar {
  background: var(--secondary);
  color: #e2e8f0;
  padding: 20px 0;
}
.admin-sidebar .logo { color: #fff; padding: 0 16px; margin-bottom: 24px; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #94a3b8;
  font-size: 14px;
  transition: all .2s;
}
.admin-nav a:hover, .admin-nav a.active {
  background: rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
}
.admin-content { padding: 24px; background: var(--bg-muted); }
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.admin-header h1 { font-size: 22px; font-weight: 700; }

/* Статистичні картки */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.stat-card .stat-label { font-size: 12px; text-transform: uppercase; color: var(--text-muted); letter-spacing: 1px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; margin-top: 4px; }
.stat-card .stat-icon { font-size: 24px; opacity: .3; }

/* Адмінська таблиця */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.admin-table th, .admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  background: var(--bg-muted);
}
.admin-table tr:hover { background: var(--bg-muted); }
.admin-table .actions { display: flex; gap: 4px; }

/* Статуси замовлень */
.status-new { background: var(--info-bg); color: var(--info); }
.status-processing { background: var(--warning-bg); color: var(--warning); }
.status-shipped { background: #ede9fe; color: #7c3aed; }
.status-delivered { background: var(--success-bg); color: var(--success); }
.status-cancelled { background: var(--danger-bg); color: var(--danger); }

/* Логін */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
}
.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.login-box h1 { text-align: center; margin-bottom: 24px; }

/* 3D Превʼю товару */
.preview-3d {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  opacity: .3;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: .3; }

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 16px 0;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { opacity: .4; }

/* Review */
.review-item {
  padding: 12px;
  background: var(--bg-muted);
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.review-item .review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.review-item .author { font-weight: 600; font-size: 14px; }
.review-item .date { font-size: 12px; color: var(--text-muted); }
.review-item .text { font-size: 13px; color: var(--text-muted); }

/* ===== CART SIDEBAR (виїжджає справа) ===== */
.cart-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.5);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-card);
  z-index: 999;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,.15);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.cart-sidebar.open {
  transform: translateX(0);
}

.cart-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-sidebar-header h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.cart-sidebar-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}

.cart-sidebar-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
}

.cart-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cart-sidebar-item:last-child {
  border-bottom: none;
}

.cart-sidebar-item-img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-muted);
}
.cart-sidebar-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-sidebar-item-info {
  flex: 1;
  min-width: 0;
}
.cart-sidebar-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: block;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-sidebar-item-name:hover {
  color: var(--primary);
}
.cart-sidebar-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cart-sidebar-item-price {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.cart-sidebar-item-remove {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: all .2s;
}
.cart-sidebar-item-remove:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.cart-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-sidebar-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* ===== CART TOAST ===== */
.cart-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transform: translateX(100px);
  transition: all .4s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  box-shadow: var(--shadow-lg);
}
.cart-toast-show {
  opacity: 1;
  transform: translateX(0);
}
.cart-toast-success {
  background: var(--success);
  color: #fff;
}
.cart-toast-error {
  background: var(--danger);
  color: #fff;
}

/* Responsive utilities */
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 8px 0; }
  .search-box { order: 3; max-width: 100%; width: 100%; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .hero h1 { font-size: 22px; }
  .product-detail { gap: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .cart-sidebar { width: 100vw; max-width: 100vw; }
}

/* ===== CART SLIDE-IN ITEM ===== */
.cart-slide-in-item {
  animation: cartSlideIn .4s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes cartSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes cartSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ===== SIDEBAR ITEM SLIDE-IN (тільки для нових елементів) ===== */
.cart-sidebar-item.slide-in-new {
  animation: sidebarItemIn .35s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes sidebarItemIn {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== Статичные страницы ===== */
.page-content { font-family: 'Segoe UI', Arial, sans-serif; font-size: 16px; line-height: 1.7; color: var(--text); max-width: 800px; margin: 0 auto; padding: 20px; }
.page-content h1 { font-size: 32px; margin: 32px 0 16px; }
.page-content h2 { font-size: 26px; margin: 28px 0 14px; border-bottom: 2px solid var(--primary); padding-bottom: 8px; }
.page-content h3 { font-size: 22px; margin: 24px 0 12px; }
.page-content p { margin: 0 0 16px; }
.page-content img { max-width: 100%; height: auto; border-radius: 10px; margin: 16px 0; }
.page-content ul, .page-content ol { margin: 0 0 16px; padding-left: 24px; }
.page-content li { margin-bottom: 6px; }
.page-content blockquote { border-left: 4px solid var(--primary); padding: 12px 20px; margin: 16px 0; background: var(--bg-alt); border-radius: 0 8px 8px 0; }
.page-content table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.page-content th, .page-content td { border: 1px solid var(--border); padding: 10px 14px; }
.page-content th { background: var(--bg-alt); }
.page-content a { color: var(--primary); }
.page-content pre { background: #1a1a1a; color: #f0f0f0; padding: 16px; border-radius: 8px; overflow-x: auto; }

@media (max-width: 768px) {
    .page-content h1 { font-size: 24px; }
    .page-content h2 { font-size: 20px; }
    .stats-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr !important; }
    .hero h1 { font-size: 28px !important; }
    .hero p { font-size: 14px !important; }
}

/* =====================================================
   HERO SECTION (стиль reohimik)
   ===================================================== */
.hero {
    background:
        radial-gradient(circle at 20% 50%, rgba(124,58,237,0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59,130,246,0.06) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-muted) 100%);
    padding: 64px 0;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
    align-items: center;
}
.hero-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    color: var(--primary-hover);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    width: fit-content;
}
.hero-title {
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--text);
    margin: 0;
}
.hero-title-gradient {
    background: linear-gradient(135deg, #7C3AED, #3B82F6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.hero-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 540px;
    line-height: 1.6;
    margin: 0;
}
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.hero-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all 0.2s;
    cursor: pointer;
    border: 2px solid transparent;
}
.hero-actions .btn-primary {
    background: var(--primary);
    color: #fff;
}
.hero-actions .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(234,88,12,0.25);
}
.hero-actions .btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.hero-actions .btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.hero-stat {
    display: flex;
    flex-direction: column;
}
.hero-stat-value {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}
.hero-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

/* Візуальна частина — SVG 3D-принтер */
.hero-visual {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(59,130,246,0.08));
    border-radius: 24px;
    display: grid;
    place-items: center;
    overflow: visible;
}
.hero-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(124,58,237,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124,58,237,0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    border-radius: 24px;
    pointer-events: none;
}
.hero-printer {
    position: relative;
    width: 70%;
    height: 70%;
    animation: heroPrintPulse 4s ease-in-out infinite;
}
@keyframes heroPrintPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* Плаваючі теги */
.hero-tag {
    position: absolute;
    background: var(--bg-card);
    padding: 8px 14px;
    border-radius: var(--radius);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    border: 1px solid var(--border);
    z-index: 2;
}
.hero-tag strong {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    color: var(--primary);
}
.hero-tag-1 { top: 12%; right: -10%; animation: heroFloat 4s ease-in-out infinite; }
.hero-tag-2 { bottom: 18%; left: -8%; animation: heroFloat 5s ease-in-out infinite 1s; }
.hero-tag-3 { top: 50%; right: -5%; animation: heroFloat 6s ease-in-out infinite 0.5s; }

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Адаптивність */
@media (max-width: 768px) {
    .hero { padding: 32px 0; }
    .hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .hero-visual { display: none; }
    .hero-stats { gap: 16px; flex-wrap: wrap; }
    .hero-stat-value { font-size: 18px; }
    .hero-title { font-size: 32px !important; }
    .hero-subtitle { font-size: 15px; }
}
@media (max-width: 480px) {
    .hero-stats { flex-direction: column; gap: 12px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
}

/* Темна тема — коригуємо hero */
[data-theme="dark"] .hero {
    background:
        radial-gradient(circle at 20% 50%, rgba(124,58,237,0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59,130,246,0.12) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-muted) 100%);
}
[data-theme="dark"] .hero-visual {
    background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(59,130,246,0.15));
}
[data-theme="dark"] .hero-tag {
    background: var(--bg-card);
    color: var(--text);
}
