/**
 * POD Creator – streetwear dark theme (Ciax-inspired)
 * Orange accent, black surfaces, high contrast.
 */

/* Admin bar: keep stage mockup filling canvas; modal above admin UI */
body.admin-bar .pod-creator .pod-stage__product {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain;
}
body.admin-bar .pod-modal {
  z-index: 1000200;
}

.pod-creator {
  --pod-bg: #0a0a0a;
  --pod-surface: #141414;
  --pod-surface-2: #1a1a1a;
  --pod-border: #2a2a2a;
  --pod-border-strong: #3a3a3a;
  --pod-text: #f5f5f5;
  --pod-muted: #9a9a9a;
  --pod-primary: #f97316;
  --pod-primary-hover: #ea580c;
  --pod-primary-soft: rgba(249, 115, 22, 0.14);
  --pod-success: #34d399;
  --pod-danger: #f87171;
  --pod-radius: 14px;
  --pod-radius-sm: 10px;
  --pod-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --pod-shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --pod-font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
  --pod-stage-bg: #1c1c1c;
  --pod-stage-bg-2: #0f0f0f;

  box-sizing: border-box;
  font-family: var(--pod-font);
  color: var(--pod-text);
  line-height: 1.5;
  max-width: 1280px;
  margin: 0 auto 2rem;
  padding: 0.5rem;
  background: transparent;
}

.pod-creator *,
.pod-creator *::before,
.pod-creator *::after {
  box-sizing: border-box;
}

.pod-creator img {
  max-width: 100%;
  height: auto;
  display: block;
}

/*
 * Stage mockup must fill the canvas box so object-fit:contain centers like admin.
 * The rule above (.pod-creator img { height:auto }) would otherwise win and
 * top-align the image, shifting the print area vs backend.
 */
.pod-creator .pod-stage__product {
  max-width: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

/* Must beat `.pod-creator img { height:auto }` so free-stretch works. */
.pod-creator .pod-design__img {
  max-width: none !important;
  max-height: none !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: fill !important;
  object-position: center center;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* Header + steps */
.pod-creator__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1.1rem 1.25rem;
  background: linear-gradient(135deg, #141414 0%, #0d0d0d 60%, #1a1008 100%);
  border: 1px solid var(--pod-border);
  border-radius: var(--pod-radius);
  box-shadow: var(--pod-shadow-sm);
}

.pod-creator__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.pod-creator__logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #fdba74, transparent 50%),
    conic-gradient(from 200deg, #f97316, #7c2d12, #f97316);
  box-shadow: 0 0 0 2px #1a1a1a, 0 0 18px rgba(249, 115, 22, 0.45);
  flex-shrink: 0;
}

.pod-creator__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.pod-creator__subtitle {
  margin: 0.15rem 0 0;
  color: var(--pod-muted);
  font-size: 0.88rem;
}

.pod-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pod-steps__item {
  appearance: none;
  border: 1px solid var(--pod-border);
  background: var(--pod-surface-2);
  color: var(--pod-muted);
  border-radius: 999px;
  padding: 0.4rem 0.75rem 0.4rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: default;
}

.pod-steps__item span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #222;
  color: #bbb;
  font-size: 0.72rem;
}

.pod-steps__item em {
  font-style: normal;
  font-weight: inherit;
  color: inherit;
}

.pod-steps__item.is-active {
  border-color: var(--pod-primary);
  color: #fff;
  background: var(--pod-primary-soft);
}

.pod-steps__item.is-active span {
  background: var(--pod-primary);
  color: #111;
}

.pod-steps__item.is-done span {
  background: #3f3f3f;
  color: var(--pod-success);
}

.pod-creator__empty {
  padding: 2rem;
  text-align: center;
  background: var(--pod-surface);
  border: 1px dashed var(--pod-border-strong);
  border-radius: var(--pod-radius);
  color: var(--pod-muted);
}

/* Layout: sidebar | stage | info  (+ checkout under sidebar on desktop) */
.pod-creator__layout {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr) minmax(200px, 240px);
  grid-template-areas:
    "sidebar stage info"
    "checkout stage info";
  gap: 1rem;
  align-items: start;
}

.pod-creator__sidebar {
  grid-area: sidebar;
}

.pod-creator__stage-wrap {
  grid-area: stage;
}

