/* ============================================================
   Print Studio — Gallery Wall Designer v2.0
   All rules scoped inside #psgw
   ============================================================ */

#psgw, #psgw * { box-sizing: border-box; margin: 0; padding: 0; }

#psgw {
  position: fixed; inset: 0; z-index: 9000;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  background: #13110e;
  color: #ede8e0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#psgw button { font-family: inherit; cursor: pointer; border: none; background: none; }
#psgw input, #psgw select { font-family: inherit; outline: none; border: none; }
#psgw a { color: inherit; text-decoration: none; }
#psgw ::-webkit-scrollbar { width: 4px; height: 4px; }
#psgw ::-webkit-scrollbar-thumb { background: rgba(200,169,110,.3); border-radius: 2px; }

/* ── Tokens ─────────────────────────────────────────────────── */
#psgw { --gold: #c8a96e; --gold-light: #dfc08a; --dark: #13110e; --panel: #1f1c17; --border: rgba(200,169,110,.16); --text-dim: rgba(237,232,224,.45); }

/* ── Typography ─────────────────────────────────────────────── */
#psgw .serif { font-family: 'Cormorant Garamond', serif; font-weight: 300; }

/* ── Layout ─────────────────────────────────────────────────── */
#psgw-header {
  height: 52px; flex-shrink: 0;
  background: rgba(19,17,14,.98);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 18px; z-index: 10;
  transition: opacity .2s, transform .2s;
}

/* Full view mode — hide all chrome properly */
#psgw.fullview #psgw-header {
  height: 0; overflow: hidden; border: none;
  opacity: 0; pointer-events: none;
}
#psgw.fullview #psgw-panel,
#psgw.fullview #psgw-panel-toggle {
  width: 0; min-width: 0; overflow: hidden;
  opacity: 0; pointer-events: none;
}
#psgw.fullview #psgw-toolbar    { opacity: 0; pointer-events: none; }
#psgw.fullview #psgw-cartbar    { opacity: 0; pointer-events: none; }
#psgw.fullview #psgw-furn-btn-wrap { opacity: 0; pointer-events: none; }
#psgw.fullview #psgw-guides     { opacity: 0; }
#psgw.fullview #psgw-pickers    { opacity: 0; pointer-events: none; }

/* Exit full view button */
#psgw-fullview-exit {
  display: none; position: fixed; top: 20px; right: 20px; z-index: 9998;
  background: rgba(19,17,14,.9); border: 1px solid rgba(200,169,110,.4);
  color: #f2ece2; font-size: 13px; font-weight: 600;
  padding: 10px 20px; border-radius: 10px; cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .15s;
}
#psgw-fullview-exit:hover { background: rgba(40,35,28,.95); }
#psgw.fullview #psgw-fullview-exit { display: flex; align-items: center; gap: 8px; }

#psgw-body { flex: 1; display: flex; overflow: hidden; min-height: 0; }

#psgw-canvas {
  flex: 1; position: relative; overflow: hidden;
  background: #cec8c0 center/cover no-repeat;
  image-rendering: high-quality;
  -webkit-image-rendering: auto;
  cursor: default;
}

/* ── Cart bar ────────────────────────────────────────────────── */
/* Positioned relative to #psgw-body, not #psgw-canvas, to avoid overflow:hidden clipping */

/* ── Panel ──────────────────────────────────────────────────── */
#psgw-panel {
  width: 320px; flex-shrink: 0;
  flex: 1;                       /* fill wrapper in column flex context */
  transition: opacity .2s, transform .2s;
  min-height: 0;                 /* allow children to scroll */
  background: var(--panel);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: width .25s ease;
}
#psgw-panel.collapsed { width: 0; border-left: none; }

#psgw-panel-toggle {
  position: absolute; left: -28px; top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 60px;
  background: var(--panel);
  border: 1px solid var(--border); border-right: none;
  border-radius: 6px 0 0 6px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 20; color: var(--gold); font-size: 12px;
  user-select: none; -webkit-user-select: none;
}

#psgw-panel-head {
  padding: 14px 12px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

#psgw-panel-items {
  flex: 1; overflow-y: scroll; /* always show scrollbar → stable column width */
  padding: 8px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  scrollbar-gutter: stable;   /* reserve space before scrollbar appears */
}
#psgw .psgw-panel-col {
  flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0;
}

/* ── Search / Filters ───────────────────────────────────────── */
#psgw .search-wrap {
  position: relative; margin-bottom: 8px;
}
#psgw .search-wrap input {
  width: 100%; padding: 7px 10px 7px 30px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 7px; color: #ede8e0; font-size: 12px;
}
#psgw .search-icon {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); font-size: 13px; pointer-events: none;
}

/* Horizontal scroll pill row — replaces wrapping filter-row */
#psgw .filter-scroll-wrap {
  position: relative; margin-bottom: 5px;
  /* fade edges */
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 12px, black calc(100% - 12px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, black 12px, black calc(100% - 12px), transparent 100%);
}
#psgw .filter-scroll {
  display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  padding: 2px 12px 4px;
  align-items: center;
  white-space: nowrap;
}
#psgw .filter-scroll::-webkit-scrollbar { display: none; }

