:root {
  --bg: #07101d;
  --panel: #0d1828;
  --panel-2: #111f32;
  --panel-3: #15253a;
  --border: rgba(255,255,255,.09);
  --muted: #91a0b4;
  --text: #f6f8fb;
  --accent: #64d3ff;
  --accent-2: #a8f0ff;
  --success: #6ee7b7;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(63,148,195,.16), transparent 28rem),
    radial-gradient(circle at 85% 15%, rgba(92,214,255,.08), transparent 24rem),
    var(--bg);
  color: var(--text);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
.is-hidden { display: none !important; }

.app-shell { max-width: 1540px; margin: 0 auto; padding: 24px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.brand { display: inline-flex; align-items: center; min-width: 0; text-decoration: none; }
.brand-button { padding: 0; border: 0; background: transparent; }
.brand-logo { display: block; width: min(330px, 52vw); height: 58px; object-fit: contain; object-position: left center; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.api-status { display: inline-flex; align-items: center; gap: 8px; color: #91a2b7; font-size: 12px; font-weight: 700; white-space: nowrap; }
.api-status i { width: 9px; height: 9px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,.12); }
.api-status.connected { color: #9ce7c5; }
.api-status.connected i { background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.12); }
.connection-alert { margin: 0 0 16px; border: 1px solid rgba(245,158,11,.35); background: rgba(245,158,11,.09); border-radius: 14px; padding: 13px 16px; display: flex; gap: 10px; align-items: center; color: #f6d48f; }
.connection-alert span { color: #b8c4d3; font-size: 13px; }
.panel, .preview-card { border: 1px solid var(--border); background: linear-gradient(180deg, rgba(17,31,50,.94), rgba(10,20,34,.94)); border-radius: 22px; box-shadow: var(--shadow); }
.page { animation: pageIn .24s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Catalog */
.catalog-hero { min-height: 300px; display: grid; grid-template-columns: minmax(0,1.2fr) minmax(430px,.8fr); gap: 56px; align-items: end; padding: 42px 38px 38px; margin-bottom: 22px; border: 1px solid var(--border); border-radius: 28px; overflow: hidden; background:
  linear-gradient(105deg, rgba(7,16,29,.2), rgba(7,16,29,.82)),
  radial-gradient(circle at 83% 22%, rgba(100,211,255,.17), transparent 23rem),
  linear-gradient(145deg, #12243a, #081422 62%);
  box-shadow: var(--shadow);
}
.eyebrow { display: block; margin-bottom: 14px; color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.catalog-hero h1 { margin: 0; font-size: clamp(36px,5vw,68px); line-height: .98; letter-spacing: -.045em; }
.catalog-hero h1 em { color: var(--accent-2); font-style: normal; }
.catalog-hero > div > p { max-width: 690px; margin: 22px 0 0; color: #a7b6c8; font-size: 15px; line-height: 1.65; }
.hero-steps { display: grid; gap: 10px; }
.hero-steps > div { display: grid; grid-template-columns: 42px 1fr; column-gap: 12px; padding: 15px 16px; border: 1px solid var(--border); border-radius: 15px; background: rgba(255,255,255,.035); backdrop-filter: blur(8px); }
.hero-steps > div > span { grid-row: 1/3; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #07101d; background: var(--accent); font-size: 11px; font-weight: 900; }
.hero-steps strong { font-size: 13px; }
.hero-steps small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.catalog-browser { padding: 25px; }
.catalog-browser-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.catalog-browser-head h2 { margin: 0 0 4px; font-size: 21px; }
.catalog-browser-head p { margin: 0; color: var(--muted); font-size: 11px; }
.search-field { display: flex; align-items: center; gap: 8px; background: #0c1727; border: 1px solid #20314a; border-radius: 12px; padding: 0 12px; }
.search-field span { color: #66809f; font-size: 22px; }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; color: #f4f7fb; background: transparent; padding: 12px 0; }
.search-field input::placeholder { color: #62748a; }
.catalog-search { width: min(440px,45vw); }
.category-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 8px; margin-bottom: 18px; }
.category-chip { min-width: 0; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 7px; min-height: 48px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.025); color: #c6d2df; text-align: left; }
.category-chip:hover { border-color: rgba(100,211,255,.35); background: rgba(100,211,255,.04); }
.category-chip.active { color: #fff; background: rgba(100,211,255,.09); border-color: rgba(100,211,255,.55); box-shadow: inset 0 0 0 1px rgba(100,211,255,.08); }
.category-chip > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(100,211,255,.08); color: var(--accent); font-size: 11px; font-weight: 900; }
.category-chip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.category-chip small { color: #6f8299; font-size: 9px; }
.product-grid { display: grid; gap: 12px; }
.catalog-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
.catalog-card { min-width: 0; border: 1px solid var(--border); border-radius: 17px; background: rgba(255,255,255,.025); overflow: hidden; transition: .18s ease; }
.catalog-card:hover { border-color: rgba(100,211,255,.45); transform: translateY(-2px); box-shadow: 0 18px 38px rgba(0,0,0,.22); }
.catalog-card.active { border-color: rgba(100,211,255,.72); }
.catalog-card-main { width: 100%; padding: 9px; border: 0; background: transparent; color: inherit; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.catalog-image-wrap { display: grid; place-items: center; aspect-ratio: 1/1; background: #edf1f4; border-radius: 12px; overflow: hidden; }
.catalog-image-wrap img { width: 100%; height: 100%; object-fit: contain; transition: transform .22s ease; }
.catalog-card:hover .catalog-image-wrap img { transform: scale(1.035); }
.catalog-image-wrap i { color: #64748b; font-size: 11px; font-style: normal; }
.catalog-copy { display: flex; flex-direction: column; align-items: flex-start; text-align: left; min-width: 0; width: 100%; padding: 4px 3px 6px; }
.catalog-copy strong { font-size: 12px; line-height: 1.3; color: #f2f6fb; }
.catalog-copy small { color: #71849b; font-size: 9px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.catalog-view-button { width: 100%; min-height: 39px; border: 0; border-top: 1px solid var(--border); background: rgba(100,211,255,.035); color: #bfeeff; font-size: 10px; font-weight: 800; }
.catalog-view-button:hover { background: rgba(100,211,255,.11); color: #fff; }
.loading-card, .catalog-error { grid-column: 1/-1; min-height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #8ea0b6; text-align: center; padding: 16px; border: 1px dashed #263953; border-radius: 12px; }
.loading-card span, .loading-overlay span { width: 22px; height: 22px; border: 3px solid rgba(100,211,255,.18); border-top-color: #64d3ff; border-radius: 50%; animation: spin .8s linear infinite; }
.catalog-error strong { color: #f3f6fb; }
.catalog-error span { font-size: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Product detail */
.back-link { margin: 0 0 14px 4px; padding: 8px 0; border: 0; background: transparent; color: #9fb1c5; font-size: 12px; font-weight: 750; }
.back-link:hover { color: var(--accent); }
.product-detail-layout { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(420px,.72fr); gap: 22px; align-items: start; }
.product-gallery { overflow: hidden; }
.gallery-toolbar { min-height: 55px; display: flex; align-items: center; justify-content: space-between; padding: 8px 14px 8px 18px; border-bottom: 1px solid var(--border); }
.detail-stage { position: relative; width: 100%; height: min(67vh,740px); min-height: 510px; overflow: auto; padding: 24px; background: #dfe5e9; overscroll-behavior: contain; scrollbar-width: thin; }
.detail-scene { position: relative; width: 100%; height: 100%; min-width: 0; overflow: hidden; user-select: none; background: #eef1f4; }
#detailImage { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .2s ease; }
#detailImage.has-image { opacity: 1; }
.detail-thumbnails { display: flex; gap: 8px; padding: 12px 14px; overflow-x: auto; border-top: 1px solid var(--border); background: #0b1625; }
.detail-thumb { flex: 0 0 86px; padding: 5px; border: 1px solid var(--border); border-radius: 11px; background: rgba(255,255,255,.025); color: #8799ae; }
.detail-thumb:hover { border-color: rgba(100,211,255,.4); }
.detail-thumb.active { border-color: var(--accent); background: rgba(100,211,255,.08); color: #fff; }
.detail-thumb img { width: 100%; aspect-ratio: 1/1; object-fit: contain; border-radius: 7px; background: #edf1f4; }
.detail-thumb small { display: block; margin: 4px 0 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.product-info { padding: 30px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; scrollbar-width: thin; }
.product-category { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: rgba(100,211,255,.08); border: 1px solid rgba(100,211,255,.2); color: var(--accent); font-size: 9px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.product-info > h1 { margin: 14px 0 10px; font-size: clamp(28px,3vw,44px); line-height: 1.04; letter-spacing: -.035em; }
.product-summary { margin: 0; color: #aab9ca; font-size: 13px; line-height: 1.65; }
.detail-section { margin-top: 25px; padding-top: 22px; border-top: 1px solid var(--border); }
.detail-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.detail-section-title h3 { margin: 0; font-size: 13px; }
.detail-section-title > span { color: var(--accent); font-size: 10px; }
.detail-color-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.color-choice { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 40px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 11px; background: rgba(255,255,255,.025); color: #b8c6d5; text-align: left; }
.color-choice:hover { border-color: rgba(100,211,255,.4); }
.color-choice.active { border-color: var(--accent); background: rgba(100,211,255,.08); color: #fff; }
.color-choice i { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); }
.color-choice span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.product-spec-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 24px; }
.spec-card { min-height: 88px; display: flex; align-items: flex-start; gap: 11px; padding: 13px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.025); }
.spec-card > span { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: rgba(100,211,255,.08); color: var(--accent); font-size: 13px; }
.spec-card small { display: block; margin-bottom: 5px; color: #71859c; font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.spec-card strong { display: block; color: #e7eef6; font-size: 10px; line-height: 1.45; font-weight: 650; }
.spec-empty { grid-column: 1/-1; }
.size-chip-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.size-chip { min-width: 42px; height: 36px; padding: 0 9px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.025); color: #bdc9d6; font-size: 10px; }
.size-chip:hover { border-color: rgba(100,211,255,.4); }
.size-chip.active { border-color: var(--accent); background: rgba(100,211,255,.1); color: #fff; }
.empty-inline { color: var(--muted); font-size: 11px; }
.feature-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.feature-list li { position: relative; padding-left: 18px; color: #b6c4d3; font-size: 11px; line-height: 1.5; }
.feature-list li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 900; }
.technique-list { display: flex; flex-wrap: wrap; gap: 7px; }
.technique-list span { padding: 7px 9px; border: 1px solid rgba(110,231,183,.18); border-radius: 999px; background: rgba(110,231,183,.055); color: #a8e6c9; font-size: 9px; }
.product-cta-card { margin-top: 26px; padding: 18px; border: 1px solid rgba(100,211,255,.24); border-radius: 17px; background: linear-gradient(135deg, rgba(100,211,255,.11), rgba(100,211,255,.035)); }
.product-cta-card > div { display: flex; flex-direction: column; gap: 4px; margin-bottom: 13px; }
.product-cta-card strong { font-size: 13px; }
.product-cta-card span { color: #9eb0c4; font-size: 10px; line-height: 1.45; }
.button-large { width: 100%; min-height: 49px !important; font-size: 13px !important; }
.detail-note { margin: 13px 2px 0; color: #6f8298; font-size: 9px; line-height: 1.45; }
.product-gallery:fullscreen { width: 100vw; height: 100vh; border: 0; border-radius: 0; background: #07101d; }
.product-gallery:fullscreen .detail-stage { height: calc(100vh - 190px); min-height: 0; }
.product-gallery:fullscreen .detail-scene { margin-inline: auto; }

/* Shared controls + editor */
.editor-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: -2px 4px 13px; }
.editor-header .back-link { margin: 0; }
.editor-header > div { display: flex; align-items: center; gap: 8px; }
.editor-header > div span { color: #70839a; font-size: 8px; letter-spacing: .1em; }
.editor-header > div strong { color: #dce8f3; font-size: 11px; }
.workspace { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 22px; align-items: start; }
.controls-panel { padding: 8px 22px 22px; max-height: calc(100vh - 115px); overflow: auto; scrollbar-width: thin; }
.control-section { padding: 20px 0; border-bottom: 1px solid var(--border); }
.control-section:last-child { border-bottom: 0; }
.control-section.is-disabled { opacity: .38; pointer-events: none; }
.section-heading { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 15px; }
.section-heading h2 { margin: 1px 0 4px; font-size: 15px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.step { flex: 0 0 26px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: rgba(100,211,255,.09); border: 1px solid rgba(100,211,255,.16); color: var(--accent); font-size: 11px; font-weight: 800; }
.color-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.color-swatch { width: 28px; height: 28px; padding: 0; border: 2px solid rgba(255,255,255,.2); border-radius: 50%; box-shadow: 0 0 0 2px transparent; }
.color-swatch:hover { transform: scale(1.08); }
.color-swatch.active { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
.select-row { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #9aacc0; font-size: 13px; }
.select-row select { flex: 1; min-width: 0; max-width: 230px; color: #ecf3fa; background: #0b1626; border: 1px solid #263a55; border-radius: 10px; padding: 10px 12px; outline: 0; }
.upload-dropzone { display: flex; min-height: 110px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px dashed rgba(100,211,255,.38); border-radius: 16px; background: rgba(100,211,255,.035); transition: .2s ease; cursor: pointer; }
.upload-dropzone:hover, .upload-dropzone.dragover { background: rgba(100,211,255,.085); border-color: var(--accent); }
.upload-dropzone input { display: none; }
.upload-dropzone .upload-icon { color: var(--accent); font-size: 25px; font-weight: 300; line-height: 1; }
.upload-dropzone strong { font-size: 13px; }
.upload-dropzone small { color: var(--muted); font-size: 11px; }
.toggle-row { display: flex; gap: 9px; align-items: center; margin-top: 13px; color: #dce6f0; font-size: 12px; }
.toggle-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.21); border: 1px solid var(--border); }
.segmented button { min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 10px; line-height: 1.15; padding: 5px; }
.segmented button:hover { color: white; }
.segmented button.active { background: var(--panel-2); color: white; box-shadow: 0 4px 16px rgba(0,0,0,.22); }
.segmented.compact { display: flex; width: auto; max-width: 520px; overflow-x: auto; padding: 3px; }
.segmented.compact:empty { display: none; }
.segmented.compact button { min-width: 88px; min-height: 34px; font-size: 10px; }
.range-group { margin-top: 16px; }
.range-group label { display: flex; justify-content: space-between; margin-bottom: 8px; color: #dce6f0; font-size: 12px; }
.range-group output { color: var(--accent); }
.range-group input { width: 100%; accent-color: var(--accent); }
.preview-column { min-width: 0; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 3px 12px; }
.view-toolbar-left { display: flex; min-width: 0; align-items: center; gap: 10px; }
.status-pill { flex: 0 0 auto; padding: 8px 11px; border: 1px solid rgba(110,231,183,.24); background: rgba(110,231,183,.07); color: var(--success); border-radius: 999px; font-size: 11px; font-weight: 750; }
.status-pill.ready { color: #6ee7b7; border-color: rgba(110,231,183,.22); background: rgba(110,231,183,.08); }
.zoom-controls { display: inline-flex; align-items: center; gap: 5px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: rgba(0,0,0,.2); }
.zoom-controls button { min-width: 34px; height: 34px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: #c8d6e5; font-size: 16px; }
.zoom-controls button:hover { background: var(--panel-2); color: #fff; }
.zoom-controls button:nth-child(2) { min-width: 58px; font-size: 10px; color: var(--accent); }
.preview-card { overflow: hidden; }
.preview-stage { position: relative; width: 100%; height: min(68vh, 790px); min-height: 480px; overflow: auto; padding: 24px; background: #dfe5e9; overscroll-behavior: contain; scrollbar-width: thin; }
.stage-scene { position: relative; width: 100%; height: 100%; min-width: 0; overflow: hidden; user-select: none; touch-action: pan-x pan-y; background:
  linear-gradient(45deg, rgba(0,0,0,.018) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.018) 75%),
  linear-gradient(45deg, rgba(0,0,0,.018) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.018) 75%), #eef1f4;
  background-size: 34px 34px; background-position: 0 0, 17px 17px;
}
.mockup-background, #productImage { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.mockup-background { z-index: 0; opacity: 0; transition: opacity .2s ease; }
.mockup-background.has-image { opacity: 1; }
#productImage { z-index: 1; opacity: 0; transition: opacity .2s ease; }
#productImage.has-image { opacity: 1; }
.print-area { position: absolute; border: 1px dashed rgba(25,169,230,.82); background: rgba(25,169,230,.07); border-radius: 8px; pointer-events: none; transition: opacity .18s; z-index: 4; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.print-area::after { content: "ÁÆTLAÐ PRENTSVÆÐI"; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); color: rgba(17,90,120,.58); font-size: clamp(7px,1.1vw,10px); font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.logo-layer { position: absolute; transform-origin: center; object-fit: contain; cursor: grab; touch-action: none; filter: drop-shadow(0 2px 1px rgba(0,0,0,.12)); z-index: 2; max-height: none; }
.logo-layer:active { cursor: grabbing; }
.logo-layer.is-hidden { display: none; }
.empty-state { position: absolute; z-index: 10; left: 50%; bottom: 7%; transform: translateX(-50%); text-align: center; color: #506074; width: min(78%,320px); }
.empty-state span { display: block; font-size: 23px; }
.empty-state strong { font-size: 13px; }
.empty-state p { margin: 5px 0 0; font-size: 11px; line-height: 1.35; }
.loading-overlay { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(238,241,244,.82); color: #314158; backdrop-filter: blur(4px); }
.rotate-panel { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; gap: 12px; align-items: center; padding: 14px 18px 12px; border-top: 1px solid var(--border); background: #0c1828; }
.rotate-panel.is-disabled { opacity: .45; }
.rotate-panel > button { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.035); color: #e7eff7; font-size: 20px; }
.rotate-panel > button:hover:not(:disabled) { border-color: rgba(100,211,255,.4); background: rgba(100,211,255,.08); }
.rotate-track label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; font-size: 11px; }
.rotate-track label strong { color: #eef5fb; }
.rotate-track label span { color: var(--muted); }
.rotate-track input { width: 100%; accent-color: var(--accent); }
.rotate-scale { display: flex; justify-content: space-between; color: #63768d; font-size: 8px; }
.preview-meta { display: grid; grid-template-columns: repeat(3,1fr); background: #0b1625; border-top: 1px solid var(--border); }
.preview-meta > div { padding: 15px 18px; border-right: 1px solid var(--border); }
.preview-meta > div:last-child { border-right: 0; }
.preview-meta span { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 4px; }
.preview-meta strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-card:fullscreen { width: 100vw; height: 100vh; border: 0; border-radius: 0; background: #07101d; }
.preview-card:fullscreen .preview-stage { height: calc(100vh - 154px); min-height: 0; }
.preview-card:fullscreen .stage-scene { margin-inline: auto; }
.action-row { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.action-row p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.4; max-width: 500px; }
.button { min-height: 42px; border-radius: 12px; padding: 0 16px; border: 1px solid var(--border); font-weight: 750; font-size: 12px; }
.button-primary { background: linear-gradient(135deg,var(--accent),#31aee2); color: #02121b; border-color: transparent; box-shadow: 0 12px 28px rgba(49,174,226,.2); }
.button-primary:hover:not(:disabled) { filter: brightness(1.08); }
.button-secondary { background: rgba(255,255,255,.035); color: #dce6f0; }
.button:disabled { opacity: .38; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translate(-50%,20px); padding: 10px 14px; border-radius: 12px; background: #0d1b2b; border: 1px solid var(--border); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s ease; font-size: 12px; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 1280px) {
  .catalog-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .category-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .product-detail-layout { grid-template-columns: minmax(0,1fr) 430px; }
}
@media (max-width: 1020px) {
  .catalog-hero { grid-template-columns: 1fr; gap: 30px; align-items: start; }
  .hero-steps { grid-template-columns: repeat(3,1fr); }
  .hero-steps > div { grid-template-columns: 34px 1fr; }
  .hero-steps > div > span { width: 32px; height: 32px; }
  .catalog-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .product-detail-layout { grid-template-columns: 1fr; }
  .product-info { position: static; max-height: none; }
  .workspace { grid-template-columns: 350px minmax(0,1fr); }
}
@media (max-width: 850px) {
  .app-shell { padding: 16px; }
  .catalog-browser-head { align-items: stretch; flex-direction: column; }
  .catalog-search { width: 100%; }
  .category-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .workspace { grid-template-columns: 1fr; }
  .controls-panel { max-height: none; order: 2; }
  .preview-column { order: 1; }
  .preview-stage { height: min(72vh,720px); }
}
@media (max-width: 620px) {
  .app-shell { padding: 10px; }
  .topbar { margin: 5px 3px 12px; }
  .brand-logo { width: 210px; height: 46px; }
  .header-actions { align-items: flex-end; flex-direction: column-reverse; gap: 6px; }
  .api-status { font-size: 10px; }
  .button-secondary { min-height: 36px; padding: 0 11px; }
  .connection-alert { align-items: flex-start; flex-direction: column; }
  .catalog-hero { min-height: 0; padding: 28px 20px; border-radius: 20px; }
  .catalog-hero h1 { font-size: 39px; }
  .catalog-hero > div > p { font-size: 12px; }
  .hero-steps { grid-template-columns: 1fr; }
  .catalog-browser { padding: 15px; border-radius: 18px; }
  .category-grid { display: flex; overflow-x: auto; padding-bottom: 4px; }
  .category-chip { flex: 0 0 135px; }
  .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog-card-main { padding: 7px; }
  .product-detail-layout { gap: 12px; }
  .product-gallery, .product-info { border-radius: 18px; }
  .detail-stage { height: 57vh; min-height: 390px; }
  .detail-thumbnails { padding: 9px; }
  .detail-thumb { flex-basis: 72px; }
  .product-info { padding: 20px 16px; }
  .detail-color-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .product-spec-grid { grid-template-columns: 1fr; }
  .spec-empty { grid-column: auto; }
  .editor-header { align-items: flex-start; }
  .editor-header > div { align-items: flex-end; flex-direction: column; }
  .controls-panel { padding-inline: 15px; border-radius: 18px; }
  .preview-toolbar { align-items: flex-start; }
  .view-toolbar-left { min-width: 0; flex: 1; }
  .status-pill { display: none; }
  .zoom-controls button { min-width: 30px; height: 32px; }
  .zoom-controls button:nth-child(2) { display: none; }
  .preview-card { border-radius: 18px; }
  .preview-stage { height: 62vh; min-height: 390px; }
  .rotate-panel { grid-template-columns: 38px minmax(0,1fr) 38px; gap: 8px; padding-inline: 10px; }
  .rotate-panel > button { width: 37px; height: 37px; }
  .rotate-track label span { display: none; }
  .preview-meta > div { padding: 12px 10px; }
  .action-row { align-items: stretch; flex-direction: column; }
  .action-row .button { width: 100%; }
}
