/* =============================================
   Virtual Try-On — Widget Redesign 2026
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #f0efeb;
  --surf:     #ffffff;
  --surf2:    #f4f3f0;
  --border:   #e2e1dc;
  --acc:      #1a1a1a;
  --acc-h:    #333;
  --acc-soft: rgba(26,26,26,.07);
  --text:     #1a1a1a;
  --muted:    #888880;
  --ok:       #16a34a;
  --err:      #dc2626;
  --r:  20px;
  --rs: 12px;
  --shadow-widget: 0 8px 40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
}

html { overflow-x: hidden; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ══════════════════════════════════════════════
   DEMO PRODUCT PAGE
══════════════════════════════════════════════ */
.page-shell { min-height: 100vh; }

.store-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  position: sticky; top: 0; z-index: 10;
}
.store-header-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.store-logo { font-weight: 800; font-size: .95rem; letter-spacing: .08em; color: var(--text); text-decoration: none; }
.store-nav  { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.store-nav-link { color: var(--muted); text-decoration: none; transition: color .15s; }
.store-nav-link:hover, .store-nav-link.active { color: var(--text); }
.store-nav-sep  { color: var(--border); }
.store-nav-home { display: flex; align-items: center; color: var(--muted); text-decoration: none; transition: color .15s; }
.store-nav-home:hover { color: var(--text); }

.product-detail {
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Product image */
.pd-image-col {}
.pd-image-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #e8e6e0;
  aspect-ratio: 3/4;
}
.pd-skeleton {
  position: absolute; inset: 0;
  background: linear-gradient(110deg, #e8e6e0 25%, #d8d6d0 50%, #e8e6e0 75%);
  background-size: 200% 100%;
  animation: shimmer-pd 1.5s linear infinite;
}
@keyframes shimmer-pd {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.pd-product-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.btn-try-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(26,26,26,.15);
  border-radius: 50px;
  padding: 12px 24px;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: background .2s, transform .15s;
  white-space: nowrap;
}
.btn-try-badge:hover { background: #fff; transform: translate(-50%, -50%) scale(1.04); }
.try-badge-dot { font-size: 1rem; }

/* Product info */
.pd-info-col { padding-top: 8px; }
.pd-breadcrumb { font-size: .76rem; color: var(--muted); margin-bottom: 10px; letter-spacing: .04em; }
.pd-name { font-size: 1.6rem; font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.pd-price { font-size: 1.4rem; font-weight: 700; margin-bottom: 28px; }

.pd-section { margin-bottom: 20px; }
.pd-label { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 10px; }
.pd-selected-val { color: var(--text); text-transform: none; letter-spacing: 0; }

.pd-size-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-pd-size {
  min-width: 44px; height: 36px;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 600;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s;
}
.btn-pd-size:hover { border-color: var(--acc); }
.btn-pd-size.active { border-color: var(--acc); background: var(--acc); color: #fff; }
.btn-pd-size.unavailable { opacity: .35; cursor: not-allowed; text-decoration: line-through; }

.pd-color-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-pd-color {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.btn-pd-color:hover { transform: scale(1.1); }
.btn-pd-color.active { border-color: var(--acc); outline: 2px solid var(--acc); outline-offset: 2px; }
.btn-pd-color.unavailable { opacity: .3; cursor: not-allowed; }

.pd-btn-group { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.btn-pd-cart {
  width: 100%; padding: 15px;
  background: var(--acc); color: #fff;
  border: none; border-radius: 50px;
  font-size: .95rem; font-weight: 700;
  letter-spacing: .05em;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-pd-cart:disabled { opacity: .4; cursor: not-allowed; }
.btn-pd-cart:not(:disabled):hover { opacity: .85; }

.btn-pd-try {
  width: 100%; padding: 15px;
  background: transparent; color: var(--acc);
  border: 1.5px solid var(--acc);
  border-radius: 50px;
  font-size: .95rem; font-weight: 700;
  letter-spacing: .05em;
  cursor: pointer;
  transition: background .2s, color .2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-pd-try:hover { background: var(--acc); color: #fff; }

/* ══════════════════════════════════════════════
   WIDGET BAR (collapsed)
══════════════════════════════════════════════ */
.widget-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  height: 52px;
  background: var(--acc);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.wb-label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
}
.wb-actions { display: flex; gap: 4px; }
.wb-gen-indicator {
  display: flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 600; letter-spacing: .05em;
  color: rgba(255,255,255,.7);
}
.wb-gen-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,.6);
  animation: wb-pulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes wb-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(74,222,128,.6); }
  70%  { box-shadow: 0 0 0 6px rgba(74,222,128,0);  }
  100% { box-shadow: 0 0 0 0   rgba(74,222,128,0);  }
}
.wb-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  color: #fff;
  font-size: .9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.wb-btn:hover { background: rgba(255,255,255,.22); }

/* ══════════════════════════════════════════════
   WIDGET PANEL (expanded)
══════════════════════════════════════════════ */
.widget-panel {
  position: fixed;
  bottom: 0; right: 24px;
  z-index: 1000;
  width: 360px;
  max-height: 90vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-widget);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: wp-slide-up .3s ease;
}
@keyframes wp-slide-up {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Header */
.wp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.wp-title { font-size: .72rem; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.wp-header-btns { display: flex; gap: 4px; }
.wp-hbtn {
  width: 28px; height: 28px;
  background: var(--surf2);
  border: none; border-radius: 8px;
  font-size: .85rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.wp-hbtn:hover { background: var(--border); color: var(--text); }

/* Screens container */
.ws-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.ws-screen.ws-active {}

/* ── Screen: Home ───────────────────────────────── */
.wsh-visual {
  position: relative;
  height: 300px;
  overflow: hidden;
  flex-shrink: 0;
}
.wsh-visual-bg {
  position: absolute; inset: 0;
  background: #1a1a1a;
  background-size: cover;
  background-position: center top;
  filter: brightness(0.55) saturate(0.8);
}
.wsh-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 18px;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 100%);
}
.wsh-sub {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: rgba(255,255,255,.75);
  margin-bottom: 6px;
}
.wsh-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: .01em;
}

.wsh-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wsh-hint {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.55;
}
.wsh-btns { display: flex; gap: 8px; }
.btn-w-outline {
  flex: 1;
  padding: 11px 10px;
  background: transparent;
  border: 1.5px solid var(--acc);
  border-radius: 50px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  color: var(--acc);
  transition: background .18s, color .18s;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  white-space: nowrap;
}
.btn-w-outline:hover { background: var(--acc); color: #fff; }
.w-btn-icon { font-size: .9rem; }

.wsh-legal { font-size: .67rem; color: #aaa; line-height: 1.5; }
.wsh-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ── Screen: Preview ─────────────────────────────── */
.wsp-visual {
  position: relative;
  flex: 1;
  overflow: hidden;
  min-height: 360px;
}
/* Person photo fills the preview background */
.wsp-person-bg {
  position: absolute; inset: 0;
  background: #1a1a1a;
  background-size: cover;
  background-position: center top;
}
/* Garment thumbnail pinned to bottom-right corner */
.wsp-garment-corner {
  position: absolute;
  bottom: 14px; right: 14px;
  width: 72px; height: 92px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.85);
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
  z-index: 1;
}
.wsp-garment-thumb {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.btn-tryon-overlay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(26,26,26,.15);
  border-radius: 50px;
  padding: 13px 26px;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .06em;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: background .2s, transform .15s;
  white-space: nowrap;
}
.btn-tryon-overlay:hover { background: #fff; transform: translate(-50%, -50%) scale(1.04); }
.tryon-dot { font-size: 1rem; }

.wsp-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: #fff;
  display: flex; flex-direction: column; gap: 10px;
}
.wsp-footer-btns { display: flex; gap: 8px; }
.btn-w-ghost-line {
  flex: 1;
  padding: 9px 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .03em;
  cursor: pointer;
  color: var(--muted);
  transition: border-color .15s, color .15s;
  white-space: nowrap;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.btn-w-ghost-line:hover { border-color: var(--acc); color: var(--acc); }

/* ── Screen: Generation ──────────────────────────── */
.wsg-visual {
  position: relative;
  height: 320px;
  overflow: hidden;
  flex-shrink: 0;
}
.wsg-visual-bg {
  position: absolute; inset: 0;
  background: #1a1a1a;
  background-size: cover;
  background-position: center top;
  filter: blur(8px) brightness(0.45) saturate(0.7);
  transform: scale(1.08);
}
/* Shimmer overlay — semi-transparent so blurred photo shows through */
.wsg-shimmer {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(110deg,
    rgba(238,238,234,0.18) 8%,
    rgba(200,200,195,0.22) 18%,
    rgba(238,238,234,0.18) 33%);
  background-size: 200% 100%;
  animation: wsg-shimmer 1.6s linear infinite;
}
@keyframes wsg-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Scan line */
.wsg-scan-line {
  position: absolute; left: 0; right: 0; height: 3px; z-index: 2;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: wsg-scan 2s ease-in-out infinite;
}
@keyframes wsg-scan {
  0%   { top: 0%;   opacity: 1; }
  90%  { top: 100%; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.wsg-overlay {
  position: absolute; inset: 0; z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
}
.wsg-pct-wrap {}
.wsg-pct {
  font-size: 3.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.wsg-bar-wrap { width: 200px; text-align: center; }
.wsg-bar-track {
  height: 4px;
  background: rgba(255,255,255,.25);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}
.wsg-bar {
  height: 100%; width: 0%;
  background: #fff;
  border-radius: 2px;
  transition: width 1.8s ease;
}
.wsg-status {
  font-size: .78rem;
  color: rgba(255,255,255,.8);
  letter-spacing: .04em;
}

.btn-w-stop {
  margin: 10px 14px;
  width: calc(100% - 28px);
  padding: 11px;
  background: rgba(26,26,26,.06);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
  color: var(--text);
  transition: border-color .15s, background .15s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  flex-shrink: 0;
}
.btn-w-stop:hover { border-color: #dc2626; color: #dc2626; background: rgba(220,38,38,.05); }

/* ── Order-done card (shown in chat while generation still runs) ── */
.chat-order-done {
  display: flex; align-items: center; gap: 10px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: .8rem; line-height: 1.4;
  max-width: 100%;
}
.chat-order-done-icon {
  font-size: 1.2rem;
  color: #16a34a;
  flex-shrink: 0;
}
.chat-order-done strong { display: block; font-weight: 700; color: #15803d; }
.chat-order-done span   { color: var(--muted); font-size: .75rem; }

/* ── Chat panel ──────────────────────────────────── */
.w-chat {
  flex: 1;
  min-height: 160px;
  max-height: 320px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.chat-inner {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 4px;
  gap: 8px;
}

/* Chat messages */
.chat-msgs { display: flex; flex-direction: column; gap: 6px; }

.chat-msg {
  max-width: 82%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: .8rem;
  line-height: 1.5;
  animation: msg-in .2s ease;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-msg-system {
  background: var(--surf2);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-msg-user {
  background: var(--acc);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Quick reply buttons */
.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 12px 10px;
}
.btn-chat-quick {
  padding: 7px 14px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: border-color .15s, background .15s;
  white-space: nowrap;
}
.btn-chat-quick:hover { border-color: var(--acc); }
.btn-chat-quick.selected { border-color: var(--acc); background: var(--acc); color: #fff; }

/* Color swatches in chat */
.chat-color-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px 12px 10px;
}
.btn-chat-color {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: transform .15s, border-color .15s;
  position: relative;
}
.btn-chat-color:hover { transform: scale(1.15); }
.btn-chat-color.selected { border-color: var(--acc); }
.btn-chat-color.selected::after {
  content: '✓';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; font-weight: 900;
  color: rgba(0,0,0,.7);
}
.btn-chat-color[data-hex="#1a1a1a"].selected::after { color: rgba(255,255,255,.9); }
.btn-chat-color.unavail { opacity: .3; cursor: not-allowed; }

/* Accessory cards in chat */
.chat-accessory-list { display: flex; flex-direction: column; gap: 8px; padding: 4px 12px 10px; }
.chat-accessory {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--surf2);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.chat-acc-img {
  width: 44px; height: 44px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e8e8e4;
}
.chat-acc-info { flex: 1; }
.chat-acc-name { font-size: .78rem; font-weight: 600; }
.chat-acc-price { font-size: .72rem; color: var(--muted); }
.btn-chat-acc-add {
  padding: 6px 12px;
  background: var(--acc); color: #fff;
  border: none; border-radius: 50px;
  font-size: .72rem; font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s;
}
.btn-chat-acc-add:hover { opacity: .8; }
.btn-chat-acc-add.added {
  background: var(--ok);
}

/* Chat size result card */
.chat-size-card {
  margin: 4px 12px 8px;
  padding: 14px;
  background: var(--surf2);
  border-radius: 12px;
  text-align: center;
}
.chat-size-big { font-size: 2.5rem; font-weight: 800; margin-bottom: 4px; }
.chat-size-expl { font-size: .75rem; color: var(--muted); line-height: 1.5; }

/* Chat form */
.chat-form-area {
  padding: 8px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-form-row { display: flex; gap: 8px; align-items: center; }
.chat-unit-toggle {
  display: flex;
  background: var(--surf2);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
  flex-shrink: 0;
  margin-bottom: 4px;
}
.btn-unit {
  padding: 4px 10px;
  background: transparent;
  border: none; border-radius: 6px;
  font-size: .73rem; font-weight: 600;
  cursor: pointer; color: var(--muted);
  transition: background .15s, color .15s;
}
.btn-unit.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

.chat-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: .82rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .15s;
  outline: none;
}
.chat-input:focus { border-color: var(--acc); }
.chat-input-label { font-size: .72rem; color: var(--muted); white-space: nowrap; min-width: 60px; }

.btn-chat-submit {
  width: 100%;
  padding: 11px;
  background: var(--acc);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
  margin-top: 2px;
}
.btn-chat-submit:hover { opacity: .85; }

/* Order summary in chat */
.chat-summary {
  margin: 4px 12px 8px;
  padding: 12px;
  background: var(--surf2);
  border-radius: 12px;
  font-size: .78rem;
}
.chat-summary-row { display: flex; justify-content: space-between; padding: 3px 0; }
.chat-summary-row.total { font-weight: 700; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; }

/* ── Screen: Result ──────────────────────────────── */
.wsr-img-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 260px;
}
.wsr-result-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.wsr-back-chat {
  width: 100%;
  background: var(--surf2);
  border: none; border-bottom: 1px solid var(--border);
  padding: 9px 14px;
  font-size: .78rem; font-weight: 600; color: var(--text);
  text-align: left; cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.wsr-back-chat:hover { background: var(--border); }

.wsr-order-banner {
  display: flex; align-items: center; gap: 8px;
  background: #f0fdf4; border-top: 1px solid #86efac;
  padding: 9px 14px;
  font-size: .8rem; font-weight: 600; color: #15803d;
  animation: toast-in .25s ease;
}
.wsr-order-banner-icon { font-size: 1rem; }
.wsr-order-banner-text { line-height: 1.3; }

.wsr-bottom {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  flex-shrink: 0;
}
.wsr-size-section {}
.wsr-size-label { font-size: .73rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.wsr-size-row { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-wsr-size {
  min-width: 40px;
  height: 34px;
  padding: 0 10px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.btn-wsr-size:hover { border-color: var(--acc); }
.btn-wsr-size.active { border-color: var(--acc); background: var(--acc); color: #fff; }
.btn-wsr-size.unavail { opacity: .35; cursor: not-allowed; text-decoration: line-through; }

.wsr-cart-row { display: flex; gap: 8px; align-items: stretch; }
.btn-w-cart {
  flex: 1;
  padding: 13px 16px;
  background: var(--acc);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: .05em;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .2s;
}
.btn-w-cart:hover:not(:disabled) { opacity: .85; }
.btn-w-cart:disabled { opacity: .4; cursor: not-allowed; }
.cart-icon { font-size: 1rem; }

.btn-w-wish {
  width: 48px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.btn-w-wish:hover { border-color: #e91e63; color: #e91e63; }
.btn-w-wish.wished { color: #e91e63; border-color: #e91e63; }

.wsr-actions {
  display: flex;
  gap: 6px;
}
.btn-w-sm-action {
  flex: 1;
  padding: 8px 6px;
  background: var(--surf2);
  border: none; border-radius: 10px;
  font-size: .68rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.btn-w-sm-action:hover { background: var(--border); color: var(--text); }
.bwsa-icon { font-size: 1rem; }

/* ── Screen: Order Success ───────────────────────── */
.wssucc-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  text-align: center;
  gap: 12px;
}
.wssucc-check {
  width: 56px; height: 56px;
  background: var(--ok);
  color: #fff;
  border-radius: 50%;
  font-size: 1.6rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.wssucc-title { font-size: 1.2rem; font-weight: 800; }
.wssucc-num { font-size: .82rem; color: var(--muted); }
.wssucc-msg { font-size: .82rem; color: var(--muted); line-height: 1.5; }
.wssucc-email-msg { font-size: .78rem; color: var(--ok); }
.wssucc-btn { margin-top: 12px; }

/* ══════════════════════════════════════════════
   MODALS (camera + terms)
══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  backdrop-filter: blur(2px);
}
.modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  width: 100%; max-width: 500px;
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: 0 12px 48px rgba(0,0,0,.22);
  max-height: 90vh; overflow-y: auto;
}
.modal-title { font-size: 1rem; font-weight: 700; }

/* Camera */
.camera-modal-box { max-width: 560px; }
.camera-video { width: 100%; border-radius: var(--rs); background: #000; aspect-ratio: 4/3; object-fit: cover; }
.camera-modal-preview-img { width: 100%; border-radius: var(--rs); border: 1px solid var(--border); }
.camera-live-actions, .camera-preview-actions { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.camera-live-row { display: flex; gap: 12px; justify-content: center; }
.camera-flip-btn { font-size: .85rem; }

/* Terms */
.terms-modal-box { max-width: 620px; }
.terms-scroll { overflow-y: auto; max-height: 50vh; padding-right: 4px; font-size: .8rem; line-height: 1.65; color: #555; }
.terms-scroll p { margin-bottom: 10px; }
.terms-scroll ol { padding-left: 18px; }
.terms-scroll ol li { margin-bottom: 6px; }

/* ══════════════════════════════════════════════
   SHARED BUTTONS (used in modals)
══════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--acc); color: #fff;
  border: none; border-radius: 50px;
  font-size: .92rem; font-weight: 600;
  padding: 13px 28px;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-primary:hover { opacity: .85; }
.btn-outline {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); border-radius: 50px;
  font-size: .84rem; font-weight: 500;
  padding: 9px 20px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-outline:hover { border-color: var(--acc); color: var(--acc); }
.btn-ghost {
  background: none; border: none;
  color: var(--muted); font-size: .8rem;
  cursor: pointer; padding: 4px 8px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.btn-ghost:hover { color: var(--text); background: var(--surf2); }

/* ══════════════════════════════════════════════
   ERROR TOAST
══════════════════════════════════════════════ */
.error-toast {
  position: fixed;
  bottom: 64px; left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a; color: #fff;
  padding: 11px 22px;
  border-radius: 50px;
  font-size: .84rem; font-weight: 500;
  z-index: 3000;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  max-width: 88vw; text-align: center;
  animation: toast-in .2s ease;
  cursor: pointer;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.store-footer {
  border-top: 1px solid var(--border);
  padding: 18px 24px;
  margin-top: 40px;
}
.store-footer-inner {
  max-width: 1140px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.store-footer-copy    { font-size: .75rem; color: var(--muted); }
.store-footer-version { font-size: .72rem; color: var(--border); letter-spacing: .03em; }

/* ══════════════════════════════════════════════
   CATALOG PAGE
══════════════════════════════════════════════ */
.catalog-main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 36px 24px 60px;
}
.catalog-header { margin-bottom: 28px; }
.catalog-breadcrumb { font-size: .74rem; color: var(--muted); margin-bottom: 8px; letter-spacing: .04em; }
.catalog-title  { font-size: 1.8rem; font-weight: 700; margin-bottom: 6px; }
.catalog-count  { font-size: .8rem; color: var(--muted); }

/* Grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Card */
.cat-card {
  background: var(--surf);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow .2s, transform .18s;
  cursor: pointer;
}
.cat-card:hover { box-shadow: 0 6px 28px rgba(0,0,0,.1); transform: translateY(-2px); }

/* Skeleton card */
.cat-skeleton {
  aspect-ratio: 3/4;
  background: linear-gradient(110deg, #e8e6e0 25%, #d8d6d0 50%, #e8e6e0 75%);
  background-size: 200% 100%;
  animation: shimmer-pd 1.5s linear infinite;
  cursor: default;
}
.cat-skeleton:hover { box-shadow: none; transform: none; }

/* Image wrap */
.cat-img-wrap {
  position: relative;
  aspect-ratio: 3/4;
  background: #e8e6e0;
  overflow: hidden;
}
.cat-img-skeleton {
  position: absolute; inset: 0;
  background: linear-gradient(110deg, #e8e6e0 25%, #d8d6d0 50%, #e8e6e0 75%);
  background-size: 200% 100%;
  animation: shimmer-pd 1.5s linear infinite;
}
.cat-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  display: block;
  opacity: 0;
  transition: opacity .3s;
}

/* ПРИМІРЯТИ overlay */
.cat-try-btn {
  position: absolute;
  bottom: 14px; left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(26,26,26,.14);
  border-radius: 50px;
  padding: 10px 20px;
  font-size: .8rem; font-weight: 700; letter-spacing: .06em;
  cursor: pointer;
  white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  opacity: 0;
  transition: opacity .2s, transform .15s, background .15s;
  transform: translateX(-50%) translateY(4px);
}
.cat-card:hover .cat-try-btn {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.cat-try-btn:hover { background: #fff; }
.cat-try-dot { font-size: .9rem; }

/* Info row */
.cat-info {
  padding: 12px 14px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.cat-name { font-size: .88rem; font-weight: 600; line-height: 1.3; }
.cat-badge {
  display: inline-block;
  background: var(--surf2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .68rem; font-weight: 600; letter-spacing: .05em;
  color: var(--muted);
  padding: 2px 7px;
  width: fit-content;
  text-transform: uppercase;
}

/* Empty state */
.catalog-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 80px 24px;
  text-align: center;
  gap: 12px;
}
.catalog-empty-icon  { font-size: 3rem; }
.catalog-empty-title { font-size: 1.1rem; font-weight: 600; }
.catalog-empty-hint  { font-size: .82rem; color: var(--muted); max-width: 320px; line-height: 1.6; }

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 500px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .catalog-main { padding: 24px 12px 60px; }
  .cat-try-btn { opacity: 1; transform: translateX(-50%) translateY(0); font-size: .72rem; padding: 8px 14px; }
}

@media (max-width: 760px) {
  .product-detail { grid-template-columns: 1fr; gap: 24px; padding: 20px 16px 80px; }
  .store-nav { display: none; }

  .widget-panel {
    right: 0; left: 0;
    width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
  }
  .wsh-visual { height: 260px; }
  .wsg-visual { height: 280px; }
  .wsp-visual { min-height: 320px; }
}