/* Keep the old filter-row for orientation (only 4 items, no scroll needed) */
#psgw .filter-row {
  display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px;
}

#psgw .filter-pill {
  padding: 2px 8px; border-radius: 18px; font-size: 10px; cursor: pointer;
  border: 1px solid rgba(237,232,224,.1);
  background: transparent; color: var(--text-dim);
  transition: all .15s; flex-shrink: 0;
}
#psgw .filter-pill.active {
  border-color: var(--gold); background: rgba(200,169,110,.15); color: var(--gold); font-weight: 600;
}

/* ── Panel cards ─────────────────────────────────────────────── */
#psgw .pcard {
  margin-bottom: 0;
  border-radius: 7px; overflow: hidden;
  border: 1px solid var(--border);
  background: #252118; cursor: grab;
  transition: border-color .15s, transform .15s;
  position: relative;
}
#psgw .pcard:hover { border-color: rgba(200,169,110,.5); transform: translateY(-2px); }

#psgw .pcard-thumb {
  width: 100%; position: relative; overflow: hidden;
  background: #1a1713; display: block;
  height: 160px;    /* default portrait — overridden inline per card */
}
#psgw .pcard-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  pointer-events: none;
}
#psgw .pcard-foot {
  padding: 6px 8px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 4px;
}
#psgw .pcard-title {
  font-size: 10px; font-weight: 500; color: #ede8e0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
#psgw .pcard-price { font-size: 10px; color: var(--gold); font-weight: 600; flex-shrink: 0; }

#psgw .pcard-add {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,6,4,0); transition: background .15s;
}
#psgw .pcard:hover .pcard-add { background: rgba(8,6,4,.45); }
#psgw .pcard-add button {
  padding: 6px 14px; border-radius: 18px;
  background: rgba(19,17,14,.92); color: var(--gold);
  border: 1px solid rgba(200,169,110,.5);
  font-size: 11px; font-weight: 600; white-space: nowrap;
  opacity: 0; transition: opacity .15s;
}
#psgw .pcard:hover .pcard-add button { opacity: 1; }

#psgw .panel-loader {
  text-align: center; padding: 20px; color: var(--text-dim); font-size: 12px;
}
#psgw-panel-footer {
  flex-basis: 100%; text-align: center;
}

/* ── Artworks on canvas ─────────────────────────────────────── */
#psgw .art {
  position: absolute; cursor: grab; user-select: none; isolation: isolate;
  transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease;
  pointer-events: auto;
}
#psgw .art.dragging { cursor: grabbing; transition: none; will-change: left, top; z-index: 999 !important; }

#psgw .art-frame {
  width: 100%; height: 100%; position: relative; overflow: visible;
}
#psgw .art-inner { width: 100%; height: 100%; overflow: hidden; position: relative; }
#psgw .art-inner.set-container { overflow: visible; } /* sets: let slot shadows show */
#psgw .art-img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; filter: brightness(.97) contrast(1.03) saturate(.96); }
#psgw .art-sheen { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(145deg,rgba(255,255,255,.1) 0%,rgba(255,255,255,.03) 30%,transparent 60%,rgba(0,0,0,.04) 100%); }

#psgw .art-ring {
  position: absolute; inset: -3px;
  border: 2px solid var(--gold); border-radius: 2px;
  pointer-events: none; z-index: 4; opacity: 0; transition: opacity .15s;
}
#psgw .art.selected .art-ring { opacity: 1; }

#psgw .art-hov {
  position: absolute; inset: 0; z-index: 5;
  background: rgba(8,6,4,.38);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  opacity: 0; transition: opacity .15s; pointer-events: none;
}
#psgw .art:hover .art-hov { opacity: 1; pointer-events: auto; }
#psgw .art.dragging .art-hov { opacity: 0 !important; pointer-events: none !important; }

#psgw .art-hov-btn {
  padding: 7px 16px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap;
}
#psgw .art-hov-btn.primary { background: linear-gradient(135deg,var(--gold),var(--gold-light)); color: #13110e; }
#psgw .art-hov-btn.secondary { background: rgba(237,232,224,.12); border: 1px solid rgba(237,232,224,.28); color: rgba(237,232,224,.88); }

#psgw .art-del {
  position: absolute; top: 6px; right: 6px; z-index: 6;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(220,60,60,.9); color: #fff; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
#psgw .art:hover .art-del { opacity: 1; pointer-events: auto; }

/* Set thumbnails */
#psgw .set-inner { display: flex; width: 100%; height: 100%; align-items: stretch; }
#psgw .set-inner .art-frame { display: flex; flex-direction: column; flex-shrink: 0; overflow: visible; }
#psgw .set-inner .art-inner { flex: 1; position: relative; overflow: hidden; }

