:root {
  --font-scale: 1.08;
  --page-rgb: 13, 11, 10;
  --panel-rgb: 28, 22, 18;
  --theme-rgb: 28, 22, 18; /* CHANGE ONLY THIS LINE: R, G, B controls page + all panel backgrounds */
  --bg: rgb(var(--theme-rgb));
  --bg-2: rgba(var(--theme-rgb), 0.96);
  --panel: rgba(var(--theme-rgb), 0.92);
  --panel-2: rgba(var(--theme-rgb), 0.86);
  --panel-soft: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.105);
  --line-strong: rgba(255, 255, 255, 0.17);
  --text: #f4f5f7;
  --muted: #97a0ad;
  --muted-2: #687384;
  --gold: #d7a07f;
  --gold-2: #a76c50;
  --blue: #4d86ff;
  --blue-2: #2d5ce2;
  --green: #5ecb7b;
  --danger: #dc8669;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0,0,0,.34);
  --soft-shadow: 0 14px 34px rgba(0,0,0,.24);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  min-width: 1180px;
  height: 100%;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 84% 8%, rgba(50, 83, 160, .16), transparent 28%),
    radial-gradient(circle at 14% 76%, rgba(219, 167, 75, .07), transparent 34%),
    linear-gradient(135deg, #070b11 0%, #0c121b 48%, #070b11 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid rgba(227, 183, 101, .78);
  outline-offset: 2px;
}

svg { width: 1em; height: 1em; fill: currentColor; display: block; }
.hidden { display: none !important; }

.app-shell {
  height: 100vh;
  padding: 14px 18px 16px;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  gap: 12px;
}

.panel,
.topbar {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255,255,255,.045), transparent 34%),
    linear-gradient(180deg, rgba(20,29,41,.96), rgba(12,19,28,.97));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), var(--shadow);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.topbar {
  position: relative;
  z-index: 20;
  border-radius: 20px;
  display: grid;
  grid-template-columns: minmax(210px, .8fr) minmax(430px, 1.45fr) minmax(430px, .95fr);
  align-items: center;
  gap: 18px;
  padding: 8px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  width: max-content;
}
.brand img { width: 38px; height: 38px; }
.brand span { font-family: Georgia, serif; font-size: calc(17px * var(--font-scale)); font-weight: 700; letter-spacing: -.02em; }
.brand b { color: #7ecbff; }

.product-title { text-align: center; min-width: 0; }
.product-title h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 2.2vw, 40px);
  font-weight: 600;
  line-height: .9;
  letter-spacing: -.02em;
}
.product-title h1 span { color: var(--gold); }
.product-title p { margin: 6px 0 0; color: var(--muted); font-size: calc(11px * var(--font-scale)); letter-spacing: .01em; }

.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.status-pill {
  min-width: 122px;
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  border: 1px solid var(--line);
  color: #dbe1e9;
  font-weight: 800;
  font-size: calc(11px * var(--font-scale));
}
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: #e1a74c; box-shadow: 0 0 14px rgba(225,167,76,.8); }
.status-pill.ready i { background: var(--green); box-shadow: 0 0 14px rgba(94,203,123,.8); }
.status-pill.busy i { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.72); } }
.top-divider { width: 1px; height: 30px; background: var(--line); margin: 0 2px; }
.round-icon,
.profile-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  cursor: pointer;
  transition: .18s ease;
}
.round-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #bec6d1;
}
.round-icon svg { width: 18px; height: 18px; }
.round-icon:hover, .profile-chip:hover { color: var(--gold); border-color: rgba(227,183,101,.38); transform: translateY(-1px); }
.profile-chip {
  height: 40px;
  min-width: 76px;
  padding: 3px 8px 3px 4px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
}
.profile-avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: #202936; border: 1px solid rgba(227,183,101,.42); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-chip > svg { width: 15px; color: var(--muted); }

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 286px minmax(620px, 1fr) minmax(470px, 530px);
  gap: 14px;
}

.sidebar {
  border-radius: var(--radius);
  min-height: 0;
  display: grid;
  grid-template-rows: 68px 45px minmax(0, 1fr) auto;
  overflow: hidden;
}

.audience-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}
.audience-tab {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  font-size: calc(10px * var(--font-scale));
}
.audience-tab:not(:last-child)::after { content: ""; position: absolute; right: 0; height: 30px; width: 1px; background: var(--line); }
.audience-tab svg { width: 20px; height: 20px; }
.audience-tab.active { color: var(--gold); }
.audience-tab.active::before { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px; border-radius: 2px; background: var(--gold); box-shadow: 0 0 12px rgba(227,183,101,.5); }

.search-row { display: grid; grid-template-columns: minmax(0,1fr) 38px; gap: 8px; padding: 8px 12px 0; }
.search-box {
  height: 36px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  border-radius: 12px;
  overflow: hidden;
}
.search-box svg { width: 15px; height: 15px; justify-self: center; color: var(--gold); }
.search-box input { width: 100%; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--text); outline: 0; font-size: calc(11px * var(--font-scale)); }
.search-box input::placeholder { color: var(--muted-2); }
.filter-button {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #c7ced8;
}
.filter-button svg { width: 17px; }
.filter-button:hover { color: var(--gold); border-color: rgba(227,183,101,.34); }

