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

:root {
  --bg:       #0e0b16;
  --bg2:      #17132a;
  --bg3:      #211d36;
  --accent:   #c97b9a;
  --accent2:  #a85c7c;
  --gold:     #c9a86e;
  --text:     #f2edf8;
  --text2:    #9b8fb5;
  --border:   #2d2848;
  --radius:   14px;
  --header-h: 56px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overscroll-behavior: none;
}

/* ── Header ── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; height: 100%;
}
.logo {
  font-size: 19px; font-weight: 800;
  background: linear-gradient(135deg, #e09ab8, #b07cc9);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.icon-btn {
  position: relative; background: none; border: none;
  cursor: pointer; padding: 8px; font-size: 22px; line-height: 1;
}
.cart-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
  transform-origin: center;
}
@keyframes badgePop {
  0%   { transform: scale(1); }
  25%  { transform: scale(1.8) rotate(-8deg); }
  55%  { transform: scale(0.8) rotate(4deg); }
  80%  { transform: scale(1.15); }
  100% { transform: scale(1) rotate(0deg); }
}
.badge-pop { animation: badgePop 0.45s cubic-bezier(0.36,0.07,0.19,0.97) both; }

/* ── Views ── */
#app { min-height: calc(100vh - var(--header-h)); }
.view { display: none; padding-bottom: 90px; }
.view.active { display: block; }

/* ── Category grid (level-0: visible tiles) ── */
#catTabsWrap { border-bottom: 1px solid var(--border); }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px 16px 12px;
}
.cat-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 12px 6px 10px; min-height: 70px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; cursor: pointer; font-family: inherit;
  transition: all 0.18s; color: var(--text2); text-align: center;
}
.cat-tile:active { transform: scale(0.96); }
.cat-tile.active {
  background: rgba(201,123,154,0.15); border-color: var(--accent); color: var(--accent);
}
.cat-tile--all {
  grid-column: span 3; flex-direction: row; gap: 8px;
  min-height: auto; padding: 9px 16px;
}
.cat-tile-icon { font-size: 22px; line-height: 1; }
.cat-tile-name { font-size: 11px; font-weight: 600; line-height: 1.3; }
.cat-tile--all .cat-tile-icon { font-size: 16px; }
.cat-tile--all .cat-tile-name { font-size: 13px; font-weight: 600; }

/* ── Sub-category tabs (level-1, level-2: horizontal scroll) ── */
.cat-tabs {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 0 16px 10px; scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 14px; flex-shrink: 0;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text2); border-radius: 20px;
  font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: all 0.18s; font-family: inherit;
}
.cat-tab:active { transform: scale(0.96); }
.cat-tab.active {
  background: rgba(201,123,154,0.15); border-color: var(--accent);
  color: var(--accent); font-weight: 700;
}
.cat-tabs.level-2 .cat-tab { font-size: 12px; padding: 5px 10px; background: var(--bg); }

/* ── Filter bar (sort + filters, compact) ── */
.filter-bar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 16px 4px;
}
.filter-bar-btn {
  display: flex; align-items: center; gap: 5px;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text2); border-radius: 16px;
  padding: 6px 12px; font-size: 13px; cursor: pointer;
  transition: all 0.18s; font-family: inherit; white-space: nowrap;
}
.filter-bar-btn:hover { border-color: var(--accent); }
.filter-bar-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(201,123,154,0.08); }
.filter-dot { color: var(--accent); font-size: 10px; }

/* ── Active filter chips ── */
.active-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 2px 16px 8px;
  min-height: 0;
}
.active-chip {
  display: flex; align-items: center; gap: 5px;
  background: rgba(201,123,154,0.15); border: 1px solid var(--accent);
  color: var(--accent); border-radius: 16px;
  padding: 3px 10px; font-size: 12px; cursor: pointer;
}
.active-chip:hover { background: rgba(201,123,154,0.3); }

/* ── Products grid ── */
.products-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px; padding: 4px 16px 16px;
}
.loader, .no-results {
  grid-column: span 2; text-align: center;
  color: var(--text2); padding: 48px 0; font-size: 14px;
}

