/* ============================================================
   BARCAPRINTSHOP — DESIGN STUDIO  (designer.css)
   ============================================================ */

@font-face {
  font-family: 'GelatoSans';
  src: url('fonts/fonnts.com-gelatosans-regular.otf') format('opentype');
  font-weight: 400; font-style: normal;
}
@font-face {
  font-family: 'GelatoSans';
  src: url('fonts/fonnts.com-gelatosans-medium.otf') format('opentype');
  font-weight: 500; font-style: normal;
}
@font-face {
  font-family: 'GelatoSans';
  src: url('fonts/fonnts.com-gelatosans-semibold.otf') format('opentype');
  font-weight: 600; font-style: normal;
}
@font-face {
  font-family: 'GelatoSans';
  src: url('fonts/fonnts.com-gelatosans-bold.otf') format('opentype');
  font-weight: 700; font-style: normal;
}

/* ── Scoped reset ── */
.dr-studio *, .dr-studio *::before, .dr-studio *::after {
  box-sizing: border-box;
}
.dr-panel *, .dr-panel *::before, .dr-panel *::after {
  box-sizing: border-box;
}

/* ============================================================
   STUDIO WRAPPER
   Centred, max-width 1100px — empty grey on both sides.
   ============================================================ */
.dr-studio {
  display: flex;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  height: calc(100vh - 148px);  /* 48px announce bar + 100px navbar */
  min-height: 620px;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #111;
  background: transparent;
  -webkit-font-smoothing: antialiased;
  gap: 16px;
  padding: 14px 18px 18px;
}

.dr-studio button,
.dr-studio input,
.dr-studio select,
.dr-studio textarea {
  font-family: inherit;
}

/* Background fill for wide screens (sides of the 1100px box) */
body {
  background: #e8e8e8;
}

/* ============================================================
   LEFT SIDEBAR (64 px)
   ============================================================ */
.dr-sidebar {
  width: clamp(260px, 23vw, 340px);
  flex-shrink: 0;
  background: #f4f4f4;
  border: 1px solid #dbdbdb;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 14px;
  gap: 12px;
  z-index: 20;
}

.dr-side-title {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #161616;
}

.dr-tabs { display: none; }

.dr-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 15px 0;
  width: 100%;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  color: #aaa;
  font-family: inherit;
  font-size: 0.66rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.dr-tab svg { width: 23px; height: 23px; flex-shrink: 0; }
