:root {
  --pink: #ff2d78;
  --pink-dark: #d81b60;
  --blue: #00b8d4;
  --yellow: #f5a623;
  --ink: #17102b;
  --muted-ink: #6b6478;
  --paper: #ffffff;
  --paper-alt: #faf9fc;
  --line: rgba(23, 16, 43, 0.1);
  --line-strong: rgba(23, 16, 43, 0.16);
  --radius: 16px;
  --shadow: 0 12px 30px rgba(23, 16, 43, 0.12);
  --shadow-sm: 0 4px 14px rgba(23, 16, 43, 0.08);
  --gradient-brand: linear-gradient(135deg, var(--pink) 0%, #a020f0 50%, var(--blue) 100%);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

h1, h2, h3, h4 { font-weight: 800; margin: 0 0 0.5em; letter-spacing: -0.02em; }

a { color: var(--pink-dark); text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
}

.logo {
  display: flex;
  align-items: center;
}
.logo-badge {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2px 6px;
  height: 80px;
}
.logo-badge img {
  height: 100%;
  width: auto;
  display: block;
}
.logo-tagline {
  margin-left: 14px;
  font-size: 14px;
  font-weight: 600;
  font-style: italic;
  color: var(--muted-ink);
  white-space: nowrap;
}

.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.hamburger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a { color: var(--ink); font-weight: 600; opacity: 0.75; }
.nav-links a:hover { opacity: 1; color: var(--pink); }

@media (max-width: 760px) {
  .hamburger-btn { display: flex; }
  /* No room next to the logo badge and hamburger button on a narrow
     screen, so the tagline moves underneath instead of disappearing —
     the header grows to fit (auto height) rather than staying pinned
     to the desktop's fixed 92px. */
  .site-header .container { height: auto; min-height: 92px; padding-top: 10px; padding-bottom: 10px; }
  .logo { flex-direction: column; align-items: flex-start; gap: 2px; }
  .logo-tagline { margin-left: 0; font-size: 11px; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    padding: 8px 24px 20px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav-links.nav-open { display: flex; }
  .nav-links a { padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: none; }
  .cart-link { justify-content: space-between; }
}

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cart-count {
  background: var(--pink);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 7px;
  min-width: 18px;
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(255, 45, 120, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255, 45, 120, 0.35); }
.btn-secondary {
  background: var(--paper-alt);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-secondary:hover { background: #f0eef5; border-color: var(--pink); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-danger { background: #ff4757; color: #fff; }

/* ---------- Hero ---------- */
.hero {
  padding: 90px 0 70px;
  text-align: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 45, 120, 0.08), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(0, 184, 212, 0.08), transparent 45%);
}
.hero h1 { font-size: clamp(36px, 6vw, 64px); }
.hero .highlight {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { font-size: 19px; color: var(--muted-ink); max-width: 620px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.badge-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 48px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted-ink);
}
.badge-row span { display: flex; align-items: center; gap: 6px; }

/* ---------- Hero: copy + media ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  text-align: left;
}
.hero-copy { text-align: left; }
.hero-copy p { margin-left: 0; margin-right: 0; }
.hero-copy .hero-actions,
.hero-copy .badge-row { justify-content: flex-start; }

.hero-media { display: flex; flex-direction: column; gap: 16px; }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.media-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 20px;
  border-radius: var(--radius);
  border: 2px dashed var(--line-strong);
  background:
    linear-gradient(135deg, rgba(255, 45, 120, 0.07), rgba(0, 184, 212, 0.07)),
    var(--paper-alt);
  color: var(--muted-ink);
  overflow: hidden;
}
.media-slot img,
.media-slot video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.media-slot--video { aspect-ratio: 16 / 9; }
.media-slot--image { aspect-ratio: 1 / 1; padding: 14px; }

.media-slot-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  padding-left: 4px; /* optically center the triangle */
  box-shadow: var(--shadow-sm);
}
.media-slot-icon { font-size: 26px; }
.media-slot-label { font-weight: 700; color: var(--ink); margin: 0; font-size: 13px; }
.media-slot-hint { font-size: 12px; margin: 0; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { text-align: center; }
  .hero-copy .hero-actions,
  .hero-copy .badge-row { justify-content: center; }
  .hero-media { max-width: 480px; margin: 0 auto; }
}

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-title { text-align: center; margin-bottom: 12px; font-size: clamp(28px, 4vw, 40px); }
.section-subtitle { text-align: center; color: var(--muted-ink); max-width: 600px; margin: 0 auto 48px; }

/* ---------- Product grid ---------- */
.product-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}
.product-card {
  flex: 1 1 220px;
  max-width: 260px;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.product-card:hover { transform: translateY(-6px); border-color: var(--pink); box-shadow: var(--shadow); }
.product-card .size-badge {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: var(--gradient-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.product-card h3 { margin-bottom: 4px; font-size: 18px; }
.product-card .price { font-size: 26px; font-weight: 800; color: var(--pink-dark); margin: 10px 0 18px; }

.product-card.custom-card {
  border-style: dashed;
  border-color: var(--line-strong);
  background: var(--paper-alt);
}
.product-card.custom-card:hover { border-color: var(--pink); }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.step { text-align: center; padding: 0 12px; }
.step .num {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; margin: 0 auto 16px; font-size: 18px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--paper-alt);
  border-top: 1px solid var(--line);
  padding: 40px 0;
  text-align: center;
  color: var(--muted-ink);
  font-size: 14px;
  margin-top: 60px;
}
.site-footer a { color: var(--muted-ink); text-decoration: underline; }
.footer-links {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; text-align: left; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--paper-alt);
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--pink);
  background: var(--paper);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-hint { font-size: 12px; color: var(--muted-ink); margin-top: -12px; margin-bottom: 18px; }

.password-toggle-btn {
  position: absolute;
  right: 6px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 8px;
  color: var(--muted-ink);
}
.password-toggle-btn:hover { color: var(--ink); }

.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.dashboard-tile { cursor: pointer; transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; }
.dashboard-tile:hover { transform: translateY(-3px); border-color: var(--pink); box-shadow: var(--shadow); }

.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 14px;
}
.alert-error { background: #fff0f1; color: #c0293b; border: 1px solid #ffd1d6; }
.alert-success { background: #eefcf3; color: #1a8a4c; border: 1px solid #c5f0d7; }
.alert-info { background: #eef8fc; color: #0e6f8e; border: 1px solid #c9e9f4; }
.alert-warning { background: #fef3e0; color: #b3720a; border: 1px solid #fbdfa8; }

/* ---------- Builder page ---------- */
.builder-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: flex-start;
}

.builder-sidebar {
  position: sticky;
  top: 116px;
  max-height: calc(100vh - 132px);
  overflow-y: auto;
  padding-right: 4px;
}

/* Must come AFTER the base .builder-sidebar rule above — same specificity,
   so source order decides the winner regardless of the media query, and a
   block placed earlier would silently lose. This override previously sat
   before the base rule, so the sidebar stayed sticky/pinned on phones and
   scrolled to float directly over the gang sheet canvas beneath it. */
@media (max-width: 900px) {
  .builder-layout { grid-template-columns: 1fr; }
  .builder-sidebar { position: static; max-height: none; overflow: visible; }
}

.size-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.size-option:hover { border-color: var(--pink); }
.size-option.active { border-color: var(--pink); background: rgba(255, 45, 120, 0.06); }

.btn-group-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--muted-ink);
  margin: 16px 0 8px;
}
.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preset-size-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.preset-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper-alt);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.preset-chip:hover { border-color: var(--pink); background: rgba(255, 45, 120, 0.06); }
.preset-chip .dim { opacity: 0.65; font-weight: 400; margin-left: 3px; }
.preset-chip.active {
  border-color: var(--pink);
  background: var(--gradient-brand);
  color: #ffffff;
}
.preset-chip.active .dim { opacity: 0.85; }
.preset-chip.active:hover { background: var(--gradient-brand); }

.upload-tray {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 8px;
}
.upload-tray-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: repeating-conic-gradient(#eceaf1 0% 25%, #f6f5f9 0% 50%) 50% / 12px 12px;
  transition: border-color 0.15s ease;
}
.upload-tray-item:hover { border-color: var(--pink); }
.upload-tray-item img { width: 100%; height: 100%; object-fit: contain; }
.upload-tray-item .remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(23, 16, 43, 0.65);
  color: #fff;
  border: none;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}