/* ── Skeleton loading ── */
@keyframes skeletonShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton-block, .skeleton-line {
  background: linear-gradient(90deg, var(--bg3) 0%, rgba(255,255,255,0.07) 50%, var(--bg3) 100%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s ease-in-out infinite;
  border-radius: 6px;
}
.skeleton-block { aspect-ratio: 1; width: 100%; border-radius: 0; }
.skeleton-card { pointer-events: none; }

/* ── Product card ── */
.product-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column;
  transition: border-color 0.15s, transform 0.12s;
}
.product-card:active { transform: scale(0.97); }
.product-card:hover { border-color: var(--accent); }

/* White background for product photos */
.product-thumb {
  width: 100%; aspect-ratio: 1;
  object-fit: contain;
  display: block;
  background: #ffffff;
  padding: 6px;
}
.product-body {
  padding: 10px 10px 12px;
  display: flex; flex-direction: column; flex: 1; gap: 4px;
}
.product-brand { font-size: 11px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.product-name  { font-size: 12px; font-weight: 600; line-height: 1.35; }
.product-price { font-size: 15px; font-weight: 800; color: var(--gold); }
.product-waterproof { font-size: 11px; color: var(--text2); }
.btn-add {
  margin-top: auto;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); border-radius: 8px; padding: 7px 0;
  font-size: 12px; cursor: pointer; transition: all 0.18s; width: 100%;
}
.btn-add:hover, .btn-add.in-cart {
  background: var(--accent2); border-color: var(--accent2); color: #fff;
}

/* ── Back + title ── */
.back-btn {
  display: inline-block; background: none; border: none;
  color: var(--accent); font-size: 14px; cursor: pointer;
  padding: 14px 16px 6px;
}
.view-title { padding: 4px 16px 12px; font-size: 20px; font-weight: 700; }