/* Size label + step buttons */
#psgw .art-sizelbl {
  position: absolute; bottom: -26px; left: 50%; transform: translateX(-50%);
  background: rgba(19,17,14,.95); color: var(--gold); font-size: 10px;
  padding: 3px 8px; border-radius: 5px; white-space: nowrap;
  border: 1px solid var(--border); pointer-events: none; z-index: 10;
  display: none;
}
#psgw .art.selected .art-sizelbl { display: block; }

#psgw .art-stepbtns {
  position: absolute; bottom: -24px; right: 0; z-index: 10;
  display: none; gap: 3px;
}
#psgw .art.selected .art-stepbtns { display: flex; }
#psgw .art-stepbtns button {
  width: 22px; height: 22px; border-radius: 4px;
  background: rgba(19,17,14,.92); border: 1px solid var(--border);
  color: var(--gold); font-size: 13px;
}

/* ── Tiny arts — keep controls below but separate them vertically ── */
#psgw .art--tiny .art-sizelbl {
  bottom: -26px; top: auto; font-size: 9px; padding: 2px 6px;
}
#psgw .art--tiny .art-stepbtns {
  bottom: -50px; top: auto; right: 0;
}
#psgw .art--tiny .art-stepbtns button {
  width: 22px; height: 22px; font-size: 13px;
}
/* Tiny hover — icon only, no text labels */
#psgw .art--tiny .art-hov { gap: 4px; }
#psgw .art--tiny .art-hov-btn {
  padding: 5px 8px; font-size: 10px; border-radius: 14px;
}
#psgw .art--tiny .art-hov-btn.primary::before  { content: '🛒'; }
#psgw .art--tiny .art-hov-btn.secondary::before { content: '⊞'; }
#psgw .art--tiny .art-hov-btn span { display: none; }
/* Hide delete button on tiny (too cluttered) — accessible via hover overlay */
#psgw .art--tiny .art-del { width: 16px; height: 16px; font-size: 10px; top: 3px; right: 3px; }

/* ── Floor / ruler / guides ─────────────────────────────────── */
#psgw-floor {
  position: absolute; left: 0; right: 0; pointer-events: none; z-index: 2;
  height: 1px;
  background: linear-gradient(to right,transparent 2%,rgba(80,65,45,.2) 10%,rgba(80,65,45,.2) 55%,transparent 62%);
}
#psgw-eyelevel {
  position: absolute; left: 0; right: 38%; pointer-events: none; z-index: 2;
  border-bottom: 1px dashed rgba(80,65,45,.14);
}
#psgw-eyelevel span {
  position: absolute; bottom: 3px; left: 40px;
  font-size: 9px; color: rgba(80,65,45,.45); font-weight: 600;
}
#psgw-ruler {
  position: absolute; left: 18px; pointer-events: none; z-index: 3;
}
#psgw-ruler .r-line {
  position: absolute; bottom: 0; left: 0; width: 1px;
  border-right: 1px dashed rgba(80,65,45,.2);
}
#psgw-ruler .r-tick {
  position: absolute; left: 0; display: flex; align-items: center;
}
#psgw-ruler .r-tick-mark {
  width: 12px; height: 1px; background: rgba(80,65,45,.35);
}
#psgw-ruler .r-tick-lbl {
  font-size: 9px; color: rgba(80,65,45,.5); font-weight: 700;
  margin-left: 3px; font-family: monospace;
}

/* ── Arrange toolbar ─────────────────────────────────────────── */
#psgw-toolbar {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 20; display: none; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
#psgw-toolbar.visible { display: flex; }
#psgw-toolbar-inner {
  background: rgba(19,17,14,.94); border: 1px solid var(--border);
  border-radius: 9px; padding: 5px 10px;
  display: flex; gap: 4px; align-items: center;
  backdrop-filter: blur(20px); box-shadow: 0 4px 20px rgba(0,0,0,.4);
  white-space: nowrap;
}
#psgw-toolbar-furn {
  background: rgba(19,17,14,.88); border: 1px solid var(--border);
  border-radius: 9px; padding: 4px 8px;
  display: flex; align-items: center;
  backdrop-filter: blur(20px); box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
#psgw-toolbar span { font-size: 9px; color: var(--text-dim); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-right: 2px; }
#psgw .tb-btn {
  padding: 5px 10px; border-radius: 6px; font-size: 10px;
  border: 1px solid rgba(237,232,224,.12); color: var(--text-dim);
}
#psgw .tb-btn.gold { border-color: rgba(200,169,110,.35); background: rgba(200,169,110,.12); color: var(--gold); font-weight: 600; }
#psgw .tb-btn.active { border-color: rgba(200,169,110,.5); background: rgba(200,169,110,.15); color: var(--gold); }
#tb-furn { display: flex; align-items: center; font-size: 10px; gap: 2px; }