.pod-creator__info {
  grid-area: info;
}

.pod-creator__checkout {
  grid-area: checkout;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

@media (max-width: 1100px) {
  .pod-creator__layout {
    grid-template-columns: minmax(260px, 320px) 1fr;
    grid-template-areas:
      "sidebar stage"
      "checkout stage"
      "info info";
  }
  .pod-creator__info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
  }
}

/* Mobile DOM order: sidebar → stage → info → checkout (qty + cart last) */
@media (max-width: 800px) {
  .pod-creator__layout {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    grid-template-areas: none;
  }

  .pod-creator__sidebar,
  .pod-creator__stage-wrap,
  .pod-creator__info,
  .pod-creator__checkout {
    grid-area: auto;
    width: 100%;
  }

  .pod-creator__info {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
  }

  .pod-creator__checkout {
    order: 99;
  }

  .pod-creator__checkout .pod-sidebar__footer {
    position: sticky;
    bottom: 0.5rem;
    z-index: 20;
    background: linear-gradient(180deg, transparent 0%, var(--pod-bg) 18%);
    padding-top: 0.75rem;
  }
}

.pod-creator__sidebar,
.pod-creator__info {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.pod-panel {
  background: var(--pod-surface);
  border: 1px solid var(--pod-border);
  border-radius: var(--pod-radius);
  padding: 0.95rem 1rem;
  box-shadow: var(--pod-shadow-sm);
}

.pod-panel__heading {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pod-muted);
}

/* Product picker (selected + change) */
.pod-product-picker {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pod-product-selected__card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem;
  border: 2px solid var(--pod-primary);
  border-radius: var(--pod-radius-sm);
  background: var(--pod-primary-soft);
}

.pod-product-selected__card img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  background: #0c0c0c;
}

.pod-product-selected__meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.pod-product-selected__meta strong {
  font-size: 0.9rem;
  line-height: 1.25;
  word-break: break-word;
}

.pod-product-selected__meta span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pod-primary);
}

/* Product modal grid */
.pod-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.65rem;
}

.pod-product-card {
  appearance: none;
  border: 2px solid var(--pod-border);
  background: var(--pod-surface-2);
  border-radius: var(--pod-radius-sm);
  padding: 0.55rem;
  cursor: pointer;
  text-align: center;
  color: var(--pod-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.pod-product-card img,
.pod-product-card__ph {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background: #0c0c0c;
  margin-bottom: 0.35rem;
}

.pod-product-card__ph {
  display: block;
  background: linear-gradient(145deg, #222, #111);
}

.pod-product-card__name {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}

.pod-product-card__price {
  display: block;
  font-size: 0.72rem;
  color: var(--pod-primary);
  font-weight: 700;
  margin-top: 0.15rem;
}

.pod-product-card:hover {
  border-color: var(--pod-border-strong);
}

.pod-product-card.is-selected {
  border-color: var(--pod-primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
  background: var(--pod-primary-soft);
}

/* Product modal */
body.pod-modal-open {
  overflow: hidden;
}

.pod-modal {
  position: fixed;
  inset: 0;
  z-index: 100010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.pod-modal[hidden] {
  display: none !important;
}

.pod-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
}

.pod-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(86vh, 820px);
  display: flex;
  flex-direction: column;
  background: var(--pod-surface);
  border: 1px solid var(--pod-border-strong);
  border-radius: var(--pod-radius);
  box-shadow: var(--pod-shadow);
  overflow: hidden;
}

.pod-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--pod-border);
  flex-shrink: 0;
}

.pod-modal__header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pod-modal__close {
  appearance: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--pod-border);
  border-radius: 8px;
  background: #121212;
  color: var(--pod-text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.pod-modal__close:hover {
  border-color: var(--pod-primary);
  color: var(--pod-primary);
}

.pod-modal__search {
  padding: 0.75rem 1.1rem 0.35rem;
  flex-shrink: 0;
}

.pod-modal__search-input {
  width: 100%;
  box-sizing: border-box;
  background: #0c0c0c;
  border: 1px solid var(--pod-border-strong);
  border-radius: 10px;
  color: var(--pod-text);
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  font-family: inherit;
}

.pod-modal__search-input:focus {
  outline: none;
  border-color: var(--pod-primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
}

.pod-modal__body {
  padding: 0.75rem 1.1rem 1.1rem;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.pod-modal__empty {
  margin: 1.5rem 0;
  text-align: center;
  color: var(--pod-muted);
  font-size: 0.9rem;
}

/* Design preview lightbox */
.pod-stage-toolbar #pod-preview-btn {
  margin-left: auto;
}

.pod-btn--sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
}

.pod-preview-modal__dialog {
  width: min(960px, 100%);
  max-height: min(92vh, 920px);
}

.pod-preview-modal__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0.75rem 0.5rem;
  min-height: 280px;
  background: #0a0a0a;
}

.pod-preview-modal__main {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.pod-preview-modal__main img {
  display: block;
  max-width: 100%;
  max-height: min(62vh, 640px);
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  background: #111;
  object-fit: contain;
}

.pod-preview-modal__label {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pod-muted);
}

.pod-preview-nav {
  appearance: none;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--pod-border-strong);
  background: #161616;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.pod-preview-nav:hover {
  border-color: var(--pod-primary);
  color: var(--pod-primary);
}