/* ── Product detail ── */
#productDetail { padding: 0 16px 16px; }
.detail-gallery { margin-bottom: 16px; }
.detail-img {
  width: 100%; max-height: 340px; object-fit: contain;
  border-radius: var(--radius); display: block;
  background: #ffffff; padding: 10px;
}
.gallery-thumbs {
  display: flex; gap: 6px; margin-top: 8px; overflow-x: auto;
  scrollbar-width: none;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  width: 56px; height: 56px; flex-shrink: 0;
  object-fit: contain; border-radius: 8px;
  background: #ffffff; padding: 3px;
  border: 2px solid transparent; cursor: pointer;
  transition: border-color 0.15s;
}
.gallery-thumb.active { border-color: var(--accent); }
.detail-brand { font-size: 12px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 2px; }
.detail-name  { font-size: 19px; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.detail-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.detail-old-price { font-size: 15px; color: var(--text2); text-decoration: line-through; font-weight: 500; }
.detail-price { font-size: 26px; font-weight: 900; color: var(--gold); }
.detail-desc  { color: var(--text2); font-size: 14px; line-height: 1.65; margin-bottom: 20px; }
.detail-desc p { margin-bottom: 10px; }
.detail-desc ul { padding-left: 18px; }
.detail-desc li { margin-bottom: 4px; }
.specs-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.specs-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table td { padding: 8px 4px; font-size: 13px; }
.specs-table td:first-child { color: var(--text2); width: 55%; }
.specs-table td:last-child { color: var(--text); font-weight: 500; text-align: right; }

/* ── Buttons ── */
.btn-primary {
  display: block; width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--accent), #9966bb);
  border: none; border-radius: var(--radius);
  color: #fff; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: opacity 0.18s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { opacity: 0.8; }

/* ── Cart ── */
#cartItems { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.empty-cart { text-align: center; color: var(--text2); padding: 60px 0; font-size: 16px; }
.cart-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px;
}
.cart-item-thumb {
  width: 56px; height: 56px; border-radius: 8px;
  object-fit: contain; background: #ffffff;
  padding: 3px; flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { font-size: 13px; color: var(--gold); font-weight: 700; margin-top: 2px; }
.qty-controls { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg3);
  color: var(--text); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.qty-btn:hover { background: var(--accent2); border-color: var(--accent2); }
.qty-num { font-size: 14px; font-weight: 700; min-width: 20px; text-align: center; }
.cart-item-right {
  display: flex; flex-direction: column; align-items: stretch; gap: 8px; flex-shrink: 0;
}
.btn-cart-quick {
  padding: 6px 10px;
  background: var(--bg3); border: 1px solid var(--accent);
  color: var(--accent); border-radius: 8px; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
  font-family: inherit; width: 100%;
}
.btn-cart-quick:hover { background: rgba(201,123,154,0.15); }
.btn-quick-cart {
  display: block; width: 100%; padding: 14px; margin-bottom: 10px;
  background: linear-gradient(135deg, #d4a843, #b8820a);
  border: none; border-radius: var(--radius);
  color: #fff; font-size: 16px; font-weight: 700; letter-spacing: 0.3px;
  cursor: pointer; transition: opacity 0.18s; font-family: inherit;
  box-shadow: 0 3px 16px rgba(201,168,67,0.35);
}
.btn-quick-cart:hover { opacity: 0.9; }
.btn-quick-cart:active { opacity: 0.8; }
.cart-footer {
  padding: 16px; position: sticky; bottom: 0;
  background: var(--bg); border-top: 1px solid var(--border);
}
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cart-total-label { font-size: 16px; color: var(--text2); }
.cart-total-value { font-size: 24px; font-weight: 900; color: var(--gold); }

/* ── Order form ── */
#orderForm { padding: 0 16px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; font-weight: 500; }
.form-input {
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
  color: var(--text); font-size: 15px; outline: none;
  transition: border-color 0.18s;
}
.form-input:focus { border-color: var(--accent); }
.form-input.error { border-color: #e74c3c; }
.radio-group { display: flex; gap: 10px; }
.radio-option { flex: 1; cursor: pointer; }
.radio-option input { display: none; }
.radio-box {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; font-size: 13px; transition: all 0.18s;
}
.radio-option input:checked + .radio-box {
  background: rgba(201,123,154,0.12); border-color: var(--accent); color: var(--accent);
}
.order-summary {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; margin-bottom: 16px;
}
.order-summary h4 { font-size: 13px; color: var(--text2); margin-bottom: 8px; }
.order-summary-item { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; color: var(--text2); }
.order-summary-total {
  display: flex; justify-content: space-between;
  font-size: 15px; font-weight: 800; color: var(--gold);
  border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px;
}
.btn-submit {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, var(--accent), #9966bb);
  border: none; border-radius: var(--radius);
  color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
  transition: opacity 0.18s;
}
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Success ── */
.success-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: calc(100vh - var(--header-h));
  padding: 32px 24px; text-align: center;
}
.success-emoji { font-size: 72px; margin-bottom: 16px; }
.success-title { font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.success-text { color: var(--text2); font-size: 15px; line-height: 1.6; margin-bottom: 32px; }

/* ── Drawers ── */
.drawer-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
}
.drawer-overlay.open { display: flex; flex-direction: column; justify-content: flex-end; }
.overlay-bg {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(3px);
}
.drawer {
  position: relative; z-index: 1;
  background: var(--bg2); border-radius: 22px 22px 0 0;
  padding: 16px 16px 40px;
  max-height: 85vh; overflow-y: auto;
}
.drawer-handle {
  width: 40px; height: 4px; background: var(--border);
  border-radius: 2px; margin: 0 auto 18px;
}
.drawer-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.drawer-section { margin-bottom: 18px; }
.drawer-section-label {
  font-size: 11px; color: var(--text2);
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px;
}
.drawer-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); border-radius: 20px;
  padding: 6px 14px; font-size: 13px; cursor: pointer;
  transition: all 0.18s;
}
.filter-chip.active {
  background: rgba(201,123,154,0.18); border-color: var(--accent); color: var(--accent);
}
.filter-select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239b8fb5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.filter-select option { background: #17132a; color: #f2edf8; }
.drawer-actions { display: flex; gap: 10px; margin-top: 20px; }
.btn-reset {
  flex: 1; padding: 13px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); border-radius: var(--radius); font-size: 14px; cursor: pointer;
}
.btn-apply {
  flex: 2; padding: 13px;
  background: linear-gradient(135deg, var(--accent), #9966bb);
  border: none; border-radius: var(--radius);
  color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
}

/* ── Filter drawer extra (collapsible brand/material/color) ── */
.drawer-extra-section { margin-bottom: 18px; }
.drawer-extra-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); border-radius: var(--radius);
  padding: 10px 14px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.drawer-extra-toggle:active { opacity: 0.8; }