/* ── Float buttons (left side) ──────────────────────────────── */
#psgw-floats {
  position: absolute; left: 12px; bottom: 160px;
  display: flex; flex-direction: column; gap: 8px; z-index: 10;
}
#psgw .float-btn {
  width: 34px; height: 34px; border-radius: 7px;
  border: 1px solid rgba(237,232,224,.12);
  background: rgba(19,17,14,.8); color: var(--text-dim);
  font-size: 15px; display: flex; align-items: center; justify-content: center;
}
#psgw .float-btn.gold { border-color: var(--gold); background: rgba(200,169,110,.12); color: var(--gold); }

/* ── Pickers ─────────────────────────────────────────────────── */
#psgw-pickers {
  position: absolute; bottom: 74px; left: 50%; transform: translateX(-50%);
  z-index: 30; display: flex; flex-direction: column; gap: 6px; align-items: center;
}
#psgw .picker-row {
  display: flex; gap: 5px; align-items: center;
  padding: 7px 12px;
  background: rgba(19,17,14,.97); border: 1px solid var(--border);
  border-radius: 10px; backdrop-filter: blur(20px);
  box-shadow: 0 8px 36px rgba(0,0,0,.5); flex-wrap: wrap;
  white-space: nowrap;
}
#psgw .picker-lbl {
  font-size: 9px; color: var(--text-dim); font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; width: 34px; flex-shrink: 0;
}
#psgw .chip {
  padding: 3px 8px; border-radius: 5px; font-size: 10px; cursor: pointer; transition: all .15s;
}
#psgw .chip.on { border: 1px solid var(--gold); background: rgba(200,169,110,.15); color: var(--gold); }
#psgw .chip.off { border: 1px solid rgba(237,232,224,.12); color: var(--text-dim); }
#psgw .frame-swatch {
  width: 22px; height: 22px; border-radius: 3px; cursor: pointer; flex-shrink: 0;
  border: 2px solid transparent; transition: border-color .15s;
}
#psgw .frame-swatch.on { border-color: var(--gold); }
#psgw .picker-divider { width: 1px; height: 16px; background: var(--border); margin: 0 3px; flex-shrink: 0; }

#psgw .picker-cart-btn {
  padding: 8px 20px; border-radius: 8px;
  background: linear-gradient(135deg,var(--gold),var(--gold-light));
  color: #13110e; font-size: 11px; font-weight: 700;
}

/* ── Cart bar ─────────────────────────────────────────────────── */
#psgw-cartbar {
  position: fixed; bottom: 0; left: 0; right: 320px; min-height: 62px;
  background: rgba(19,17,14,.97); border-top: 1px solid var(--border);
  display: none; align-items: center; justify-content: space-between;
  padding: 10px 18px; backdrop-filter: blur(20px); z-index: 9500;
  transition: right .25s ease;
}
#psgw-cartbar.visible { display: flex; }
#psgw-cartbar.panel-collapsed { right: 0; }
#psgw-cartbar-info { display: flex; flex-direction: column; gap: 2px; }
#psgw-cartbar-info .main { font-size: 13px; }
#psgw-cartbar-info .nudge { font-size: 11px; color: var(--text-dim); font-style: italic; }
#psgw-cartbar-actions { display: flex; gap: 12px; align-items: center; }
#psgw-cartbar-actions .total { font-size: 16px; font-weight: 700; color: var(--gold); letter-spacing: .01em; }

/* Size custom dropdown */
#psgw .size-dd { position: relative; min-width: 220px; }
#psgw .size-dd-btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px; border-radius: 7px; cursor: pointer;
  background: rgba(237,232,224,.08); border: 1px solid rgba(237,232,224,.18);
  font-size: 13px; color: var(--text); transition: border-color .15s;
  user-select: none;
}
#psgw .size-dd-btn::after {
  content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 10px; flex-shrink: 0;
  border-right: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold);
  transform: rotate(45deg) translateY(-2px); transition: transform .15s;
}
#psgw .size-dd.open .size-dd-btn { border-color: var(--gold); }
#psgw .size-dd.open .size-dd-btn::after { transform: rotate(-135deg) translateY(-2px); }
#psgw .size-dd-list {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 0; right: 0;
  background: #1a1713; border: 1px solid rgba(200,169,110,.25);
  border-radius: 8px; overflow: hidden; z-index: 200;
  max-height: 220px; overflow-y: auto;
  box-shadow: 0 -8px 24px rgba(0,0,0,.5);
}
#psgw .size-dd.open .size-dd-list { display: block; }
#psgw .size-dd-opt {
  padding: 8px 14px; font-size: 13px; cursor: pointer; color: var(--text);
  transition: background .1s;
}
#psgw .size-dd-opt:hover { background: rgba(200,169,110,.12); }
#psgw .size-dd-opt.active { color: var(--gold); background: rgba(200,169,110,.08); font-weight: 600; }
#psgw .cart-add-all {
  padding: 8px 18px; border-radius: 7px;
  background: linear-gradient(135deg,var(--gold),var(--gold-light));
  color: #13110e; font-size: 12px; font-weight: 700;
}
#psgw .cart-view {
  padding: 8px 18px; border-radius: 7px;
  border: 1px solid var(--border); color: var(--gold); font-size: 12px; font-weight: 600;
}

