:root {
  --bg: #0b0806;
  --surface: #1c0f09;
  --surface-2: #27130a;
  --surface-3: #322014;
  --line: rgba(245,185,44,.16);
  --line-strong: rgba(245,185,44,.32);
  --text: #fffaf0;
  --muted: #c6b6a5;
  --soft: #e0cfb9;
  --red: #e74317;
  --red-bright: #ff6a18;
  --red-deep: #8a310d;
  --red-wash: rgba(255,106,24,.14);
  --green: #72efad;
  --gold: #f5b92c;
  --orange: #ff6a18;
  --mono: 'DM Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.23,1,.32,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--text); background: var(--bg); font-family: var(--sans); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background: radial-gradient(circle at 76% 28%, rgba(255,106,24,.09), transparent 28%), radial-gradient(circle at 2% 82%, rgba(130,45,13,.18), transparent 28%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .15;
  background-image: linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.app-shell { min-height: 100vh; }
.site-header { height: 74px; display: flex; align-items: center; gap: 28px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(8,9,12,.88); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20; }
html.embedded .site-header { display: none !important; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; letter-spacing: -.04em; }
.brand-mark { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: linear-gradient(145deg, var(--red-bright), var(--red-deep)); box-shadow: 0 0 26px rgba(255,106,24,.25); font-weight: 700; font-size: 17px; letter-spacing: -.1em; }
.brand-word { font-size: 17px; font-weight: 700; }
.brand-word em { color: var(--red-bright); font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .09em; margin-left: 4px; vertical-align: 2px; }
.topbar-search { height: 38px; max-width: 410px; flex: 1; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: rgba(255,255,255,.025); }
.topbar-search:focus-within { border-color: rgba(255,106,24,.65); box-shadow: 0 0 0 3px rgba(255,106,24,.1); }
.search-icon { font-size: 22px; line-height: 1; transform: rotate(-20deg); color: var(--soft); }
.topbar-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; }
.topbar-search input::placeholder { color: #a99176; }
kbd { padding: 3px 5px; color: #ad957c; border: 1px solid var(--line); border-radius: 4px; font: 10px var(--mono); white-space: nowrap; }
.topbar-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; color: var(--soft); font-size: 12px; white-space: nowrap; }
.topbar-nav a:hover { color: #fff; }
.icon-btn, .cart-btn, .square-btn, .close-btn { border: 0; cursor: pointer; background: transparent; }
.icon-btn { width: 27px; height: 27px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--soft); }
.cart-btn { position: relative; color: var(--soft); font-size: 22px; padding: 0 3px; }
.cart-btn b { position: absolute; top: -9px; right: -8px; min-width: 16px; height: 16px; display: grid; place-items: center; padding: 0 4px; color: #fff; border-radius: 20px; background: var(--red); font: 10px var(--mono); }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 390px; min-height: calc(100vh - 74px); }
.tool-rail { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 22px 9px; border-right: 1px solid var(--line); background: rgba(10,11,15,.76); }
.rail-label, .eyebrow { color: #c1ad95; font: 10px var(--mono); letter-spacing: .13em; }
.rail-label { margin-bottom: 8px; color: var(--red-bright); writing-mode: vertical-rl; transform: rotate(180deg); }
.tool-btn { width: 64px; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; color: #ccb79e; background: transparent; font-size: 10px; transition: .18s var(--ease); }
.tool-btn:hover { color: #fff; border-color: var(--line); background: rgba(255,255,255,.035); }
.tool-btn.active { color: #fff; border-color: rgba(255,106,24,.35); background: linear-gradient(155deg, rgba(255,106,24,.19), rgba(255,106,24,.035)); box-shadow: inset 0 0 20px rgba(255,106,24,.05); }
.tool-icon { width: 26px; height: 26px; display: grid; place-items: center; color: var(--red-bright); font-weight: 700; font-size: 17px; border-radius: 7px; background: rgba(255,106,24,.1); }
.tool-btn.active .tool-icon { color: #fff; background: var(--red); box-shadow: 0 0 18px rgba(255,106,24,.28); }
.rail-spacer { flex: 1; }
.rail-version { color: #8e7661; text-align: center; font: 9px/1.5 var(--mono); letter-spacing: .06em; }

.editor-area { min-width: 0; padding: 27px clamp(22px, 3vw, 48px) 32px; background: linear-gradient(120deg, rgba(255,255,255,.012), transparent 45%); }
.editor-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.editor-header h1, .inspector-head h2, .modal-head h2 { margin: 7px 0 0; letter-spacing: -.055em; font-size: clamp(24px, 2.6vw, 34px); line-height: 1; }
h1 span, h2 span { color: var(--red-bright); }
.eyebrow { display: flex; align-items: center; gap: 7px; }
.live-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(114,239,173,.8); }
.editor-actions { display: flex; align-items: center; gap: 7px; }
.ghost-btn, .outline-btn, .square-btn { height: 36px; border-radius: 7px; cursor: pointer; transition: .18s var(--ease); }
.ghost-btn { padding: 0 12px; border: 1px solid transparent; color: var(--soft); background: transparent; font-size: 11px; }
.ghost-btn:hover { color: #fff; background: rgba(255,255,255,.05); }
.outline-btn { padding: 0 13px; border: 1px solid rgba(255,106,24,.52); color: #fff; background: rgba(255,106,24,.08); font-size: 11px; }
.outline-btn:hover { background: var(--red); box-shadow: 0 0 22px rgba(255,106,24,.22); }
.square-btn { width: 36px; border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.025); font-size: 18px; }
.square-btn:hover { color: #fff; border-color: var(--line-strong); }

.stage-card { min-height: min(730px, calc(100vh - 183px)); overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #160e09; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.stage-meta { min-height: 55px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.face-tabs { display: flex; align-items: center; gap: 4px; overflow: auto; }
.face-tab { padding: 8px 11px; border: 0; border-radius: 6px; cursor: pointer; color: #c1ad95; background: transparent; font-size: 11px; white-space: nowrap; }
.face-tab:hover { color: #fff; }
.face-tab.active { color: #fff; background: rgba(255,255,255,.08); }
.stage-status { color: #b5a18d; font: 10px var(--mono); white-space: nowrap; }
.stage-status i { width: 5px; height: 5px; display: inline-block; margin-right: 5px; border-radius: 50%; background: var(--green); vertical-align: 1px; }
.stage { min-height: 620px; position: relative; display: grid; place-items: center; overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at center, #382216 0%, #21140c 40%, #0d0906 82%); }
.stage-grid { position: absolute; inset: 0; opacity: .27; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: 42px 42px; mask-image: radial-gradient(ellipse at center, black 15%, transparent 77%); }
.red-orb { position: absolute; width: 38vw; height: 25vw; min-width: 300px; min-height: 220px; border-radius: 50%; filter: blur(70px); opacity: .16; pointer-events: none; z-index: -1; }
.orb-one { top: -14%; left: 2%; background: #d34b12; transform: rotate(-14deg); }
.orb-two { right: -10%; bottom: -10%; background: #8b300b; transform: rotate(20deg); }
.stage-caption { position: absolute; top: 19px; left: 22px; display: flex; gap: 10px; color: #aa967f; font: 9px var(--mono); letter-spacing: .08em; }
.stage-caption b { color: var(--red-bright); font-weight: 400; }
.zoom-controls { position: absolute; top: 18px; right: 19px; display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: rgba(8,9,12,.56); z-index: 5; }
.zoom-controls button { width: 24px; height: 24px; border: 0; border-radius: 4px; cursor: pointer; color: var(--soft); background: transparent; }
.zoom-controls button:hover { color: #fff; background: rgba(255,255,255,.08); }
.zoom-controls span { min-width: 44px; text-align: center; color: #bca891; font: 10px var(--mono); }
.product-frame { width: min(66%, 600px); aspect-ratio: 1000 / 1073; position: relative; display: grid; place-items: center; transform: scale(var(--product-scale, 1)); transition: transform .22s var(--ease); }
.product-glow { position: absolute; inset: 19% 13% 12%; border-radius: 50%; background: rgba(0,0,0,.65); filter: blur(34px); transform: translateY(10%); z-index: -1; }
.product-image { width: 100%; height: 100%; display: block; object-fit: contain; filter: brightness(.78) contrast(1.15); transition: filter .22s var(--ease); user-select: none; -webkit-user-drag: none; }
.product-frame.color-red .product-image { filter: brightness(.55) contrast(1.16) sepia(.9) saturate(5.5) hue-rotate(306deg); }
.product-frame.color-white .product-image { filter: brightness(1.6) contrast(.8) grayscale(.7); }
.product-frame.color-charcoal .product-image { filter: brightness(.48) contrast(1.28) saturate(.5); }
.design-zone { position: absolute; left: 17%; top: 10%; width: 66%; height: 80%; z-index: 3; border: 0; border-radius: 3px; transition: none; }
.design-zone:hover { border-color: transparent; }
.preview-design-zone { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; -webkit-mask-image: var(--garment-mask); mask-image: var(--garment-mask); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.zone-hint { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: rgba(255,255,255,.62); text-align: center; pointer-events: none; }
.zone-hint strong { font-size: clamp(9px, 1vw, 12px); font-weight: 500; }
.zone-hint small { color: rgba(255,255,255,.36); font: 8px var(--mono); }
.zone-cross { width: 24px; height: 24px; display: grid; place-items: center; color: var(--red-bright); border: 1px solid rgba(255,106,24,.55); border-radius: 50%; font-size: 16px; }
.stage-tip { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.38); font: 9px var(--mono); white-space: nowrap; }
.tip-icon { margin-right: 5px; color: var(--red-bright); }
.design-item { position: absolute; min-width: 25px; min-height: 25px; display: grid; place-items: center; padding: 5px; color: #fff; border: 1px solid transparent; border-radius: 5px; cursor: grab; user-select: none; transform: translate(-50%, -50%); touch-action: none; transition: border-color .12s, background .12s, box-shadow .12s; }
.design-item:active { cursor: grabbing; }
.design-item.selected { border-color: var(--red-bright); background: rgba(255,106,24,.1); box-shadow: 0 0 0 3px rgba(255,106,24,.08); }
.design-item img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; }
.design-item .catalog-word { font: 700 16px var(--mono); letter-spacing: .11em; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.8); }

.inspector { min-width: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: rgba(13,15,20,.9); }
.inspector-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 29px 24px 18px; }
.inspector-head h2 { font-size: 24px; }
.project-id { color: #a88f76; margin-left: 5px; }
.status-pill { padding: 5px 7px; color: var(--red-bright); border: 1px solid rgba(255,106,24,.28); border-radius: 5px; background: rgba(255,106,24,.07); font: 9px var(--mono); white-space: nowrap; }
.project-progress { height: 2px; margin: 0 24px 20px; overflow: hidden; background: rgba(255,255,255,.08); }
.project-progress span { display: block; width: 18%; height: 100%; background: var(--red); box-shadow: 0 0 10px var(--red); }
.panel-tabs { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0 17px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); }
.panel-tab { min-width: 0; padding: 9px 3px; overflow: hidden; border: 0; border-radius: 6px; cursor: pointer; color: #baa58c; background: transparent; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.panel-tab:hover { color: #fff; }
.panel-tab.active { color: #fff; background: var(--red); box-shadow: 0 3px 12px rgba(255,106,24,.18); }
.panel-content { flex: 1; min-height: 0; padding: 25px 24px 18px; overflow: auto; }
.panel-section { animation: rise .22s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.panel-section h3 { margin: 0 0 5px; font-size: 17px; letter-spacing: -.03em; }
.panel-section > p { margin: 0 0 22px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.section-label { display: block; margin: 22px 0 10px; color: #bda68d; font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.select-box, .text-input, .drop-zone { width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); background: rgba(255,255,255,.035); }
.select-box { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 12px 13px; font-size: 12px; }
.select-box span:last-child { color: var(--red-bright); }
.swatches { display: flex; gap: 11px; }
.swatch { width: 35px; height: 35px; position: relative; padding: 0; border: 2px solid transparent; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 4px var(--surface-2); transition: .18s var(--ease); }
.swatch:hover { transform: translateY(-2px); }
.swatch.active { border-color: var(--red-bright); box-shadow: 0 0 0 3px rgba(255,106,24,.14), inset 0 0 0 4px var(--surface-2); }
.swatch-black { background: #050505; } .swatch-charcoal { background: #353943; } .swatch-red { background: #b73517; } .swatch-white { background: #d8d8d8; }
.swatch-name { margin: 11px 0 0; color: var(--soft); font-size: 11px; }
.size-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.size-btn { padding: 10px 4px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; color: var(--soft); background: rgba(255,255,255,.025); font: 11px var(--mono); }
.size-btn:hover, .size-btn.active { color: #fff; border-color: var(--red); background: rgba(255,106,24,.13); }
.helper-card { display: flex; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; color: #858b98; background: rgba(255,255,255,.025); font-size: 10px; line-height: 1.5; }
.helper-card strong { display: block; margin-bottom: 2px; color: #fff0d5; font-size: 11px; }
.helper-icon { color: var(--red-bright); font-size: 17px; }
.drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 150px; padding: 18px; border-style: dashed; text-align: center; cursor: pointer; }
.drop-zone:hover { border-color: var(--red-bright); background: rgba(255,106,24,.06); }
.drop-zone .drop-icon { width: 33px; height: 33px; display: grid; place-items: center; color: var(--red-bright); border-radius: 50%; background: var(--red-wash); font-size: 20px; }
.drop-zone strong { color: #f8ead7; font-size: 12px; }
.drop-zone small { color: var(--muted); font: 9px var(--mono); }
.text-input { min-height: 102px; resize: vertical; padding: 12px; outline: none; font-size: 13px; }
.text-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,106,24,.1); }
.input-row { display: flex; gap: 8px; align-items: center; }
.range-input { flex: 1; accent-color: var(--red); }
.color-input { width: 34px; height: 30px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 5px; background: transparent; }
.action-btn { width: 100%; margin-top: 13px; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 7px; cursor: pointer; color: #fff; background: rgba(255,255,255,.055); font-size: 11px; }
.action-btn:hover { border-color: var(--red); background: rgba(255,106,24,.13); }
.chip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.clip-chip { display: flex; align-items: center; gap: 9px; padding: 12px 10px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; color: var(--soft); background: rgba(255,255,255,.025); text-align: left; font-size: 11px; }
.clip-chip:hover { color: #fff; border-color: var(--red); transform: translateY(-1px); }
.clip-symbol { display: grid; place-items: center; width: 25px; height: 25px; color: var(--red-bright); border-radius: 6px; background: var(--red-wash); font-size: 17px; }
.catalog-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); }
.catalog-card strong { display: block; font: 700 13px var(--mono); letter-spacing: .08em; }
.catalog-card small { color: var(--muted); font-size: 10px; }
.catalog-add { padding: 7px 9px; border: 1px solid rgba(255,106,24,.38); border-radius: 5px; cursor: pointer; color: var(--red-bright); background: transparent; font: 10px var(--mono); }
.catalog-add:hover { color: #fff; background: var(--red); }
.inspector-footer { padding: 18px 24px 22px; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(13,15,20,.8), #140c08); }
.price-line { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; color: var(--muted); font: 10px var(--mono); }
.price-line strong { color: #fff; font-size: 19px; letter-spacing: -.04em; }
.primary-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border: 0; border-radius: 7px; cursor: pointer; color: #fff; background: linear-gradient(110deg, #e74317, var(--red-bright)); box-shadow: 0 8px 22px rgba(255,106,24,.19); font-size: 12px; font-weight: 600; transition: .18s var(--ease); }
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(255,106,24,.28); }
.primary-btn:active { transform: scale(.98); }
.inspector-footer > small { display: block; margin-top: 10px; color: #b29e85; text-align: center; font: 9px/1.4 var(--mono); }

.toast { position: fixed; left: 50%; bottom: 26px; z-index: 50; padding: 11px 15px; border: 1px solid rgba(114,239,173,.3); border-radius: 7px; color: #e8fff2; background: rgba(13,34,24,.94); box-shadow: 0 12px 35px rgba(0,0,0,.3); font: 11px var(--mono); opacity: 0; transform: translate(-50%, 14px); pointer-events: none; transition: .25s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.preview-modal { width: min(720px, calc(100% - 30px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 16px; color: var(--text); background: #1c100b; box-shadow: 0 30px 100px rgba(0,0,0,.62); }
.preview-modal::backdrop { background: rgba(1,2,4,.82); backdrop-filter: blur(8px); }
.modal-card { padding: 24px; }
.modal-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.modal-head h2 { font-size: 24px; }
.close-btn { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: 21px; line-height: 1; }
.close-btn:hover { color: #fff; border-color: var(--red); }
.modal-preview { min-height: 390px; display: grid; place-items: center; margin: 22px 0 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: radial-gradient(ellipse at center, #382619, #160e09 75%); }
.modal-preview .product-frame { width: min(46%, 330px); --product-scale: 1; }
.modal-preview .design-zone { border-color: rgba(255,255,255,.3); }
.preview-grid { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 18px; }
.preview-face-card { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); }
.preview-face-card > span { color: var(--soft); font: 10px var(--mono); text-transform: uppercase; }
.preview-face-card .product-frame { width: min(90%, 220px); }
.image-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.image-actions .action-btn { margin-top: 13px; padding-inline: 6px; font-size: 10px; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 15px; color: var(--muted); font: 10px var(--mono); }
.modal-actions { display: flex; gap: 8px; align-items: center; }
.modal-foot .primary-btn { width: auto; min-width: 160px; }
.three-modal { width: min(760px, calc(100% - 30px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 16px; color: var(--text); background: #1c100b; box-shadow: 0 30px 100px rgba(0,0,0,.62); }
.three-modal::backdrop { background: rgba(1,2,4,.86); backdrop-filter: blur(8px); }
.three-card { padding: 24px; }
.three-stage { min-height: 440px; display: grid; place-items: center; overflow: hidden; perspective: 1000px; border: 1px solid var(--line); border-radius: 10px; background: radial-gradient(ellipse at center, #3b2a1c, #160e09 76%); touch-action: none; cursor: grab; }
.three-stage:active { cursor: grabbing; }
.three-product { position: relative; width: min(55%, 340px); aspect-ratio: 1000 / 1073; transform-style: preserve-3d; transition: transform .12s linear; }
.three-face { position: absolute; inset: 0; display: grid; place-items: center; backface-visibility: hidden; }
.three-face img { width: 100%; height: 100%; object-fit: contain; filter: brightness(1.05) contrast(.98); }
.three-back { transform: rotateY(180deg); }
.three-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; color: var(--muted); font: 11px var(--mono); }
@media (max-width: 620px) { .preview-grid { grid-template-columns: 1fr 1fr; padding: 8px; gap: 7px; } .modal-foot { flex-direction: column; align-items: stretch; } .modal-actions { justify-content: stretch; } .modal-actions > * { flex: 1; } .three-stage { min-height: 340px; } }

@media (max-width: 1120px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 340px; }
  .tool-btn { width: 54px; }
  .editor-area { padding-inline: 24px; }
  .topbar-nav a { display: none; }
}
@media (max-width: 860px) {
  .topbar { gap: 14px; padding: 0 16px; }
  .topbar-search { max-width: none; }
  .workspace { grid-template-columns: 1fr; }
  .inspector { grid-column: 1; border-top: 1px solid var(--line); border-left: 0; min-height: 660px; }
  .editor-area { padding-bottom: 26px; }
  .stage { min-height: 560px; }
}
@media (max-width: 580px) {
  .topbar { height: 62px; }
  .brand-word { font-size: 14px; }
  .brand-mark { width: 32px; height: 32px; font-size: 15px; }
  .topbar-search { display: none; }
  .topbar-nav { gap: 10px; }
  .workspace { grid-template-columns: 1fr; }
  .tool-rail { order: 2; flex-direction: row; overflow-x: auto; justify-content: flex-start; padding: 9px 12px; border-top: 1px solid var(--line); border-right: 0; }
  .rail-label, .rail-spacer, .rail-version { display: none; }
  .tool-btn { min-width: 67px; min-height: 54px; }
  .editor-area { padding: 20px 12px 20px; }
  .editor-header { align-items: flex-start; flex-direction: column; margin-bottom: 15px; }
  .editor-header h1 { font-size: 25px; }
  .editor-actions { width: 100%; }
  .editor-actions .ghost-btn { margin-right: auto; }
  .editor-actions .outline-btn { font-size: 10px; }
  .stage-card { border-radius: 12px; }
  .stage-meta { padding: 0 10px; }
  .stage-status { display: none; }
  .face-tab { padding-inline: 8px; font-size: 10px; }
  .stage { min-height: 470px; }
  .product-frame { width: 84%; }
  .stage-tip { bottom: 12px; font-size: 8px; }
  .inspector { grid-column: 1; min-height: 690px; }
  .inspector-head { padding-inline: 18px; }
  .project-progress { margin-inline: 18px; }
  .panel-tabs { margin-inline: 12px; }
  .panel-content { padding-inline: 18px; }
  .inspector-footer { padding-inline: 18px; }
  .modal-card { padding: 18px; }
  .modal-preview { min-height: 330px; }
  .modal-preview .product-frame { width: 68%; }
  .modal-foot { align-items: stretch; flex-direction: column; }
  .modal-foot .primary-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Del Averno Custom overrides */
.brand-logo { width: 150px; height: 54px; display: block; object-fit: contain; object-position: left center; mix-blend-mode: screen; }
.topbar { justify-content: space-between; }
.topbar-nav { margin-left: auto; }
.garment-select { width: 100%; padding: 12px 13px; border: 1px solid var(--line-strong); border-radius: 8px; outline: 0; color: var(--text); background: var(--surface-2); font-size: 11px; }
.garment-select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,106,24,.1); }
.garment-select option { color: #111; background: #fff; }
.product-detail { display: flex; flex-direction: column; gap: 3px; padding: 10px 0 2px; color: var(--muted); font: 10px var(--mono); }
.product-detail strong { color: var(--soft); font: 600 11px var(--sans); }
.swatch { background: var(--swatch); }
.swatch.active { box-shadow: 0 0 0 3px rgba(255,106,24,.14), inset 0 0 0 4px var(--surface-2); }
.swatch-white, .swatch-pink, .swatch-yellow, .swatch-beige { border-color: rgba(255,255,255,.18); }
.pricing-note { display: flex; gap: 11px; align-items: flex-start; padding: 12px; margin-bottom: 12px; border: 1px solid rgba(255,106,24,.25); border-radius: 8px; background: linear-gradient(110deg, rgba(255,106,24,.11), rgba(255,255,255,.025)); }
.pricing-note.compact { margin-top: 18px; margin-bottom: 0; }
.pricing-note strong { display: block; color: #fff; font: 600 15px var(--sans); }
.pricing-note small { display: block; margin-top: 4px; color: var(--muted); font: 9px/1.45 var(--mono); }
.location-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.location-pill { padding: 8px 9px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; color: var(--muted); background: rgba(255,255,255,.025); font-size: 10px; }
.location-pill:hover { color: #fff; border-color: var(--red); }
.location-pill.active { color: #fff; border-color: rgba(255,106,24,.65); background: rgba(255,106,24,.18); }
.scale-badge { float: right; color: var(--red-bright); }
.scale-row { display: flex; align-items: center; gap: 9px; }
.scale-row .range-input { min-width: 0; }
.scale-label { min-width: 84px; color: var(--soft); text-align: right; font: 9px var(--mono); }
.product-frame.color-white .product-image { filter: brightness(1.6) contrast(.8) grayscale(.7); }
.product-frame.color-melange .product-image { filter: brightness(1.05) contrast(.78) grayscale(.65); }
.product-frame.color-navy .product-image { filter: brightness(.56) contrast(1.15) sepia(.45) saturate(4) hue-rotate(178deg); }
.product-frame.color-red .product-image { filter: brightness(.55) contrast(1.16) sepia(.9) saturate(5.5) hue-rotate(306deg); }
.product-frame.color-burgundy .product-image { filter: brightness(.49) contrast(1.2) sepia(.82) saturate(4.2) hue-rotate(295deg); }
.product-frame.color-carbon .product-image { filter: brightness(.48) contrast(1.28) saturate(.5); }
.product-frame.color-jade .product-image { filter: brightness(.47) contrast(1.2) sepia(.7) saturate(4.2) hue-rotate(75deg); }
.product-frame.color-forest .product-image { filter: brightness(.43) contrast(1.2) sepia(.8) saturate(4) hue-rotate(64deg); }
.product-frame.color-royal .product-image { filter: brightness(.52) contrast(1.18) sepia(.45) saturate(4) hue-rotate(188deg); }
.product-frame.color-brown .product-image { filter: brightness(.49) contrast(1.15) sepia(1) saturate(3.3) hue-rotate(343deg); }
.product-frame.color-purple .product-image { filter: brightness(.48) contrast(1.18) sepia(.6) saturate(5) hue-rotate(245deg); }
.product-frame.color-pink .product-image { filter: brightness(.85) contrast(.9) sepia(.3) saturate(2.2) hue-rotate(278deg); }
.product-frame.color-orange .product-image { filter: brightness(.58) contrast(1.18) sepia(.9) saturate(4.2) hue-rotate(327deg); }
.product-frame.color-yellow .product-image { filter: brightness(.68) contrast(1.06) sepia(.95) saturate(3.5) hue-rotate(2deg); }
.product-frame.color-beige .product-image { filter: brightness(.92) contrast(.9) sepia(.55) saturate(1.6) hue-rotate(350deg); }

@media (max-width: 580px) {
  .brand-logo { width: 132px; height: 48px; }
}

.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Final visual correction: vivid garment colors and rounded selectors */
.product-frame { isolation: isolate; }
.product-color-layer { display: none; }
.product-image { position: relative; z-index: 1; filter: brightness(1.08) contrast(.94) saturate(1.28); mix-blend-mode: multiply; }
.product-frame.color-black .product-color-layer { opacity: .96; }
.product-frame.color-white .product-image { filter: brightness(1.7) contrast(.72) grayscale(.35); mix-blend-mode: normal; }
.product-frame.color-melange .product-image { filter: brightness(1.22) contrast(.72) grayscale(.45); mix-blend-mode: normal; }
.product-frame.color-black .product-image { filter: brightness(.9) contrast(1.18) saturate(.8); mix-blend-mode: normal; }
.product-frame.color-navy .product-image { filter: brightness(.82) contrast(1.08) sepia(.25) saturate(3.8) hue-rotate(178deg); }
.product-frame.color-red .product-image { filter: brightness(.82) contrast(1.08) sepia(.65) saturate(5) hue-rotate(315deg); }
.product-frame.color-burgundy .product-image { filter: brightness(.72) contrast(1.1) sepia(.7) saturate(4) hue-rotate(300deg); }
.product-frame.color-carbon .product-image { filter: brightness(.74) contrast(1.15) saturate(.65); }
.product-frame.color-jade .product-image { filter: brightness(.78) contrast(1.08) sepia(.55) saturate(4) hue-rotate(75deg); }
.product-frame.color-forest .product-image { filter: brightness(.7) contrast(1.1) sepia(.65) saturate(4) hue-rotate(64deg); }
.product-frame.color-royal .product-image { filter: brightness(.82) contrast(1.08) sepia(.25) saturate(4) hue-rotate(188deg); }
.product-frame.color-brown .product-image { filter: brightness(.76) contrast(1.08) sepia(.82) saturate(3.1) hue-rotate(343deg); }
.product-frame.color-purple .product-image { filter: brightness(.76) contrast(1.08) sepia(.45) saturate(4.8) hue-rotate(245deg); }
.product-frame.color-pink .product-image { filter: brightness(1.08) contrast(.82) sepia(.2) saturate(2.4) hue-rotate(278deg); }
.product-frame.color-orange .product-image { filter: brightness(.88) contrast(1.08) sepia(.72) saturate(4) hue-rotate(327deg); }
.product-frame.color-yellow .product-image { filter: brightness(.98) contrast(1) sepia(.75) saturate(3.1) hue-rotate(2deg); }
.product-frame.color-beige .product-image { filter: brightness(1.05) contrast(.88) sepia(.42) saturate(1.7) hue-rotate(350deg); }
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px 8px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; background: var(--swatch) !important; box-shadow: 0 0 0 2px rgba(255,255,255,.08), inset 0 0 0 3px rgba(0,0,0,.13); }
.swatch:hover { transform: scale(1.12); }
.swatch.active { border-color: #fff; box-shadow: 0 0 0 3px var(--red-bright), 0 0 0 5px rgba(255,106,24,.18), inset 0 0 0 3px rgba(0,0,0,.13); }
.swatch-white, .swatch-pink, .swatch-yellow, .swatch-beige { border-color: rgba(255,255,255,.36); }
.panel-tabs { grid-template-columns: repeat(3, 1fr); }
.garment-picker { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 9px; cursor: pointer; color: var(--text); text-align: left; background: rgba(255,255,255,.035); }
.garment-picker:hover { border-color: var(--red); background: rgba(255,106,24,.08); }
.garment-picker > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--red); }
.garment-picker div { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.garment-picker strong { font-size: 11px; }
.garment-picker small { color: var(--muted); font: 9px var(--mono); }
.garment-picker b { color: var(--red-bright); }
.garment-modal, .preview-modal { width: min(780px, calc(100% - 30px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 16px; color: var(--text); background: #1c100b; box-shadow: 0 30px 100px rgba(0,0,0,.62); }
.garment-modal::backdrop, .preview-modal::backdrop { background: rgba(1,2,4,.82); backdrop-filter: blur(8px); }
.garment-modal-card { padding: 25px; }
.modal-intro { margin: 8px 0 20px; color: var(--muted); font-size: 12px; }
.garment-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; max-height: 66vh; overflow: auto; padding: 2px; }
.garment-card { display: flex; flex-direction: column; gap: 6px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--text); text-align: left; background: rgba(255,255,255,.025); transition: .18s var(--ease); }
.garment-card:hover, .garment-card.active { border-color: var(--red); background: rgba(255,106,24,.12); transform: translateY(-2px); }
.garment-thumb { height: 130px; display: grid; place-items: center; overflow: hidden; border-radius: 7px; background: radial-gradient(circle, #30343e, #20130c); }
.garment-thumb img { width: 100%; height: 100%; object-fit: contain; filter: brightness(1.08) contrast(.94); }
.garment-card strong { font-size: 11px; line-height: 1.2; }
.garment-card small { min-height: 24px; color: var(--muted); font: 9px/1.35 var(--mono); }
@media (max-width: 700px) { .garment-grid { grid-template-columns: repeat(2, 1fr); } .swatches { grid-template-columns: repeat(8, 1fr); } }
@media (max-width: 420px) { .garment-grid { grid-template-columns: 1fr 1fr; } .garment-thumb { height: 105px; } .swatches { grid-template-columns: repeat(6, 1fr); } }

/* The canvas colorizer already applies the selected color; do not hue-shift it again. */
.product-frame.color-black .product-image,
.product-frame.color-white .product-image,
.product-frame.color-melange .product-image,
.product-frame.color-navy .product-image,
.product-frame.color-red .product-image,
.product-frame.color-burgundy .product-image,
.product-frame.color-carbon .product-image,
.product-frame.color-jade .product-image,
.product-frame.color-forest .product-image,
.product-frame.color-royal .product-image,
.product-frame.color-brown .product-image,
.product-frame.color-purple .product-image,
.product-frame.color-pink .product-image,
.product-frame.color-orange .product-image,
.product-frame.color-yellow .product-image,
.product-frame.color-beige .product-image { filter: brightness(1.06) contrast(.98) saturate(1.05); mix-blend-mode: normal; }

.design-zone .design-item { position: absolute; z-index: 4; }
.design-zone .zone-hint { z-index: 1; }

/* Direct manipulation handles */
.design-item.selected { overflow: visible; }
.resize-handle { position: absolute; z-index: 8; width: 13px; height: 13px; border: 2px solid #fff; border-radius: 4px; background: var(--red-bright); box-shadow: 0 0 0 2px rgba(0,0,0,.65), 0 0 12px rgba(255,106,24,.75); }
.handle-nw { top: -8px; left: -8px; cursor: nwse-resize; }
.handle-ne { top: -8px; right: -8px; cursor: nesw-resize; }
.handle-sw { bottom: -8px; left: -8px; cursor: nesw-resize; }
.handle-se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.tool-btn[data-panel="image"], .tool-btn[data-panel="text"] { width: 70px; min-height: 76px; border-color: rgba(255,106,24,.28); background: linear-gradient(155deg, rgba(255,106,24,.16), rgba(255,106,24,.035)); box-shadow: 0 8px 18px rgba(0,0,0,.2); font-size: 11px; }
.tool-btn[data-panel="image"] .tool-icon, .tool-btn[data-panel="text"] .tool-icon { width: 34px; height: 34px; font-size: 21px; border-radius: 10px; background: var(--red); color: #fff; box-shadow: 0 0 16px rgba(255,106,24,.32); }
.tool-btn[data-panel="image"]:hover, .tool-btn[data-panel="text"]:hover, .tool-btn[data-panel="image"].active, .tool-btn[data-panel="text"].active { border-color: var(--red-bright); transform: translateY(-2px); }
.panel-tab[data-panel="image"], .panel-tab[data-panel="text"] { min-height: 42px; color: #fff; font-size: 12px; font-weight: 700; background: rgba(255,106,24,.09); }
.panel-tab[data-panel="image"]::before { content: '▧ '; color: var(--red-bright); }
.panel-tab[data-panel="text"]::before { content: 'T '; color: var(--red-bright); }
.panel-tab[data-panel="image"]:hover, .panel-tab[data-panel="text"]:hover { background: var(--red); }
@media (max-width: 1120px) { .tool-btn[data-panel="image"], .tool-btn[data-panel="text"] { width: 60px; } }

.three-face { position: absolute; inset: 0; display: grid; place-items: center; backface-visibility: hidden; }
.three-design { position: absolute; z-index: 2; display: grid; place-items: center; pointer-events: none; text-align: center; font-weight: 700; text-shadow: 0 2px 7px rgba(0,0,0,.9); }
.three-design img { display: block; object-fit: contain; }

.modal-head-actions { display: flex; align-items: center; gap: 9px; }
.modal-head-actions .outline-btn { min-height: 34px; padding: 8px 12px; border-color: rgba(255,106,24,.55); color: #fff; background: rgba(255,106,24,.12); }
.ghost-mannequin { position: absolute; z-index: 0; width: min(55%, 340px); height: 82%; opacity: .42; border-radius: 45% 45% 18% 18% / 14% 14% 8% 8%; background: radial-gradient(ellipse at 50% 9%, rgba(230,236,244,.55) 0 8%, transparent 8.5%), radial-gradient(ellipse at 50% 34%, rgba(230,236,244,.25), rgba(128,143,164,.12) 48%, transparent 70%); filter: blur(1px) drop-shadow(0 0 24px rgba(193,208,230,.25)); transform: translateY(5%); pointer-events: none; }
.three-product { z-index: 1; }
.three-product::after { content: ''; position: absolute; inset: 5% 16% 2%; z-index: 3; border-radius: 42% 42% 18% 18%; pointer-events: none; background: linear-gradient(105deg, rgba(255,255,255,.13), transparent 30%, transparent 66%, rgba(255,255,255,.08)); mix-blend-mode: screen; }
.three-face img { opacity: .9; filter: brightness(1.12) contrast(.92) drop-shadow(0 18px 18px rgba(0,0,0,.35)); }
@media (max-width: 620px) { .modal-head-actions .outline-btn { padding-inline: 8px; font-size: 10px; } }

.preview-empty { grid-column: 1 / -1; min-height: 180px; display: grid; place-items: center; color: var(--muted); font: 11px var(--mono); text-align: center; }


/* ================================================================
   TEMA DEL AVERNO / edición 11-10-2026
   Referencia visual: ../assets/styles.css
   Negro carbón + café profundo + naranja fuego + dorado.
   Solo afecta a la interfaz: los colores seleccionables de prendas
   conservan sus valores RGB originales.
   ================================================================ */
body { background: radial-gradient(circle at 8% 0%, rgba(231,67,23,.13), transparent 34rem), var(--bg); }
body::before { background: radial-gradient(circle at 77% 25%, rgba(255,106,24,.095), transparent 28%), radial-gradient(circle at 5% 85%, rgba(120,53,13,.13), transparent 30%); }
body::after { opacity: .12; background-image: linear-gradient(rgba(245,185,44,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(245,185,44,.035) 1px,transparent 1px); }
.site-header { background: rgba(11,8,6,.95); border-bottom: 1px solid rgba(245,185,44,.2); }
.brand { gap: 10px; font-size: 12px; font-weight: 800; letter-spacing: .07em; }
.brand-logo { width: 46px; height: 46px; object-fit: cover; object-position: center; border: 1px solid rgba(245,185,44,.34); border-radius: 8px; mix-blend-mode: normal; }
.brand-copy { display: flex; flex-direction: column; gap: 1px; white-space: nowrap; }
.brand-copy strong { font-size: 12px; color: var(--text); }
.brand-copy small { font-size: 9px; letter-spacing: .13em; color: var(--gold); }
.topbar-nav { font-size: 12px; gap: clamp(12px,1.6vw,24px); }
.topbar-nav a { transition: color .15s; }
.topbar-nav a:hover, .topbar-nav a[aria-current="page"] { color: var(--gold); }
.cart-btn { color: var(--gold); }
.cart-btn b { background: var(--red); }
.editor-area { background: linear-gradient(120deg, rgba(245,185,44,.025), transparent 46%); }
.editor-header h1 { color: var(--text); }
.editor-header h1 span, .inspector-head h2 span, .modal-head h2 span { color: var(--orange); }
.eyebrow { color: #d2b58c; }
.stage-card { border-color: rgba(245,185,44,.21); background: #1a100a; }
.stage { background: radial-gradient(ellipse at 50% 42%, #382518 0%, #23160e 42%, #100b07 86%); }
.orb-one { background: #d54b18; opacity: .13; }
.orb-two { background: #a1530b; opacity: .13; }
.stage-caption { color: #bea98c; }
.stage-caption b { color: var(--gold); }
.stage-status { color: #d4bea3; }
.stage-tip { color: #cab39a; }
.zone-hint { color: rgba(255,250,240,.74); }
.zone-hint small { color: rgba(255,250,240,.54); }
.zoom-controls { background: rgba(11,8,6,.8); }
.zoom-controls span { color: #ddc4a5; }
.face-tab { color: #ceb89f; }
.face-tab.active { color: var(--gold); background: rgba(245,185,44,.12); }
.inspector { background: linear-gradient(165deg, #1d110a, #130c07 95%); border-left-color: var(--line); }
.inspector-head h2 { letter-spacing: -.03em; }
.status-pill { color: var(--gold); background: rgba(245,185,44,.09); border-color: rgba(245,185,44,.32); }
.project-progress span { background: linear-gradient(90deg, var(--red), var(--gold)); box-shadow: 0 0 12px rgba(245,185,44,.4); }
.panel-tabs { background: rgba(245,185,44,.025); }
.panel-tab { color: #d1bca3; }
.panel-tab[data-panel].active { color: #1b0803; background: linear-gradient(135deg, var(--gold), var(--orange)); box-shadow: 0 3px 13px rgba(245,185,44,.2); font-weight: 800; }
.panel-tab[data-panel="image"], .panel-tab[data-panel="text"] { color: #fff4df; background: rgba(255,106,24,.08); }
.panel-tab[data-panel="image"].active, .panel-tab[data-panel="text"].active { color: #1b0803; background: linear-gradient(135deg, var(--gold), var(--orange)); }
.panel-tab[data-panel="image"].active::before, .panel-tab[data-panel="text"].active::before { color: #1b0803; }
.panel-tab[data-panel="image"]:hover:not(.active), .panel-tab[data-panel="text"]:hover:not(.active) { background: rgba(255,106,24,.22); }
.section-label { color: #dec2a0; }
.helper-card { color: var(--muted); background: rgba(245,185,44,.035); }
.helper-card strong { color: #fff0d5; }
.pricing-note { border-color: rgba(245,185,44,.27); background: linear-gradient(110deg, rgba(245,185,44,.1), rgba(255,106,24,.025)); }
.pricing-note strong { color: var(--gold); }
.swatch-name { color: var(--text); }
.swatch.active { border-color: #fff9ef; box-shadow: 0 0 0 3px var(--gold), 0 0 0 5px rgba(245,185,44,.2), inset 0 0 0 3px rgba(0,0,0,.16); }
.size-btn.active { color: #1b0803; border-color: var(--gold); background: var(--gold); font-weight: 800; }
.location-pill.active { color: #1b0803; border-color: var(--gold); background: var(--gold); font-weight: 800; }
.garment-picker > span { color: #1b0803; background: var(--gold); }
.garment-picker b, .scale-badge { color: var(--gold); }
.inspector-footer { background: linear-gradient(180deg, #1d110a, #110a06); border-top-color: rgba(245,185,44,.2); }
.price-line strong { color: var(--gold); font-size: 22px; }
.primary-btn { color: #1b0803; background: linear-gradient(135deg, var(--gold), var(--orange)); box-shadow: 0 9px 24px rgba(245,185,44,.21); font-size: 13px; font-weight: 800; }
.primary-btn:hover { box-shadow: 0 12px 32px rgba(245,185,44,.32); filter: brightness(1.07); }
.primary-btn span { font-size: 17px; }
.inspector-footer > small { color: #c5ad91; }
.outline-btn { border-color: rgba(245,185,44,.56); color: var(--gold); background: rgba(245,185,44,.06); }
.outline-btn:hover { background: rgba(245,185,44,.18); box-shadow: 0 0 18px rgba(245,185,44,.18); }
.garment-thumb { background: radial-gradient(circle, #463020, #170e09); }
.garment-card:hover, .garment-card.active { border-color: var(--gold); background: rgba(245,185,44,.1); }
.preview-modal, .three-modal, .garment-modal { background: #1c100b; }
.modal-preview, .three-stage { background: radial-gradient(ellipse at center, #382619, #150d08 80%); }
.resize-handle { background: var(--orange); box-shadow: 0 0 0 2px rgba(0,0,0,.65), 0 0 10px rgba(245,185,44,.7); }
:where(button,a,input,textarea):focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (max-width: 1120px) { .topbar-nav a { display: none; } }
@media (max-width: 580px) {
  .site-header { height: 64px; padding: 0 13px; }
  .brand-logo { width: 38px; height: 38px; }
  .brand-copy strong { font-size: 10px; }
  .brand-copy small { font-size: 8px; }
  .topbar-nav { gap: 11px; }
  .stage-tip { max-width: 94%; overflow: hidden; text-overflow: ellipsis; }
}

/* Ajustes comprobados en móvil y en la ventana de vista previa */
.preview-grid:has(> .preview-face-card:only-child) { grid-template-columns: minmax(0, 360px); justify-content: center; }
.preview-grid:has(> .preview-face-card:only-child) .preview-face-card { width: 100%; }
@media (max-width: 580px) {
  .stage-card { min-height: 0; }
  .stage { min-height: 470px; }
  .stage-tip { width: calc(100% - 20px); text-align: center; white-space: normal; line-height: 1.4; font-size: 9px; }
}

/* Carrito del personalizador: conserva la estética fuego, dorado y negro */
.custom-cart-scrim { position:fixed; inset:0; z-index:990; background:rgba(0,0,0,.72); opacity:0; pointer-events:none; transition:opacity .2s ease; }
.custom-cart-scrim.is-open { opacity:1; pointer-events:auto; }
.custom-cart-drawer { position:fixed; z-index:991; top:0; right:0; bottom:0; width:min(100%,440px); display:flex; flex-direction:column; color:#f9eedc; background:linear-gradient(150deg,#24160d,#110a06 72%); border-left:1px solid rgba(245,185,44,.42); box-shadow:-15px 0 60px #000b; transform:translateX(105%); transition:transform .24s ease; visibility:hidden; }
.custom-cart-drawer.is-open { transform:translateX(0); visibility:visible; }
.custom-cart-head { display:flex; justify-content:space-between; align-items:center; padding:25px 23px 18px; border-bottom:1px solid rgba(245,185,44,.19); }
.custom-cart-head h2 { margin:7px 0 0; font-size:25px; font-weight:800; }
.custom-cart-head em { font-style:normal; color:var(--gold); }
.custom-cart-close { width:36px; height:36px; font-size:29px; line-height:1; color:var(--gold); border:1px solid rgba(245,185,44,.37); background:rgba(245,185,44,.08); border-radius:8px; cursor:pointer; }
.custom-cart-body { overflow-y:auto; flex:1; padding:16px 20px; }
.custom-cart-item { display:grid; grid-template-columns:90px minmax(0,1fr); gap:15px; padding:17px 0; border-bottom:1px solid rgba(245,185,44,.15); }
.custom-cart-item > img { width:90px; height:104px; object-fit:contain; border-radius:9px; background:#3a2417; }
.custom-cart-item-copy { display:flex; flex-direction:column; align-items:flex-start; gap:6px; min-width:0; font-size:12px; }
.custom-cart-item-copy strong { font-size:13px; line-height:1.35; }
.custom-cart-item-copy span, .custom-cart-item-copy small { color:#ccbda9; line-height:1.4; }
.custom-cart-item-copy b { color:var(--gold); font-size:14px; }
.custom-cart-item-copy button,.custom-cart-clear { color:#eab394; background:none; border:0; padding:4px 0; text-decoration:underline; cursor:pointer; font:inherit; font-size:12px; }
.custom-cart-empty { color:#d1bca3; font-size:14px; line-height:1.6; }
.custom-cart-foot { flex-shrink:0; display:flex; flex-direction:column; gap:10px; padding:18px 23px 23px; border-top:1px solid rgba(245,185,44,.3); background:#1d110a; }
.custom-cart-total { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.custom-cart-total strong { color:var(--gold); font-size:21px; }
.custom-cart-foot > .primary-btn { width:100%; font-size:12px; }
.custom-cart-foot > .outline-btn { width:100%; font-size:12px; }
.custom-cart-foot > p { margin:0; color:#b9aa96; font-size:11px; line-height:1.5; }
.custom-cart-foot > .custom-cart-storage-warning { color:var(--gold); }
@media(max-width:500px) { .custom-cart-head { padding:20px 17px 15px; } .custom-cart-body { padding:10px 17px; } .custom-cart-foot { padding:14px 17px 16px; } }

/* Carrito sin miniaturas para prendas personalizadas */
.custom-cart-item.without-image{grid-template-columns:minmax(0,1fr)}
.custom-cart-item.without-image .custom-cart-item-copy{width:100%}

/* Edición en el carrito: discreta y acorde con la estética aprobada. */
.cart-edit-notice[hidden]{display:none!important}
.cart-edit-notice{display:flex;flex-direction:column;gap:7px;margin-bottom:14px;padding:13px;border:1px solid rgba(245,185,44,.56);border-radius:9px;background:linear-gradient(120deg,rgba(245,185,44,.13),rgba(255,106,24,.08))}
.cart-edit-notice strong{font-size:12px;color:#ffd16a}
.cart-edit-notice span{font-size:11px;color:#e1cbb0;line-height:1.45}
.cart-edit-notice button{align-self:flex-start;border:0;background:transparent;padding:2px 0;color:#ffc18b;text-decoration:underline;cursor:pointer;font-size:11px}
.custom-cart-item-link{display:flex;align-items:center;justify-content:space-between;gap:9px;width:100%;padding:0;border:0;background:none;cursor:pointer;text-align:left;color:inherit}
.custom-cart-item-link strong{font-weight:750}
.custom-cart-item-link span{font-size:18px;color:var(--gold)}
.custom-cart-item-link:hover strong{text-decoration:underline;text-decoration-color:var(--orange);text-underline-offset:3px}
.custom-cart-item-copy .custom-cart-edit{border:1px solid rgba(245,185,44,.55);border-radius:7px;color:var(--gold);font-weight:700;background:rgba(245,185,44,.08);text-decoration:none;padding:8px 12px;margin:4px 0}
.custom-cart-item-copy .custom-cart-edit:hover{background:rgba(245,185,44,.19)}
.missing-image-warning{padding:10px;background:#4a1d14;border:1px solid #e89544;border-radius:8px;font-size:12px;line-height:1.5;color:#ffdfc3}

/* Aviso permanente cuando una imagen supera 1 MB o no es válida */
.upload-file-error { margin: 10px 0 0; border: 1px solid #e99b44; border-radius: 8px; background: rgba(96,34,20,.8); padding: 12px 13px; color: #ffe1cb; font-size: 12px; line-height: 1.55; }

/* Optimización de imágenes en el navegador (límite de 1 MB) */
.upload-help { margin: 8px 0 4px; font-size: 11px; line-height: 1.5; color: #bcaf9d; }
.upload-file-progress, .upload-file-success { border: 1px solid rgba(226,155,54,.45); border-radius: 8px; background: rgba(51,44,20,.65); color: #ffdf9c; margin: 10px 0 0; padding: 11px 12px; font-size: 12px; line-height: 1.5; }
.upload-file-success { border-color: rgba(141,166,84,.55); color: #e1f1bd; background: rgba(38,51,25,.55); }


/* --- Vista 3D mejorada tipo maniquí fantasma --- */
.three-stage {
  position: relative;
  min-height: 500px;
  isolation: isolate;
}
.three-product {
  --three-depth: 92px;
  position: relative;
  z-index: 1;
  width: min(58%, 360px);
  aspect-ratio: 1000 / 1073;
  transform-style: preserve-3d;
  transition: transform .18s ease-out;
  will-change: transform;
}
.three-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  transform-origin: center center;
}
.three-front { transform: translateZ(var(--three-depth)); }
.three-right { transform: rotateY(90deg) translateZ(var(--three-depth)); }
.three-back { transform: rotateY(180deg) translateZ(var(--three-depth)); }
.three-left { transform: rotateY(-90deg) translateZ(var(--three-depth)); }
.three-face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: .92;
  filter: brightness(1.12) contrast(.94) drop-shadow(0 18px 18px rgba(0,0,0,.35));
}
.three-design {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
  text-align: center;
  font-weight: 700;
  text-shadow: 0 2px 7px rgba(0,0,0,.9);
}
.three-design img { display: block; object-fit: contain; }
.ghost-mannequin {
  position: absolute;
  z-index: 0;
  width: min(60%, 390px);
  height: 84%;
  opacity: .45;
  border-radius: 46% 46% 20% 20% / 14% 14% 8% 8%;
  background:
    radial-gradient(ellipse at 50% 9%, rgba(240,245,252,.56) 0 8%, transparent 8.5%),
    radial-gradient(ellipse at 50% 33%, rgba(231,237,245,.24), rgba(128,143,164,.12) 48%, transparent 70%);
  filter: blur(1px) drop-shadow(0 0 24px rgba(193,208,230,.25));
  transform: translateY(6%);
  pointer-events: none;
}
.three-product::after {
  content: '';
  position: absolute;
  inset: 5% 16% 2%;
  z-index: 3;
  border-radius: 42% 42% 18% 18%;
  pointer-events: none;
  background: linear-gradient(105deg, rgba(255,255,255,.13), transparent 30%, transparent 66%, rgba(255,255,255,.08));
  mix-blend-mode: screen;
}
.three-foot {
  gap: 12px;
  flex-wrap: wrap;
}
.three-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
  font: 11px var(--mono);
}
.three-view-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.three-view-controls .outline-btn {
  min-width: 96px;
  padding-inline: 12px;
}
.three-view-controls .outline-btn.active {
  background: linear-gradient(180deg, rgba(255,153,51,.22), rgba(255,88,24,.12));
  border-color: rgba(255,153,51,.52);
  color: #ffd9b8;
}
@media (max-width: 720px) {
  .three-stage { min-height: 380px; }
  .three-product { width: min(72%, 310px); --three-depth: 72px; }
  .three-view-controls { width: 100%; }
  .three-view-controls .outline-btn { flex: 1 1 calc(50% - 8px); min-width: 0; }
}

/* Selector de unidades — carrito sin miniaturas */
.custom-cart-quantity{display:inline-flex;align-items:center;gap:0;width:max-content;border:1px solid rgba(255,153,51,.42);border-radius:8px;overflow:hidden;margin:.25rem 0;color:#fff}
.custom-cart-quantity button{min-width:36px;min-height:35px;background:rgba(255,153,51,.12);border:0;color:#ffd5a8;font-size:20px;cursor:pointer}
.custom-cart-quantity button:hover{background:rgba(255,153,51,.24)}
.custom-cart-quantity span{min-width:35px;text-align:center;font-weight:700}


/* --- Optimización móvil del personalizador --- */
@media (max-width: 680px){
  .site-header{position:sticky;top:0;z-index:40;display:flex;flex-direction:column;align-items:stretch;gap:10px;min-height:auto;padding:10px 12px 8px}
  .brand{justify-content:flex-start}
  .brand-logo{width:38px;height:38px}
  .topbar-nav{margin-left:0;width:100%;display:flex!important;gap:8px;overflow-x:auto;padding:0 0 4px;white-space:nowrap;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .topbar-nav::-webkit-scrollbar{display:none}
  .topbar-nav a{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 auto;padding:8px 11px;border:1px solid rgba(245,185,44,.26);border-radius:999px;background:rgba(255,255,255,.03);font-size:11px;line-height:1}
  .topbar-nav a[aria-current="page"]{background:rgba(245,185,44,.15);border-color:rgba(245,185,44,.48)}
  .icon-btn,.cart-btn{flex:0 0 auto}

  .workspace{grid-template-columns:1fr}
  .editor-area{padding:14px 10px 18px}
  .editor-header{display:grid;gap:10px;align-items:stretch;margin-bottom:12px}
  .editor-header h1{font-size:22px;line-height:1.02}
  .editor-actions{display:grid;grid-template-columns:minmax(0,1fr) 48px 48px;gap:8px;width:100%}
  .editor-actions .outline-btn{grid-column:1 / -1;justify-content:center;min-height:44px;font-size:12px}
  .ghost-btn,.square-btn,.outline-btn,.primary-btn,.action-btn,.size-btn,.location-pill,.panel-tab,.face-tab,.garment-picker{min-height:44px}
  .ghost-btn,.garment-picker,.action-btn{font-size:12px}

  .stage-card{border-radius:14px;overflow:hidden}
  .stage-meta{display:grid;gap:8px;padding:12px 10px 0}
  .face-tabs{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;white-space:nowrap;scrollbar-width:none}
  .face-tabs::-webkit-scrollbar{display:none}
  .face-tab{flex:0 0 auto;padding:0 14px;border-radius:999px;border:1px solid rgba(245,185,44,.2);background:rgba(255,255,255,.03);font-size:11px}
  .stage{min-height:400px;padding-bottom:46px}
  .stage-caption{left:12px;top:12px}
  .zoom-controls{right:10px;bottom:10px}
  .product-frame{width:min(82%,340px)}
  .zone-hint strong{font-size:14px}
  .zone-hint small{font-size:11px}
  .stage-tip{left:10px;right:10px;bottom:10px;width:auto;padding:6px 10px;border-radius:999px;background:rgba(11,8,6,.62);backdrop-filter:blur(5px)}

  .inspector{min-height:auto;border-top:1px solid var(--line);border-left:0}
  .inspector-head{padding:16px 16px 12px}
  .inspector-head h2{font-size:28px;line-height:.96}
  .status-pill{font-size:10px}
  .project-progress{margin-inline:16px}
  .panel-tabs{position:sticky;top:112px;z-index:5;margin:0 12px;padding:4px;background:rgba(17,10,6,.92);backdrop-filter:blur(8px);border-radius:12px;box-shadow:0 10px 25px rgba(0,0,0,.18)}
  .panel-content{padding:16px 16px 132px}
  .panel-section h3{font-size:18px;margin-bottom:8px}
  .panel-section p{font-size:13px;line-height:1.55}
  .drop-zone{padding:18px 14px;border-radius:12px;text-align:center}
  .drop-zone strong{font-size:15px}
  .drop-zone small,.upload-help,.missing-image-warning,.upload-file-error,.upload-file-success{font-size:12px;line-height:1.5}
  .swatches{grid-template-columns:repeat(6,1fr);gap:10px 8px}
  .swatch{width:34px;height:34px;justify-self:center}
  .size-grid{grid-template-columns:repeat(4,1fr)}
  .location-pills{display:grid;grid-template-columns:repeat(2,1fr)}
  .location-pill{justify-content:center;text-align:center;padding-inline:10px}
  .input-row,.scale-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px}
  .input-row .color-input{grid-column:1 / -1;width:100%;height:42px;border-radius:10px}
  .scale-label{grid-column:1 / -1;min-width:0;text-align:left;font-size:10px}

  .inspector-footer{position:sticky;bottom:0;z-index:8;padding:14px 16px calc(14px + env(safe-area-inset-bottom));background:linear-gradient(180deg,rgba(29,17,10,.92),#110a06 28%);backdrop-filter:blur(10px);box-shadow:0 -12px 24px rgba(0,0,0,.25)}
  .price-line{align-items:flex-end}
  .price-line span{font-size:11px}
  .price-line strong{font-size:24px}
  .inspector-footer > small{font-size:10px;line-height:1.45}
  .cart-edit-notice{margin-bottom:10px}

  .custom-cart-drawer{width:100%;border-left:0}
  .custom-cart-item{grid-template-columns:minmax(0,1fr);gap:10px}
  .custom-cart-item > img{width:100%;height:140px}
}


/* --- Integración galería y mejoras móviles 2026-10-11 --- */
.gallery-source-block{margin:16px 0 14px;padding:14px;border:1px solid rgba(245,185,44,.16);border-radius:16px;background:linear-gradient(180deg,rgba(255,255,255,.025),rgba(255,255,255,.01));}
.gallery-source-cats{display:flex;gap:8px;overflow:auto;padding-bottom:6px;scrollbar-width:none}
.gallery-source-cats::-webkit-scrollbar{display:none}
.gallery-source-cat{border:1px solid rgba(245,185,44,.24);background:#140c08;color:#f0e2cf;border-radius:999px;padding:8px 11px;font:600 11px/1.1 var(--mono);cursor:pointer;white-space:nowrap}
.gallery-source-cat.active{border-color:rgba(245,185,44,.55);background:rgba(245,185,44,.14);color:#fff3d8}
.gallery-source-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;max-height:310px;overflow:auto;padding-right:2px;margin-top:12px}
.gallery-source-item{display:flex;flex-direction:column;gap:6px;padding:7px;border-radius:12px;border:1px solid rgba(245,185,44,.14);background:#0f0a07;color:#ead8c0;cursor:pointer;position:relative}
.gallery-source-thumb{display:block;aspect-ratio:1;border-radius:10px;overflow:hidden;background:linear-gradient(180deg,#241109,#120904);border:1px solid rgba(245,185,44,.08)}
.gallery-source-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.gallery-source-item small{font:11px/1 var(--mono);color:#d4b28b;text-align:center}
.gallery-source-empty{display:none;position:absolute;inset:7px 7px auto;top:34px;text-align:center;font:10px/1.35 var(--mono);color:#b79675;padding:0 6px}
.gallery-source-item.is-empty .gallery-source-empty{display:block}
.gallery-source-item.is-empty .gallery-source-thumb{display:flex;align-items:center;justify-content:center;background:linear-gradient(180deg,#170d09,#0f0906)}
.gallery-source-item.is-empty small{margin-top:auto}.gallery-source-item:hover{border-color:rgba(245,185,44,.38);transform:translateY(-1px)}
@media (max-width: 680px){.gallery-source-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-height:250px}.panel-section{padding-bottom:8px}.face-tabs{display:flex;overflow:auto;gap:8px;padding-bottom:6px;scrollbar-width:none}.face-tabs::-webkit-scrollbar{display:none}.face-tab{flex:0 0 auto;min-width:116px}.stage{min-height:380px}.stage-tip{font-size:10px;padding:8px 10px;left:10px;right:10px;bottom:10px}.zoom-controls{right:10px;bottom:52px}.panel-tab{min-height:42px}.action-btn,.primary-btn,.ghost-btn,.outline-btn{min-height:44px}.drop-zone{padding:16px 12px}.location-pills{display:grid;grid-template-columns:1fr 1fr;gap:8px}.location-pill{justify-content:center;text-align:center;min-height:42px}}
@media (max-width: 460px){.gallery-source-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-height:238px}.editor-actions{grid-template-columns:1fr 1fr}.editor-actions .ghost-btn{grid-column:1 / -1}.editor-actions .square-btn{width:auto}.editor-actions .outline-btn{grid-column:1 / -1}.topbar-nav a{font-size:10px;padding:8px 9px}.stage-card{padding:10px}.stage-meta{flex-direction:column;align-items:flex-start;gap:10px}}

/* Selector flotante de imágenes por categoría */
.gallery-category-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;overflow:visible}
.gallery-category-choices .gallery-source-cat{white-space:normal;text-align:left;min-height:48px;display:flex;align-items:center;justify-content:space-between;font:700 12px system-ui,sans-serif}
.gallery-source-block > small{display:block;color:#c7aa88;margin-top:10px;line-height:1.45}
.design-gallery-modal{width:min(900px,calc(100% - 24px));max-height:min(90vh,900px);padding:0;border:1px solid rgba(245,185,44,.45);border-radius:18px;background:#1b110a;color:#fff5e6;box-shadow:0 20px 90px #000c}
.design-gallery-modal::backdrop{background:#000c;backdrop-filter:blur(5px)}
.design-gallery-card{padding:20px;max-height:88vh;overflow-y:auto}
.design-gallery-card .modal-intro{color:#d7b996}
.gallery-dialog-categories{display:flex;gap:9px;overflow-x:auto;margin-bottom:18px}
.gallery-dialog-categories button{white-space:nowrap;min-height:43px;padding:9px 14px;border-radius:999px;background:#150c08;border:1px solid #694322;color:#fae6c8;cursor:pointer;font:700 12px system-ui,sans-serif}
.gallery-dialog-categories button.active{background:rgba(245,185,44,.2);border-color:#f5b92c}
.gallery-dialog-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px}
.gallery-dialog-item{display:grid;gap:5px;padding:7px;background:#120b08;border:1px solid #50341c;border-radius:12px;color:#ffe0b0;cursor:pointer;min-width:0;font:12px system-ui,sans-serif}
.gallery-dialog-item img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px}
.gallery-dialog-item:hover{border-color:#f5b92c;transform:translateY(-1px)}
.gallery-dialog-item.unavailable{opacity:.35;min-height:100px}
@media(max-width:650px){.design-gallery-card{padding:13px}.gallery-dialog-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.gallery-dialog-categories{gap:6px}.gallery-dialog-categories button{padding:9px 11px}}
@media(max-width:375px){.gallery-dialog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* Misma barra fija y carrito que el resto de Del Averno. */
.app-shell > .site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11,8,6,.97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
html { scroll-padding-top: 90px; }
.topbar-nav .cart-btn.cart-toggle {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 8px;
  border: 1px solid rgba(245,185,44,.24);
  border-radius: 12px;
  color: var(--gold);
  background: rgba(255,255,255,.025);
  cursor: pointer;
  position: relative;
  font-size: initial;
}
.topbar-nav .cart-btn.cart-toggle:hover,
.topbar-nav .cart-btn.cart-toggle:focus-visible {
  border-color: rgba(245,185,44,.65);
  background: rgba(245,185,44,.08);
}
.topbar-nav .cart-icon { width: 25px; height: 25px; display: block; flex: none; }
.topbar-nav .cart-btn.cart-toggle .cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  border-radius: 999px;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  color: #fff;
  background: var(--red);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
@media (max-width:680px) {
  .topbar-nav { align-items: center; }
  .topbar-nav .cart-btn.cart-toggle { margin-left: auto; }
  html { scroll-padding-top: 132px; }
}

/* Evita que el carrito se pierda en el desplazamiento horizontal de móvil. */
.topbar-nav-links { display: flex; align-items: center; gap: inherit; min-width: 0; }
@media (max-width:680px) {
  .topbar-nav { overflow: visible !important; }
  .topbar-nav-links {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .topbar-nav-links::-webkit-scrollbar { display:none; }
  .topbar-nav .icon-btn { width:30px;height:30px;flex:0 0 30px; }
  .topbar-nav .cart-btn.cart-toggle { margin-left:0; flex:0 0 44px; }
}

/* Cotización y vista previa 2D usan el MISMO PNG. No hay vista 360°. */
.preview-identical-png{display:block;width:min(100%,780px);max-height:70vh;object-fit:contain;margin:10px auto;border-radius:12px;}
.modal-preview{display:block;text-align:center;}
.preview-modal .modal-card{width:min(860px,95vw);}
@media(max-width:620px){.preview-identical-png{width:100%;max-height:63vh}.preview-modal .modal-card{width:96vw}}

/* Guía del cotizador por tamaño, accesible sin ocupar espacio en móvil. */
.size-price-guide{margin:12px 0;border:1px solid rgba(245,185,44,.32);border-radius:12px;padding:10px 12px;background:rgba(13,8,6,.75)}
.size-price-guide summary{cursor:pointer;color:#f5b92c;font-weight:700;font-size:12px;line-height:1.5}
.size-price-guide img{display:block;width:min(100%,280px);height:auto;margin:10px auto;object-fit:contain;border-radius:8px}
.size-price-guide div{font-size:12px;line-height:1.6;color:#ecd3b1}


/* Tamaños de estampado: selector flotante junto a Vista previa. */
.editor-preview-pair{display:flex;gap:8px;align-items:center;min-width:0}
.editor-preview-pair .outline-btn{flex:1 1 auto;white-space:nowrap;min-height:44px;justify-content:center}
.editor-preview-pair .guide-launch-btn{border-color:rgba(245,185,44,.6);color:#ffe4b6;background:rgba(245,185,44,.07)}
.size-guide-inline-link{display:flex;justify-content:space-between;align-items:center;width:100%;margin:8px 0 14px;padding:12px;border-radius:10px;background:#211307;border:1px solid rgba(245,185,44,.35);color:#ffd597;font-size:12px;font-weight:700;cursor:pointer}
.size-guide-modal{border:1px solid rgba(245,185,44,.44);border-radius:18px;background:#150c07;color:#fff7e9;padding:0;width:min(940px,calc(100% - 24px));max-height:min(94dvh,940px);box-shadow:0 30px 100px rgba(0,0,0,.75);overflow:auto}
.size-guide-modal::backdrop{background:rgba(0,0,0,.8);backdrop-filter:blur(5px)}
.size-guide-card{padding:23px}
.size-guide-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.size-guide-head h2{font-size:clamp(22px,4vw,32px);margin-top:6px}
.size-guide-intro{color:#dac8af;font-size:13px;line-height:1.5;max-width:760px;margin:10px 0 17px}
.size-guide-layout{display:grid;grid-template-columns:minmax(235px,.95fr) minmax(270px,1.05fr);gap:20px;align-items:start}
.size-guide-art{position:relative;width:100%;max-width:350px;justify-self:center;border-radius:12px;overflow:hidden;border:1px solid rgba(245,185,44,.18);background:#0a0808}
.size-guide-art img{display:block;width:100%;height:auto}
.size-hotspot{position:absolute;display:block;cursor:pointer;border:2px solid transparent;background:transparent;border-radius:2px;padding:0;outline-offset:3px;transition:background .15s,box-shadow .15s}
.size-hotspot:hover,.size-hotspot:focus-visible,.size-hotspot.is-active{background:rgba(245,185,44,.13);box-shadow:inset 0 0 0 1px #fff8db}
.size-hotspot span{position:absolute;bottom:2px;right:2px;border-radius:4px;background:rgba(7,6,5,.88);color:#fff;padding:2px 5px;font-size:10px;line-height:1.2}
.size-hotspot--blanco{left:59.5%;top:22.2%;width:17.5%;height:13.8%;z-index:4}
.size-hotspot--azul{left:24%;top:23.7%;width:52.6%;height:14.1%;z-index:3}
.size-hotspot--rojo{left:23%;top:38.4%;width:55.8%;height:10.3%;z-index:2}
.size-hotspot--verde{left:22.5%;top:49%;width:56.2%;height:39.3%;z-index:1}
.size-guide-choices{display:flex;flex-direction:column;gap:12px;min-width:0}
.size-guide-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.size-choice{display:grid;grid-template-columns:14px minmax(0,1fr);gap:6px 9px;align-items:start;text-align:left;background:#1e120c;color:#fff3df;border:1px solid rgba(245,185,44,.22);border-radius:13px;padding:12px 10px;cursor:pointer;min-height:94px}
.size-choice:hover,.size-choice.is-active{border-color:#f5b92c;background:linear-gradient(130deg,#35200f,#241207)}
.size-choice-dot{width:13px;height:13px;border-radius:4px;border:1px solid rgba(255,255,255,.52);margin-top:2px}
.size-choice-dot--blanco{background:#eee}.size-choice-dot--azul{background:#135cda}.size-choice-dot--rojo{background:#d62427}.size-choice-dot--verde{background:#159e40}
.size-choice strong,.size-choice small{display:block}.size-choice strong{font-size:14px}.size-choice small{font-size:11px;color:#bda990;line-height:1.3;margin-top:3px}
.size-choice b{grid-column:2;color:#f5b92c;font-size:15px;line-height:1.2}
.size-guide-summary{border:1px solid rgba(245,185,44,.36);border-radius:12px;background:linear-gradient(160deg,#271708,#18100a);padding:14px}
.size-guide-summary>small{font-size:12px;font-weight:700;color:#efc783}
.size-guide-summary-prices{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:8px}
.size-guide-summary-prices span{font-size:11px;color:#c4b49e}.size-guide-summary-prices b,.size-guide-summary-prices strong{display:block;font-size:21px;color:#ffe0a2;margin-top:3px}
.size-guide-summary-prices strong{color:#ff9b43}
.size-guide-summary p{font-size:12px;line-height:1.4;color:#d2bea4;margin:10px 0 0}
.size-guide-extras{font-size:11px;line-height:1.5;color:#c1b09d;margin:0}
.size-guide-finish{align-self:stretch;min-height:46px}
@media(max-width:680px){
 .editor-actions{grid-template-columns:minmax(0,1fr) 48px 48px}
 .editor-preview-pair{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:8px}
 .editor-preview-pair .outline-btn{grid-column:auto!important;padding-inline:7px;font-size:11px;white-space:normal}
 .size-guide-card{padding:14px}.size-guide-layout{grid-template-columns:1fr;gap:12px}
 .size-guide-art{max-width:min(100%,280px)}.size-guide-choice-grid{grid-template-columns:1fr 1fr}
 .size-choice{min-height:89px;padding:10px 8px}.size-guide-modal{max-height:94dvh}
}
@media(max-width:460px){
 .editor-actions{grid-template-columns:1fr 1fr}
 .editor-actions .ghost-btn{grid-column:1/-1}
 .editor-preview-pair{grid-column:1/-1}
 .editor-preview-pair .outline-btn{grid-column:auto!important}
 .size-guide-art{max-width:240px}
}


/* 2026-10-12: mismo encabezado que la página principal. */
.app-shell > .site-header#site-header{display:block;position:sticky;top:0;z-index:100;height:auto;min-height:0;padding:0;gap:0;border-bottom:1px solid rgba(245,185,44,.2);background:rgba(11,8,6,.97);font:400 16px/1.55 Inter,system-ui,sans-serif}
#site-header .nav-shell{width:min(1180px,calc(100% - 2rem));margin:auto;min-height:70px;display:flex;align-items:center;gap:1.5rem;justify-content:space-between}
#site-header .brand{display:flex;align-items:center;gap:.65rem;margin:0;padding:0;text-decoration:none;color:#fffaf0;font-weight:800;letter-spacing:.08em;font-size:.75rem;white-space:nowrap}
#site-header .brand img{width:46px;height:46px;object-fit:cover;border-radius:8px;flex:0 0 auto}
#site-header .brand span{display:inline-block}
#site-header .brand small{display:block;color:#f5b92c;font-size:.55rem;letter-spacing:.15em}
#site-header .site-nav{display:flex;gap:1.2rem;align-items:center;position:static;min-width:0}
#site-header .site-nav a{color:#fffaf0;text-decoration:none;font-size:.9rem;white-space:nowrap;display:inline-block;padding:0;border:0;background:none}
#site-header .site-nav a:hover,#site-header .site-nav a[aria-current="page"]{color:#f5b92c}
#site-header .mobile-menu-toggle{display:none;border:1px solid rgba(245,185,44,.35);background:transparent;color:#f5b92c;border-radius:8px;padding:.42rem .58rem;font:inherit;font-size:1.2rem;line-height:1;cursor:pointer}
#site-header .cart-toggle{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:8px;border:1px solid rgba(245,185,44,.24);border-radius:12px;color:#f5b92c;background:rgba(255,255,255,.025);cursor:pointer;position:relative}
#site-header .cart-toggle .cart-icon{width:25px;height:25px;display:block;flex:none}
#site-header .cart-toggle .cart-count{position:absolute;top:-5px;right:-5px;border-radius:999px;min-width:19px;height:19px;display:grid;place-items:center;padding:0 4px;color:white;background:#e74317;font-size:10px;font-weight:800;line-height:1}
#site-header .cart-toggle:hover{border-color:rgba(245,185,44,.65);background:rgba(245,185,44,.08)}
@media(max-width:800px){
 #site-header .nav-shell{min-height:63px;gap:.45rem;position:relative}
 #site-header .mobile-menu-toggle{display:block;order:2;flex:0 0 auto}
 #site-header .cart-toggle{order:3;flex:0 0 44px}
 #site-header .site-nav{position:absolute;display:none;left:0;right:0;top:100%;z-index:110;flex-direction:column;align-items:stretch;gap:.25rem;padding:.75rem 1rem 1rem;background:rgba(11,8,6,.98);border-bottom:1px solid rgba(245,185,44,.25);box-shadow:0 12px 24px rgba(0,0,0,.35)}
 #site-header .site-nav.is-open{display:flex}
 #site-header .site-nav a{font-size:.95rem;padding:.7rem .75rem;border-radius:8px}
 #site-header .site-nav a:hover,#site-header .site-nav a[aria-current="page"]{background:rgba(245,185,44,.1)}
 #site-header .brand span{display:none}
}
@media(max-width:460px){#site-header .nav-shell{width:calc(100% - 1.25rem)}#site-header .brand img{width:42px;height:42px}}

/* Visor 2D: siempre mostrar la captura completa sin barra de desplazamiento. */
.preview-modal{width:min(960px,calc(100vw - 16px));max-width:none;max-height:calc(100dvh - 16px);margin:auto;overflow:hidden}
.preview-modal .modal-card{box-sizing:border-box;display:flex;flex-direction:column;width:100%;height:min(740px,calc(100dvh - 20px));max-height:calc(100dvh - 20px);padding:clamp(9px,2vw,18px);gap:7px;overflow:hidden}
.preview-modal .modal-head{flex:0 0 auto;margin:0;min-height:0}
.preview-modal .modal-head h2{font-size:clamp(19px,3.3vw,29px);line-height:1.1;margin:4px 0}
.preview-modal .modal-preview{flex:1 1 0;min-height:0;max-height:none;margin:0;display:grid;place-items:center;overflow:hidden;padding:5px;background:#150e09}
.preview-modal .preview-identical-png{display:block;max-width:100%;max-height:100%;height:100%;width:100%;object-fit:contain;margin:0;border-radius:8px}
.preview-modal .modal-foot{flex:0 0 auto;min-height:0;margin:0;padding:6px 0 0;gap:8px;flex-wrap:wrap}
.preview-modal .modal-foot .primary-btn{min-height:42px}
@media(max-width:650px){
 .preview-modal{width:calc(100vw - 10px);max-height:calc(100dvh - 10px)}
 .preview-modal .modal-card{height:calc(100dvh - 14px);padding:10px;gap:4px}
 .preview-modal .modal-foot{flex-direction:column;align-items:stretch;font-size:11px}
 .preview-modal .modal-foot .primary-btn{width:100%}
}

/* Mangas: información visible y destacada. */
.sleeve-surcharge{display:grid;grid-template-columns:auto 1fr;gap:3px 10px;align-items:center;margin:13px 0;padding:15px;border:1px solid #f5b92c;border-radius:14px;background:linear-gradient(120deg,#42200a,#21120a);box-shadow:0 0 18px rgba(255,139,28,.15);color:#fff4da}
.sleeve-surcharge>span{grid-row:1/4;font-size:29px;color:#ffac33}
.sleeve-surcharge strong{font-size:13px;letter-spacing:.09em;color:#ffcd71}
.sleeve-surcharge b{font-size:clamp(19px,3vw,25px);line-height:1.05;color:#ff991f}
.sleeve-surcharge small{font-size:12px;color:#f2d7aa;line-height:1.4}
.sleeve-surcharge--guide{margin:0}
.size-section-label{font-size:12px;color:#ffca66;font-weight:900;margin:0 0 2px;letter-spacing:.1em}
.size-choice-dot--purpura{background:#9221be}
.size-choice-dot--amarillo{background:#f5e100}
.size-guide-art{max-width:none}
.size-guide-art img{width:100%}
.size-guide-layout{grid-template-columns:minmax(300px,1.2fr) minmax(310px,1fr)}
.size-guide-choices{gap:8px}
.size-guide-choice-grid{gap:6px}
.size-choice{min-height:56px;padding:8px}
.size-guide-intro{margin:6px 0 9px}
.custom-cart-foot > [data-cart-quote], .cart-toggle{align-items:center}
.custom-cart-foot > [data-cart-quote]{display:flex;justify-content:center;text-align:center;letter-spacing:.08em;font-weight:900}
@media(max-width:720px){.size-guide-layout{grid-template-columns:1fr}.size-guide-art{max-width:100%}}
/* El PNG puede ser muy alto (hasta 4 caras); ocupar exactamente el área libre. */
.preview-modal .modal-preview{position:relative;min-width:0;min-height:0;overflow:hidden}
.preview-modal .preview-identical-png{position:absolute;inset:0;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}

#site-header .site-nav a{text-transform:uppercase;letter-spacing:.025em;font-weight:750;font-size:.82rem}

/* Los tamaños seleccionados en frente y espalda permanecen marcados */
.size-choice.is-active{border:2px solid #ffc14b;background:linear-gradient(145deg,#4c260f,#2c1609);box-shadow:0 0 0 2px rgba(245,185,44,.16),inset 0 0 24px rgba(255,160,32,.10);position:relative}
.size-choice.is-active::after{content:'✓';position:absolute;top:5px;right:7px;font-size:16px;font-weight:900;color:#ffdf98}
.size-section-label span{font-weight:700;letter-spacing:0;text-transform:none;color:#fff2dc}


/* Footer social Del Averno */
.personalizador-footer{margin-top:2rem;border-top:none;background:#000;padding:1.5rem 0 1rem;color:#fff}
.personalizador-footer .footer-shell{width:min(1180px,calc(100% - 2rem));margin:auto}
.personalizador-footer .footer-shell--social{display:grid;grid-template-columns:minmax(220px,320px) 1fr;gap:2rem;align-items:center}
.personalizador-footer .footer-brand-block{display:flex;justify-content:flex-start;align-items:center}
.personalizador-footer .footer-brand-logo{width:min(280px,100%);height:auto;display:block}
.personalizador-footer .footer-social-block{text-align:center;display:grid;gap:1.5rem}
.personalizador-footer .footer-social-block h2{margin:0;color:#fff;font-size:clamp(2rem,4vw,4rem);font-weight:500;letter-spacing:.02em;line-height:1.05}
.personalizador-footer .footer-social-links{display:flex;justify-content:center;align-items:center;gap:1.35rem;flex-wrap:wrap}
.personalizador-footer .social-icon-link{width:88px;height:88px;border-radius:22px;color:#fff;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;transition:transform .2s ease, color .2s ease, box-shadow .2s ease;background:transparent}
.personalizador-footer .social-icon-link svg{width:64px;height:64px;display:block}
.personalizador-footer .social-icon-link:hover{color:#f5b92c;transform:translateY(-3px);box-shadow:0 0 0 1px rgba(245,185,44,.35)}
.personalizador-footer .footer-bottom-line{width:min(calc(100% - 2rem),1830px);height:4px;background:#ff1e1e;margin:1rem auto 0}
.personalizador-footer .footer-bottom{padding-top:1rem;display:flex;justify-content:flex-end}
.personalizador-footer .footer-bottom span{font-size:clamp(1rem,2vw,1.45rem);font-weight:700;letter-spacing:.03em;color:#fff}
@media (max-width: 820px){.personalizador-footer .footer-shell--social{grid-template-columns:1fr;gap:1.5rem}.personalizador-footer .footer-brand-block{justify-content:center}.personalizador-footer .footer-social-block h2{font-size:clamp(1.8rem,8vw,3rem)}.personalizador-footer .social-icon-link{width:72px;height:72px;border-radius:18px}.personalizador-footer .social-icon-link svg{width:52px;height:52px}.personalizador-footer .footer-bottom{justify-content:center;text-align:center}}

/* Selector accesible de cantidad de imágenes en la galería del personalizador. */
.design-gallery-view-picker{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:0 0 16px;color:#e0c09a;font:700 12px system-ui,sans-serif}
.design-gallery-view-picker span{margin-right:7px}
.design-gallery-view-picker button{min-height:40px;min-width:56px;padding:9px 14px;border:1px solid #764224;border-radius:10px;cursor:pointer;color:#ffdcaa;background:#150c08;font:800 13px system-ui,sans-serif}
.design-gallery-view-picker button[aria-pressed="true"]{background:linear-gradient(130deg,#ffc04b,#ff7826);color:#210b04;border-color:#f9c265}
.design-gallery-view-picker button:focus-visible{outline:2px solid #ffcc6d;outline-offset:2px}
@media(max-width:650px){.design-gallery-view-picker{justify-content:center}.design-gallery-view-picker button{min-height:44px}}