.category-section { min-height: 0; padding: 14px 12px 10px; overflow: hidden; }
.category-section h2,
.model-section h2 {
  margin: 0;
  color: var(--gold);
  font-size: calc(10px * var(--font-scale));
  letter-spacing: .09em;
  text-transform: uppercase;
}
.category-list { height: calc(100% - 24px); margin-top: 10px; overflow-y: auto; padding-right: 5px; display: grid; align-content: start; gap: 3px; }
.category-list::-webkit-scrollbar, .catalog-grid::-webkit-scrollbar { width: 6px; }
.category-list::-webkit-scrollbar-thumb, .catalog-grid::-webkit-scrollbar-thumb { background: rgba(227,183,101,.24); border-radius: 999px; }
.category-button {
  appearance: none;
  width: 100%;
  min-height: 34px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  font-size: calc(11px * var(--font-scale));
  transition: .15s ease;
}
.category-button svg { width: 17px; height: 17px; color: #929ca9; }
.category-button:hover { color: #e7ebf0; background: rgba(255,255,255,.035); }
.category-button.active { color: #f4d8a8; border-color: rgba(227,183,101,.28); background: linear-gradient(90deg, rgba(227,183,101,.13), rgba(255,255,255,.025)); }
.category-button.active svg { color: var(--gold); }

.model-section { border-top: 1px solid var(--line); padding: 12px; }
.section-label-row { display: flex; align-items: center; justify-content: space-between; }
.section-label-row > span { min-width: 24px; height: 20px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; background: rgba(255,255,255,.055); border: 1px solid var(--line); color: var(--muted); font-size: calc(9px * var(--font-scale)); }
.model-strip { margin-top: 10px; display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; }
.model-strip::-webkit-scrollbar { height: 4px; }
.model-strip::-webkit-scrollbar-thumb { background: rgba(227,183,101,.24); border-radius: 999px; }
.model-thumb {
  flex: 0 0 47px;
  width: 47px;
  height: 47px;
  padding: 2px;
  border-radius: 50%;
  border: 1px solid rgba(227,183,101,.5);
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  transition: .18s ease;
}
.model-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.model-thumb:hover { transform: translateY(-2px); border-color: var(--gold); }
.model-thumb.active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(227,183,101,.2), 0 8px 20px rgba(0,0,0,.32); }
.add-model-button {
  width: 100%; height: 38px; margin-top: 8px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px dashed rgba(255,255,255,.16); border-radius: 11px;
  background: rgba(255,255,255,.018); color: #d4dae2; cursor: pointer; font-size: calc(11px * var(--font-scale));
}
.add-model-button svg { width: 16px; }
.add-model-button:hover { color: var(--gold); border-color: rgba(227,183,101,.38); }

.catalog-panel {
  border-radius: var(--radius);
  min-width: 0;
  min-height: 0;
  padding: 14px 16px 12px;
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr) 48px;
  gap: 8px;
  overflow: hidden;
}
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-heading h2 { margin: 0; color: var(--gold); font-size: calc(15px * var(--font-scale)); letter-spacing: .04em; text-transform: uppercase; }
.catalog-controls { display: flex; align-items: center; gap: 9px; }
.sort-control { height: 34px; min-width: 146px; display: grid; grid-template-columns: auto 1fr 18px; align-items: center; gap: 4px; padding: 0 8px 0 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--muted); font-size: calc(10px * var(--font-scale)); }
.sort-control select { min-width: 0; border: 0; outline: 0; appearance: none; background: transparent; color: #d8dde4; font-size: calc(10px * var(--font-scale)); cursor: pointer; }
.sort-control option { color: #111; }
.sort-control svg { width: 15px; }
.view-switch { display: grid; grid-template-columns: 34px 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.view-switch button { border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.view-switch button.active { color: var(--gold); background: rgba(227,183,101,.09); }
.view-switch svg { width: 16px; }

.catalog-grid {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(250px, 1fr);
  gap: 10px;
  overflow-y: auto;
  padding: 2px 6px 4px 2px;
  align-content: start;
}
.catalog-grid.compact { grid-auto-rows: minmax(212px, 1fr); gap: 8px; }
.product-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.018));
  box-shadow: var(--soft-shadow);
  display: grid;
  grid-template-rows: minmax(138px, 1fr) auto auto auto 34px;
  gap: 2px;
  padding: 6px 7px 0;
  transition: .18s ease;
}
.product-card:hover { transform: translateY(-2px); border-color: rgba(227,183,101,.34); box-shadow: 0 18px 42px rgba(0,0,0,.3); }
.product-image-wrap { min-height: 0; overflow: hidden; border-radius: 10px; background: #f4f5f6; }
.product-image-wrap img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 5px; }
.favourite-button { position: absolute; z-index: 2; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(50,56,64,.72); color: #e2e5e9; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(6px); }
.favourite-button svg { width: 16px; }
.favourite-button.active { color: #ffcf6e; }
.product-title { margin: 6px 0 0; font-size: calc(11px * var(--font-scale)); line-height: 1.15; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-meta { color: var(--muted); font-size: calc(9px * var(--font-scale)); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-price { color: var(--gold); font-size: calc(11px * var(--font-scale)); font-weight: 850; }
.tryon-button { appearance: none; margin: 3px -7px 0; border: 0; border-top: 1px solid rgba(227,183,101,.32); background: linear-gradient(180deg, rgba(227,183,101,.08), rgba(227,183,101,.02)); color: #efcc91; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-size: calc(10px * var(--font-scale)); font-weight: 800; }
.tryon-button svg { width: 13px; }
.tryon-button:hover { background: rgba(227,183,101,.13); color: #ffe0a8; }
.tryon-button:disabled { cursor: wait; opacity: .55; }
.catalog-empty { grid-column: 1 / -1; min-height: 280px; display: grid; place-items: center; align-content: center; gap: 9px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); }
.catalog-empty svg { width: 30px; height: 30px; color: var(--gold); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; }
.page-button { min-width: 30px; height: 30px; padding: 0 7px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: calc(10px * var(--font-scale)); }
.page-button.active { color: #ffe2aa; border-color: rgba(227,183,101,.5); background: rgba(227,183,101,.1); }
.page-button.arrow { border-color: var(--line); }
.page-button:disabled { opacity: .3; cursor: default; }

.tryon-column { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) 104px; gap: 10px; }
.mirror-panel { position: relative; min-height: 0; border-radius: var(--radius); padding: 14px 14px 12px; display: grid; grid-template-rows: 38px minmax(0,1fr); gap: 8px; overflow: hidden; }
.mirror-panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 95% 0%, rgba(77,134,255,.15), transparent 32%); }
.mirror-heading { position: relative; z-index: 3; }
.mirror-heading > div { display: flex; align-items: center; gap: 8px; }
.info-button { width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); cursor: help; font-size: calc(10px * var(--font-scale)); }
.fit-badge { min-width: 78px; height: 28px; padding: 0 11px; border-radius: 999px; background: linear-gradient(180deg, #4e83ff, #2e5bda); box-shadow: 0 9px 22px rgba(45,92,226,.3); display: grid; place-items: center; color: white; font-size: calc(10px * var(--font-scale)); font-weight: 800; }
.mirror-content { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 58px; gap: 10px; position: relative; z-index: 2; }
.mirror-frame { position: relative; min-width: 0; min-height: 0; overflow: hidden; border-radius: 15px; border: 1px solid rgba(255,255,255,.14); background: #121a24; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 18px 40px rgba(0,0,0,.34); }
.mirror-frame > img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; background: #edf0f2; }
.mirror-empty, .mirror-loading { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; background: linear-gradient(180deg, rgba(16,24,35,.96), rgba(10,15,22,.98)); color: var(--muted); }
.mirror-empty strong, .mirror-loading strong { color: #e5e9ee; font-size: calc(13px * var(--font-scale)); }
.mirror-loading small { color: var(--muted); font-size: calc(10px * var(--font-scale)); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mirror-bottom-actions { position: absolute; z-index: 4; left: 0; right: 0; bottom: 10px; display: flex; align-items: center; justify-content: center; gap: clamp(44px, 8vw, 90px); pointer-events: none; }
.mirror-bottom-actions button { pointer-events: auto; appearance: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); background: rgba(7,12,18,.82); color: white; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(10px); box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.mirror-bottom-actions button svg { width: 19px; height: 19px; }
.mirror-bottom-actions button:hover { color: var(--gold); transform: translateY(-1px); }
.mirror-bottom-actions .camera-shutter { width: 58px; height: 58px; color: white; background: linear-gradient(180deg, #5b91ff, #2d62e6); border: 4px solid rgba(255,255,255,.35); }
.mirror-bottom-actions .camera-shutter svg { width: 24px; height: 24px; }
.mirror-tools { min-height: 0; display: grid; grid-template-rows: repeat(4, minmax(68px, 1fr)); gap: 8px; }
.mirror-tools button { appearance: none; min-width: 0; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.026); color: var(--muted); display: grid; place-items: center; align-content: center; gap: 6px; cursor: pointer; transition: .16s ease; font-size: calc(8px * var(--font-scale)); }
.mirror-tools button svg { width: 20px; height: 20px; }
.mirror-tools button:hover, .mirror-tools button.active { color: #f5d08c; border-color: rgba(227,183,101,.48); background: rgba(227,183,101,.07); }

.render-drawer { position: absolute; z-index: 20; top: 55px; right: 13px; bottom: 12px; width: min(330px, calc(100% - 26px)); padding: 14px; border: 1px solid var(--line-strong); border-radius: 16px; background: rgba(10,16,24,.97); box-shadow: 0 24px 70px rgba(0,0,0,.55); backdrop-filter: blur(20px); overflow-y: auto; }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.drawer-header span { color: var(--gold); text-transform: uppercase; letter-spacing: .08em; font-size: calc(8px * var(--font-scale)); }
.drawer-header strong { display: block; margin-top: 3px; font-size: calc(15px * var(--font-scale)); }
.drawer-header button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.03); color: var(--muted); cursor: pointer; font-size: calc(20px * var(--font-scale)); line-height: 1; }
.drawer-section { margin-top: 13px; }
.drawer-section > label, .custom-prompt-field > span { display: block; margin-bottom: 7px; color: #d9dee5; font-size: calc(10px * var(--font-scale)); font-weight: 700; }
.segmented-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.segmented-grid button { min-height: 32px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.026); color: var(--muted); cursor: pointer; font-size: calc(9px * var(--font-scale)); }
.segmented-grid button.active { color: #f7d69b; border-color: rgba(227,183,101,.42); background: rgba(227,183,101,.08); }
.brightness-control > div { display: flex; justify-content: space-between; align-items: center; }
.brightness-control output { min-width: 31px; height: 22px; border-radius: 999px; display: grid; place-items: center; color: var(--gold); background: rgba(227,183,101,.08); font-size: calc(9px * var(--font-scale)); }
.brightness-control input { width: 100%; accent-color: var(--gold); }
.custom-prompt-field { display: block; margin-top: 13px; }
.custom-prompt-field textarea { width: 100%; min-height: 70px; resize: vertical; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--text); outline: 0; font-size: calc(10px * var(--font-scale)); line-height: 1.4; }
.primary-button, .secondary-button { appearance: none; min-height: 39px; padding: 0 15px; border-radius: 11px; cursor: pointer; font-weight: 800; font-size: calc(11px * var(--font-scale)); }
.primary-button { width: 100%; margin-top: 12px; border: 1px solid rgba(227,183,101,.46); color: #1b160d; background: linear-gradient(180deg, #f0c778, #c99645); }
.secondary-button { border: 1px solid var(--line-strong); color: #e0e4e9; background: rgba(255,255,255,.045); }
.primary-button:hover, .secondary-button:hover { transform: translateY(-1px); }
.primary-button:disabled { opacity: .5; cursor: wait; }

.basket-row { min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.basket-card { position: relative; min-width: 0; border-radius: 16px; padding: 11px 42px 9px 12px; display: grid; grid-template-rows: auto 1fr; text-align: left; cursor: pointer; overflow: hidden; }
.basket-card:hover { border-color: rgba(227,183,101,.32); }
.basket-title { display: flex; align-items: center; gap: 7px; color: #d9dee5; text-transform: uppercase; font-size: calc(9px * var(--font-scale)); font-weight: 850; }
.basket-title > svg { width: 14px; color: var(--gold); }
.basket-count { position: absolute; right: 12px; top: 10px; min-width: 23px; height: 23px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted); font-size: calc(9px * var(--font-scale)); }
.basket-thumbs { display: flex; align-items: end; gap: 5px; padding-top: 8px; min-height: 42px; }
.basket-thumbs img { width: 38px; height: 38px; border-radius: 7px; object-fit: cover; background: white; border: 1px solid rgba(255,255,255,.12); }
.basket-empty-text { color: var(--muted-2); font-size: calc(9px * var(--font-scale)); align-self: center; }
.basket-arrow { position: absolute; right: 11px; bottom: 14px; width: 17px; color: #c7ced7; }

.toast-host { position: fixed; z-index: 1000; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { min-width: 250px; max-width: 380px; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(13,20,29,.96); color: #e9edf2; box-shadow: 0 18px 50px rgba(0,0,0,.42); font-size: calc(11px * var(--font-scale)); animation: toastIn .2s ease; }
.toast.error { border-color: rgba(220,134,105,.48); }
.toast.success { border-color: rgba(94,203,123,.44); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

.modal { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(8px); }
.modal-card { position: relative; width: min(540px, 96vw); padding: 16px; border-radius: 18px; border: 1px solid var(--line-strong); background: #111925; box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.modal-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.modal-heading span { color: var(--gold); text-transform: uppercase; letter-spacing: .08em; font-size: calc(8px * var(--font-scale)); }
.modal-heading h2 { margin: 3px 0 0; font-size: calc(20px * var(--font-scale)); }
.modal-heading > button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted); font-size: calc(22px * var(--font-scale)); cursor: pointer; }
.camera-modal-card video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 13px; background: #05080c; transform: scaleX(-1); }
.camera-actions { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.camera-actions .primary-button { margin: 0; }

@media (max-width: 1450px) {
  .workspace { grid-template-columns: 245px minmax(570px, 1fr) 460px; }
  .catalog-grid { gap: 8px; }
  .product-card { padding-left: 6px; padding-right: 6px; }
  .tryon-column { grid-template-rows: minmax(0, 1fr) 96px; }
}

@media (min-height: 950px) {
  .catalog-grid { grid-auto-rows: minmax(285px, 1fr); }
}

@media (max-height: 780px) {
  .app-shell { padding-top: 9px; padding-bottom: 9px; grid-template-rows: 58px minmax(0,1fr); gap: 9px; }
  .topbar { padding-top: 5px; padding-bottom: 5px; }
  .product-title h1 { font-size: calc(29px * var(--font-scale)); }
  .sidebar { grid-template-rows: 62px 43px minmax(0,1fr) auto; }
  .catalog-panel { grid-template-rows: 38px minmax(0,1fr) 38px; }
  .catalog-grid { grid-auto-rows: 230px; }
  .tryon-column { grid-template-rows: minmax(0,1fr) 88px; }
  .basket-card { padding-top: 8px; padding-bottom: 7px; }
}

/* Premium management pages */
.management-body { min-width: 980px; overflow: auto; }
.management-shell { min-height: 100vh; padding: 18px; display: grid; grid-template-rows: 76px minmax(0,1fr); gap: 14px; }
.management-topbar { border-radius: 20px; display: grid; grid-template-columns: 220px 1fr 220px; align-items: center; padding: 10px 18px; }
.management-topbar > div { text-align: center; }
.management-topbar h1 { margin: 0; font-family: Georgia, serif; font-size: calc(30px * var(--font-scale)); }
.management-topbar p { margin: 5px 0 0; color: var(--muted); font-size: calc(11px * var(--font-scale)); }
.management-back { justify-self: end; color: #f0c778; text-decoration: none; font-size: calc(11px * var(--font-scale)); border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; }
.review-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-height: 0; }
.review-panel { border-radius: 20px; padding: 16px; min-height: 420px; }
.review-heading { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.review-heading span { color: var(--gold); text-transform: uppercase; letter-spacing: .08em; font-size: calc(8px * var(--font-scale)); }
.review-heading h2 { margin: 4px 0 0; font-size: calc(22px * var(--font-scale)); }
.review-heading b { min-width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted); }
.review-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.review-look-card { border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); overflow: hidden; }
.review-look-card img { width: 100%; height: 300px; object-fit: contain; background: #eef0f2; display: block; }
.review-look-card > div { padding: 10px; }
.review-look-card h3 { margin: 0; font-size: calc(13px * var(--font-scale)); }
.review-look-card p { margin: 5px 0 10px; color: var(--muted); font-size: calc(10px * var(--font-scale)); }
.review-look-card button { width: 100%; height: 34px; border-radius: 9px; border: 1px solid rgba(227,183,101,.35); background: rgba(227,183,101,.08); color: #f3ce8d; cursor: pointer; font-size: calc(10px * var(--font-scale)); }
.review-empty { grid-column: 1 / -1; min-height: 220px; border: 1px dashed var(--line); border-radius: 14px; display: grid; place-items: center; color: var(--muted); font-size: calc(11px * var(--font-scale)); }

.catalogue-admin-layout { display: grid; grid-template-columns: minmax(520px,1fr) 390px; gap: 14px; min-height: 0; }
.admin-panel { border-radius: 20px; padding: 16px; overflow: auto; }
.admin-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.admin-heading span { color: var(--gold); text-transform: uppercase; font-size: calc(8px * var(--font-scale)); letter-spacing: .08em; }
.admin-heading h2 { margin: 4px 0 0; font-size: calc(21px * var(--font-scale)); }
.admin-form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; margin-top: 14px; }
.admin-form label { display: grid; gap: 5px; color: #dce1e7; font-size: calc(9px * var(--font-scale)); }
.admin-form input,.admin-form select,.admin-form textarea { width: 100%; min-height: 38px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--text); padding: 8px 10px; outline: 0; font-size: calc(10px * var(--font-scale)); }
.admin-form select option { color: #111; }
.admin-form textarea { min-height: 74px; resize: vertical; }
.admin-form .span-2 { grid-column: span 2; }
.admin-form .span-3 { grid-column: 1 / -1; }
.admin-form button { grid-column: 1 / -1; height: 42px; border-radius: 10px; border: 1px solid rgba(227,183,101,.46); background: linear-gradient(180deg,#efc77b,#c89543); color: #1d170d; font-weight: 850; cursor: pointer; }
.admin-list { display: grid; gap: 8px; margin-top: 12px; }
.admin-item { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 8px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.admin-item img { width: 70px; height: 70px; object-fit: contain; border-radius: 8px; background: #f1f2f3; }
.admin-item h3 { margin: 3px 0 4px; font-size: calc(11px * var(--font-scale)); }
.admin-item p { margin: 0; color: var(--muted); font-size: calc(9px * var(--font-scale)); line-height: 1.35; }


/* =========================================================
   Premium glossy colour patch v2
   Layout is intentionally unchanged.
   Edit only --theme-rgb at the top of this file to recolour
   the page and every major panel together.
   ========================================================= */

html,
body {
  background:
    radial-gradient(circle at 84% 4%, rgba(218, 160, 126, .12), transparent 30%),
    radial-gradient(circle at 18% 84%, rgba(93, 105, 165, .08), transparent 34%),
    linear-gradient(135deg,
      rgba(var(--theme-rgb), 1) 0%,
      rgba(var(--theme-rgb), .94) 48%,
      rgba(var(--theme-rgb), 1) 100%);
}

.panel,
.topbar,
.modal-card,
.render-drawer,
.review-look-card,
.admin-item {
  background:
    linear-gradient(112deg,
      rgba(255,255,255,.105) 0%,
      rgba(255,255,255,.025) 20%,
      transparent 42%,
      rgba(255,255,255,.04) 72%,
      transparent 100%),
    linear-gradient(180deg,
      rgba(var(--theme-rgb), .82),
      rgba(var(--theme-rgb), .98));
  border-color: rgba(216,160,127,.24);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.13),
    inset 0 -24px 52px rgba(0,0,0,.16),
    0 24px 70px rgba(0,0,0,.34);
  backdrop-filter: blur(20px) saturate(1.18);
  -webkit-backdrop-filter: blur(20px) saturate(1.18);
}

.product-card {
  background:
    linear-gradient(125deg, rgba(255,255,255,.08), transparent 31%),
    linear-gradient(180deg, rgba(var(--theme-rgb), .72), rgba(var(--theme-rgb), .97));
  border-color: rgba(216,160,127,.34);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 14px 34px rgba(0,0,0,.28);
}
.product-card:hover {
  border-color: rgba(226,171,137,.70);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 20px 48px rgba(0,0,0,.40),
    0 0 0 1px rgba(216,160,127,.12);
}

/* Removes the plain white catalogue tile surface for transparent PNG garments. */
.product-image-wrap,
.admin-item img,
.review-look-card img {
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.11), transparent 48%),
    linear-gradient(145deg, rgba(255,255,255,.035), rgba(0,0,0,.22)),
    rgb(var(--theme-rgb));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    inset 0 -22px 45px rgba(0,0,0,.20);
}

.mirror-frame {
  background:
    radial-gradient(circle at 50% 10%, rgba(255,255,255,.08), transparent 52%),
    linear-gradient(145deg, rgba(var(--theme-rgb), .72), rgba(var(--theme-rgb), 1));
  border-color: rgba(216,160,127,.30);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.13),
    inset 0 -30px 70px rgba(0,0,0,.20),
    0 20px 48px rgba(0,0,0,.40);
}
.mirror-frame > img {
  background: transparent;
}

.tryon-button {
  border-top-color: rgba(216,160,127,.58);
  background:
    linear-gradient(110deg, rgba(255,255,255,.12), transparent 26%, rgba(255,255,255,.04) 65%),
    linear-gradient(180deg, rgba(216,160,127,.15), rgba(var(--theme-rgb), .75));
  color: #f1c5a8;
}

.mirror-tools button,
.round-icon,
.profile-chip,
.status-pill,
.search-box,
.filter-button,
.sort-control,
.view-switch,
.basket-count,
.segmented-grid button,
.drawer-header button,
.secondary-button,
.add-model-button,
.page-button.arrow {
  background:
    linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.018)),
    rgba(var(--theme-rgb), .56);
}

.basket-thumbs img {
  background: rgb(var(--theme-rgb));
}

.toast {
  background: rgba(var(--theme-rgb), .97);
}

/* New icon-only control. It does not affect the mirror layout. */
.fresh-render-button {
  position: absolute;
  z-index: 6;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(216,160,127,.44);
  display: grid;
  place-items: center;
  color: #f2c5aa;
  background:
    linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.025)),
    rgba(var(--theme-rgb), .84);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 12px 28px rgba(0,0,0,.36);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, color .16s ease;
}
.fresh-render-button svg { width: 18px; height: 18px; }
.fresh-render-button:hover {
  transform: translateY(-1px) rotate(-16deg);
  border-color: rgba(232,181,149,.82);
  color: #ffe2cf;
}
.fresh-render-button:disabled {
  cursor: wait;
  opacity: .55;
  animation: freshSpin 1s linear infinite;
}
@keyframes freshSpin { to { transform: rotate(360deg); } }

/* ========================================================================== */
/* PRODUCT CATALOGUE V2 — product cards + Amazon-style detail page + AI mirror */
/* ========================================================================== */

.product-card-v2 {
  grid-template-rows: minmax(150px, 1fr) auto auto auto !important;
  padding-bottom: 8px;
  cursor: pointer;
}
.product-card-v2:focus-visible {
  outline: 2px solid rgba(227,183,101,.78);
  outline-offset: 2px;
}
.product-quick-tryon {
  position: absolute;
  z-index: 3;
  left: 11px;
  top: 11px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(227,183,101,.48);
  border-radius: 50%;
  color: #ffe0a7;
  background: rgba(16,22,31,.82);
  box-shadow: 0 8px 20px rgba(0,0,0,.28);
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.product-quick-tryon svg { width: 15px; height: 15px; }
.product-quick-tryon:hover { transform: translateY(-1px) scale(1.05); background: rgba(216,160,127,.2); }
.product-quick-tryon:disabled { opacity: .55; cursor: wait; }
.product-card-footer {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
}
.product-colour-preview {
  min-height: 17px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}
.product-colour-preview span,
.product-colour-preview b {
  max-width: 68px;
  padding: 2px 5px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  font-size: calc(7px * var(--font-scale));
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.product-colour-preview b { color: var(--gold); }
.product-open-arrow {
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(227,183,101,.24);
  border-radius: 50%;
  color: var(--gold);
  font-size: calc(21px * var(--font-scale));
  line-height: 1;
}

.product-page-body {
  min-width: 1180px;
  min-height: 100vh;
  height: auto;
  overflow: auto;
}
.product-page-shell {
  width: 100%;
  min-height: 100vh;
  padding: 14px 18px 18px;
  display: grid;
  grid-template-rows: 64px minmax(760px, calc(100vh - 96px));
  gap: 12px;
}
.product-topbar {
  position: sticky;
  top: 14px;
  z-index: 30;
  min-width: 0;
  padding: 8px 16px;
  display: grid;
  grid-template-columns: 210px minmax(300px, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-radius: 20px;
}
.product-breadcrumb {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: calc(11px * var(--font-scale));
}
.product-breadcrumb a { color: var(--gold); text-decoration: none; }
.product-breadcrumb b { overflow: hidden; color: #dce1e8; white-space: nowrap; text-overflow: ellipsis; }
.product-top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.product-back-button,
.product-cart-button {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dce2ea;
  background: rgba(255,255,255,.035);
  text-decoration: none;
  font-size: calc(10px * var(--font-scale));
  font-weight: 800;
  cursor: pointer;
}
.product-cart-button svg { width: 16px; }
.product-cart-button b {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #16100c;
  background: var(--gold);
  font-size: calc(9px * var(--font-scale));
}
.product-back-button:hover,
.product-cart-button:hover { color: #ffe0aa; border-color: rgba(227,183,101,.42); }

.product-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(500px, 1.15fr) minmax(310px, .72fr) minmax(430px, .88fr);
  gap: 12px;
}
.product-gallery-panel,
.product-information-panel,
.product-mirror-panel {
  min-width: 0;
  min-height: 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.product-gallery-panel {
  padding: 15px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto 46px;
  gap: 11px;
}
.product-gallery-heading,
.product-mirror-heading,
.product-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.product-gallery-heading span,
.product-mirror-heading span,
.product-section-title span,
.product-cart-header span {
  display: block;
  color: var(--muted);
  font-size: calc(9px * var(--font-scale));
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.product-gallery-heading h1 {
  max-width: 650px;
  margin: 4px 0 0;
  overflow: hidden;
  color: #f2f4f7;
  font-family: Georgia, serif;
  font-size: calc(19px * var(--font-scale));
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-detail-heart {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255,255,255,.03);
  cursor: pointer;
}
.product-detail-heart svg { width: 19px; }
.product-detail-heart.active { color: #ffcf72; border-color: rgba(255,207,114,.45); background: rgba(255,207,114,.08); }

.product-gallery-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
}
.product-view-thumbs {
  min-height: 0;
  padding-right: 4px;
  display: grid;
  align-content: start;
  gap: 7px;
  overflow-y: auto;
}
.product-view-thumbs::-webkit-scrollbar { width: 5px; }
.product-view-thumbs::-webkit-scrollbar-thumb { background: rgba(227,183,101,.25); border-radius: 999px; }
.product-view-thumb {
  width: 100%;
  min-height: 78px;
  padding: 4px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  cursor: pointer;
  overflow: hidden;
}
.product-view-thumb img {
  width: 100%;
  height: 70px;
  display: block;
  object-fit: contain;
  border-radius: 7px;
  background: rgba(255,255,255,.035);
}
.product-view-thumb:hover,
.product-view-thumb.active { color: #ffe0a8; border-color: rgba(227,183,101,.55); background: rgba(227,183,101,.08); }
.product-main-image-wrap {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(216,160,127,.3);
  border-radius: 17px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.11), transparent 46%),
    linear-gradient(145deg, rgba(255,255,255,.035), rgba(0,0,0,.22)),
    rgb(var(--theme-rgb));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), inset 0 -25px 55px rgba(0,0,0,.18);
}
.product-main-image-wrap > img {
  width: 100%;
  height: 100%;
  max-height: 545px;
  display: block;
  object-fit: contain;
  padding: 12px;
}
.product-view-chip {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 11px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  color: #f2d6a6;
  background: rgba(12,17,24,.78);
  backdrop-filter: blur(8px);
  font-size: calc(9px * var(--font-scale));
  font-weight: 850;
}
.product-image-nav {
  position: absolute;
  top: 50%;
  width: 34px;
  height: 44px;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 12px;
  color: #e6e9ee;
  background: rgba(9,13,19,.6);
  font-size: calc(25px * var(--font-scale));
  cursor: pointer;
  backdrop-filter: blur(7px);
}
.product-image-nav.previous { left: 10px; }
.product-image-nav.next { right: 10px; }
.product-image-nav:hover { color: var(--gold); border-color: rgba(227,183,101,.45); }

.product-colour-section { min-width: 0; }
.product-section-title h2,
.product-mirror-heading h2,
.product-cart-header h2 {
  margin: 3px 0 0;
  color: #f0f2f5;
  font-size: calc(13px * var(--font-scale));
}
.product-section-title > b {
  min-width: 25px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(255,255,255,.035);
  font-size: calc(9px * var(--font-scale));
}
.product-variant-strip {
  margin-top: 7px;
  padding: 1px 2px 5px;
  display: flex;
  gap: 7px;
  overflow-x: auto;
}
.product-variant-strip::-webkit-scrollbar { height: 4px; }
.product-variant-strip::-webkit-scrollbar-thumb { background: rgba(227,183,101,.25); border-radius: 999px; }
.product-variant-card {
  flex: 0 0 94px;
  min-width: 94px;
  padding: 5px;
  display: grid;
  grid-template-rows: 58px auto auto;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  text-align: left;
  cursor: pointer;
}
.product-variant-card img { width: 100%; height: 58px; object-fit: contain; border-radius: 7px; background: rgba(255,255,255,.035); }
.product-variant-card span { overflow: hidden; font-size: calc(8px * var(--font-scale)); font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.product-variant-card small { color: var(--muted-2); font-size: calc(7px * var(--font-scale)); }
.product-variant-card.active { color: #ffe1ac; border-color: rgba(227,183,101,.58); background: rgba(227,183,101,.09); box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.product-primary-tryon {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(227,183,101,.55);
  border-radius: 13px;
  color: #16100c;
  background: linear-gradient(180deg, #e9bd7c, #c8915c);
  box-shadow: 0 12px 28px rgba(200,145,92,.2);
  font-size: calc(11px * var(--font-scale));
  font-weight: 900;
  cursor: pointer;
}
.product-primary-tryon svg { width: 17px; }
.product-primary-tryon:hover { filter: brightness(1.06); transform: translateY(-1px); }
.product-primary-tryon:disabled { opacity: .46; cursor: not-allowed; transform: none; }

.product-information-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}
.product-info-scroll { min-height: 0; padding: 18px 18px 10px; overflow-y: auto; }
.product-info-scroll::-webkit-scrollbar { width: 6px; }
.product-info-scroll::-webkit-scrollbar-thumb { background: rgba(227,183,101,.24); border-radius: 999px; }
.product-info-kicker { color: var(--gold); font-size: calc(9px * var(--font-scale)); font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.product-information-panel h2 { margin: 8px 0 0; color: #f3f5f8; font-family: Georgia, serif; font-size: calc(21px * var(--font-scale)); line-height: 1.18; }
.product-detail-price { margin-top: 12px; color: #f0c989; font-size: calc(19px * var(--font-scale)); font-weight: 900; }
.product-selected-summary { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.product-selected-summary > div { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); }
.product-selected-summary span { display: block; color: var(--muted); font-size: calc(7px * var(--font-scale)); text-transform: uppercase; }
.product-selected-summary b { display: block; margin-top: 4px; overflow: hidden; color: #e9edf2; font-size: calc(9px * var(--font-scale)); white-space: nowrap; text-overflow: ellipsis; }
.product-highlights { margin-top: 17px; }
.product-highlights h3 { margin: 0 0 8px; color: var(--gold); font-size: calc(11px * var(--font-scale)); }
.product-highlights ul { margin: 0; padding-left: 17px; color: #d6dbe2; font-size: calc(10px * var(--font-scale)); line-height: 1.52; }
.product-highlights li + li { margin-top: 5px; }
.product-attributes { margin: 17px 0 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.product-attributes > div { min-width: 0; padding: 8px 10px; display: grid; grid-template-columns: 42% 58%; gap: 8px; background: rgba(255,255,255,.02); }
.product-attributes > div + div { border-top: 1px solid var(--line); }
.product-attributes dt { color: var(--muted); font-size: calc(8px * var(--font-scale)); }
.product-attributes dd { margin: 0; overflow-wrap: anywhere; color: #e2e6eb; font-size: calc(8px * var(--font-scale)); font-weight: 700; }
.product-raw-details { margin-top: 15px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.product-raw-details summary { padding: 10px 12px; color: #e5e9ef; background: rgba(255,255,255,.025); font-size: calc(9px * var(--font-scale)); font-weight: 800; cursor: pointer; }
.product-raw-details pre { max-height: 260px; margin: 0; padding: 12px; overflow: auto; color: var(--muted); background: rgba(0,0,0,.13); font: 8px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }
.product-purchase-actions { padding: 12px 15px 14px; border-top: 1px solid var(--line); background: rgba(5,8,12,.17); }
.add-to-cart-button {
  width: 100%;
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(77,134,255,.55);
  border-radius: 12px;
  color: #eef4ff;
  background: linear-gradient(180deg, rgba(77,134,255,.88), rgba(45,92,226,.88));
  font-size: calc(10px * var(--font-scale));
  font-weight: 900;
  cursor: pointer;
}
.add-to-cart-button svg { width: 16px; }
.product-purchase-actions small { display: block; margin-top: 7px; color: var(--muted); font-size: calc(7px * var(--font-scale)); line-height: 1.4; text-align: center; }

.product-mirror-panel {
  padding: 14px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 9px;
}
.product-mirror-heading > div > span { color: var(--gold); }
.product-model-section { min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.product-section-title.compact h2 { font-size: calc(10px * var(--font-scale)); }
.product-model-strip { margin-top: 7px; padding-bottom: 4px; display: flex; gap: 7px; overflow-x: auto; }
.product-model-strip::-webkit-scrollbar { height: 4px; }
.product-model-strip::-webkit-scrollbar-thumb { background: rgba(227,183,101,.24); border-radius: 999px; }
.product-model-thumb {
  flex: 0 0 62px;
  width: 62px;
  padding: 3px;
  display: grid;
  grid-template-rows: 52px auto;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  cursor: pointer;
}
.product-model-thumb img { width: 100%; height: 52px; object-fit: cover; border-radius: 7px; }
.product-model-thumb span { overflow: hidden; font-size: calc(7px * var(--font-scale)); white-space: nowrap; text-overflow: ellipsis; }
.product-model-thumb.active { color: #ffe0a8; border-color: rgba(227,183,101,.58); background: rgba(227,183,101,.08); }
.product-upload-profile { width: 100%; height: 28px; margin-top: 5px; border: 1px dashed rgba(255,255,255,.16); border-radius: 8px; color: #d4dae2; background: rgba(255,255,255,.018); font-size: calc(8px * var(--font-scale)); cursor: pointer; }
.product-upload-profile:hover { color: var(--gold); border-color: rgba(227,183,101,.38); }
.product-mirror-frame {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(216,160,127,.3);
  border-radius: 17px;
  background:
    radial-gradient(circle at 50% 10%, rgba(255,255,255,.08), transparent 52%),
    linear-gradient(145deg, rgba(var(--theme-rgb), .72), rgba(var(--theme-rgb), 1));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13), inset 0 -30px 70px rgba(0,0,0,.2), 0 20px 48px rgba(0,0,0,.34);
}
.product-mirror-frame > img { width: 100%; height: 100%; max-height: 510px; display: block; object-fit: contain; }
.product-mirror-empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--muted); font-size: calc(10px * var(--font-scale)); text-align: center; }
.product-mirror-empty small { max-width: 220px; }
.product-mirror-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.product-mirror-actions button { height: 34px; border: 1px solid var(--line); border-radius: 10px; color: #dce2e9; background: rgba(255,255,255,.025); font-size: calc(9px * var(--font-scale)); font-weight: 800; cursor: pointer; }
.product-mirror-actions button:hover { color: var(--gold); border-color: rgba(227,183,101,.36); }
.product-mirror-actions button:disabled { opacity: .5; cursor: wait; }

.product-cart-drawer {
  position: fixed;
  z-index: 101;
  top: 0;
  right: 0;
  width: min(430px, 92vw);
  height: 100vh;
  padding: 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 13px;
  transform: translateX(105%);
  border-left: 1px solid rgba(255,255,255,.13);
  color: var(--text);
  background: rgba(12,18,27,.97);
  box-shadow: -24px 0 70px rgba(0,0,0,.46);
  backdrop-filter: blur(20px);
  transition: transform .24s ease;
}
.product-cart-drawer.open { transform: translateX(0); }
.product-cart-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-cart-header button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: #e2e7ed; background: rgba(255,255,255,.03); font-size: calc(21px * var(--font-scale)); cursor: pointer; }
.product-cart-items { min-height: 0; display: grid; align-content: start; gap: 9px; overflow-y: auto; }
.product-cart-item { min-width: 0; padding: 8px; display: grid; grid-template-columns: 74px minmax(0, 1fr) 27px; gap: 9px; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.product-cart-item img { width: 74px; height: 90px; object-fit: contain; border-radius: 8px; background: rgba(255,255,255,.04); }
.product-cart-item h3 { margin: 0; display: -webkit-box; overflow: hidden; color: #edf0f4; font-size: calc(10px * var(--font-scale)); line-height: 1.3; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-cart-item p { margin: 5px 0 0; color: var(--gold); font-size: calc(8px * var(--font-scale)); }
.product-cart-item small { display: block; margin-top: 5px; color: var(--muted); font-size: calc(8px * var(--font-scale)); }
.product-cart-item > button { width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 50%; color: #d9dfe6; background: transparent; cursor: pointer; }
.product-cart-empty { min-height: 230px; display: grid; place-items: center; align-content: center; gap: 7px; border: 1px dashed var(--line); border-radius: 13px; color: var(--muted); text-align: center; }
.product-cart-empty strong { color: #e7ebef; font-size: calc(13px * var(--font-scale)); }
.product-cart-empty span { max-width: 260px; font-size: calc(9px * var(--font-scale)); }
.product-cart-footer button { width: 100%; height: 42px; border: 1px solid rgba(227,183,101,.45); border-radius: 12px; color: #ffe0a8; background: rgba(227,183,101,.08); font-size: calc(10px * var(--font-scale)); font-weight: 850; cursor: pointer; }
.product-cart-backdrop { position: fixed; z-index: 100; inset: 0; background: rgba(0,0,0,.52); backdrop-filter: blur(2px); }

@media (max-width: 1420px) {
  .product-workspace { grid-template-columns: minmax(460px, 1.05fr) minmax(280px, .68fr) minmax(390px, .82fr); }
  .product-gallery-layout { grid-template-columns: 76px minmax(0, 1fr); }
  .product-view-thumb { min-height: 70px; }
  .product-view-thumb img { height: 62px; }
}

/* PRODUCT CATALOG V2.1: image-only gallery thumbnails */
.product-view-thumb {
  grid-template-rows: 1fr !important;
  padding: 4px !important;
}
.product-view-thumb img {
  height: 100% !important;
  min-height: 72px;
}
.product-view-thumb span,
.product-view-chip,
.product-view-render-hint {
  display: none !important;
}

/* PRODUCT CATALOG V2.2: front/back-only try-on, size chart and catalogue editor */
.round-icon { text-decoration: none; }

.product-size-summary .product-size-row {
  margin-top: 5px;
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto;
  gap: 6px;
  align-items: center;
}
.product-size-summary select {
  min-width: 0;
  height: 29px;
  padding: 0 24px 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #f1f3f6;
  background: rgba(255,255,255,.045);
  font-size: calc(9px * var(--font-scale));
  font-weight: 800;
  outline: 0;
}
.product-size-summary select option { color: #111; }
.product-size-summary button {
  height: 29px;
  padding: 0 9px;
  border: 1px solid rgba(227,183,101,.38);
  border-radius: 7px;
  color: #f3cb8d;
  background: rgba(227,183,101,.07);
  font-size: calc(8px * var(--font-scale));
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}
.product-size-summary button:hover { border-color: rgba(227,183,101,.7); background: rgba(227,183,101,.12); }
.product-mirror-actions button:disabled { cursor: not-allowed; opacity: .42; }

.size-chart-modal {
  position: fixed;
  z-index: 160;
  inset: 0;
  display: none;
  place-items: center;
  padding: 28px;
}
.size-chart-modal.open { display: grid; }
.size-chart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(5px);
}
.size-chart-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 92vw);
  max-height: min(720px, 88vh);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  color: #1b1f25;
  background: #f7f8f9;
  box-shadow: 0 30px 100px rgba(0,0,0,.58);
}
.size-chart-header {
  min-height: 72px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid #d6d9dc;
  background: #eef0f2;
}
.size-chart-header span { display: block; color: #65707b; font-size: calc(10px * var(--font-scale)); font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.size-chart-header h2 { margin: 4px 0 0; color: #171b20; font: 800 24px/1.1 Inter, sans-serif; }
.size-chart-header button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #15191e;
  background: transparent;
  font-size: calc(29px * var(--font-scale));
  line-height: 1;
  cursor: pointer;
}
.size-chart-header button:hover { background: rgba(0,0,0,.07); }
.size-chart-content { max-height: calc(min(720px, 88vh) - 72px); padding: 22px 28px 30px; overflow: auto; }
.size-chart-content h3 { margin: 0 0 16px; color: #20252b; font-size: calc(16px * var(--font-scale)); }
.size-chart-table-wrap { overflow-x: auto; border: 1px solid #ced2d6; border-radius: 12px; background: white; }
.size-chart-table { width: 100%; min-width: 560px; border-collapse: collapse; color: #20252b; font-size: calc(14px * var(--font-scale)); }
.size-chart-table th,
.size-chart-table td { padding: 13px 15px; border-bottom: 1px solid #d8dbde; text-align: left; white-space: nowrap; }
.size-chart-table thead th { color: #171b20; background: #f2f4f5; font-size: calc(14px * var(--font-scale)); font-weight: 900; }
.size-chart-table tbody th { font-weight: 900; }
.size-chart-table tbody tr:last-child th,
.size-chart-table tbody tr:last-child td { border-bottom: 0; }

.catalogue-admin-v22 { grid-template-columns: minmax(640px, 1fr) minmax(360px, 430px); }
.admin-mode-hint { margin: 7px 0 0; color: var(--muted); font-size: calc(9px * var(--font-scale)); line-height: 1.45; }
.admin-cancel-edit {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #e5e9ee;
  background: rgba(255,255,255,.035);
  font-size: calc(9px * var(--font-scale));
  font-weight: 800;
  cursor: pointer;
}
.admin-form label small { color: var(--muted); font-size: calc(7px * var(--font-scale)); line-height: 1.35; }
.reference-person-field {
  padding: 9px;
  border: 1px solid rgba(227,183,101,.22);
  border-radius: 11px;
  background: rgba(227,183,101,.045);
}
.admin-list .admin-item {
  width: 100%;
  appearance: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.admin-list .admin-item.active {
  border-color: rgba(227,183,101,.62);
  background: linear-gradient(135deg, rgba(227,183,101,.12), rgba(255,255,255,.025));
  box-shadow: 0 0 0 1px rgba(227,183,101,.13) inset;
}
.admin-list .admin-item:hover { border-color: rgba(227,183,101,.38); transform: translateY(-1px); }

@media (max-width: 1220px) {
  .catalogue-admin-v22 { grid-template-columns: 1fr; overflow-y: auto; }
  .size-chart-dialog { width: 96vw; }
}

/* =========================================================
   PRODUCT CATALOG V2.4 — RETAIL THEMES, PROMOTIONS & PRICING
   ========================================================= */
:root {
  --surface: rgba(var(--panel-rgb), .96);
  --surface-2: rgba(var(--panel-rgb), .88);
  --surface-soft: rgba(255,255,255,.045);
  --page-background:
    radial-gradient(circle at 82% 5%, rgba(69,104,197,.12), transparent 30%),
    radial-gradient(circle at 12% 82%, rgba(220,160,112,.10), transparent 34%),
    rgb(var(--page-rgb));
}

html[data-theme="dark"] {
  color-scheme: dark;
  --line: rgba(255,255,255,.11);
  --line-strong: rgba(255,255,255,.18);
  --panel-soft: rgba(255,255,255,.04);
  --shadow: 0 24px 70px rgba(0,0,0,.34);
  --soft-shadow: 0 14px 34px rgba(0,0,0,.25);
}

html[data-theme="light"] {
  color-scheme: light;
  --line: rgba(54,40,31,.13);
  --line-strong: rgba(54,40,31,.20);
  --panel-soft: rgba(54,40,31,.035);
  --shadow: 0 22px 58px rgba(73,53,39,.13);
  --soft-shadow: 0 13px 30px rgba(73,53,39,.12);
  --blue: #315fd5;
  --blue-2: #234bb6;
  --green: #27854b;
  --danger: #b14c35;
  --page-background:
    radial-gradient(circle at 84% 3%, rgba(224,177,138,.22), transparent 30%),
    radial-gradient(circle at 8% 88%, rgba(87,126,211,.09), transparent 34%),
    rgb(var(--page-rgb));
}

html, body {
  color: var(--text) !important;
  background: var(--page-background) !important;
}

.panel,
.topbar,
.product-topbar,
.admin-panel,
.review-panel,
.retail-admin-panel {
  color: var(--text);
  border-color: var(--line) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.07), transparent 38%),
    linear-gradient(180deg, rgba(var(--panel-rgb), .94), rgba(var(--panel-rgb), .995)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), var(--shadow) !important;
}

html[data-theme="light"] body::before { opacity: .055; mix-blend-mode: multiply; }
html[data-theme="light"] .panel,
html[data-theme="light"] .topbar,
html[data-theme="light"] .product-topbar,
html[data-theme="light"] .admin-panel,
html[data-theme="light"] .review-panel,
html[data-theme="light"] .retail-admin-panel {
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,255,255,.74) 44%, transparent 75%),
    rgb(var(--panel-rgb)) !important;
  box-shadow: inset 0 1px 0 #fff, var(--shadow) !important;
}

html[data-theme="light"] :is(.product-title, .product-cart-item h3, .product-cart-empty strong, .review-heading h2, .admin-heading h2, .product-info-scroll h2, .product-gallery-heading h1, .product-mirror-heading h2) { color: var(--text) !important; }
html[data-theme="light"] :is(.round-icon, .profile-chip, .filter-button, .sort-control, .view-switch, .category-button, .add-model-button, .product-mirror-actions button, .product-upload-profile, .admin-cancel-edit, .management-back, input, select, textarea) {
  color: var(--text);
  background-color: rgba(70,52,40,.035);
}
html[data-theme="light"] select option { color: #211a16; background: white; }
html[data-theme="light"] .product-image-wrap { background: #f8f6f3 !important; }
html[data-theme="light"] .product-card,
html[data-theme="light"] .product-variant-card,
html[data-theme="light"] .product-selected-summary > div,
html[data-theme="light"] .product-model-section,
html[data-theme="light"] .product-cart-item,
html[data-theme="light"] .admin-item {
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(248,244,239,.92)) !important;
}
html[data-theme="light"] .product-cart-drawer { color: var(--text); background: rgba(252,249,245,.98); }
html[data-theme="light"] .product-size-summary select { color: var(--text); background: rgba(70,52,40,.04); }

/* Main retail page: animated engagement strip. */
.app-shell {
  grid-template-rows: 64px 66px minmax(0, 1fr) !important;
  gap: 10px !important;
}

.retail-promo-zone {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(360px, 1.25fr) minmax(270px, .75fr) minmax(420px, 1fr);
  gap: 10px;
  overflow: hidden;
}

.retail-promo-zone > * {
  position: relative;
  min-width: 0;
  height: 72px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

.promo-image-card {
  isolation: isolate;
  background: var(--panel);
}

.promo-image-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform .45s ease, filter .35s ease;
  animation: promoImageFloat 8s ease-in-out infinite;
}

.promo-image-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.18) 50%, transparent 75%);
  transform: translateX(-135%);
  animation: promoImageSweep 6.5s linear infinite;
  mix-blend-mode: screen;
}

.promo-image-card:hover img {
  transform: scale(1.035);
  filter: saturate(1.06) contrast(1.02);
}

.promo-offer-image-card img { animation-delay: 0s; }
.promo-delivery-image-card img { animation-delay: -2.2s; }
.promo-live-image-card img { animation-delay: -4.3s; }

@keyframes promoImageFloat {
  0%, 100% { transform: scale(1.01) translateY(0); }
  50% { transform: scale(1.025) translateY(-1px); }
}

@keyframes promoImageSweep {
  from { transform: translateX(-135%); }
  to { transform: translateX(135%); }
}

/* Discount pricing. */
/* Discount pricing. */
.product-price-stack { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.product-sale-price { color: var(--gold); font-weight: 900; }
.product-price-stack del { color: var(--muted); opacity: .8; }
.product-price-stack b { padding: 2px 5px; border-radius: 999px; color: #fff; background: #d2573a; letter-spacing: .03em; }
.product-detail-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.product-detail-current-price { color: var(--gold); font-size: calc(21px * var(--font-scale)); font-weight: 950; }
.product-detail-price del { color: var(--muted); font-size: calc(12px * var(--font-scale)); }
.product-detail-price b { padding: 4px 7px; border-radius: 999px; color: white; background: #d2573a; font-size: calc(9px * var(--font-scale)); }

/* Catalogue retail controls and structured dropdown metadata. */
.catalogue-admin-page { min-height: 0; overflow-y: auto; padding-right: 4px; display: grid; align-content: start; gap: 14px; }
.catalogue-admin-page::-webkit-scrollbar { width: 7px; }
.catalogue-admin-page::-webkit-scrollbar-thumb { border-radius: 999px; background: color-mix(in srgb, var(--gold) 35%, transparent); }
.retail-admin-panel { padding: 14px 16px; border-radius: 18px; }
.retail-admin-heading { margin-bottom: 4px; }
.retail-settings-form { margin-top: 12px; display: grid; grid-template-columns: 1fr 1.2fr 1.8fr auto; gap: 11px; align-items: stretch; }
.retail-settings-form fieldset { min-width: 0; margin: 0; padding: 9px; display: grid; grid-template-columns: repeat(2, minmax(85px, 1fr)); gap: 7px; border: 1px solid var(--line); border-radius: 12px; }
.retail-settings-form legend { padding: 0 6px; color: var(--gold); font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.retail-settings-form label { min-width: 0; display: grid; gap: 4px; color: var(--muted); }
.retail-settings-form input { min-width: 0; width: 100%; height: 31px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: rgba(255,255,255,.035); outline: 0; }
.retail-promo-fields { grid-template-columns: repeat(2, minmax(130px, 1fr)) !important; }
.retail-settings-form .span-2 { grid-column: span 2; }
.retail-settings-form > button { min-width: 140px; border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); border-radius: 12px; color: #fff; background: linear-gradient(160deg, color-mix(in srgb, var(--gold) 82%, #704022), color-mix(in srgb, var(--gold) 52%, #3d2418)); font-weight: 900; cursor: pointer; }
.catalogue-admin-v24 { grid-template-columns: minmax(680px, 1fr) minmax(370px, 440px); }
.metadata-section-label { padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--gold) 7%, transparent); }
.metadata-section-label b { color: var(--gold); text-transform: uppercase; letter-spacing: .07em; }
.metadata-section-label span { color: var(--muted); text-align: right; }
.metadata-section-label.secondary { border-color: var(--line); background: rgba(255,255,255,.025); }
.structured-admin-form select { cursor: pointer; }
.admin-price-row { margin-top: 6px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.admin-sale-price { color: var(--gold); font-weight: 900; }
.admin-price-row del { color: var(--muted); }
.admin-price-row em { padding: 2px 5px; border-radius: 999px; color: #fff; background: #cf563d; font-style: normal; font-weight: 850; }
.management-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.management-header-actions .management-back { width: auto; white-space: nowrap; }
.theme-header-button { cursor: pointer; }

/* Appearance studio. */
.theme-control-backdrop { position: fixed; z-index: 240; inset: 0; background: rgba(0,0,0,.36); backdrop-filter: blur(3px); }
.theme-control-panel { position: fixed; z-index: 241; top: 14px; right: 14px; width: min(360px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 15px; display: grid; gap: 11px; overflow-y: auto; transform: translateX(calc(100% + 30px)); opacity: 0; border: 1px solid var(--line); border-radius: 18px; color: var(--text); background: rgba(var(--panel-rgb), .985); box-shadow: 0 30px 90px rgba(0,0,0,.38); backdrop-filter: blur(22px); transition: .23s ease; }
.theme-control-panel.open { transform: translateX(0); opacity: 1; }
.theme-control-panel header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.theme-control-panel header span { color: var(--gold); font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.theme-control-panel h2 { margin: 3px 0 0; font-family: Georgia, serif; }
.theme-control-panel header button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: var(--text); background: transparent; font-size: calc(22px * var(--font-scale)); cursor: pointer; }
.theme-preset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.theme-preset-row button,
.theme-panel-actions button { min-height: 38px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: rgba(255,255,255,.035); font-weight: 850; cursor: pointer; }
.theme-preset-row button.active { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 55%, transparent); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.theme-control-panel > label { min-height: 42px; padding: 7px 9px; display: grid; grid-template-columns: 1fr 48px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.theme-control-panel input[type="color"] { width: 46px; height: 30px; padding: 2px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.theme-font-control { grid-template-columns: 1fr auto !important; }
.theme-font-control input { grid-column: 1 / -1; width: 100%; }
.theme-font-control output { color: var(--gold); font-weight: 900; }
.theme-panel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.theme-panel-actions button:last-child { color: #fff; border-color: transparent; background: linear-gradient(160deg, color-mix(in srgb, var(--gold) 85%, #784627), color-mix(in srgb, var(--gold) 55%, #3d2418)); }
.theme-control-panel > small { color: var(--muted); line-height: 1.5; }
.theme-floating-launcher,
.theme-floating-mode { position: fixed; z-index: 150; bottom: 18px; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; color: var(--text); background: rgba(var(--panel-rgb), .96); box-shadow: var(--soft-shadow); cursor: pointer; }
.theme-floating-launcher { right: 18px; }
.theme-floating-mode { right: 68px; width: auto; padding: 0 13px; border-radius: 999px; }

@media (max-width: 1500px) {
  .retail-promo-zone { grid-template-columns: minmax(330px, 1.05fr) minmax(240px, .7fr) minmax(340px, .9fr); }
  .retail-settings-form { grid-template-columns: 1fr 1fr; }
  .retail-settings-form > button { min-height: 44px; }
}

@media (max-width: 1220px) {
  .catalogue-admin-v24 { grid-template-columns: 1fr; }
  .retail-promo-zone { grid-template-columns: 1fr 1fr; }
  .promo-live-image-card { display: none; }
}

/* V2.4 header space refinements */
.top-actions { gap: 7px; }
.theme-quick-button { font-weight: 900; }
.management-topbar { grid-template-columns: minmax(180px, .7fr) minmax(320px, 1fr) minmax(430px, auto); }
.product-topbar { grid-template-columns: minmax(150px, .55fr) minmax(180px, .55fr) minmax(620px, 1.55fr); }
.product-top-actions { gap: 6px; }
.product-top-actions .theme-header-button { padding-left: 10px; padding-right: 10px; }

@media (max-height: 820px) {
  .app-shell { grid-template-rows: 58px 58px minmax(0, 1fr) !important; gap: 8px !important; }
  .retail-promo-zone > * { height: 58px; border-radius: 14px; }
}


/* =============================================================
   V2.7 — Virtual fitting scan animation
   ============================================================= */
.tryon-scan-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  overflow: hidden;
  display: block;
  color: #f7fbff;
  background:
    radial-gradient(circle at 50% 40%, rgba(31, 112, 255, .08), transparent 46%),
    linear-gradient(180deg, rgba(5, 12, 22, .20), rgba(5, 11, 20, .50));
  backdrop-filter: saturate(.88) contrast(1.03);
}

.tryon-scan-overlay.hidden { display: none !important; }

.tryon-scan-grid {
  position: absolute;
  inset: 0;
  opacity: .28;
  background-image:
    linear-gradient(rgba(103, 181, 255, .20) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 181, 255, .20) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, #000 18%, transparent 78%);
  animation: tryonGridDrift 9s linear infinite;
}

.tryon-scan-beam {
  position: absolute;
  left: 3%;
  right: 3%;
  height: 4px;
  top: 8%;
  z-index: 3;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(84, 216, 255, .98) 17%, #fff 50%, rgba(84, 216, 255, .98) 83%, transparent);
  box-shadow:
    0 0 10px rgba(73, 199, 255, .95),
    0 0 28px rgba(43, 131, 255, .72),
    0 18px 44px rgba(52, 158, 255, .22),
    0 -18px 44px rgba(52, 158, 255, .18);
  animation: tryonScanBeam 2.7s cubic-bezier(.45, 0, .55, 1) infinite;
}

.tryon-scan-beam::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -36px;
  height: 76px;
  background: linear-gradient(180deg, transparent, rgba(64, 183, 255, .10), transparent);
}

.tryon-scan-corners i {
  position: absolute;
  z-index: 4;
  width: 34px;
  height: 34px;
  border-color: rgba(136, 221, 255, .92);
  filter: drop-shadow(0 0 7px rgba(66, 174, 255, .72));
}
.tryon-scan-corners i:nth-child(1) { left: 7%; top: 8%; border-left: 2px solid; border-top: 2px solid; }
.tryon-scan-corners i:nth-child(2) { right: 7%; top: 8%; border-right: 2px solid; border-top: 2px solid; }
.tryon-scan-corners i:nth-child(3) { left: 7%; bottom: 23%; border-left: 2px solid; border-bottom: 2px solid; }
.tryon-scan-corners i:nth-child(4) { right: 7%; bottom: 23%; border-right: 2px solid; border-bottom: 2px solid; }

.tryon-scan-points i {
  position: absolute;
  z-index: 4;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(144, 225, 255, .9);
  border-radius: 50%;
  background: rgba(50, 154, 255, .28);
  box-shadow: 0 0 12px rgba(80, 192, 255, .95);
  animation: tryonPointPulse 1.8s ease-in-out infinite;
}
.tryon-scan-points i:nth-child(1) { left: 45%; top: 19%; }
.tryon-scan-points i:nth-child(2) { left: 35%; top: 35%; animation-delay: -.3s; }
.tryon-scan-points i:nth-child(3) { right: 35%; top: 35%; animation-delay: -.6s; }
.tryon-scan-points i:nth-child(4) { left: 42%; top: 54%; animation-delay: -.9s; }
.tryon-scan-points i:nth-child(5) { right: 42%; top: 54%; animation-delay: -1.2s; }
.tryon-scan-points i:nth-child(6) { left: 49%; top: 67%; animation-delay: -1.5s; }

.tryon-scan-hud {
  position: absolute;
  z-index: 7;
  left: 6%;
  right: 6%;
  bottom: 4.5%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 14px;
  padding: 12px 14px;
  border: 1px solid rgba(119, 203, 255, .34);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(5, 14, 27, .86), rgba(8, 25, 47, .76));
  box-shadow: 0 16px 44px rgba(0, 0, 0, .36), inset 0 1px rgba(255, 255, 255, .06);
  backdrop-filter: blur(13px);
}

.tryon-scan-live {
  grid-column: 1 / -1;
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 7px;
  color: #8fddff;
  font-size: calc(8.5px * var(--font-scale));
  font-weight: 900;
  letter-spacing: .16em;
}
.tryon-scan-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #55e0ff;
  box-shadow: 0 0 14px #55e0ff;
  animation: tryonLivePulse 1.1s ease-in-out infinite;
}

.tryon-scan-hud strong {
  min-width: 0;
  overflow: hidden;
  color: #f7fbff;
  font-size: calc(13px * var(--font-scale));
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tryon-scan-hud > small {
  grid-column: 1 / -1;
  color: rgba(222, 238, 255, .76);
  font-size: calc(9.5px * var(--font-scale));
}

.tryon-progress-track {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .42);
}
.tryon-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #337dff, #58d8ff 55%, #e6fbff);
  box-shadow: 0 0 15px rgba(65, 180, 255, .8);
  transition: width .42s ease;
  position: relative;
}
.tryon-progress-track span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent);
  transform: translateX(-100%);
  animation: tryonProgressShine 1.35s linear infinite;
}

.tryon-progress-meta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(206, 229, 255, .72);
  font-size: calc(8.5px * var(--font-scale));
  letter-spacing: .04em;
}
.tryon-progress-meta b { color: #7bddff; font-variant-numeric: tabular-nums; }

@keyframes tryonScanBeam {
  0% { top: 8%; opacity: .25; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: 76%; opacity: .25; }
}
@keyframes tryonGridDrift { to { background-position: 28px 28px, 28px 28px; } }
@keyframes tryonPointPulse { 50% { transform: scale(1.7); opacity: .42; } }
@keyframes tryonLivePulse { 50% { opacity: .38; transform: scale(.78); } }
@keyframes tryonProgressShine { to { transform: translateX(100%); } }

@media (prefers-reduced-motion: reduce) {
  .tryon-scan-grid, .tryon-scan-beam, .tryon-scan-points i,
  .tryon-scan-live i, .tryon-progress-track span::after { animation: none !important; }
}

@media (max-width: 900px) {
  .tryon-scan-hud { left: 4%; right: 4%; bottom: 3%; padding: 10px 11px; }
  .tryon-scan-hud strong { font-size: calc(11px * var(--font-scale)); }
}


/* V2.8 — MediaPipe browser fit-scan modes */
.fit-segmentation-canvas,
.fit-pose-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
}

.fit-pose-canvas { z-index: 4; }

.fit-scan-mode-segment .fit-segmentation-canvas,
.fit-scan-mode-pose .fit-segmentation-canvas,
.fit-scan-mode-pose .fit-pose-canvas {
  opacity: .95;
}

.fit-scan-mode-segment .tryon-scan-points,
.fit-scan-mode-pose .tryon-scan-points {
  opacity: .28;
}

.fit-scan-mediapipe-loading .tryon-scan-live::after {
  content: " · LOADING BROWSER AI";
  color: #aeefff;
}

.fit-scan-mediapipe-ready .tryon-scan-live::after {
  content: " · BODY DETECTED";
  color: #9fffce;
}

.fit-scan-mediapipe-error .tryon-scan-live::after {
  content: " · CLASSIC FALLBACK";
  color: #ffd18f;
}

.fit-scan-mode-control {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.82);
  font-size: calc(10px * var(--font-scale));
}

.fit-scan-mode-control span {
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .78;
  font-weight: 850;
}

.fit-scan-mode-control select {
  min-width: 0;
  height: 30px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  padding: 0 9px;
  color: #f4fbff;
  background: rgba(9, 16, 28, .78);
  outline: none;
  font-size: calc(10px * var(--font-scale));
  font-weight: 800;
}

.fit-scan-mode-control select:focus {
  border-color: rgba(112, 210, 255, .72);
  box-shadow: 0 0 0 3px rgba(63, 164, 255, .18);
}

.fit-scan-mode-pose .tryon-scan-beam {
  background:
    linear-gradient(180deg, transparent, rgba(90,210,255,.18), transparent),
    linear-gradient(90deg, transparent, rgba(255,225,123,.95), transparent);
  box-shadow: 0 0 26px rgba(69, 176, 255, .38), 0 0 45px rgba(255, 210, 105, .18);
}

@media (max-width: 900px) {
  .fit-scan-mode-control { grid-template-columns: 1fr; gap: 5px; }
  .fit-scan-mode-control select { width: 100%; }
}


/* V2.8B — code-only fit-scan mode. Hide any legacy scan dropdown. */
.fit-scan-mode-control { display: none !important; }
