/* VortexVestments Cosmic Theme — matches Vortex Nova aesthetic */
:root {
  --bg: #07070f;
  --elevated: #10101c;
  --card: #12122a;
  --card-border: rgba(168, 168, 199, 0.14);
  --text: #f4f4ff;
  --muted: #a8a8c7;
  --cyan: #22d3ee;
  --violet: #a855f7;
  --gradient: linear-gradient(135deg, #22d3ee 0%, #a855f7 100%);
  --gradient-soft: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(168, 85, 247, 0.18));
  --danger: #f87171;
  --success: #34d399;
  --warning: #fbbf24;
  --radius-pill: 999px;
  --radius-card: 16px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --glow: 0 0 24px rgba(34, 211, 238, 0.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(34, 211, 238, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(168, 85, 247, 0.14), transparent 45%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(34, 211, 238, 0.06), transparent 40%);
  color: var(--text);
  margin: 0;
  padding: 0;
  padding-top: 108px;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.top-banner {
  background: var(--elevated);
  border-bottom: 1px solid var(--card-border);
  color: var(--text);
  text-align: center;
  padding: 10px 16px;
  font-weight: 600;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.top-banner .accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.sticky-price-bar {
  position: fixed;
  top: 41px;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(16, 16, 28, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 48px;
}
.sticky-price-bar .brand-mini {
  font-size: 0.85em;
  color: var(--muted);
}
.sticky-price-bar .brand-mini a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
}
.sticky-price-bar .brand-mini a:hover { color: var(--violet); }
.sticky-price-value {
  font-weight: 700;
  font-size: 1.05em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sticky-price-note {
  font-size: 0.75em;
  color: var(--muted);
  width: 100%;
  text-align: right;
}
.sticky-price-bar.empty .sticky-price-value { color: var(--muted); background: none; -webkit-background-clip: unset; background-clip: unset; }

.back-button {
  position: fixed;
  top: 100px;
  left: 16px;
  background: var(--elevated);
  color: var(--text);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  z-index: 100;
  font-size: 0.9em;
}
.back-button:hover {
  border-color: var(--cyan);
  box-shadow: var(--glow);
  transform: translateY(-1px);
}
.back-button svg { width: 18px; height: 18px; }

.page-wrap {
  display: flex;
  justify-content: center;
  padding: 20px 16px 48px;
  width: 100%;
}

.generator-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 32px 28px;
  max-width: 1200px;
  width: 100%;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand-header { margin-bottom: 8px; }
.brand-header .eyebrow {
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 0 0 8px;
}
.brand-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6em, 4vw, 2.4em);
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.2;
}
.brand-header .tagline {
  color: var(--muted);
  margin: 0;
  font-size: 1em;
}
.brand-header .store-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 600;
}
.brand-header .store-link:hover { color: var(--violet); }

.steps-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 8px;
}
.step-pill {
  font-size: 0.75em;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--elevated);
  border: 1px solid var(--card-border);
  color: var(--muted);
  font-weight: 600;
}
.step-pill.active {
  border-color: transparent;
  background: var(--gradient);
  color: #07070f;
}

.mode-switcher {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
  background: var(--elevated);
  border-radius: var(--radius-pill);
  padding: 4px;
  border: 1px solid var(--card-border);
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.mode-switcher button {
  background: none;
  border: none;
  padding: 10px 20px;
  font-size: 0.95em;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: all 0.25s ease;
  flex: 1;
  box-shadow: none;
  margin: 0;
  width: auto;
}
.mode-switcher button.active {
  background: var(--gradient);
  color: #07070f;
  box-shadow: var(--glow);
}
.mode-switcher button:hover:not(.active) {
  background: rgba(244, 244, 255, 0.06);
  color: var(--text);
}

.main-content {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  width: 100%;
  text-align: left;
}

.design-controls,
.product-display {
  flex: 1;
  min-width: min(100%, 300px);
  background: var(--elevated);
  border-radius: 14px;
  padding: 22px;
  border: 1px solid var(--card-border);
  box-shadow: none;
}

.design-controls h3,
.product-display h3 {
  color: var(--text);
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.35em;
  font-weight: 700;
  text-align: center;
}

.form-section {
  display: none;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.form-section.active { display: flex; }

.form-group { margin-bottom: 12px; }
label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.9em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  font-size: 1em;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
}
input[type="file"] { padding: 10px; }
input:focus, textarea:focus, select:focus {
  border-color: var(--cyan);
  outline: none;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}
textarea { resize: vertical; min-height: 88px; }
select option { background: #10101c; color: var(--text); }

button {
  background: var(--gradient);
  color: #07070f;
  padding: 12px 22px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 1em;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
  box-shadow: var(--glow);
  display: block;
  width: 100%;
  margin-top: 8px;
  font-family: inherit;
}
button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(168, 85, 247, 0.35);
}
button:disabled {
  background: #2a2a40;
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.7;
}

button#generateDesignBtn,
button#retryGenerateBtn {
  background: var(--gradient);
  color: #07070f;
}
button#proceedToCheckoutButton {
  background: var(--gradient);
  color: #07070f;
  font-size: 1.1em;
  padding: 14px 24px;
  margin-top: 16px;
}
button.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--card-border);
  box-shadow: none;
}
button.btn-secondary:hover:not(:disabled) {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}