#drawerExtraBody { padding-top: 14px; }
.drawer-sub-label {
  font-size: 11px; color: var(--text2);
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 8px; margin-top: 14px;
}
.drawer-sub-label:first-child { margin-top: 0; }

/* ── Category tree ── */
.cat-tree { display: flex; flex-direction: column; }
.cat-node { }
.cat-icon { font-size: 16px; flex-shrink: 0; }
.cat-row {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 4px; border-bottom: 1px solid var(--border);
  cursor: pointer; font-size: 15px; transition: color 0.15s;
}
.cat-row:hover { color: var(--accent); }
.cat-row.selected { color: var(--accent); font-weight: 700; }
.cat-row.selected::before { content: '✓'; font-size: 13px; color: var(--accent); }
.cat-indent-1 .cat-row { padding-left: 16px; font-size: 14px; }
.cat-indent-2 .cat-row { padding-left: 32px; font-size: 13px; color: var(--text2); }
.cat-indent-2 .cat-row:hover, .cat-indent-2 .cat-row.selected { color: var(--accent); }
.cat-toggle {
  margin-left: auto; font-size: 12px; color: var(--text2);
  transition: transform 0.2s;
}
.cat-toggle.open { transform: rotate(180deg); }
.cat-children { display: none; }
.cat-children.open { display: block; }

/* ── Welcome page animations ── */
@keyframes gradientShift {
  0%   { background-position: 0% 60%; }
  50%  { background-position: 100% 40%; }
  100% { background-position: 0% 60%; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

#viewWelcome {
  background: linear-gradient(-40deg, #0e0b16, #1a0d22, #17132a, #120a1e, #1e0e2a, #0e0b16);
  background-size: 400% 400%;
  animation: gradientShift 9s ease infinite;
}
.welcome-wrap {
  min-height: calc(100vh - var(--header-h));
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 28px 20px 50px; text-align: center;
  position: relative;
}
.welcome-loader { color: var(--text2); padding: 60px 0; }

/* Particles overlay */
.welcome-wrap::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(201,123,154,0.25) 1px, transparent 1px),
    radial-gradient(circle, rgba(176,124,201,0.2) 1px, transparent 1px);
  background-size: 80px 80px, 120px 120px;
  background-position: 0 0, 40px 40px;
  animation: gradientShift 15s linear infinite;
  opacity: 0.6;
}