.pod-preview-modal__thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1rem 1.1rem;
  border-top: 1px solid var(--pod-border);
  background: var(--pod-surface);
}

.pod-preview-thumb {
  appearance: none;
  width: 88px;
  padding: 0.35rem;
  border: 2px solid var(--pod-border);
  border-radius: 10px;
  background: #101010;
  color: var(--pod-muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.pod-preview-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 6px;
  background: #0a0a0a;
  margin-bottom: 0.25rem;
}

.pod-preview-thumb.is-active {
  border-color: var(--pod-primary);
  color: #fff;
}

.pod-designed-list__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  padding: 0.35rem 0.25rem;
  border-radius: 8px;
}

.pod-designed-list__item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.pod-designed-list__thumb {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 6px;
  background: #0a0a0a;
  border: 1px solid var(--pod-border);
  flex-shrink: 0;
}

.pod-designed-list__meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.pod-designed-list__meta strong {
  font-size: 0.82rem;
}

.pod-designed-list__meta span {
  font-size: 0.72rem;
  color: var(--pod-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sides */
.pod-side-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pod-side-choice {
  margin: 0;
  cursor: pointer;
}

.pod-side-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pod-side-choice__box {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0.65rem;
  align-items: center;
  padding: 0.45rem;
  border: 2px solid var(--pod-border);
  border-radius: var(--pod-radius-sm);
  background: var(--pod-surface-2);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pod-side-choice__box img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 8px;
  background: #0c0c0c;
}

.pod-side-choice__meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  position: relative;
}

.pod-side-choice__meta strong {
  font-size: 0.85rem;
}

.pod-side-choice__meta em {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--pod-primary);
  font-weight: 700;
}

.pod-side-dot {
  position: absolute;
  right: 0;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pod-success);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

.pod-side-choice input:checked + .pod-side-choice__box {
  border-color: var(--pod-primary);
  background: var(--pod-primary-soft);
}

/* Dropzone */
.pod-dropzone {
  position: relative;
  border: 2px dashed var(--pod-border-strong);
  border-radius: var(--pod-radius-sm);
  background: #101010;
  padding: 1.1rem 0.85rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.pod-dropzone:hover,
.pod-dropzone:focus-visible,
.pod-dropzone.is-dragover {
  border-color: var(--pod-primary);
  background: var(--pod-primary-soft);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.pod-dropzone.has-file {
  border-style: solid;
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.08);
}

.pod-dropzone__icon {
  color: var(--pod-primary);
  margin-bottom: 0.3rem;
  display: flex;
  justify-content: center;
}

.pod-dropzone__text {
  margin: 0 0 0.3rem;
  font-size: 0.88rem;
}

.pod-dropzone__text span {
  color: var(--pod-muted);
  font-size: 0.8rem;
}

.pod-dropzone__hint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--pod-muted);
}

.pod-dropzone__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  font-size: 0;
}

.pod-upload-status {
  margin-top: 0.55rem;
  font-size: 0.8rem;
  color: var(--pod-success);
  font-weight: 600;
  word-break: break-all;
}

.pod-upload-status.is-error {
  color: var(--pod-danger);
}