/* ── Toast ───────────────────────────────────────────────────── */
#psgw-toast {
  position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: rgba(19,17,14,.97); border: 1px solid var(--border);
  border-radius: 7px; padding: 9px 16px; font-size: 11px;
  backdrop-filter: blur(10px); z-index: 100; white-space: nowrap;
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
#psgw-toast.show { opacity: 1; }

/* ── Modals (absolute inside #psgw) ─────────────────────────── */
#psgw .modal {
  position: absolute; inset: 0; z-index: 50;
  display: none; align-items: center; justify-content: center;
  background: rgba(8,6,4,.92); backdrop-filter: blur(14px);
}
#psgw .modal.open { display: flex; }

/* Onboarding */
#psgw-ob { align-items: stretch; }
#psgw-ob.open { display: flex; flex-direction: column; }
#psgw-ob-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 52px 0; flex-shrink: 0;
}
#psgw-ob-logo { font-family: 'Cormorant Garamond',serif; font-size: 15px; letter-spacing: .2em; color: var(--gold); text-transform: uppercase; }
#psgw-ob-dots { display: flex; gap: 8px; align-items: center; }
#psgw-ob-dots span { height: 4px; border-radius: 2px; background: rgba(200,169,110,.25); transition: all .4s; }
#psgw-ob-dots span.active { background: var(--gold); width: 44px !important; }
#psgw-ob-skip { padding: 7px 18px; border-radius: 20px; border: 1px solid rgba(237,232,224,.12); color: var(--text-dim); font-size: 12px; }

#psgw .ob-step { flex: 1; display: none; flex-direction: column; padding: 16px 20px 0; gap: 10px; overflow: hidden; min-height: 0; align-self: stretch; }
#psgw .ob-step.active { display: flex; }
#psgw .ob-step h2 { font-family: 'Cormorant Garamond',serif; font-size: 36px; font-weight: 300; color: #f2ece2; line-height: 1.1; margin: 0; white-space: nowrap; }
#psgw .ob-step h2 br { display: none; }
#psgw .ob-step p { font-size: 13px; color: var(--text-dim); margin: 0; }

/* Step 1 — style cards, full-bleed hero */
#psgw-ob-styles { display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(2,1fr); gap: 10px; flex: 1; min-height: 0; width: 100%; }
#psgw .style-card { border-radius: 12px; overflow: hidden; cursor: pointer; background: #1a1714; border: none; outline: 3px solid transparent; outline-offset: -3px; position: relative; transition: outline-color .2s; background-size: cover; background-position: center; }
#psgw .style-card:hover { outline-color: rgba(200,169,110,.4); }
#psgw .style-card.on { outline-color: var(--gold); }
#psgw .style-card.on::after { content:''; position:absolute; inset:0; background:rgba(200,169,110,.08); pointer-events:none; z-index:1; }
#psgw .style-card-ov { position: absolute; inset: 0; background: linear-gradient(to top,rgba(0,0,0,.82) 0%,rgba(0,0,0,.1) 50%,transparent 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 16px 18px; z-index: 2; }
#psgw .style-card-lbl { font-size: 17px; font-weight: 700; color: #f2ece2; margin-bottom: 4px; letter-spacing: .01em; }
#psgw .style-card-tagline { font-size: 11px; color: rgba(255,255,255,.5); font-style: italic; }
#psgw .style-card-check { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #13110e; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; z-index: 3; }

/* Step 2 — mood cards improved */
#psgw-ob-s2 .ob-head-text h2 { font-family: 'Cormorant Garamond',serif; font-size: 36px; font-weight: 300; color: #f2ece2; line-height: 1.1; margin: 0; white-space: nowrap; }
#psgw-ob-s2 .ob-head-text p { font-size: 13px; color: var(--text-dim); margin: 0; }
#psgw-ob-moods { display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(2,1fr); gap: 10px; flex: 1; min-height: 0; width: 100%; }
#psgw .mood-card { border-radius: 12px; overflow: hidden; cursor: pointer; border: none; outline: 3px solid transparent; outline-offset: -3px; position: relative; transition: outline-color .2s; }
#psgw .mood-card:hover { outline-color: rgba(200,169,110,.4); }
#psgw .mood-card.on { outline-color: var(--gold); }
#psgw .mood-card.on::after { content:''; position:absolute; inset:0; background:rgba(200,169,110,.08); pointer-events:none; z-index:1; }