.welcome-hero {
  display: flex; flex-direction: column; align-items: center; width: 100%;
}
.welcome-logo-big {
  font-size: 34px; font-weight: 900; margin-bottom: 6px;
  background: linear-gradient(90deg, #e09ab8, #c97b9a, #b07cc9, #e09ab8);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideUp 0.5s cubic-bezier(0.22,1,0.36,1) 0.1s both,
             shimmer 3s linear 1s infinite;
}
.welcome-tagline {
  font-size: 15px; color: var(--text2); margin-bottom: 28px; font-weight: 500;
  animation: slideUp 0.5s cubic-bezier(0.22,1,0.36,1) 0.4s both;
}

.welcome-featured {
  background: rgba(23,19,42,0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(201,123,154,0.3);
  border-radius: 22px; padding: 18px; max-width: 320px; width: 100%;
  margin: 0 auto 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(201,123,154,0.1);
  animation: scaleIn 0.6s cubic-bezier(0.22,1,0.36,1) 0.7s both;
  position: relative;
}
/* Glow border on featured card */
.welcome-featured::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: 23px;
  background: linear-gradient(135deg, rgba(201,123,154,0.4), transparent 50%, rgba(176,124,201,0.3));
  pointer-events: none;
  z-index: -1;
}
.welcome-sale-badge {
  display: inline-block;
  background: linear-gradient(135deg, #e25c7a, #c9538f);
  color: #fff; font-size: 12px; font-weight: 800;
  padding: 4px 14px; border-radius: 20px; margin-bottom: 12px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 12px rgba(226,92,122,0.4);
}
.welcome-img {
  width: 180px; height: 180px; object-fit: contain;
  background: #fff; border-radius: 14px; padding: 8px;
  margin: 0 auto 14px; display: block;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.welcome-prod-name {
  font-size: 13px; font-weight: 600; line-height: 1.4;
  color: var(--text); margin-bottom: 10px;
}
.welcome-prices {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 14px;
}
.welcome-old-price {
  font-size: 14px; color: var(--text2); text-decoration: line-through; font-weight: 500;
}
.welcome-new-price { font-size: 22px; font-weight: 900; color: var(--gold); }
.btn-welcome-view {
  display: block; width: 100%; padding: 11px;
  background: rgba(201,123,154,0.08); border: 1px solid rgba(201,123,154,0.5);
  color: var(--accent); border-radius: 12px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: background 0.2s, border-color 0.2s;
  font-family: inherit;
}
.btn-welcome-view:hover { background: rgba(201,123,154,0.18); border-color: var(--accent); }

.btn-enter-shop {
  max-width: 320px; width: 100%;
  font-family: inherit;
  animation: slideUp 0.55s cubic-bezier(0.22,1,0.36,1) 1.0s both;
  box-shadow: 0 4px 24px rgba(201,123,154,0.35);
}

/* ── Search bar ── */
.search-wrap {
  padding: 10px 16px 4px;
}
.search-input {
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 22px; padding: 10px 16px;
  color: var(--text); font-size: 14px; font-family: inherit;
  outline: none; transition: border-color 0.18s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text2); }
.search-input::-webkit-search-cancel-button { cursor: pointer; }

/* ── Product card updates ── */
.product-thumb-wrap { position: relative; }
.sale-badge {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  background: linear-gradient(135deg, #e25c7a, #c9538f);
  color: #fff; font-size: 10px; font-weight: 900;
  padding: 2px 8px; border-radius: 10px; letter-spacing: 0.5px;
}
.new-badge {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  background: linear-gradient(135deg, #27ae60, #1a8a47);
  color: #fff; font-size: 10px; font-weight: 900;
  padding: 2px 8px; border-radius: 10px; letter-spacing: 0.5px;
}
.product-brand-row {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
}
.product-sku-tag { font-size: 10px; color: var(--text2); }
.product-price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.product-old-price { font-size: 11px; color: var(--text2); text-decoration: line-through; }
.card-btns { display: flex; gap: 6px; margin-top: auto; }
.card-btns .btn-add { flex: 1; }
.btn-quick {
  flex-shrink: 0; width: 34px; height: 34px; padding: 0;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--gold); border-radius: 8px; font-size: 14px; cursor: pointer;
  transition: all 0.18s; display: flex; align-items: center; justify-content: center;
}
.btn-quick:hover { background: rgba(201,123,154,0.12); border-color: var(--accent); }

/* ── Detail page SKU & quick order ── */
.detail-sku { font-size: 11px; color: var(--text2); margin-bottom: 6px; letter-spacing: 0.4px; }
.detail-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-quick-order-full {
  display: block; width: 100%; padding: 14px;
  background: var(--bg3); border: 1px solid var(--accent);
  color: var(--accent); border-radius: var(--radius);
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: background 0.18s; font-family: inherit;
}
.btn-quick-order-full:hover { background: rgba(201,123,154,0.1); }

/* ── Related products ── */
.related-section { margin-top: 28px; padding-bottom: 4px; }
.related-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.related-scroll {
  display: flex; gap: 10px; overflow-x: auto;
  scrollbar-width: none; padding-bottom: 6px;
}
.related-scroll::-webkit-scrollbar { display: none; }
.related-card {
  flex: 0 0 130px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  transition: border-color 0.15s, transform 0.12s;
}
.related-card:active { transform: scale(0.97); }
.related-card:hover { border-color: var(--accent); }
.related-thumb {
  width: 100%; aspect-ratio: 1; object-fit: contain;
  background: #fff; padding: 5px; display: block;
}
.related-body { padding: 7px 8px 9px; position: relative; }
.related-name {
  font-size: 11px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 5px; color: var(--text);
}
.related-price { font-size: 13px; font-weight: 800; color: var(--gold); }
.related-new-badge {
  display: inline-block; margin-bottom: 4px;
  background: linear-gradient(135deg, #27ae60, #1a8a47);
  color: #fff; font-size: 9px; font-weight: 900;
  padding: 1px 6px; border-radius: 8px; letter-spacing: 0.4px;
}

/* ── Toast notification ── */
.toast {
  position: fixed; bottom: 100px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(24,18,44,0.96); backdrop-filter: blur(12px);
  color: var(--text); border: 1px solid var(--accent);
  border-radius: 16px; padding: 14px 24px;
  font-size: 14px; font-weight: 600; font-family: inherit; line-height: 1.5;
  z-index: 999; opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease;
  width: calc(100vw - 40px); max-width: 420px; text-align: center; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Lightning bolts & cart bounce ── */
@keyframes boltFly {
  0%   { opacity: 0; transform: translate(0,0) rotate(0deg) scale(0.4); }
  18%  { opacity: 1; transform: translate(0,0) rotate(0deg) scale(1.4); }
  100% { opacity: 0; transform: translate(var(--dx,0px), var(--dy,-80px)) rotate(var(--rot,20deg)) scale(0.1); }
}
.lightning-bolt {
  position: fixed;
  z-index: 9998;
  pointer-events: none;
  animation: boltFly 1.4s cubic-bezier(0.15, 0.9, 0.4, 1) forwards;
}
.cart-bounce {
  position: fixed;
  z-index: 9998;
  pointer-events: none;
  animation: boltFly 1.5s cubic-bezier(0.15, 0.9, 0.4, 1) forwards;
}

/* ── Cart discount badge ── */
.cart-discount-banner {
  background: linear-gradient(135deg, rgba(201,123,154,0.18), rgba(153,102,187,0.18));
  border: 1px solid rgba(201,123,154,0.4);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  color: var(--accent);
}
.cart-item-old-price { font-size: 11px; color: var(--text2); text-decoration: line-through; margin-right: 4px; }

/* ── Welcome countdown ── */
.welcome-countdown {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 14px; padding: 8px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,123,154,0.25);
  border-radius: 12px;
}
.countdown-label { font-size: 12px; color: var(--text2); font-weight: 500; }
.countdown-timer {
  font-size: 20px; font-weight: 900; letter-spacing: 3px;
  font-variant-numeric: tabular-nums; color: var(--gold);
}

/* ── Out-of-stock ── */
.product-card.out-of-stock { opacity: 0.6; }
.out-of-stock-badge {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  background: rgba(20,15,35,0.78);
  color: #cca0b8; font-size: 10px; font-weight: 700; text-align: center;
  padding: 4px 6px; letter-spacing: 0.3px;
}
.out-of-stock-btn {
  opacity: 0.55; cursor: not-allowed !important;
  font-size: 12px; padding: 0 8px;
}
.detail-out-of-stock {
  display: inline-block;
  background: rgba(200,80,80,0.15); border: 1px solid rgba(200,80,80,0.4);
  color: #e07070; font-size: 13px; font-weight: 700;
  padding: 5px 14px; border-radius: 20px; margin-bottom: 12px;
}
.os-dim { filter: grayscale(40%) opacity(0.75); }

/* ── Similar product popup ── */
.similar-overlay {
  position: fixed; inset: 0; z-index: 9990;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.similar-overlay[hidden] { display: none; }
.similar-popup {
  background: var(--bg2); border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0; padding: 20px 18px 28px;
  width: 100%; max-width: 480px; position: relative;
  animation: slideUp 0.28s ease;
}
@keyframes slideUp {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.similar-close {
  position: absolute; top: 14px; right: 16px;
  background: var(--bg3); border: none; color: var(--text2);
  font-size: 16px; width: 30px; height: 30px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.similar-label {
  font-size: 13px; color: #e07070; font-weight: 700; margin-bottom: 4px;
}
.similar-sub {
  font-size: 12px; color: var(--text2); margin-bottom: 14px;
}
.similar-body {
  display: flex; gap: 14px; align-items: center;
}
.similar-img {
  width: 90px; height: 90px; object-fit: cover;
  border-radius: 10px; flex-shrink: 0;
  border: 1px solid var(--border);
}
.similar-info { flex: 1; min-width: 0; }
.similar-brand { font-size: 11px; color: var(--text2); margin-bottom: 2px; }
.similar-name  { font-size: 13px; font-weight: 600; margin-bottom: 6px; line-height: 1.35; }
.similar-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.similar-price { font-size: 16px; font-weight: 800; color: var(--gold); }
.similar-old-price { font-size: 12px; color: var(--text2); text-decoration: line-through; }
.btn-similar-view {
  background: var(--accent); color: #fff; border: none;
  border-radius: 10px; padding: 8px 16px; font-size: 13px;
  font-weight: 700; cursor: pointer; font-family: inherit;
  width: 100%;
}