/* Controls */
.pod-control {
  display: block;
  margin-bottom: 0.85rem;
}

.pod-control__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.pod-control__label span:last-child {
  color: var(--pod-primary);
  font-variant-numeric: tabular-nums;
}

.pod-control__row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.pod-control__row input[type="range"] {
  flex: 1;
  accent-color: var(--pod-primary);
  height: 6px;
  cursor: pointer;
}

.pod-qty {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.pod-qty input[type="number"] {
  width: 72px;
  text-align: center;
  background: #0c0c0c;
  border: 1px solid var(--pod-border-strong);
  border-radius: 8px;
  color: var(--pod-text);
  padding: 0.45rem;
  font-weight: 700;
  font-size: 1rem;
}

.pod-price-box {
  margin-top: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--pod-border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pod-price-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--pod-muted);
}

.pod-price-row strong {
  color: var(--pod-text);
  font-variant-numeric: tabular-nums;
}

.pod-price-row--sub {
  font-size: 0.8rem;
  padding-left: 0.35rem;
}

.pod-price-row--total {
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--pod-border);
  font-size: 1rem;
  color: var(--pod-text);
  font-weight: 700;
}

.pod-price-row--total strong {
  color: var(--pod-primary);
  font-size: 1.1rem;
}

.pod-sidebar__footer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  bottom: 0.5rem;
}

/* Buttons */
.pod-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: var(--pod-surface-2);
  color: var(--pod-text);
  text-decoration: none;
}

.pod-btn:active {
  transform: translateY(1px);
}

.pod-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pod-btn--primary {
  background: var(--pod-primary);
  color: #111;
  border-color: var(--pod-primary);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pod-btn--primary:hover:not(:disabled) {
  background: var(--pod-primary-hover);
  border-color: var(--pod-primary-hover);
  color: #111;
}

.pod-btn--ghost {
  background: transparent;
  border-color: var(--pod-border-strong);
  color: var(--pod-muted);
}

.pod-btn--ghost:hover:not(:disabled) {
  border-color: var(--pod-text);
  color: var(--pod-text);
  background: #1a1a1a;
}

.pod-btn--sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  width: 100%;
  margin-top: 0.45rem;
}

.pod-btn--block {
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
}

.pod-btn--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--pod-border);
  background: #121212;
  font-size: 1.15rem;
  flex-shrink: 0;
  color: var(--pod-text);
}

.pod-btn--icon:hover {
  border-color: var(--pod-primary);
  color: var(--pod-primary);
  background: var(--pod-primary-soft);
}

/* Stage */
.pod-creator__stage-wrap {
  background: var(--pod-surface);
  border: 1px solid var(--pod-border);
  border-radius: var(--pod-radius);
  padding: 1rem;
  box-shadow: var(--pod-shadow);
  min-width: 0;
}

.pod-stage-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.pod-stage-toolbar__label {
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pod-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--pod-muted);
  background: #101010;
  border: 1px solid var(--pod-border);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}

.pod-stage {
  background:
    radial-gradient(ellipse 70% 60% at 50% 42%, #2a2a2a 0%, transparent 70%),
    linear-gradient(160deg, var(--pod-stage-bg) 0%, var(--pod-stage-bg-2) 100%);
  border-radius: var(--pod-radius-sm);
  border: 1px solid #0a0a0a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 1rem;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.pod-stage__canvas {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 1 / 1.15;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
}

.pod-stage__product {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain;
  object-position: center center;
  pointer-events: none;
  z-index: 1;
  user-select: none;
}

.pod-stage__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pod-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
  z-index: 0;
}

.pod-print-area {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /* Dual-tone frame: readable on both light and dark mockups */
  border: 2px dashed #f97316;
  border-radius: 4px;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(249, 115, 22, 0.14),
      rgba(249, 115, 22, 0.14) 5px,
      rgba(15, 15, 15, 0.06) 5px,
      rgba(15, 15, 15, 0.06) 10px
    );
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.72),
    0 0 0 3px rgba(255, 255, 255, 0.72),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    inset 0 0 0 2px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  /* No in-flow children — label is a pseudo-element so it cannot shift the box */
  font-size: 0;
  line-height: 0;
  overflow: visible;
  transition: opacity 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