.generate-status {
  display: none;
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--text);
  font-size: 0.9em;
  text-align: center;
}
.generate-status.show { display: block; }
.generate-status.error {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}
.generate-status .hint { color: var(--muted); font-size: 0.85em; margin-top: 4px; }
#retryGenerateBtn { display: none; margin-top: 10px; }
#retryGenerateBtn.show { display: block; }

.message-box {
  background: var(--elevated);
  border: 1px solid var(--card-border);
  padding: 14px;
  border-radius: 12px;
  margin-top: 12px;
  text-align: center;
  font-weight: 600;
  display: none;
  transition: all 0.3s ease;
  color: var(--text);
}
.message-box.show { display: block; }
.message-box.success {
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.35);
}
.message-box.error {
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
}
.message-box.info,
.message-box.warning {
  background: rgba(34, 211, 238, 0.1);
  color: #a5f3fc;
  border-color: rgba(34, 211, 238, 0.3);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--bg);
  min-height: 160px;
  align-items: start;
  justify-content: center;
}
.product-item {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s ease;
  background: var(--elevated);
  padding: 6px;
}
.product-item:hover { border-color: rgba(34, 211, 238, 0.4); }
.product-item.selected {
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.35);
}
.product-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  background: #0a0a14;
}
.product-item p {
  font-size: 0.8em;
  font-weight: 600;
  color: var(--muted);
  margin: 8px 4px 4px;
  text-align: center;
  line-height: 1.3;
}

.loading-spinner {
  border: 3px solid rgba(244, 244, 255, 0.1);
  border-top: 3px solid var(--cyan);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  animation: spin 0.8s linear infinite;
  margin: 16px auto;
  display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-spinner.show { display: block; }

.design-preview-container {
  position: relative;
  margin-top: 12px;
  background: var(--bg);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--card-border);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  overflow: visible;
  max-width: 100%;
}
.design-preview-container .form-group { width: 100%; text-align: left; }
.design-preview-container h3 {
  margin-bottom: 4px;
  font-size: 1.25em;
}

.price-card {
  width: 100%;
  background: var(--gradient-soft);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  margin: 8px 0 4px;
}
.price-card .price-label {
  font-size: 0.8em;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.price {
  font-size: 1.6em;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.price #displayPrice {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.price-loading { color: var(--cyan) !important; background: none !important; -webkit-background-clip: unset !important; font-style: italic; font-size: 0.9em; }
.shipping-note {
  color: var(--muted);
  font-size: 0.85em;
  margin-top: 6px;
  font-weight: 500;
}

.qty-group { margin: 10px 0 4px; text-align: left; }
.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--elevated);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.06);
}
.qty-btn {
  width: 44px;
  min-width: 44px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--cyan);
  font-size: 1.35em;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.qty-btn:hover:not(:disabled) {
  background: rgba(34, 211, 238, 0.12);
  color: var(--text);
  transform: none;
}
.qty-btn:active { background: rgba(168, 85, 247, 0.18); }
#quantityInput {
  width: 56px;
  min-width: 56px;
  height: 42px;
  margin: 0;
  padding: 0 4px;
  border: none;
  border-left: 1px solid var(--card-border);
  border-right: 1px solid var(--card-border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.05em;
  font-weight: 600;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
#quantityInput::-webkit-outer-spin-button,
#quantityInput::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#quantityInput:focus {
  outline: none;
  background: rgba(34, 211, 238, 0.08);
}
.price-breakdown {
  font-size: 0.85em;
  color: var(--muted);
  margin-top: 4px;
}
.canvas-wrapper .canvas-container {
  margin: 0 auto !important;
  position: relative !important;
  max-width: 100%;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(244, 244, 255, 0.2);
  cursor: pointer;
  display: inline-block;
  margin: 0 4px 4px 0;
  transition: transform 0.2s, border-color 0.2s;
}
.color-swatch.selected {
  transform: scale(1.15);
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}
.color-swatches { margin: 8px 0; text-align: left; }

.canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 12px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  padding: 8px;
}
#previewCanvas {
  border: 1px dashed rgba(168, 168, 199, 0.35);
  border-radius: 12px;
  background-color: #0a0a14;
  display: block;
  max-width: 100%;
  margin: 0 auto;
}
.canvas-wrapper .canvas-container,
.canvas-wrapper .canvas-container .lower-canvas,
.canvas-wrapper .canvas-container .upper-canvas {
  border-radius: 12px;
}.print-area-guide {
  position: absolute;
  z-index: 10;
  border: 2px dashed rgba(34, 211, 238, 0.7);
  background-color: rgba(34, 211, 238, 0.05);
  pointer-events: none;
  box-sizing: border-box;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.fullscreen-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(16, 16, 28, 0.9);
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.25s ease;
  z-index: 100;
  width: auto;
  margin: 0;
  box-shadow: none;
}
.fullscreen-btn:hover {
  border-color: var(--cyan);
  transform: scale(1.03);
}
.fullscreen-btn svg { width: 16px; height: 16px; }

.fullscreen-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(7, 7, 15, 0.96);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.fullscreen-modal.active { display: flex; }
.fullscreen-canvas-wrapper {
  position: relative;
  width: 90vw;
  max-width: 800px;
  height: 90vh;
  max-height: 1000px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.fullscreen-canvas-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
#fullscreenCanvas {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background-color: #0a0a14;
  max-width: 100%;
  max-height: 100%;
}
.fullscreen-print-area-guide {
  position: absolute;
  border: 2px dashed rgba(34, 211, 238, 0.9);
  background-color: rgba(34, 211, 238, 0.08);
  pointer-events: none;
  box-sizing: border-box;
  z-index: 10;
}
.fullscreen-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(248, 113, 113, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 10001;
  width: 40px;
  margin: 0;
  padding: 0;
  box-shadow: none;
}
.fullscreen-close-btn:hover { transform: scale(1.08); }
.fullscreen-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(16, 16, 28, 0.9);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  z-index: 10001;
  border: 1px solid var(--card-border);
}

.canvas-instructions {
  font-size: 0.85em;
  color: var(--muted);
  margin-top: 4px;
}

#miniPreviewBanner {
  position: fixed;
  top: 100px;
  right: -300px;
  width: 280px;
  height: 380px;
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  border-bottom-left-radius: 12px;
  overflow: hidden;
  transition: right 0.4s ease-out;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}
#miniPreviewBanner.active { right: 0; }
#miniPreviewBanner h3 {
  font-size: 0.9em;
  color: var(--muted);
  margin: 0 0 8px;
}
#miniPreviewCanvas {
  width: 250px;
  height: 320px;
  border: 1px solid var(--card-border);
  background-color: #0a0a14;
  display: block;
  border-radius: 8px;
}

.order-info-display {
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
  text-align: left;
  display: none;
}
.order-info-display.show { display: block; }
.order-info-display h4 {
  color: var(--success);
  margin: 0 0 12px;
  font-size: 1.1em;
  font-weight: 700;
}
.order-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(52, 211, 153, 0.2);
  gap: 8px;
  flex-wrap: wrap;
}
.order-info-row:last-child { border-bottom: none; }
.order-info-label { font-weight: 600; color: var(--muted); font-size: 0.85em; }
.order-info-value { color: var(--text); font-weight: 500; font-family: ui-monospace, monospace; font-size: 0.85em; }
.copy-button {
  background: transparent;
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.4);
  padding: 4px 10px;
  font-size: 0.75em;
  border-radius: var(--radius-pill);
  cursor: pointer;
  margin-left: 0;
  width: auto;
  box-shadow: none;
}
.copy-button:hover { background: rgba(34, 211, 238, 0.1); }

