:root {
  --bg: #edf0f6;
  --bg-gradient: linear-gradient(135deg, #edf0f6, #c9d6e8);
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --border: rgba(0,0,0,0.08);
  --text-primary: #111111;
  --text-secondary: #444444;
  --text-muted: #777777;
  --accent: #2E3359;
  --accent-dim: rgba(46, 51, 89, 0.12);
  --accent-hover: #4C5A9E;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.1);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-title: 'Playfair Display', 'Oswald', serif;
  --font: 'Open Sans', 'Geologica', sans-serif;
}






.cart-btn {
  position: relative;
  background: linear-gradient(135deg, #4C5A9E, #2E3359) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 50%;
  width: 56px !important;
  height: 56px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(46, 51, 89, 0.3) !important;
  transition: all var(--transition);
}

.cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 51, 89, 0.4) !important;
}

.cart-btn svg {
  width: 24px !important;
  height: 24px !important;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #FFDD2D;
  color: #000000;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ── Cart Backdrop ── */
.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cart-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

/* ── Cart Drawer (right side panel) ── */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 420px;
  max-width: 100vw;
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.cart-drawer-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0,0,0,0.12);
}

@media (max-width: 480px) {
  .cart-drawer { width: 100vw; }
}

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

.cart-title { font-size: 17px; font-weight: 700; }

.modal-close-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  padding-bottom: 3px;
}

.modal-close-btn:hover { color: var(--text-primary); }

.back-small-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.cart-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

/* Cart item */
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.cart-item-img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.cart-item-img-placeholder {
  width: 56px; height: 56px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-meta { font-size: 12px; color: var(--text-muted); }
.cart-item-price { font-size: 14px; font-weight: 700; color: var(--accent); white-space: nowrap; }

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.qty-num { font-size: 14px; font-weight: 700; min-width: 16px; text-align: center; }

.burger-menu-open {
  display: block !important;
}

/* Cart footer */
.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-total {
  font-size: 16px;
  color: var(--text-secondary);
  text-align: center;
}

.cart-total strong { color: var(--accent); font-size: 20px; }

.btn-checkout {
  width: 100%;
  padding: 16px 24px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #4C5A9E, #2E3359);
  color: #ffffff;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(46, 51, 89, 0.2);
  transition: all var(--transition);
}

.btn-checkout:hover:not(:disabled) {
  background: linear-gradient(135deg, #5b6bb5, #3a4173);
  box-shadow: 0 6px 20px rgba(46, 51, 89, 0.3);
  transform: translateY(-1px);
}

.btn-checkout:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(46, 51, 89, 0.25);
}

.btn-checkout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #cccccc;
  color: #666666;
  box-shadow: none;
}

/* Checkout form */
.checkout-form {
  padding: 16px 20px 30px;
  display: flex;
  flex-direction: column;
}
.checkout-field { margin-bottom: 14px; }
.checkout-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.checkout-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}

.checkout-input:focus { border-color: var(--accent); }
.checkout-textarea { resize: none; min-height: 72px; }

/* Checkout summary */
.checkout-summary {
  padding: 20px 20px 10px !important;
}

.checkout-summary-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.checkout-summary-item:last-child { border-bottom: none; }
.summary-name { color: var(--text-secondary); flex: 1; padding-right: 8px; }
.summary-price { font-weight: 700; color: var(--accent); white-space: nowrap; }

/* ── Success screen ── */
.order-success {
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.success-icon { font-size: 56px; }
.success-title { font-size: 20px; font-weight: 700; }
.success-text { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }



* {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
}

.header-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-transform: uppercase;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Search bar ── */
.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 16px;
  gap: 8px;
  transition: border-color var(--transition), background var(--transition);
  max-width: 600px;
  margin: 12px 20px;
}

.search-bar:focus-within {
  border-color: var(--accent);
  background: var(--bg-card);
}

.search-bar input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font);
  flex: 1;
  min-width: 0;
}

.search-bar input::placeholder { color: var(--text-muted); }
.search-icon { color: var(--text-muted); flex-shrink: 0; }

/* ── Categories Scroll ── */
.categories-wrap {
  overflow-x: auto;
  padding: 0 20px 4px;
  scrollbar-width: none;
}
.categories-wrap::-webkit-scrollbar { display: none; }

.categories {
  display: flex;
  gap: 8px;
  width: max-content;
}

.cat-btn {
  padding: 7px 18px;
  border-radius: 40px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  outline: none;
}