/* Label drawn outside the box geometry (does not affect left/top/width/height). */
.pod-print-area::before {
  content: attr(data-label);
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 4px;
  font-size: 0.65rem;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff7ed;
  white-space: nowrap;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(249, 115, 22, 0.85);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.55),
    0 1px 3px rgba(0, 0, 0, 0.45);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.pod-stage.is-interacting .pod-print-area {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(249, 115, 22, 0.22),
      rgba(249, 115, 22, 0.22) 5px,
      rgba(15, 15, 15, 0.1) 5px,
      rgba(15, 15, 15, 0.1) 10px
    );
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.8),
    0 0 0 3px rgba(255, 255, 255, 0.85),
    inset 0 0 0 1px rgba(255, 255, 255, 0.65),
    inset 0 0 0 2px rgba(0, 0, 0, 0.35);
}

.pod-design {
  position: absolute;
  z-index: 3;
  transform-origin: center center;
  cursor: grab;
  touch-action: none;
  will-change: left, top, width, height, transform;
}

.pod-design.is-dragging {
  cursor: grabbing;
  z-index: 4;
}

/* Single design image: stretch fills box; print-area opacity via SVG mask in JS. */

/* Custom color select */
.pod-color-select {
  position: relative;
  z-index: 5;
}

.pod-color-select__trigger {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 18px;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.65rem;
  border: 2px solid var(--pod-border);
  border-radius: 10px;
  background: var(--pod-surface-2);
  color: var(--pod-text);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pod-color-select__trigger.has-thumb {
  grid-template-columns: 36px 1fr 18px;
}

.pod-color-select.is-open .pod-color-select__trigger,
.pod-color-select__trigger:hover,
.pod-color-select__trigger:focus-visible {
  border-color: var(--pod-primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
  outline: none;
}

.pod-color-select__thumb {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  overflow: hidden;
  background: #0c0c0c;
  border: 1px solid var(--pod-border);
  flex-shrink: 0;
}

.pod-color-select__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pod-color-select__thumb[hidden] {
  display: none !important;
}

.pod-color-select__label {
  font-size: 0.88rem;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pod-color-select__chevron {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--pod-muted);
  justify-self: end;
  transition: transform 0.15s ease;
}

.pod-color-select.is-open .pod-color-select__chevron {
  transform: rotate(180deg);
  border-top-color: var(--pod-primary);
}

.pod-color-select__dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #121212;
  border: 1px solid var(--pod-border-strong);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  padding: 0.35rem;
  z-index: 30;
}

.pod-color-select__dropdown[hidden] {
  display: none !important;
}

.pod-color-option {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.5rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--pod-text);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.pod-color-option:hover,
.pod-color-option:focus-visible {
  background: var(--pod-primary-soft);
  outline: none;
}

.pod-color-option.is-selected {
  background: rgba(249, 115, 22, 0.2);
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.55);
}

.pod-color-option__img,
.pod-color-option__ph {
  width: 40px;
  height: 40px;
  border-radius: 7px;
  object-fit: contain;
  background: #0c0c0c;
  border: 1px solid var(--pod-border);
  display: block;
}