.design-validation-status {
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: #a5f3fc;
  padding: 10px;
  border-radius: 10px;
  margin: 10px 0;
  font-size: 0.85em;
  display: none;
}
.design-validation-status.show { display: block; }
.design-validation-status.valid {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}
.design-validation-status.invalid {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.bg-removal-toggle {
  background: var(--elevated);
  padding: 10px 12px;
  border-radius: 10px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85em;
  border: 1px solid var(--card-border);
  color: var(--muted);
  width: 100%;
}
.bg-removal-toggle input[type="checkbox"] { width: auto; accent-color: var(--cyan); }
.bg-removal-toggle label { margin: 0; color: var(--muted); font-weight: 500; }

.product-description {
  background: var(--bg);
  border-left: 3px solid var(--violet);
  padding: 14px 16px;
  border-radius: 0 12px 12px 0;
  margin: 12px 0;
  text-align: left;
}
.product-description h4 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1em;
  letter-spacing: 0.02em;
}
.product-description h5 {
  margin: 16px 0 8px;
  color: var(--text);
  font-size: 0.92em;
  font-weight: 700;
}
.product-description h6 {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 0.85em;
  font-weight: 650;
  text-transform: none;
}
.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.product-meta-title {
  color: var(--text);
  font-weight: 650;
  font-size: 0.95em;
}
.product-meta-chip {
  font-size: 0.75em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  color: var(--muted);
  background: rgba(34, 211, 238, 0.06);
}
.product-desc-body .desc-para {
  color: var(--muted);
  font-size: 0.9em;
  line-height: 1.55;
  margin: 0 0 10px;
}
.product-desc-body .desc-list {
  margin: 0 0 12px;
  padding-left: 1.15em;
  color: var(--text);
  font-size: 0.9em;
  line-height: 1.55;
}
.product-desc-body .desc-list li { margin: 4px 0; color: var(--muted); }
.product-desc-body .desc-disclaimer {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: #fecaca;
  font-size: 0.82em;
  line-height: 1.45;
}
.product-desc-body .desc-muted { color: var(--muted); font-size: 0.9em; margin: 0; }
.size-chips-label {
  font-size: 0.78em;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.size-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.size-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2em;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
  color: var(--text);
  font-size: 0.82em;
  font-weight: 650;
}
.size-table-card {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--elevated);
}
.size-table-figure {
  margin: 0 0 10px;
  text-align: center;
}
.size-table-figure img {
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 8px;
}
.size-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
}
table.size-chart {
  width: 100%;
  border-collapse: collapse;
  min-width: 280px;
  font-size: 0.82em;
}
table.size-chart th,
table.size-chart td {
  padding: 8px 10px;
  border: 1px solid var(--card-border);
  text-align: center;
  white-space: nowrap;
  color: var(--muted);
}
table.size-chart thead th,
table.size-chart th[scope="col"] {
  background: rgba(34, 211, 238, 0.1);
  color: var(--text);
  font-weight: 700;
}
table.size-chart th[scope="row"] {
  text-align: left;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  font-weight: 600;
}
table.size-chart tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}
.size-table-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.78em;
  line-height: 1.45;
}

.canvas-alignment-controls {
  background: var(--elevated);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0;
  margin: 8px 0;
  width: 100%;
  overflow: hidden;
}
.canvas-alignment-controls summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.9em;
  font-weight: 600;
  list-style: none;
  user-select: none;
}
.canvas-alignment-controls summary::-webkit-details-marker { display: none; }
.canvas-alignment-controls summary::after {
  content: '▾';
  float: right;
  color: var(--cyan);
}
.canvas-alignment-controls[open] summary::after { content: '▴'; }
.canvas-alignment-controls .details-body { padding: 0 14px 14px; }
.canvas-alignment-controls h5 { margin: 0 0 8px; color: var(--text); font-size: 0.95em; }
.alignment-info { font-size: 0.8em; color: var(--muted); margin-bottom: 8px; }
.mockup-selector { margin-bottom: 8px; }
.mockup-selector select { padding: 8px; font-size: 0.9em; }