#psgw .ob-step .ob-foot { padding: 14px 0; display: flex; justify-content: center; margin: 0; }
#psgw .ob-step .ob-next {
  padding: 16px 44px; border-radius: 12px; font-size: 14px; font-weight: 600;
  background: rgba(200,169,110,.15); color: rgba(200,169,110,.35); transition: all .25s; border: none;
}
#psgw .ob-step .ob-next.ready { background: linear-gradient(135deg,var(--gold),var(--gold-light)); color: #13110e; cursor: pointer; }
@keyframes psgw-shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-8px)} 40%{transform:translateX(8px)} 60%{transform:translateX(-6px)} 80%{transform:translateX(6px)} }
#psgw .ob-next.shake { animation: psgw-shake .5s ease; background: rgba(200,60,60,.25); color: rgba(237,232,224,.8); }
#psgw .mood-card-ov { position: absolute; inset: 0; background: linear-gradient(to top,rgba(0,0,0,.75) 0%,transparent 55%); display: flex; flex-direction: column; justify-content: flex-end; padding: 16px 18px; z-index: 2; }
#psgw .mood-card-lbl { font-size: 17px; font-weight: 700; color: #f2ece2; margin-bottom: 4px; letter-spacing: .01em; }
#psgw .mood-card-sub { font-size: 11px; color: rgba(255,255,255,.55); }
#psgw .mood-check { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; color: #13110e; font-size: 12px; font-weight: 700; z-index: 3; }

/* Step 3 — curated product grid */
#psgw-ob-s3 { padding: 16px 20px 0 20px; }
#psgw-ob-products { columns: 4; column-gap: 10px; display: block; flex: 1; min-height: 0; overflow-y: auto; }
#psgw .ob-prod-card { break-inside: avoid; margin-bottom: 10px; border-radius: 10px; overflow: hidden; cursor: pointer; background: #1a1714; outline: 3px solid transparent; outline-offset: -3px; display: block; width: 100%; position: relative; transition: outline-color .2s; }
#psgw .ob-prod-card:hover { outline-color: rgba(200,169,110,.4); }
#psgw .ob-prod-card.selected { outline-color: var(--gold); }
#psgw .ob-prod-card img { width: 100%; display: block; height: auto; }
#psgw .ob-prod-lbl { padding: 8px 12px; font-size: 11px; color: rgba(237,232,224,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#psgw .ob-prod-check { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #13110e; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
#psgw .ob-product-loading { color: var(--text-dim); font-size: 13px; padding: 40px; text-align: center; }
#psgw-galmod { flex-direction: column; align-items: stretch; }
#psgw-galmod.open { display: flex; }
#psgw-galmod-head {
  flex-shrink: 0; padding: 18px 24px 12px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
#psgw-galmod-head h2 { font-family: 'Cormorant Garamond',serif; font-size: 24px; color: #f2ece2; font-weight: 300; }
#psgw-galmod-close { width: 30px; height: 30px; border-radius: 6px; border: 1px solid rgba(237,232,224,.12); background: rgba(255,255,255,.04); color: var(--text-dim); font-size: 16px; }

/* Curated mode banner */
#psgw-galmod-banner {
  flex-shrink: 0; padding: 10px 24px;
  background: rgba(200,169,110,.08); border-bottom: 1px solid rgba(200,169,110,.15);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
#psgw-galmod-banner.hidden { display: none; }
#psgw-galmod-banner-text { font-size: 12px; color: var(--gold); font-style: italic; }
#psgw-galmod-banner-clear {
  font-size: 11px; color: var(--text-dim); padding: 3px 10px;
  border: 1px solid rgba(237,232,224,.12); border-radius: 12px;
  white-space: nowrap; transition: color .15s;
}
#psgw-galmod-banner-clear:hover { color: #ede8e0; }

/* Toolbar: filters + search in one row */
#psgw-galmod-toolbar {
  flex-shrink: 0; padding: 10px 24px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(200,169,110,.08);
  flex-wrap: wrap;
}
#psgw-galmod-filters { display: flex; gap: 6px; align-items: center; }
#psgw-galmod-search-wrap {
  flex: 1; min-width: 200px; position: relative;
  display: flex; align-items: center; gap: 8px;
}
#psgw-galmod-search-wrap input {
  flex: 1; padding: 7px 12px 7px 32px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  border-radius: 7px; color: #ede8e0; font-size: 12px;
}
#psgw-galmod-search-wrap .gal-si {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); font-size: 14px; pointer-events: none;
}

/* Scrollable grid body */
#psgw-galmod-body {
  flex: 1; overflow-y: auto; padding: 16px 18px;
  display: block;
  columns: 5;
  column-gap: 10px;
}

/* Gallery modal loader */
#psgw-galmod-loader { flex-shrink: 0; padding: 14px; text-align: center; width: 100%; }
#psgw-galmod-loader.hidden { display: none; }

/* Gallery cards — masonry with natural ratio */
#psgw .gal-card {
  width: 100%;
  break-inside: avoid;
  margin-bottom: 10px;
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); background: #252118;
  cursor: pointer; transition: border-color .15s;
  display: block;
}
#psgw .gal-card:hover { border-color: rgba(200,169,110,.5); }
#psgw .gal-card-img {
  position: relative; overflow: hidden;
  background: #1e1b16;
}
#psgw .gal-card-img::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1;
  background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,.04) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: psgw-shimmer 1.6s infinite;
}
#psgw .gal-card-img img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; z-index: 2;
}
#psgw .gal-card-foot { padding: 10px 12px; flex-shrink: 0; }
#psgw .gal-card-title { font-size: 12px; font-weight: 500; color: #ede8e0; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#psgw .gal-card-price { font-size: 11px; color: var(--gold); font-weight: 600; }
#psgw .gal-card-hover {
  position: absolute; inset: 0; z-index: 10;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