.upload-drop {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.upload-drop:hover, .upload-drop.dragover { border-color: var(--pink); background: rgba(255, 45, 120, 0.05); }

.canvas-wrap {
  background: repeating-conic-gradient(#eceaf1 0% 25%, #f6f5f9 0% 50%) 50% / 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  overflow: auto;
  display: flex;
  justify-content: center;
}

#sheetCanvas {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: var(--shadow);
  touch-action: none;
  cursor: default;
}
/* Purely a display aid — CSS background-color is never captured by
   toDataURL()/print export, so this can never leak into the artwork. */
#sheetCanvas.bg-contrast {
  background: #f2b8d4;
}

.loupe {
  position: fixed;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid var(--pink);
  box-shadow: var(--shadow);
  pointer-events: none;
  display: none;
  z-index: 200;
  background: repeating-conic-gradient(#eceaf1 0% 25%, #f6f5f9 0% 50%) 50% / 16px 16px;
}
.loupe.visible { display: block; }

.canvas-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.item-count-pill {
  background: var(--paper-alt);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.pill-warning {
  background: #fff0f1;
  border-color: #ffd1d6;
  color: #c0293b;
}

/* ---------- Cart ---------- */
.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item img { width: 90px; height: 90px; object-fit: contain; background: var(--paper-alt); border: 1px solid var(--line); border-radius: 8px; }
.cart-summary-row { display: flex; justify-content: space-between; padding: 8px 0; }
.cart-summary-row.total { font-size: 20px; font-weight: 800; border-top: 1px solid var(--line-strong); padding-top: 16px; margin-top: 8px; }

/* ---------- Admin ---------- */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.admin-table th { color: var(--muted-ink); font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: 0.04em; }
.status-pill { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: capitalize; }
.status-pending_payment { background: #fef3e0; color: #b3720a; }
.status-paid { background: #e3f6fb; color: #0e6f8e; }
.status-printing { background: #f2e6ff; color: #8a2be2; }
.status-shipped { background: #e6f9ed; color: #1a8a4c; }
.status-cancelled { background: #fff0f1; color: #c0293b; }

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--muted-ink); }

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  background: var(--paper);
  border: none;
  padding: 18px 20px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: inherit;
}
.faq-question:hover { background: var(--paper-alt); }
.faq-question .chev { transition: transform 0.2s ease; flex-shrink: 0; color: var(--pink); }
.faq-item.open .faq-question .chev { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
  background: var(--paper-alt);
}
.faq-item.open .faq-answer { max-height: 800px; }
.faq-answer-inner { padding: 4px 20px 18px; color: var(--muted-ink); font-size: 15px; line-height: 1.6; }

/* ---------- Homepage ticker strip ---------- */
/* Admin-managed messages (see admin.php's "Homepage Tickers" tab), rendered
   as a continuously scrolling marquee — see dtf_resolve_homepage_tickers(). */
.ticker-strip {
  overflow: hidden;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ticker-track {
  display: inline-flex;
  animation: ticker-scroll 30s linear infinite;
}
.ticker-strip:hover .ticker-track { animation-play-state: paused; }
.ticker-set { display: inline-flex; gap: 48px; padding-right: 48px; }
.ticker-strip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted-ink);
  white-space: nowrap;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker-strip { overflow-x: auto; }
}

/* ---------- Account / order history ---------- */
.order-history-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.order-history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

/* ---------- Product preview modal ---------- */
.preview-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 16, 43, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 24px;
}
.preview-modal-overlay.open { display: flex; }
.preview-modal {
  background: var(--paper);
  border-radius: 20px;
  max-width: 1020px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.preview-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
}
.preview-modal-header h2 { margin: 0; font-size: 22px; }
.preview-modal-close {
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--muted-ink);
  line-height: 1;
}
.preview-modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.preview-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.preview-card .dim-label { font-size: 12px; color: var(--muted-ink); font-weight: 700; margin: 0 0 10px; }
.preview-card canvas {
  background: repeating-conic-gradient(#eceaf1 0% 25%, #f6f5f9 0% 50%) 50% / 14px 14px;
  border-radius: 10px;
  max-width: 100%;
  height: auto;
  margin-bottom: 10px;
  cursor: zoom-in;
  border: 1px solid var(--line);
}
.preview-card h4 { margin: 4px 0 0; font-size: 16px; }
.preview-card .placement-label { font-size: 12px; color: var(--muted-ink); margin: 2px 0 8px; }
.preview-card-actions { display: flex; gap: 8px; }
.preview-card-actions .btn { flex: 1; }
.mockup-color-row { display: flex; gap: 8px; align-items: center; justify-content: center; margin-bottom: 10px; }
.mockup-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  cursor: pointer;
  padding: 0;
}
.mockup-color-swatch.active { border-color: var(--pink); box-shadow: 0 0 0 2px rgba(255, 45, 120, 0.25); }
.preview-empty { text-align: center; padding: 50px 0; color: var(--muted-ink); grid-column: 1 / -1; }

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 400;
  padding: 24px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 100%; max-height: 100%; border-radius: 12px; background: #fff; }
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 34px;
  cursor: pointer;
}

/* ---------- Chat widget ---------- */
.chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  box-shadow: 0 10px 24px rgba(255, 45, 120, 0.35);
  cursor: pointer;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: transform 0.15s ease;
}
.chat-launcher:hover { transform: scale(1.06); }

.chat-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 340px;
  max-width: calc(100vw - 32px);
  height: 460px;
  max-height: calc(100vh - 140px);
  background: var(--paper);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
}
.chat-panel.open { display: flex; }
.chat-header {
  background: var(--gradient-brand);
  color: #fff;
  padding: 14px 16px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-header button {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
}
.chat-msg.bot {
  align-self: flex-start;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  color: var(--ink);
}
.chat-msg.user {
  align-self: flex-end;
  background: var(--gradient-brand);
  color: #fff;
}
.chat-msg.typing { color: var(--muted-ink); font-style: italic; }
.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
}
.chat-input-row input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  font-size: 14px;
  font-family: inherit;
}
.chat-input-row input:focus { outline: none; border-color: var(--pink); }
.chat-input-row button {
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}
.chat-input-row button:disabled { opacity: 0.5; cursor: not-allowed; }