.dr-tab:hover  { color: #333; background: #f7f7f7; }
.dr-tab.active { color: #111; border-left-color: #111; background: #f5f5f5; }

.dr-sidebar-sep { display: none; }

.dr-undoredo { display: flex; flex-direction: column; width: 100%; }

.dr-undoredo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.dr-undoredo-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  width: 100%;
  background: #ffffff;
  border: 1px solid #dedede;
  border-radius: 10px;
  color: #707070;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.dr-undoredo-btn svg { width: 20px; height: 20px; }
.dr-undoredo-btn:not(:disabled):hover { color: #111; border-color: #c9c9c9; }
.dr-undoredo-btn:disabled { opacity: 0.28; cursor: default; }

.dr-side-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.dr-side-tool-btn {
  width: 100%;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: #ffffff;
  color: #1f1f1f;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
}

.dr-side-tool-btn:hover {
  background: #f9f9f9;
  border-color: #c8c8c8;
}

/* ============================================================
   MAIN CANVAS AREA  (relative so floating panel anchors to it)
   ============================================================ */
.dr-main {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-rows: 1fr auto;
  gap: 12px;
  background: transparent;
  position: relative;
  overflow: hidden;
}

/* ── Top action bar ── */
.dr-topbar {
  display: none;
}

.dr-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 12px;
  background: #fff;
  border: 1px solid #e6e6e6;
  color: #555;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: 9px;
  cursor: pointer;
  box-shadow: 0 1px 5px rgba(0,0,0,0.09);
  pointer-events: all;
  transition: background 0.14s, color 0.14s, box-shadow 0.14s;
}
.dr-action-btn svg { width: 17px; height: 17px; }
.dr-action-btn:hover { background: #f5f5f5; color: #111; box-shadow: 0 2px 9px rgba(0,0,0,0.13); }

/* ── Product picker overlay ── */
.dr-product-picker {
  position: static;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  z-index: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.dr-product-picker.hidden {
  display: grid;
}

.dr-product-option {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid #d7d7d7;
  border-radius: 10px;
  background: #fff;
  padding: 9px;
  cursor: pointer;
  transition: border-color 0.14s, box-shadow 0.14s, background 0.14s;
}

.dr-product-option:hover {
  border-color: #cfcfcf;
  background: #fcfcfc;
}

.dr-product-option.active {
  border-color: #111;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.16);
}

.dr-product-option img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  background: #f3f3f3;
  flex-shrink: 0;
}

.dr-product-option span {
  font-size: 0.74rem;
  font-weight: 600;
  color: #2a2a2a;
  line-height: 1.2;
  text-align: left;
}

/* ── Canvas wrap — grey background, large padding on right so panel doesn't obscure shirt ── */
.dr-canvas-wrap {
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 20px;
  background: radial-gradient(circle at 50% 25%, #ededed 0%, #e3e3e3 48%, #dcdcdc 100%);
  border: 1px solid #d4d4d4;
  border-radius: 14px;
  overflow: hidden;
}

.dr-canvas {
  position: relative;
  display: inline-block;
  line-height: 0;
}

/* ── Shirt image: bigger, no white card ── */
.dr-shirt-img {
  display: block;
  height: 580px;
  width: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ── Print zone ── dashed blue overlay */
.dr-print-zone {
  position: absolute;
  top:    19%;
  left:   28%;
  width:  45%;
  height: 56%;
  background: transparent;
  overflow: visible;
  transition: top 0.18s, left 0.18s, width 0.18s, height 0.18s;
}

.dr-print-zone.zone-round {
  border-radius: 50%;
}

/* Back print area — higher & slightly narrower (matches back-shirt anatomy) */
.dr-print-zone.back-view {
  top:    11%;
  left:   27%;
  width:  46%;
  height: 56%;
}

/* ── View selector ── */
.dr-views {
  grid-column: 1;
  grid-row: 2;
  height: auto;
  flex-shrink: 0;
  background: transparent;
  border-top: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  gap: 10px;
}

.dr-view-btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  background: #f2f2f2;
  border: 1px solid #dbdbdb;
  color: #666;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.14s;
}
.dr-view-btn.active { color: #fff; background: #111; border-color: #111; }

.dr-view-thumb { display: none; }
.dr-view-empty { background: #eee; }

/* ============================================================
   IMAGE ELEMENT IN PRINT ZONE (mirrors text-el selection)
   ============================================================ */
.dr-img-el { border: none !important; }
.dr-img-el.selected { z-index: 40; }
.dr-img-el.is-dragging          { cursor: grabbing !important; }

/* ============================================================
   TEXT ELEMENT IN PRINT ZONE
   ============================================================ */
.dr-text-el {
  position: absolute;
  cursor: grab;
  user-select: none;
  display: inline-block;
  /* border reserves space so selection outline never shifts layout */
  border: 2px solid transparent;
  border-radius: 2px;
  padding: 0;
  line-height: 0;   /* let SVG/span determine height */
}

.dr-text-el svg { display: block; }

.dr-text-el:hover:not(.selected) { border-color: rgba(59,130,246,0.35); }
.dr-text-el.selected { border-color: #3b82f6; z-index: 40; }
.dr-text-el.is-dragging { cursor: grabbing; }

/* ── Floating action bar (duplicate + delete) above selected element ── */
.dr-el-bar {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 7px;
  padding: 3px 4px;
  gap: 1px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.14);
  z-index: 200;
  white-space: nowrap;
}
.dr-text-el.selected .dr-el-bar,
.dr-img-el.selected .dr-el-bar { display: flex; }

.dr-el-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 5px;
  color: #555;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.dr-el-btn:hover               { background: #f0f0f0; }
.dr-el-btn.dr-btn-delete:hover { background: #fee2e2; color: #dc2626; }

.dr-btn-edit-label {
  display: none;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

/* ── Corner handles ── */
.dr-handle {
  display: none;
  position: absolute;
  width: 10px;
  height: 10px;
  background: #3b82f6;
  border: 2px solid #fff;
  border-radius: 50%;
  z-index: 60;
  box-shadow: 0 0 0 1px rgba(59,130,246,0.5);
}
.dr-text-el.selected .dr-handle,
.dr-img-el.selected .dr-handle { display: block; }
.dr-h-tl { top: -6px;    left: -6px;   cursor: nw-resize; }
.dr-h-tr { top: -6px;    right: -6px;  cursor: ne-resize; }
.dr-h-bl { bottom: -6px; left: -6px;   cursor: sw-resize; }
.dr-h-br { bottom: -6px; right: -6px;  cursor: se-resize; }

/* ── Rotate handle below element ── */
.dr-rotate-wrap {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column;
  align-items: center;
  z-index: 60;
}
.dr-text-el.selected .dr-rotate-wrap { display: flex; }
.dr-rotate-line { width: 1px; height: 7px; background: #3b82f6; }
.dr-rotate-btn {
  width: 20px;
  height: 20px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  box-shadow: 0 1px 4px rgba(0,0,0,0.13);
  color: #666;
}
.dr-rotate-btn:hover { border-color: #3b82f6; color: #3b82f6; }

/* ============================================================
   FLOATING PANEL  — bottom-right card
   ============================================================ */
.dr-panel {
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
  width: 100%;
  max-height: none;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 28px rgba(0,0,0,0.17);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
}

.dr-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 0;
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}
.dr-panel-body::-webkit-scrollbar       { width: 4px; }
.dr-panel-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.dr-panel-body.hidden                   { display: none; }

/* ── Product info ── */
.dr-product-title  { font-size: 1.1rem; font-weight: 700; margin-bottom: 5px; }
.dr-eco-badge      { display: inline-flex; margin-bottom: 6px; }

.dr-delivery {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.77rem; color: #333; margin-bottom: 5px;
}
.dr-link { color: #1a73e8; font-weight: 500; text-decoration: none; }
.dr-link:hover { text-decoration: underline; }

.dr-rating { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.dr-stars  { color: #f9ab00; font-size: 0.84rem; letter-spacing: -1px; }
.dr-half-star { display: inline-block; width: 0.5em; overflow: hidden; vertical-align: top; }
.dr-rating-count { font-size: 0.74rem; color: #777; }

.dr-product-link {
  display: block; font-size: 0.77rem; color: #1a7a4a;
  font-weight: 600; margin-bottom: 10px; text-decoration: none;
}
.dr-product-link:hover { text-decoration: underline; }

.dr-print-method-row {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.77rem; color: #444; margin-bottom: 9px;
}
.dr-label-muted { color: #777; }
.dr-method-badge {
  background: #3b82f6; color: #fff;
  font-size: 0.68rem; font-weight: 600;
  padding: 2px 7px; border-radius: 3px;
}
.dr-color-label { font-size: 0.77rem; color: #444; margin-bottom: 8px; }

.dr-color-grid { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }

.dr-swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--sw);
  border: 2px solid transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  outline: 2.5px solid transparent;
  outline-offset: 2px;
  transition: transform 0.14s, outline-color 0.14s;
}
.dr-swatch:hover { transform: scale(1.12); }
.dr-swatch.selected { outline-color: #3b82f6; }
.dr-swatch[data-color="white"] { border-color: #ccc; }
.dr-swatch-check { display: none; }
.dr-swatch.selected .dr-swatch-check { display: block; }

.dr-arrange-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 12px 0;
  background: none; border: none; border-top: 1px solid #eee;
  font-family: inherit; font-size: 0.79rem; font-weight: 500;
  color: #333; cursor: pointer; transition: color 0.14s;
}
.dr-arrange-btn:hover { color: #111; }

/* ── Text editing panel ── */
.dr-text-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.85rem;
  color: #111;
  margin-bottom: 9px;
  outline: none;
  transition: border-color 0.15s;
}
.dr-text-input:focus { border-color: #3b82f6; }

.dr-text-toolbar {
  display: flex;
  align-items: center;
  gap: 1px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 3px 5px;
  margin-bottom: 9px;
}

.dr-tb-color-group {
  display: flex; flex-direction: column; align-items: center; gap: 2px; margin-right: 1px;
}
.dr-tb-color-label { position: relative; display: block; cursor: pointer; }
.dr-color-dot {
  width: 20px; height: 20px;
  border-radius: 50%; border: 1.5px solid #aaa; pointer-events: none;
}
.dr-tb-color-label input[type="color"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; border: none; padding: 0;
}
.dr-color-name { font-size: 0.56rem; color: #888; pointer-events: none; }

.dr-tb-sep { width: 1px; height: 18px; background: #e0e0e0; margin: 0 3px; flex-shrink: 0; }

.dr-tb-btn {
  width: 25px; height: 25px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: 4px;
  color: #555; font-size: 0.86rem; font-family: inherit;
  cursor: pointer; flex-shrink: 0;
  transition: background 0.12s;
}
.dr-tb-btn:hover  { background: #f2f2f2; }
.dr-tb-btn.active { background: #e8e8e8; color: #111; }

/* Font picker */
.dr-font-row {
  position: relative;
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin-bottom: 9px;
  cursor: pointer;
}
.dr-font-trigger {
  flex: 1; background: none; border: none;
  font-size: 0.88rem; font-weight: 700; font-style: italic;
  color: #111; cursor: pointer; text-align: left;
  font-family: inherit; padding: 0; outline: none;
}
.dr-font-chevron { flex-shrink: 0; pointer-events: none; }

.dr-font-list {
  position: absolute;
  top: calc(100% + 2px); left: 0; right: 0;
  background: #fff;
  border: 1px solid #ddd; border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
  max-height: 220px; overflow-y: auto;
  z-index: 400; padding: 4px 0; margin: 0; list-style: none;
  scrollbar-width: thin;
}
.dr-font-list.hidden { display: none; }
.dr-font-list::-webkit-scrollbar { width: 4px; }
.dr-font-list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.dr-font-list li {
  padding: 8px 12px;
  font-size: 1rem;
  color: #222;
  cursor: pointer;
  transition: background 0.11s;
  line-height: 1.2;
}
.dr-font-list li:hover    { background: #f5f5f5; }
.dr-font-list li.selected { background: #eff6ff; color: #3b82f6; }

/* Size row */
.dr-size-row,
.dr-bend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.78rem;
  color: #444;
}
.dr-row-label { flex: 1; font-weight: 500; color: #555; }

.dr-size-ctrl { display: flex; align-items: center; gap: 3px; }

.dr-size-btn {
  width: 24px; height: 24px;
  border: 1px solid #d4d4d4; background: none; border-radius: 50%;
  font-size: 1rem; line-height: 1; color: #333;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-family: inherit;
  transition: background 0.12s;
}
.dr-size-btn:hover { background: #f5f5f5; }

.dr-size-val {
  width: 40px; text-align: center;
  border: 1px solid #d4d4d4; border-radius: 5px;
  padding: 3px 2px; font-size: 0.79rem;
  font-family: inherit; color: #111; outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}
.dr-size-val::-webkit-outer-spin-button,
.dr-size-val::-webkit-inner-spin-button { -webkit-appearance: none; }

.dr-bend-num {
  width: 36px; text-align: center;
  border: 1px solid #d4d4d4; border-radius: 5px;
  padding: 3px 2px; font-size: 0.79rem;
  font-family: inherit; color: #111; outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}
.dr-bend-num::-webkit-outer-spin-button,
.dr-bend-num::-webkit-inner-spin-button { -webkit-appearance: none; }

.dr-bend-slider {
  display: block;
  width: 100%;
  margin-bottom: 9px;
  height: 4px;
  accent-color: #3b82f6;
  cursor: pointer;
}

/* Action grid */
.dr-text-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 9px 0 14px;
  border-top: 1px solid #eee;
  margin-top: 4px;
}
.dr-ta-btn {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  padding: 8px 4px;
  background: none; border: 1px solid #eee; border-radius: 8px;
  font-family: inherit; font-size: 0.62rem; color: #666;
  font-weight: 500; cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.dr-ta-btn:hover                  { background: #f8f8f8; color: #111; border-color: #ddd; }
.dr-ta-btn.dr-ta-delete:hover     { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

/* CTA pinned at panel bottom */
.dr-cta-wrap {
  flex-shrink: 0;
  padding: 10px 14px;
  border-top: 1px solid #eee;
  background: #fff;
}
.dr-cta-btn {
  width: 100%; padding: 13px;
  background: #009688; color: #fff;
  font-family: inherit; font-size: 0.88rem; font-weight: 700;
  border: none; border-radius: 5px; cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.18s, transform 0.1s;
}
.dr-cta-btn:hover  { background: #00796b; }
.dr-cta-btn:active { transform: scale(0.99); }

/* ============================================================
   MOBILE UI — hide on desktop
   ============================================================ */
@media (min-width: 769px) {
  .mob-fs-btn,
  .mob-corner-actions,
  .mob-bottom-bar,
  .mob-sheet,
  .mob-backdrop { display: none !important; }
}

/* ============================================================
   MOBILE LAYOUT  (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {

  .dr-el-btn.dr-btn-edit {
    width: auto;
    min-width: 58px;
    padding: 0 8px;
    gap: 5px;
  }

  .dr-el-btn.dr-btn-edit .dr-btn-edit-label {
    display: inline;
  }

  /* ── Body becomes flex column, footer hidden ── */
  body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    min-height: 100vh;
  }
  footer.footer { display: none !important; }
  /* .announce-bar  { display: none !important; }  Removed: show announce bar on mobile */

  /* ── Studio fills remaining height ── */
  .dr-studio {
    flex: 1 1 auto;
    width: 100vw;
    max-width: none;
    margin: 0;
    gap: 0;
    height: calc(100dvh - 124px);
    min-height: 0;
    overflow: hidden;
    padding: 0 0 64px 0;   /* reserve space for fixed bottom bar */
  }

  /* ── Hide desktop-only panels ── */
  .dr-sidebar,
  .dr-topbar,
  .dr-views,
  .dr-panel,
  .dr-product-picker { display: none !important; }

  /* ── Canvas area ── */
  .dr-main {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: hidden;
    position: relative;
  }
  .dr-canvas-wrap {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    padding: 4px 0 0;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
    transition: none;
    transform: none;
    transform-origin: center center;
  }
  .dr-canvas-wrap[data-product="cup"] {
    justify-content: center;
  }
  .dr-canvas {
    transform: translateY(40px);
  }

  .mob-corner-actions {
    position: fixed;
    top: 110px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 170;
  }

  .mob-corner-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #d8d8d8;
    border-radius: 999px;
    background: rgba(255,255,255,0.95);
    color: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 7px rgba(0,0,0,0.12);
    pointer-events: auto;
    cursor: pointer;
    padding: 0;
  }

  .mob-corner-btn:disabled {
    opacity: 0.35;
    cursor: default;
    box-shadow: none;
  }
  /* Zoom effect when element is selected on mobile */
  .dr-canvas-wrap.mob-zoomed {
    transform: none;
  }
  /* Shirt fills canvas */
  .dr-shirt-img {
    height: auto;
    max-height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
  }

  /* ── Fullscreen button ── */
  .mob-fs-btn {
    position: fixed;
    top: 68px;
    right: 10px;
    z-index: 150;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.92);
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    color: #444;
    padding: 0;
    backdrop-filter: blur(4px);
    transition: background 0.14s;
  }
  .mob-fs-btn:hover { background: #fff; }

  /* ── Bottom bar ── */
  .mob-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    font-family: 'GelatoSans', 'Helvetica Neue', Arial, sans-serif;
  }

  .mob-bar-main {
    display: flex;
    height: 68px;
    align-items: stretch;
  }

  .mob-bar-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    border-right: 1px solid #f0f0f0;
    color: #555;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 4px;
    transition: color 0.14s, background 0.14s;
    min-height: 48px;
    min-width: 48px;
  }
  .mob-bar-btn:last-of-type { border-right: none; }
  .mob-bar-btn:hover { background: #f8f8f8; color: #111; }

  .mob-bar-cta {
    flex: 1.3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #009688;
    color: #fff;
    border: none;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    min-height: 48px;
    min-width: 48px;
  }
  .mob-bar-cta:hover { background: #00796b; }

  /* ── Sub-tray (Text / Upload) ── */
  .mob-sub-tray {
    position: relative;
    z-index: 320;
    display: flex;
    border-bottom: 1px solid #eee;
    background: #fff;
    overflow: hidden;
    max-height: 72px;
    transition: max-height 0.25s ease, opacity 0.2s;
    opacity: 1;
  }
  .mob-sub-tray.mob-hidden {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
  }
  .mob-sub-btn {
    position: relative;
    z-index: 321;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    background: none;
    border: none;
    border-right: 1px solid #f0f0f0;
    color: #555;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.14s;
    min-height: 48px;
    min-width: 48px;
  }
  .mob-sub-btn:last-of-type { border-right: none; }
  .mob-sub-btn:hover { color: #111; }

  /* ── Generic mob-hidden helper ── */
  .mob-hidden { display: none !important; }

  /* ── Shared sheet base ── */
  .mob-sheet {
    position: fixed;
    bottom: 72px;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
    z-index: 290;
    font-family: 'GelatoSans', 'Helvetica Neue', Arial, sans-serif;
    height: 45vh;
    max-height: 45dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 20px));
    transition: transform 0.25s ease, opacity 0.2s ease, visibility 0s linear 0.25s;
    padding-bottom: 0;
  }
  .mob-sheet.mob-sheet-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: transform 0.25s ease, opacity 0.2s ease;
  }

  .mob-view-float {
    position: fixed;
    left: 50%;
    bottom: 80px;
    transform: translateX(-50%);
    z-index: 275;
    pointer-events: none;
  }

  .mob-view-float .mob-view-toggle {
    display: flex;
    border: 1.5px solid #e0e0e0;
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    pointer-events: auto;
  }

  .mob-sheet-handle {
    width: 36px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 10px auto 0;
  }

  .mob-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 10px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
  }
  .mob-sheet-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #111;
  }
  .mob-sheet-done {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.82rem;
    color: #555;
    cursor: pointer;
    transition: color 0.14s;
  }
  .mob-sheet-done:hover { color: #111; }

  /* ── Edit sheet (higher z-index, always on top) ── */
  .mob-edit-sheet {
    z-index: 310;
    height: 50dvh;
    max-height: 50dvh;
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  }

  .mob-edit-sheet * {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  }

  .mob-actions-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    flex-shrink: 0;
    padding: 10px 12px 8px;
    gap: 8px;
    border-bottom: 1px solid #eee;
  }

  .mob-action-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 68px;
    min-height: 54px;
    padding: 10px 9px;
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.7rem;
    color: #444;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
  }
  .mob-action-pill:hover { background: #f0f0f0; color: #111; }
  .mob-delete-pill:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

  .mob-settings-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    flex-shrink: 0;
    padding: 8px 12px 6px;
    gap: 8px;
  }

  .mob-setting-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 0;
    width: 100%;
    font-family: inherit;
    font-size: 0.74rem;
    color: #444;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
  }

  .mob-setting-icon-wrap {
    width: 60px;
    height: 52px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #333;
    transition: border-color 0.14s, background 0.14s;
    position: relative;
  }
  .mob-setting-pill:hover .mob-setting-icon-wrap {
    border-color: #3b82f6;
    background: #eff6ff;
  }

  .mob-color-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,0.15);
    flex-shrink: 0;
  }

  .mob-sz-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ccc;
    background: none;
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    font-family: inherit;
    transition: border-color 0.12s;
  }
  .mob-sz-btn:hover { border-color: #3b82f6; }
  #mob-sz-val {
    font-size: 0.94rem;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
  }

  /* Text input row */
  .mob-text-input-row {
    display: flex;
    align-items: center;
    padding: 10px 12px 10px;
    gap: 8px;
    border-top: 1px solid #eee;
  }
  .mob-text-input {
    flex: 1;
    padding: 12px 14px;
    border: 1.5px solid #d4d4d4;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.15s;
  }
  .mob-text-input:focus { border-color: #3b82f6; }
  .mob-text-close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.12s;
  }
  .mob-text-close:hover { background: #f0f0f0; color: #111; }

  /* Font overlay modal */
  .mob-font-list-wrap {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 360;
    padding: 18px;
  }

  .mob-font-modal-card {
    width: min(92vw, 360px);
    max-height: min(62vh, 420px);
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .mob-font-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
  }

  .mob-font-modal-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #111;
  }

  .mob-font-ul {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    overflow-y: auto;
    scrollbar-width: thin;
  }
  .mob-font-ul li {
    padding: 12px 16px;
    font-size: 1.05rem;
    color: #222;
    cursor: pointer;
    transition: background 0.1s;
    line-height: 1.2;
  }
  .mob-font-ul li:hover { background: #f5f5f5; }
  .mob-font-ul li.mob-selected { background: #eff6ff; color: #3b82f6; }

  /* ── Size sheet ── */
  .mob-size-sheet {
    max-height: 45dvh;
    display: flex;
    flex-direction: column;
  }
  .mob-size-grid {
    overflow-y: auto;
    flex: 1;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    scrollbar-width: thin;
  }
  .mob-size-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
  }
  .mob-size-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111;
    width: 52px;
  }
  .mob-size-qty {
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .mob-qty-btn {
    width: 34px;
    height: 34px;
    border: 1.5px solid #ccc;
    border-radius: 50%;
    background: #fff;
    font-size: 1.1rem;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    transition: border-color 0.13s, background 0.13s;
  }
  .mob-qty-btn:hover { border-color: #009688; background: #f0fdfa; }
  .mob-qty-val {
    font-size: 1rem;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
  }

  .mob-size-summary {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 16px;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
    color: #444;
  }
  .mob-price-info { color: #777; font-size: 0.75rem; }

  .mob-size-footer {
    display: flex;
    gap: 10px;
    padding: 10px 16px 12px;
    border-top: 1px solid #eee;
  }
  .mob-size-table-btn {
    flex: 1;
    padding: 11px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: background 0.13s;
  }
  .mob-size-table-btn:hover { background: #f0f0f0; }
  .mob-cart-btn {
    flex: 1.6;
    padding: 11px;
    background: #009688;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: background 0.15s;
  }
  .mob-cart-btn:hover { background: #00796b; }

  /* ── Product sheet ── */
  .mob-product-body {
    padding: 16px 16px 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
    flex: 1;
  }
  .mob-product-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .mob-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .mob-product-card {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid #e2e2e2;
    border-radius: 10px;
    background: #fff;
    padding: 8px;
    cursor: pointer;
    transition: border-color 0.14s, background 0.14s;
  }
  .mob-product-card.active {
    border-color: #111;
    background: #f6f6f6;
  }
  .mob-product-card img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 6px;
    background: #f3f3f3;
    flex-shrink: 0;
  }
  .mob-product-card span {
    font-size: 0.72rem;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
    text-align: left;
  }
  .mob-label {
    font-size: 0.82rem;
    color: #555;
    font-weight: 500;
  }
  .mob-view-toggle {
    display: flex;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
  }
  .mob-view-btn {
    padding: 11px 30px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: background 0.14s, color 0.14s;
    min-height: 46px;
    min-width: 46px;
  }
  .mob-view-btn:first-child { border-right: 1.5px solid #e0e0e0; }
  .mob-view-btn.active { background: #111; color: #fff; }
  .mob-swatch-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  /* ── Backdrop ── */
  .mob-backdrop {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 280;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
  }
  .mob-backdrop.mob-backdrop-on {
    opacity: 0;
    pointer-events: none;
  }

  /* ── Bend row ── */
  .mob-bend-row {
    display: flex;
    align-items: center;
    padding: 10px 12px 10px;
    gap: 8px;
    border-top: 1px solid #eee;
  }
  .mob-bend-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #444;
    flex-shrink: 0;
    width: 34px;
  }
  .mob-bend-slider {
    flex: 1;
    height: 4px;
    accent-color: #3b82f6;
    cursor: pointer;
  }
  #mob-bend-val-display {
    font-size: 0.9rem;
    font-weight: 700;
    color: #111;
    min-width: 28px;
    text-align: center;
  }

  .mob-transforming .dr-el-bar { display: none !important; }

  .mob-img-controls {
    border-top: 1px solid #eee;
    padding: 10px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mob-img-row {
    display: flex;
    flex-direction: column;
    gap: 7px;
  }

  .mob-img-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #444;
  }

  .mob-chip-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .mob-chip {
    border: 1.5px solid #d9d9d9;
    background: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.78rem;
    color: #444;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.14s, background 0.14s, color 0.14s;
  }

  .mob-chip.active {
    border-color: #111;
    background: #111;
    color: #fff;
  }

  .mob-opacity-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mob-opacity-slider {
    flex: 1;
    height: 4px;
    accent-color: #3b82f6;
  }

  .mob-opacity-val {
    min-width: 44px;
    text-align: right;
    font-size: 0.78rem;
    font-weight: 700;
    color: #222;
  }
}

/* ============================================================
   REVIEWS SECTION  (desktop designer page — hidden on mobile)
   ============================================================ */
.reviews-section {
  background: #fff;
  padding: 48px 0 56px;
  font-family: Arial, 'Helvetica Neue', 'Segoe UI', sans-serif;
  font-variant-ligatures: none;
  font-feature-settings: 'liga' 0, 'clig' 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  font-size: 14px;
  color: #111;
}
@media (max-width: 768px) {
  .reviews-section { display: none !important; }
}

.reviews-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

.reviews-heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: #111;
}

/* ── Overview row (stars + bars) ── */
.reviews-overview {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 8px;
}

.reviews-score-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 140px;
}

.reviews-big-stars {
  display: flex;
  gap: 2px;
  font-size: 1.5rem;
  line-height: 1;
}
.rvw-star.filled { color: #f0a500; }
.rvw-star.half   { color: #f0a500; position: relative; }

.reviews-count {
  font-size: 0.85rem;
  color: #555;
}

.reviews-bars-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 4px;
}

.rvw-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: #333;
}
.rvw-bar-label { width: 54px; flex-shrink: 0; }
.rvw-bar-track {
  flex: 1;
  height: 12px;
  background: #e5e5e5;
  border-radius: 2px;
  overflow: hidden;
}
.rvw-bar-fill {
  height: 100%;
  background: #111;
  border-radius: 2px;
}
.rvw-bar-num { width: 36px; text-align: right; flex-shrink: 0; color: #555; }

/* ── How reviews link ── */
.reviews-howlink {
  display: inline-block;
  margin: 12px 0 26px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #009688;
  text-decoration: none;
}
.reviews-howlink:hover { text-decoration: underline; }

/* ── Review grid ── */
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.rvw-card {
  padding: 18px 0;
  border-bottom: 1px solid #e8e8e8;
}
.rvw-card:nth-child(odd) {
  padding-right: 32px;
  border-right: 1px solid #e8e8e8;
}
.rvw-card:nth-child(even) {
  padding-left: 32px;
}

.rvw-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.rvw-stars5 {
  color: #f0a500;
  font-size: 0.9rem;
  letter-spacing: 1px;
}
.rvw-stars4 {
  color: #f0a500;
  font-size: 0.9rem;
  letter-spacing: 1px;
}
.rvw-star-empty {
  color: #ddd;
  font-size: 0.9rem;
}
.rvw-date {
  font-size: 0.78rem;
  color: #777;
}
.rvw-card p {
  font-size: 0.88rem;
  color: #222;
  line-height: 1.5;
  margin: 0;
}