#psgw .gal-card:hover .gal-card-hover { opacity: 1; pointer-events: auto; }
#psgw .gal-card-add-btn {
  background: transparent; color: #f2ece2;
  border: 2px solid rgba(237,232,224,.7); border-radius: 10px;
  padding: 10px 22px; font-size: 13px; font-weight: 600;
  cursor: pointer; letter-spacing: .04em;
  backdrop-filter: blur(4px); transition: background .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
#psgw .gal-card-add-btn:hover { background: rgba(255,255,255,.12); border-color: #f2ece2; transform: scale(1.04); }
#psgw .gal-empty { width: 100%; text-align: center; padding: 48px 20px; color: var(--text-dim); font-size: 14px; }

/* Set preview in gallery modal */
#psgw .gal-set-imgs { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; gap: 2px; }
#psgw .gal-set-imgs img { flex: 1; object-fit: cover; min-width: 0; height: 100%; }

/* Tag filter clear button */
#psgw .tag-clear-btn {
  font-size: 10px; color: var(--text-dim); padding: 2px 8px;
  border: 1px solid rgba(237,232,224,.12); border-radius: 12px;
  margin-left: 4px; transition: color .15s;
}
#psgw .tag-clear-btn:hover { color: var(--gold); border-color: rgba(200,169,110,.3); }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes psgw-spin    { to { transform: rotate(360deg); } }
@keyframes psgw-fadein  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes psgw-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

#psgw .spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(200,169,110,.2); border-top-color: var(--gold);
  border-radius: 50%; animation: psgw-spin .7s linear infinite;
  vertical-align: middle; margin-left: 6px;
}

#psgw .loading-screen {
  position: absolute; inset: 0; background: #13110e;
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
#psgw .loading-screen .logo { font-family: 'Cormorant Garamond',serif; font-size: 30px; color: var(--gold); letter-spacing: .1em; margin-bottom: 20px; }
#psgw .loading-screen .spin { width: 36px; height: 36px; border: 2px solid rgba(200,169,110,.2); border-top-color: var(--gold); border-radius: 50%; animation: psgw-spin .8s linear infinite; margin: 0 auto; }

/* ── Filter Overlay ──────────────────────────────────────────── */
#psgw #psgw-filter-overlay {
  display: none;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: var(--panel);
  flex-direction: column;
  overflow: hidden;
  border-radius: 0;
}
#psgw #psgw-filter-overlay.open { display: flex; }

#psgw #psgw-filter-overlay-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
#psgw #psgw-filter-close {
  background: none; border: none; color: var(--text-dim);
  font-size: 16px; cursor: pointer; padding: 4px 8px;
  border-radius: 4px; transition: background .15s;
}
#psgw #psgw-filter-close:hover { background: rgba(255,255,255,.06); color: var(--text); }

#psgw #psgw-filter-overlay-body {
  flex: 1; overflow-y: auto; padding: 0 16px 16px;
}
#psgw .fov-section { padding: 14px 0; border-bottom: 1px solid var(--border); }
#psgw .fov-section:last-child { border-bottom: none; }
#psgw .fov-section-title {
  font-size: 9px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 10px;
}
#psgw .fov-pills { display: flex; flex-wrap: wrap; gap: 6px; }
#psgw .fov-pill {
  padding: 6px 13px; border-radius: 16px; font-size: 11px; font-weight: 600;
  border: 1.5px solid rgba(200,169,110,.3); background: rgba(200,169,110,.06);
  color: rgba(242,236,226,.7); cursor: pointer; transition: all .15s;
  display: inline-flex; align-items: center; white-space: nowrap;
}
#psgw .fov-pill:hover { border-color: var(--gold); color: var(--text); }
#psgw .fov-pill.active {
  border-color: var(--gold); background: rgba(200,169,110,.18);
  color: var(--gold); font-weight: 700;
}

/* Color swatches */
#psgw .fov-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
#psgw .fov-swatch {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 6px;
  border-radius: 8px; border: 1px solid transparent; transition: all .15s;
  width: 52px;
}
#psgw .fov-swatch:hover { border-color: var(--border); background: rgba(255,255,255,.04); }
#psgw .fov-swatch.active { border-color: var(--gold); background: rgba(200,169,110,.1); }
#psgw .fov-swatch-dot {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.15);
  display: block; flex-shrink: 0;
}
#psgw .fov-swatch-lbl { font-size: 9px; color: var(--text-dim); text-align: center; line-height: 1.2; }
#psgw .fov-swatch.active #psgw .fov-swatch-lbl { color: var(--gold); }