.cat-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cat-btn.active {
  background: #2E3359;
  border-color: #2E3359;
  color: #ffffff;
  font-weight: 700;
}

/* ── Section Title ── */
.section-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 20px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-count {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}

/* ── Product Grid ── */
.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 12px 20px;
}

/* ── Product Card ── */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
  animation: fadeInUp 0.4s ease both;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(200,169,110,0.3);
  box-shadow: var(--shadow);
}

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

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-image-wrap {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--bg-elevated);
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 40px;
}

/* Stock badge */
.stock-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-out { background: rgba(248,113,113,0.9); color: #fff; }
.badge-preorder { background: rgba(251,191,36,0.9); color: #000; }

/* Featured badge */
.featured-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.card-body { padding: 12px; }

.card-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-prices {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.card-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

.card-old-price {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.card-discount {
  font-size: 11px;
  font-weight: 700;
  color: var(--danger);
  background: rgba(248,113,113,0.12);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ── Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #fafafa 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

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

.skeleton-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.skeleton-img {
  aspect-ratio: 3/4;
  background: linear-gradient(90deg, var(--bg-elevated) 25%, #1f1f1f 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-elevated) 25%, #1f1f1f 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-line.short { width: 60%; }

/* ── Empty / Error States ── */
.state-box {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.state-icon { font-size: 48px; }
.state-title { font-size: 18px; font-weight: 600; }
.state-sub { font-size: 14px; color: var(--text-muted); }

/* ── Load More ── */
.load-more-wrap {
  padding: 8px 20px 24px;
  display: flex;
  justify-content: center;
}

.btn-load-more {
  padding: 12px 32px;
  border-radius: 100px;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-load-more:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  white-space: nowrap;
  max-width: calc(100vw - 40px);
  opacity: 0;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ── Product Detail Page ── */
.back-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: #000 !important;
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
  border: none !important;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}
.back-btn:hover {
  transform: scale(1.05);
  color: var(--accent);
}
.back-btn-text {
  display: none;
}

.product-gallery {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--bg-elevated);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.gallery-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }

.thumb {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--transition);
}

.thumb.active { border-color: var(--accent); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-detail {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
  width: 100%;
}

.detail-name {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.detail-prices {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  width: 100%;
}

.detail-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
}

.detail-old-price {
  font-size: 16px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.detail-discount {
  font-size: 13px;
  font-weight: 700;
  color: var(--danger);
  background: rgba(248,113,113,0.12);
  padding: 2px 8px;
  border-radius: 6px;
}

/* Stock status indicator */
.stock-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  width: 100%;
}

.stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.stock-in .stock-dot { background: var(--success); }
.stock-out .stock-dot { background: var(--danger); }
.stock-pre .stock-dot { background: var(--warning); }
.stock-in { color: var(--success); }
.stock-out { color: var(--danger); }
.stock-pre { color: var(--warning); }

/* Sizes */
.sizes-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  width: 100%;
}

.sizes-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  width: 100%;
}

.size-btn {
  min-width: 48px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  /* Убираем штатное затемнение букв при тапе (особенно в Telegram WebApp) */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.size-btn:hover:not(.unavailable) {
  border-color: var(--accent);
  color: var(--accent);
}

/* Анимация-пружина при нажатии — без затемнения текста */
.size-btn:active:not(.unavailable):not(.selected) {
  transform: scale(0.93);
}

.size-btn.selected {
  border-color: #2E3359;
  background: #2E3359;
  color: #ffffff;
}

.size-btn.unavailable {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Description */
.detail-desc-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  width: 100%;
}

.detail-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  white-space: pre-wrap;
  text-align: center;
}

/* Category chip */
.category-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  margin: 0 auto 20px !important;
  text-align: center;
}

/* Contact button */
.btn-contact {
  width: 100%;
  padding: 16px;
  border-radius: 100px;
  border: none;
  background: #FFDD2D;
  color: #000000;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background var(--transition), transform var(--transition);
  margin-bottom: 32px;
}

.btn-contact:hover { background: #e5c728; }
.btn-contact:active { transform: scale(0.98); }

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ── Featured Row ── */
.featured-section {
  padding: 0 20px 20px;
}

.featured-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.featured-row::-webkit-scrollbar { display: none; }

.featured-card {
  flex-shrink: 0;
  width: 160px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.featured-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.featured-card:active { transform: scale(0.97); }

.featured-img {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--bg-elevated);
}

.featured-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 10px; }
.featured-name { font-size: 12px; font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
.featured-price { font-size: 13px; font-weight: 700; color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 360px) {
  .products-grid { grid-template-columns: 1fr; }
  .detail-name { font-size: 20px; }
  .detail-price { font-size: 22px; }
}

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

/* ── Gallery Arrows ── */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  color: var(--text-primary);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  line-height: 1;
}
.gallery-arrow:hover { background: rgba(255,255,255,1); transform: translateY(-50%) scale(1.1); }
.gallery-arrow-prev { left: 10px; }
.gallery-arrow-next { right: 10px; }

@media (max-width: 600px) {
  .gallery-arrow { display: none; } /* on mobile use swipe */
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease all; 
 } 
 .sb-input__placeholder { 
         transition: 0.2s ease all; 
         pointer-events: none; 
         transform-origin: left top; 
 } 

/* ── Safe area overrides for notch / status bar in Telegram Web App ── */
@media (max-width: 768px) {
  .s-main-type-11__navigation {
    top: calc(env(safe-area-inset-top, 0px) + 12px) !important;
  }
  .sb-header-default__burger {
    right: 16px !important;
  }
}

/* ── Support FAB (sits above the cart FAB) ── */
.support-fab {
  position: fixed;
  bottom: 88px;
  right: 28px;
  z-index: 999998;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: linear-gradient(135deg, #ffffff, #e8ecf6);
  color: #2E3359;
  border: 1px solid rgba(46, 51, 89, 0.15);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transition: all var(--transition);
}
.support-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.24);
}

.support-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4C5A9E, #2E3359);
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(46, 51, 89, 0.25);
  transition: all var(--transition);
}
.support-cta:hover { transform: translateY(-1px); }

/* ── Checkout consent + success actions ── */
.chk-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-secondary, #444);
  cursor: pointer;
  /* Гарантируем что вся строка видна на мобильных и не перекрыта другими элементами */
  position: relative;
  z-index: 5;
  padding: 8px 0;
}
/* Чекбокс согласия должен быть всегда видим и кликабелен.
   На catalog.html подключён внешний CSS-фреймворк, который глобально сбрасывает
   appearance у чекбоксов — поэтому усиливаем специфичность и явно возвращаем
   нативный вид, включая мобильные WebKit (iOS/Android в Telegram miniapp). */
.chk-consent-row input[type="checkbox"],
#chkConsent,
form#checkoutForm input[type="checkbox"] {
  -webkit-appearance: auto !important;
  appearance: auto !important;
  margin-top: 3px;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px;
  min-height: 22px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #2E3359;
  /* Видимый контур чтобы чекбокс не сливался с фоном на светлых/тёмных темах */
  outline: 1px solid rgba(0, 0, 0, 0.25);
  outline-offset: 1px;
  background: #fff;
  visibility: visible !important;
  opacity: 1 !important;
  display: inline-block !important;
}
.chk-consent-text { line-height: 1.45; }
.chk-consent-link {
  color: var(--accent, #2E3359);
  text-decoration: underline;
}

.order-success { text-align: center; padding: 30px 20px; }
.success-icon { font-size: 56px; margin-bottom: 12px; }
.success-title { font-size: 22px; font-weight: 800; margin-bottom: 10px; color: var(--text-primary, #111); }
.success-text { font-size: 14px; color: var(--text-secondary, #444); line-height: 1.6; margin-bottom: 24px; }
.success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-success-close, .btn-success-home {
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}
.btn-success-close {
  background: var(--bg-elevated, #fff);
  color: var(--text-primary, #111);
  border: 1px solid var(--border, rgba(0,0,0,0.12));
}
.btn-success-home {
  background: linear-gradient(135deg, #4C5A9E, #2E3359);
  color: #fff;
  box-shadow: 0 4px 14px rgba(46, 51, 89, 0.25);
}
.btn-success-close:hover, .btn-success-home:hover { transform: translateY(-1px); }

/* Desktop: keep the cart drawer close button obviously visible & clickable. */
@media (min-width: 481px) {
  .modal-close-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
  }
}

/* ── Premium E-Commerce Enhancements ── */

/* Page Load Fade In Animation */
body {
  animation: fadeInPage 0.4s ease forwards;
}

@keyframes fadeInPage {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Category Filter Chips */
.cat-btn {
  border-radius: 100px !important;
  font-family: var(--font) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  border: 1px solid var(--border) !important;
  background: #ffffff !important;
  color: var(--text-primary) !important;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02) !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.cat-btn:hover {
  border-color: var(--accent) !important;
  background: var(--accent-dim) !important;
  color: var(--accent) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(76, 90, 158, 0.1) !important;
}

.cat-btn:active {
  transform: translateY(1px);
}

.cat-btn.active {
  background: #2E3359 !important;
  color: #ffffff !important;
  border-color: #2E3359 !important;
  box-shadow: 0 4px 12px rgba(46, 51, 89, 0.25) !important;
}

/* Premium Catalog Cards */
.s-services-type-5__item-content {
  background: #ffffff !important;
  border: 1px solid var(--border) !important;
  border-radius: 20px !important;
  padding: 20px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02) !important;
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

.s-services-type-5__item-content:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 36px rgba(46, 51, 89, 0.07) !important;
  border-color: rgba(76, 90, 158, 0.25) !important;
}

/* Card Image scale and zoom effects */
.s-services-type-5__image {
  border-radius: 14px !important;
  overflow: hidden !important;
  position: relative !important;
  aspect-ratio: 1/1 !important;
  background: #f8fafc !important;
  border: 1px solid rgba(0,0,0,0.02) !important;
}

.s-services-type-5__image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.s-services-type-5__item-content:hover .s-services-type-5__image img {
  transform: scale(1.06);
}

/* Title on catalog card */
.s-services-type-5__subtitle {
  font-family: var(--font) !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  color: var(--text-primary) !important;
  margin-top: 16px !important;
  margin-bottom: 8px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  height: 40px !important;
  line-height: 1.25 !important;
  text-align: center !important;
}

/* Align old and new price inside card */
.s-services-type-5__old-price {
  font-family: var(--font) !important;
  font-size: 13px !important;
  color: var(--text-muted) !important;
  text-decoration: line-through !important;
  margin-top: auto !important;
  margin-bottom: 2px !important;
  text-align: center !important;
}

.s-services-type-5__price {
  font-family: var(--font) !important;
  font-weight: 800 !important;
  font-size: 17px !important;
  color: var(--accent) !important;
  margin-top: 2px !important;
  text-align: center !important;
}

/* If no old price, make sure new price is pushed to bottom */
.s-services-type-5__subtitle + .s-services-type-5__price {
  margin-top: auto !important;
}

/* Product Details Page - Premium 2-Column Responsive Layout */
.product-page-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

.product-left-col {
  width: 100%;
}

.product-right-col {
  width: 100%;
}

@media (min-width: 768px) {
  .product-page-container {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 54px;
    max-width: 1120px;
    margin: 40px auto 60px;
    padding: 0 40px;
    align-items: center; /* Vertically center right col content next to gallery image */
  }
  
  .product-left-col {
    position: sticky;
    top: 40px;
  }
  
  .product-gallery {
    border-radius: 24px !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.05) !important;
    border: 1px solid var(--border) !important;
    aspect-ratio: 1/1 !important;
    max-width: 600px;
    margin: 0 auto;
    overflow: hidden;
  }
  
  .gallery-thumbs {
    justify-content: flex-start;
    padding: 20px 0 0 !important;
  }
  
  .product-detail {
    padding: 10px 0 0 !important;
  }


}

/* Nice animations for detail selectors and elements */
.size-btn {
  border-radius: 10px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.size-btn.selected {
  background: linear-gradient(135deg, #4C5A9E, #2E3359) !important;
  border-color: #2E3359 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(46, 51, 89, 0.2) !important;
  animation: sizeSelectPop 0.25s ease;
}

/* Плавная подсветка выделенным фоном при выборе размера */
@keyframes sizeSelectPop {
  0%   { transform: scale(0.92); }
  60%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}



.divider {
  background: rgba(0, 0, 0, 0.06) !important;
}

.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  cursor: zoom-out;
  user-select: none;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 36px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}
.lightbox-arrow:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ── Promo Code ── */
.promo-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
.promo-input { flex: 1; margin-bottom: 0 !important; }
.promo-apply-btn {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
  flex-shrink: 0;
}
.promo-apply-btn:hover { background: var(--accent-hover); }
.promo-msg {
  font-size: 12px;
  margin-bottom: 10px;
  min-height: 18px;
  font-weight: 500;
}
.promo-ok { color: var(--success); }
.promo-err { color: var(--danger); }
.promo-discount-line {
  font-size: 13px;
  color: var(--success);
  font-weight: 600;
}
.checkout-discount-wrap { padding: 0 20px; }

/* ── Size Chart ── */
.size-chart-link {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 16px !important;
  color: var(--accent) !important;
  cursor: pointer;
  background: none;
  border: none !important;
  border-radius: 30px;
  font-family: var(--font);
  font-weight: 700 !important;
  padding: 8px 16px !important;
  margin: 12px auto 20px !important;
  text-decoration: none !important;
  transition: all var(--transition);
}
.size-chart-link:hover {
  color: var(--accent-hover) !important;
  background: var(--accent-dim) !important;
}

.size-chart-modal-inner {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 90vw;
  width: 380px;
  max-height: 70vh;
  overflow-y: auto;
}
.size-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}
.lightbox-close-sm {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.size-chart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.size-chart-table th {
  background: var(--bg-elevated);
  padding: 8px 12px;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid var(--border);
}
.size-chart-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.sc-size { font-weight: 700; color: var(--accent); white-space: nowrap; }
.sc-desc { color: var(--text-secondary); }

/* ── Burger menu fix ── */
@media (max-width: 768px) {
  .sb-header-default__wrapper {
    min-height: 60px; /* Ensure wrapper has height so burger isn't at very top */
  }
  .sb-header-default__burger {
    z-index: 201; /* Above menu so it can be closed */
  }
  .sb-header-default__menu_solid {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 16px;
    right: 16px;
    height: auto !important;
    background: rgba(25, 28, 40, 0.75) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    z-index: 200;
    padding: 20px 16px;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .sb-header-default__menu_solid .sb-header-default__link-wrapper {
    gap: 12px;
  }
  .sb-header-default__menu_solid .sb-header-default__link {
    color: #ffffff !important;
    font-weight: 500;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0;
    border-radius: 12px;
    transition: background-color 0.2s ease, opacity 0.2s ease;
  }
  .sb-header-default__menu_solid .sb-header-default__link:active {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.burger-menu-open {
  display: flex !important; /* Changed from block to flex to match main CSS */
  flex-direction: column;
}

/* ── Checkout layout ── */
.checkout-total-line {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  padding: 16px 20px !important;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  margin-bottom: 12px;
}
.checkout-total-line span:last-child { color: var(--accent); font-size: 18px; font-weight: 800; }

.chk-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  margin-top: 18px;
}
.chk-input {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: all var(--transition);
  box-sizing: border-box;
}
.chk-input:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(46, 51, 89, 0.06);
}
.checkout-submit-btn {
  width: 100%;
  padding: 16px 24px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #4C5A9E, #2E3359);
  color: #fff;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 30px;
  margin-bottom: 16px;
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(46, 51, 89, 0.2);
}
.checkout-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #5b6bb5, #3a4173);
  box-shadow: 0 6px 20px rgba(46, 51, 89, 0.3);
  transform: translateY(-1px);
}
.checkout-submit-btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(46, 51, 89, 0.25);
}
.checkout-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #cccccc;
  color: #666666;
  box-shadow: none;
}

.checkout-btn {
  width: 100%;
  padding: 16px 24px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #4C5A9E, #2E3359);
  color: #fff;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(46, 51, 89, 0.2);
}
.checkout-btn:hover {
  background: linear-gradient(135deg, #5b6bb5, #3a4173);
  box-shadow: 0 6px 20px rgba(46, 51, 89, 0.3);
  transform: translateY(-1px);
}
.checkout-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(46, 51, 89, 0.25);
}

.checkout-form {
  padding: 20px 20px 40px !important;
  box-sizing: border-box;
  width: 100%;
}


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

/* Catalog Grid Centering when few items */
#products-container, #featuredRow {
  justify-content: center !important;
}

/* Product Details Page - Elegant Card on Desktop */
@media (min-width: 768px) {
  .product-detail {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 36px !important;
    box-shadow: 0 10px 30px rgba(46, 51, 89, 0.04);
  }
}

/* Floating Label Fix for design.html */
.sb-input__field:focus + .sb-input__placeholder,
.sb-input__field:valid + .sb-input__placeholder {
    transform: translateY(-20px) scale(0.85);
    color: #424242;
    transition: 0.2s ease all;
}
.sb-input__placeholder {
    transition: 0.2s ease all;
    pointer-events: none;
    transform-origin: left top;
}