.pod-color-option__ph {
  background: linear-gradient(145deg, #222, #111);
}

.pod-color-option__name {
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pod-size-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pod-size-btn {
  appearance: none;
  min-width: 44px;
  height: 40px;
  padding: 0 0.65rem;
  border: 2px solid var(--pod-border);
  border-radius: 8px;
  background: var(--pod-surface-2);
  color: var(--pod-text);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pod-size-btn:hover {
  border-color: var(--pod-border-strong);
}

.pod-size-btn.is-selected {
  border-color: var(--pod-primary);
  background: var(--pod-primary-soft);
  color: #fff;
}

.pod-quality {
  margin-top: 0.55rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}

.pod-quality--good {
  background: rgba(52, 211, 153, 0.12);
  color: var(--pod-success);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.pod-quality--fair {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.pod-quality--bad {
  background: rgba(248, 113, 113, 0.12);
  color: var(--pod-danger);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.pod-quality-text--good { color: var(--pod-success); }
.pod-quality-text--fair { color: #fbbf24; }
.pod-quality-text--bad { color: var(--pod-danger); }

.pod-muted {
  margin: 0;
  font-size: 0.8rem;
  color: var(--pod-muted);
}

.pod-design__handles {
  position: absolute;
  inset: -2px;
  border: 1.5px solid var(--pod-primary);
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.pod-design.is-active .pod-design__handles,
.pod-design:hover .pod-design__handles {
  opacity: 1;
  pointer-events: auto;
}

.pod-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #111;
  border: 2px solid var(--pod-primary);
  border-radius: 50%;
  pointer-events: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.pod-handle--nw { top: -6px; left: -6px; cursor: nwse-resize; }
.pod-handle--ne { top: -6px; right: -6px; cursor: nesw-resize; }
.pod-handle--sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.pod-handle--se { bottom: -6px; right: -6px; cursor: nwse-resize; }

.pod-handle--n,
.pod-handle--s {
  left: 50%;
  margin-left: -6px;
  width: 14px;
  height: 10px;
  border-radius: 3px;
}
.pod-handle--n { top: -5px; cursor: ns-resize; }
.pod-handle--s { bottom: -5px; cursor: ns-resize; }

.pod-handle--e,
.pod-handle--w {
  top: 50%;
  margin-top: -6px;
  width: 10px;
  height: 14px;
  border-radius: 3px;
}
.pod-handle--e { right: -5px; cursor: ew-resize; }
.pod-handle--w { left: -5px; cursor: ew-resize; }

.pod-side-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 0.9rem;
}

.pod-side-thumb {
  appearance: none;
  border: 2px solid var(--pod-border);
  background: #101010;
  border-radius: 10px;
  padding: 0.35rem;
  width: 84px;
  cursor: pointer;
  color: var(--pod-muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pod-side-thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 6px;
  background: #0a0a0a;
  margin-bottom: 0.25rem;
}

.pod-side-thumb.is-active {
  border-color: var(--pod-primary);
  color: #fff;
}

.pod-side-thumb.has-design {
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.45);
}

.pod-stage__hint {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: var(--pod-muted);
  text-align: center;
}

/* Info column */
.pod-info-text {
  margin: 0;
  font-size: 0.82rem;
  color: var(--pod-muted);
}

.pod-info-dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pod-info-dl > div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.35rem;
  font-size: 0.8rem;
}

.pod-info-dl dt {
  margin: 0;
  color: var(--pod-muted);
  font-weight: 600;
}

.pod-info-dl dd {
  margin: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.pod-designed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pod-designed-list li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0.55rem;
  background: #101010;
  border: 1px solid var(--pod-border);
  border-radius: 8px;
  font-size: 0.78rem;
}

.pod-designed-list li strong {
  color: var(--pod-primary);
}

.pod-designed-list li span {
  color: var(--pod-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.pod-designed-list__meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
  display: block;
}

.pod-designed-list li.is-empty {
  color: var(--pod-muted);
  border-style: dashed;
}

/* Toast */
.pod-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100001;
  background: #111;
  color: #fff;
  border: 1px solid var(--pod-primary);
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  max-width: min(90vw, 400px);
  text-align: center;
  animation: pod-toast-in 0.25s ease;
}

.pod-toast.is-error {
  border-color: #991b1b;
  background: #450a0a;
}

.pod-toast[hidden] {
  display: none !important;
}

@keyframes pod-toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@media (max-width: 600px) {
  .pod-creator__title {
    font-size: 1.1rem;
  }
  .pod-stage {
    min-height: 320px;
    padding: 0.5rem;
  }
  .pod-handle {
    width: 16px;
    height: 16px;
  }
  .pod-handle--nw { top: -8px; left: -8px; }
  .pod-handle--ne { top: -8px; right: -8px; }
  .pod-handle--sw { bottom: -8px; left: -8px; }
  .pod-handle--se { bottom: -8px; right: -8px; }
  .pod-handle--n,
  .pod-handle--s { margin-left: -8px; width: 18px; height: 12px; }
  .pod-handle--n { top: -6px; }
  .pod-handle--s { bottom: -6px; }
  .pod-handle--e,
  .pod-handle--w { margin-top: -8px; width: 12px; height: 18px; }
  .pod-handle--e { right: -6px; }
  .pod-handle--w { left: -6px; }
}

@media (prefers-reduced-motion: reduce) {
  .pod-creator *,
  .pod-creator *::before,
  .pod-creator *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