#psgw #psgw-filter-overlay-foot {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--border); flex-shrink: 0;
}
#psgw #psgw-filter-clearall {
  flex: 0; padding: 9px 14px; border-radius: 7px; font-size: 11px;
  font-weight: 600; border: 1px solid var(--border);
  background: rgba(255,255,255,.04); color: var(--text-dim); cursor: pointer;
  white-space: nowrap; transition: all .15s;
}
#psgw #psgw-filter-clearall:hover { border-color: var(--text-dim); color: var(--text); }
#psgw #psgw-filter-apply {
  flex: 1; padding: 12px 18px; border-radius: 8px; font-size: 13px;
  font-weight: 700; border: none;
  background: linear-gradient(135deg, #c8a96e, #e8c98e);
  color: #13110e; cursor: pointer; transition: opacity .15s;
  box-shadow: 0 2px 12px rgba(200,169,110,.35);
  letter-spacing: .02em;
}
#psgw #psgw-filter-apply:hover { opacity: .88; }

/* ── Set badges ──────────────────────────────────────────────── */
#psgw .pcard-set-badge {
  position: absolute; bottom: 6px; left: 6px; z-index: 3;
  background: rgba(19,17,14,.82); color: var(--gold);
  font-size: 9px; font-weight: 700; letter-spacing: .05em;
  padding: 2px 7px; border-radius: 10px;
  border: 1px solid rgba(200,169,110,.3);
  pointer-events: none;
}
#psgw .gal-set-badge {
  position: absolute; bottom: 8px; left: 8px; z-index: 3;
  background: rgba(19,17,14,.82); color: var(--gold);
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 10px;
  border: 1px solid rgba(200,169,110,.3);
  pointer-events: none;
}
/* Gallery close button override */
#psgw-galmod-close {
  width: 38px !important; height: 38px !important;
  font-size: 22px !important; border-radius: 8px !important;
}

/* ── Material Picker ─────────────────────────────────────────── */
/* ── Material picker modal ── */
#psgw-mat-picker {
  display: none; position: absolute; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.45);
  align-items: center; justify-content: center;
}
#psgw-mat-picker.open { display: flex; }
#psgw .mat-picker-inner {
  background: #ffffff; border: none; border-radius: 16px;
  padding: 28px 28px 20px; max-width: 480px; width: 92%;
  display: flex; flex-direction: column; gap: 0;
  box-shadow: 0 24px 64px rgba(0,0,0,.22);
}
#psgw .mat-picker-headline {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #9b9088; margin-bottom: 6px;
}
#psgw .mat-picker-title {
  font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 600;
  color: #13110e; letter-spacing: .01em;
  border-bottom: 1px solid #e8e4de; padding-bottom: 16px; margin-bottom: 16px;
}
#psgw .mat-picker-opt {
  width: 100%; display: flex; align-items: flex-start; gap: 14px;
  padding: 14px; border-radius: 12px; border: 2px solid #e8e4de;
  background: #f8f6f2; color: #13110e; cursor: pointer;
  font-size: 13px; transition: all .15s; margin-bottom: 10px; text-align: left;
}
#psgw .mat-picker-opt:hover { border-color: var(--gold); background: #fdf9f3; }
#psgw .mat-picker-opt.selected { border-color: var(--gold); background: #fdf3e3; }
#psgw .mat-img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
#psgw .mat-picker-opt-body { display: flex; flex-direction: column; flex: 1; gap: 4px; padding-top: 2px; }
#psgw .mat-label { font-size: 14px; font-weight: 700; color: #13110e; }
#psgw .mat-desc { font-size: 11px; color: #6b6056; line-height: 1.55; }
#psgw .mat-price { color: var(--gold); font-weight: 700; font-size: 14px; margin-top: 6px; }
#psgw .mat-picker-note {
  font-size: 11px; color: #9b9088; text-align: center;
  padding-top: 12px; border-top: 1px solid #e8e4de; margin-top: 4px; line-height: 1.5;
}
#psgw .mat-picker-opt.small { padding: 8px 12px; font-size: 11px; margin-bottom: 4px; }
#psgw .mat-icon { font-size: 20px; }
#psgw .mat-picker-row { border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 8px; }
#psgw .mat-picker-row-title { font-size: 11px; color: var(--text-dim); margin-bottom: 6px; }
#psgw .mat-picker-row-btns { display: flex; gap: 6px; }
#psgw .mat-picker-row-btns .mat-picker-opt { flex: 1; }
#psgw .mat-picker-addall {
  width: 100%; padding: 13px; border-radius: 8px; font-size: 13px; font-weight: 700;
  border: none; background: linear-gradient(135deg, #c8a96e, #e8c98e);
  color: #13110e; cursor: pointer; margin-top: 8px;
}
#psgw .mat-picker-addall:hover { opacity: .88; }
#psgw .mat-picker-cancel {
  background: none; border: none; color: #9b9088; font-size: 12px;
  cursor: pointer; text-align: center; padding: 8px; transition: color .15s; margin-top: 2px;
}
#psgw .mat-picker-cancel:hover { color: #13110e; }