.debug-info-panel {
  position: fixed;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.75em;
  font-family: monospace;
  display: none;
  max-width: 300px;
  z-index: 9999;
}
.debug-info-panel.show { display: block; }

.hint-text {
  font-size: 0.8em;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}

@media (max-width: 768px) {
  body { padding-top: 120px; }
  .page-wrap { padding: 12px 10px 40px; }
  .generator-card { padding: 18px 14px; }
  .main-content { flex-direction: column; gap: 16px; }
  .design-controls, .product-display {
    min-width: unset;
    width: 100%;
    padding: 16px 12px;
  }
  .brand-header h1 { font-size: 1.55em; }
  .canvas-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 10px 0;
  }
  /* Fabric owns canvas CSS size via setDimensions(cssOnly) — do not override #previewCanvas alone */
  #previewCanvas {
    max-width: 100%;
    margin: 0 auto;
  }
  .canvas-wrapper .canvas-container {
    max-width: 100%;
  }
  .back-button {
    position: static;
    margin: 0 auto 12px;
    display: inline-flex;
  }
  .page-wrap { flex-direction: column; align-items: center; }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 8px;
  }
  #miniPreviewBanner { display: none !important; }
  .sticky-price-bar { padding: 8px 12px; }
  .sticky-price-note { text-align: left; }
  .steps-row { gap: 6px; }
  .step-pill { font-size: 0.7em; padding: 5px 10px; }
}

@media (max-width: 380px) {
  .generator-card { padding: 14px 10px; border-radius: 12px; }
  .brand-header h1 { font-size: 1.35em; }
  #previewCanvas {
    max-width: 100%;
  }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  button { font-size: 0.9em; padding: 11px 14px; }
}

@media (min-width: 769px) {
  .canvas-wrapper {
    position: relative;
    width: 440px !important;
    max-width: 440px !important;
    margin: 16px auto !important;
    padding: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  #previewCanvas {
    margin: 0 auto;
    display: block;
  }
  .design-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}


/* Multi-print placement chips */
.placement-selector {
  margin: 12px 0 8px;
  text-align: left;
}
.placement-selector-label {
  font-size: 0.82em;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.placement-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.placement-chip {
  appearance: none;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: var(--elevated);
  color: var(--muted);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font-size: 0.88em;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  box-shadow: none;
  margin: 0;
  line-height: 1.2;
}
.placement-chip:hover:not(:disabled) {
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.08);
  transform: none;
}
.placement-chip.active {
  color: #07070f;
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(34, 211, 238, 0.25);
}
.placement-chip.has-design:not(.active)::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-radius: 50%;
  background: #22d3ee;
  vertical-align: middle;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.8);
}
.placement-hint {
  margin-top: 6px;
  font-size: 0.8em;
  color: var(--muted);
  line-height: 1.35;
}
.price-extras-note {
  margin-top: 6px;
  font-size: 0.78em;
  color: var(--muted);
  line-height: 1.35;
}
@media (max-width: 768px) {
  .placement-chip { padding: 7px 12px; font-size: 0.82em; }
}


/* Clear (X) + Save design actions on canvas */
.clear-design-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 120;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.55);
  background: rgba(15, 15, 28, 0.88);
  color: #fecaca;
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.clear-design-btn:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.25);
  border-color: #f87171;
  color: #fff;
}
.clear-design-btn[hidden] { display: none !important; }

.design-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 4px;
  justify-content: center;
}
.design-actions[hidden] { display: none !important; }
.design-actions .design-action-remove {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}
.design-actions .design-action-remove:hover:not(:disabled) {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}


/* LetsLaunch reciprocal badge (dofollow — do not add rel=nofollow) */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 16px 40px;
  margin-top: 8px;
  border-top: 1px solid var(--card-border);
}
.letslaunch-badge {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}
.letslaunch-badge img {
  display: block;
  width: 250px;
  height: 54px;
  max-width: 100%;
  border-radius: 10px;
}
.site-footer-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85em;
}
.site-footer-note a {
  color: var(--cyan);
  text-decoration: none;
}
.site-footer-note a:hover { text-decoration: underline; }
