/* =========================================================
   Printerade live customizer
   ========================================================= */

.customizer-page {
  --studio-ink: #19160f;
  --studio-gold: #d4af37;
  --studio-purple: #7052c8;
  --studio-line: rgba(33, 27, 19, 0.12);
  --studio-muted: #716a5b;
  background: #f7f2e9;
}

.customizer-page [hidden] {
  display: none !important;
}

.customizer-page button,
.customizer-page input,
.customizer-page select {
  font-family: inherit;
}

.customizer-page input,
.customizer-page select {
  color: var(--ink);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.customizer-site-header .header-inner {
  max-width: 1380px;
}

.customizer-nav a[aria-current="page"] {
  color: var(--gold-deep);
}

.customizer-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-home-link {
  display: none;
  padding: 10px 16px;
  font-size: 0.88rem;
}

.header-shop-link {
  padding: 11px 18px;
  font-size: 0.9rem;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--studio-line);
  border-radius: 50%;
  background: var(--white);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Hero ---------- */

.customizer-hero {
  position: relative;
  overflow: hidden;
  padding: 68px 20px 58px;
  color: var(--cream);
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 133, 220, 0.26), transparent 24rem),
    radial-gradient(circle at 15% 100%, rgba(139, 92, 246, 0.28), transparent 26rem),
    linear-gradient(135deg, #17130d 0%, #292116 72%, #342614 100%);
}

.customizer-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255,255,255,.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to right, transparent, #000 40%, #000);
}

.customizer-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(420px, 0.8fr);
  gap: 70px;
  align-items: center;
}

.customizer-hero .eyebrow {
  color: var(--gold-light);
}

.customizer-hero h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.5rem, 2rem + 2.4vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.customizer-hero-copy > p:last-child {
  max-width: 680px;
  color: rgba(250, 247, 242, 0.72);
  font-size: 1.08rem;
}

.customizer-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.customizer-steps::before {
  content: "";
  position: absolute;
  left: 21%;
  right: 21%;
  top: 38px;
  height: 1px;
  background: rgba(212, 175, 55, 0.45);
}

.customizer-steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.customizer-steps li > span {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--gold);
  font-weight: 900;
}

.customizer-steps strong {
  font-size: 0.92rem;
}

.customizer-steps small {
  margin-top: 3px;
  color: rgba(250, 247, 242, 0.58);
  font-size: 0.72rem;
}

/* ---------- Studio heading ---------- */

.customizer-studio {
  max-width: 1380px;
  margin: 0 auto;
  padding: 68px 28px 100px;
}

.studio-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
}

.studio-heading .eyebrow {
  margin-bottom: 8px;
}

.studio-heading h2 {
  font-size: clamp(2rem, 1.7rem + 1.2vw, 3rem);
}

.product-switch {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--studio-line);
  border-radius: 18px;
  background: rgba(255,255,255,.64);
  box-shadow: 0 12px 34px -26px rgba(33,27,19,.45);
}

.product-switch-btn {
  min-width: 198px;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border: 0;
  border-radius: 13px;
  color: var(--studio-muted);
  background: transparent;
  text-align: left;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.product-switch-btn.is-active {
  color: var(--cream);
  background: var(--ink);
  box-shadow: 0 8px 20px -12px rgba(33,27,19,.65);
}

.product-switch-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--ink);
  background: var(--gold);
  font-size: 1.1rem;
}

.product-switch-btn > span:last-child {
  display: flex;
  flex-direction: column;
}

.product-switch-btn strong {
  font-size: 0.9rem;
}

.product-switch-btn small {
  margin-top: 2px;
  color: inherit;
  opacity: 0.7;
  font-size: 0.72rem;
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(430px, 0.87fr);
  gap: 30px;
  align-items: start;
}

.preview-column {
  position: sticky;
  top: 92px;
}

.preview-card {
  overflow: hidden;
  border: 1px solid rgba(33, 27, 19, 0.08);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 28px 80px -42px rgba(33,27,19,.44);
}

.preview-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 16px;
}

.preview-card-top h3 {
  margin-top: 2px;
  font-size: 1.25rem;
}

.preview-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--studio-muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #43a86a;
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid #43a86a;
  border-radius: 50%;
  animation: live-pulse 2s ease-out infinite;
}

@keyframes live-pulse {
  0%, 40% { opacity: .65; transform: scale(.6); }
  80%, 100% { opacity: 0; transform: scale(1.5); }
}

.icon-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--studio-line);
  border-radius: 999px;
  color: var(--studio-muted);
  background: #fff;
  font-weight: 700;
  font-size: 0.82rem;
}

.view-tabs {
  display: flex;
  gap: 6px;
  padding: 0 24px 18px;
}

.view-tabs button {
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid var(--studio-line);
  border-radius: 999px;
  color: var(--studio-muted);
  background: #fff;
  font-weight: 800;
  font-size: 0.78rem;
}

.view-tabs button[aria-selected="true"] {
  border-color: var(--ink);
  color: var(--gold-light);
  background: var(--ink);
}

.preview-stage {
  --base-color: #eadcbe;
  --text-color: #211b13;
  --logo-color: #d4af37;
  --accent-color: #211b13;
  position: relative;
  min-height: 500px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-top: 1px solid rgba(33,27,19,.06);
  border-bottom: 1px solid rgba(33,27,19,.08);
  background:
    radial-gradient(circle at 50% 36%, rgba(255,255,255,.95), rgba(255,255,255,.35) 35%, transparent 68%),
    linear-gradient(145deg, #eee8dc, #ddd5c7);
  perspective: 1100px;
}

.preview-stage::before {
  content: "";
  position: absolute;
  left: 11%;
  right: 11%;
  bottom: 12%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(33,27,19,.25), transparent 67%);
  filter: blur(10px);
  transform: scaleY(.42);
}

.stage-grid {
  position: absolute;
  inset: 0;
  opacity: .2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(33,27,19,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33,27,19,.08) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}

/* ---------- Nameplate render ---------- */

.nameplate-render {
  position: relative;
  z-index: 2;
  width: min(84%, 680px);
  aspect-ratio: 8 / 2.5;
  transform-style: preserve-3d;
  transition: width .2s ease, transform .45s cubic-bezier(.2,.8,.2,1);
}

.nameplate-render.is-large {
  width: min(89%, 720px);
  aspect-ratio: 8.5 / 2.5;
}

.nameplate-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  border-radius: 15px;
  background: var(--base-color);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.42),
    inset 0 -3px 0 rgba(33,27,19,.08),
    0 22px 34px -20px rgba(33,27,19,.48);
  backface-visibility: hidden;
  transition: background .18s ease, transform .45s cubic-bezier(.2,.8,.2,1), opacity .3s ease;
}

.nameplate-front-face {
  padding: 7% 5% 7% 4.5%;
}

.nameplate-back-face {
  justify-content: center;
  opacity: 0;
  transform: none;
}

.nameplate-depth {
  position: absolute;
  inset: 2% -1.4% -5% 1.4%;
  border-radius: 16px;
  background: color-mix(in srgb, var(--base-color), #000 24%);
  transform: translateZ(-12px);
  box-shadow: 0 20px 35px -15px rgba(33,27,19,.55);
}

.nameplate-side-face {
  position: absolute;
  right: -10px;
  top: 8px;
  width: 13px;
  height: calc(100% - 6px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 8px 8px 0;
  color: rgba(255,255,255,.75);
  background: color-mix(in srgb, var(--base-color), #000 30%);
  opacity: 0;
  transform: rotateY(82deg);
  transform-origin: left center;
}

.nameplate-side-face span {
  writing-mode: vertical-rl;
  font-size: .56rem;
  font-weight: 900;
}

.nameplate-logo-mark {
  width: 25%;
  height: 100%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--logo-color);
  font-size: clamp(3.2rem, 7vw, 6rem);
  line-height: 1;
  filter: drop-shadow(0 3px 0 color-mix(in srgb, var(--logo-color), #000 28%));
  transform: scale(var(--logo-scale, 1));
  transition: color .18s ease;
}

.preview-mark.is-upload {
  background-color: var(--logo-color);
  background-position: center;
  background-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  filter: drop-shadow(0 3px 0 color-mix(in srgb, var(--logo-color), #000 28%));
}

/* Colored PNG icons render at full color — no logo-color tinting, no mask */
.preview-mark.is-color-img {
  background-color: transparent;
  filter: none;
  color: transparent;
}

.preview-stage[data-view="angle"] .nameplate-logo-mark.is-color-img {
  filter: none;
}

.nameplate-divider {
  width: 2px;
  height: 62%;
  flex: 0 0 auto;
  margin: 0 4%;
  border-radius: 2px;
  background: color-mix(in srgb, var(--accent-color), transparent 30%);
}

.preview-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--text-color);
  font-family: var(--name-font, "Arial Rounded MT Bold", sans-serif);
  font-size: var(--name-size, clamp(2.2rem, 5.3vw, 4.8rem));
  font-weight: 900;
  line-height: .92;
  letter-spacing: -0.035em;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
  text-shadow: 0 3px 0 color-mix(in srgb, var(--text-color), #000 25%);
  transition: color .18s ease, font-size .18s ease;
}

.nameplate-trim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 5px solid color-mix(in srgb, var(--accent-color), transparent 8%);
  border-radius: 15px;
  opacity: .88;
}

.engraved-brand {
  display: block;
  width: min(64%, 390px);
  aspect-ratio: 860 / 241;
  pointer-events: none;
  background: var(--engraving-color, color-mix(in srgb, var(--base-color), #000 32%));
  -webkit-mask: url("assets/printerade-logo.png?v=20260718-brand") center / contain no-repeat;
  mask: url("assets/printerade-logo.png?v=20260718-brand") center / contain no-repeat;
  opacity: .78;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.34)) drop-shadow(0 -1px 1px rgba(33,27,19,.25));
}

.preview-stage[data-view="angle"] {
  cursor: grab;
}

.preview-stage.is-dragging-3d {
  cursor: grabbing;
}

.preview-stage[data-view="angle"]::after {
  content: "↔ Drag to rotate";
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(33,27,19,0.32);
  pointer-events: none;
  user-select: none;
  z-index: 10;
}

.preview-stage[data-view="angle"] .nameplate-render {
  transform: rotateX(7deg) rotateY(-24deg) rotateZ(-2deg) translateY(-6px);
}

.preview-stage[data-view="angle"] .nameplate-side-face {
  opacity: 1;
}

/* Logo and letters appear ~0.2 in extruded off the plate in angle view */
.preview-stage[data-view="angle"] .nameplate-logo-mark {
  filter:
    drop-shadow(2px 2px 0 color-mix(in srgb, var(--logo-color), #000 32%))
    drop-shadow(4px 4px 0 color-mix(in srgb, var(--logo-color), #000 50%))
    drop-shadow(6px 6px 2px rgba(0,0,0,.2));
}

.preview-stage[data-view="angle"] .preview-name {
  text-shadow:
    1px 1px 0 color-mix(in srgb, var(--text-color), #000 30%),
    3px 3px 0 color-mix(in srgb, var(--text-color), #000 44%),
    5px 5px 1px rgba(0,0,0,.18);
}

.preview-stage[data-view="back"] .nameplate-render {
  transform: none;
}

.preview-stage[data-view="back"] .nameplate-front-face {
  opacity: 0;
}

.preview-stage[data-view="back"] .nameplate-back-face {
  opacity: 1;
}

/* ---------- AirTag render ---------- */

.airtag-render {
  position: relative;
  z-index: 2;
  width: min(54%, 360px);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transform: translateY(28px);
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}

.airtag-face,
.airtag-depth {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
}

.airtag-face {
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--base-color);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.42),
    inset 0 -6px 0 rgba(33,27,19,.1),
    0 28px 38px -24px rgba(33,27,19,.62);
  backface-visibility: hidden;
  transition: background .18s ease, opacity .3s ease;
}

.airtag-back-face {
  opacity: 0;
  transform: none;
}

.airtag-depth {
  background: color-mix(in srgb, var(--base-color), #000 25%);
  transform: translate(10px, 12px) translateZ(-18px);
}

.airtag-loop {
  position: absolute;
  z-index: -1;
  top: -1%;
  left: 38%;
  width: 24%;
  height: 24%;
  border: 18px solid var(--base-color);
  border-radius: 44% 44% 22% 22%;
  box-shadow: inset 0 0 0 3px rgba(33,27,19,.12), 0 -1px 0 rgba(255,255,255,.4);
}

.keyring {
  position: absolute;
  z-index: -2;
  left: 37%;
  top: -25%;
  width: 26%;
  height: 26%;
  border: 8px solid #aeb3b7;
  border-radius: 50%;
  box-shadow: inset 2px 1px 2px #fff, 0 4px 8px rgba(33,27,19,.22);
}

.airtag-inset {
  position: absolute;
  inset: 11%;
  border: 3px solid color-mix(in srgb, var(--accent-color), transparent 20%);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.1);
}

.airtag-logo-mark {
  position: relative;
  z-index: 1;
  width: 52%;
  height: 52%;
  display: grid;
  place-items: center;
  color: var(--logo-color);
  font-size: clamp(4.4rem, 10vw, 7.5rem);
  line-height: 1;
  filter: drop-shadow(0 4px 0 color-mix(in srgb, var(--logo-color), #000 25%));
  transform: scale(var(--logo-scale, 1));
  transition: color .18s ease;
}

.airtag-accent {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 12%;
  height: 12%;
  border-radius: 50%;
  background: var(--accent-color);
  transform: translateX(-50%);
}

.airtag-device {
  width: 70%;
  height: 70%;
  display: grid;
  place-items: center;
  border: 6px solid #f7f7f3;
  border-radius: 50%;
  color: #6f7478;
  background: radial-gradient(circle at 37% 30%, #fff, #d6d9da 48%, #92989c 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1), 0 4px 9px rgba(33,27,19,.25);
  font-size: .78rem;
  font-weight: 800;
}

.preview-stage[data-view="angle"] .airtag-render {
  transform: rotateX(9deg) rotateY(-27deg) rotateZ(-3deg) translateY(36px);
}

.preview-stage[data-view="back"] .airtag-render {
  transform: translateY(28px);
}

.preview-stage[data-view="back"] .airtag-front-face {
  opacity: 0;
}

.preview-stage[data-view="back"] .airtag-back-face {
  opacity: 1;
}

.dimension-pill {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(33,27,19,.1);
  border-radius: 999px;
  color: var(--studio-muted);
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px -12px rgba(33,27,19,.4);
  font-size: .68rem;
  font-weight: 900;
}

.dimension-width {
  left: 50%;
  bottom: 6%;
  transform: translateX(-50%);
}

.dimension-height {
  left: 3%;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
}

.preview-meta {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  padding: 18px 24px 22px;
}

.preview-meta > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 18px;
  border-left: 1px solid var(--studio-line);
}

.preview-meta > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.preview-meta span {
  color: var(--studio-muted);
  font-size: .68rem;
  font-weight: 700;
}

.preview-meta strong {
  font-size: .82rem;
}

.production-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(38,113,70,.15);
  border-radius: 16px;
  color: #315d43;
  background: rgba(233,247,237,.8);
  font-size: .78rem;
}

.production-note-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #3a8c58;
  font-weight: 900;
}

/* ---------- Controls ---------- */

.controls-column form {
  display: grid;
  gap: 16px;
}

.control-card {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(33,27,19,.09);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 46px -36px rgba(33,27,19,.44);
}

.control-card > legend {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(33,27,19,.07);
  font-weight: 900;
  font-size: 1rem;
}

.control-card > legend > span {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  color: var(--ink);
  background: var(--gold);
  font-size: .78rem;
}

.control-card-content {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.field-label-row,
.palette-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-label,
.custom-color-row > label {
  display: block;
  font-size: .82rem;
  font-weight: 900;
}

.helper-text,
.character-count {
  color: var(--studio-muted);
  font-size: .7rem;
}

.text-link {
  color: #795f16;
  font-size: .76rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.size-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.choice-card {
  position: relative;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border: 2px solid rgba(33,27,19,.1);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.choice-card.is-selected {
  border-color: var(--gold-deep);
  background: #fffaf0;
}

.choice-card input {
  position: absolute;
  opacity: 0;
}

.choice-card > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.choice-card strong {
  font-size: .85rem;
}

.choice-card small {
  color: var(--studio-muted);
  font-size: .7rem;
}

.choice-check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(33,27,19,.15);
  border-radius: 50%;
  color: transparent;
  background: #fff;
  font-size: .7rem;
  font-weight: 900;
}

.choice-card.is-selected .choice-check {
  border-color: var(--gold-deep);
  color: var(--ink);
  background: var(--gold);
}

.field-group {
  display: grid;
  gap: 7px;
}

.field-group input,
.field-group select,
.layer-colors select {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid rgba(33,27,19,.18);
  border-radius: 11px;
  outline: none;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field-group small,
.inline-note,
.rights-note,
.upload-option span {
  color: var(--studio-muted);
  font-size: .7rem;
  line-height: 1.45;
}

.field-error,
.palette-error {
  min-height: 1em;
  color: #a72e31;
  font-size: .72rem;
  font-weight: 800;
}

.field-group.has-error input {
  border-color: #bd383c;
  box-shadow: 0 0 0 3px rgba(189,56,60,.12);
}

.airtag-style-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: 265px;
  overflow: auto;
  padding: 2px 3px 4px 2px;
}

.airtag-style-button {
  min-height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 5px;
  border: 1px solid rgba(33,27,19,.12);
  border-radius: 12px;
  color: var(--studio-muted);
  background: #fff;
  text-align: center;
}

.airtag-style-button span:first-child {
  color: var(--ink);
  font-size: 1.55rem;
  line-height: 1;
}

.airtag-style-button span:last-child {
  font-size: .62rem;
  font-weight: 800;
}

.airtag-style-button[aria-checked="true"] {
  border-color: var(--gold-deep);
  color: var(--ink);
  background: #fffaf0;
  box-shadow: 0 0 0 1px var(--gold-deep);
}

.inline-note {
  padding: 11px 13px;
  border-radius: 10px;
  background: #f5f1e9;
}

.upload-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px dashed rgba(33,27,19,.22);
  border-radius: 13px;
  background: #faf8f3;
}

.upload-option > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.upload-option strong {
  font-size: .8rem;
}

.upload-button {
  justify-content: center;
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-status {
  min-height: 0;
  color: #315d43;
  font-size: .72rem;
  font-weight: 800;
}

.rights-note {
  margin-top: -7px;
}

.palette-heading > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.color-counter {
  padding: 7px 10px;
  border-radius: 999px;
  color: #6c5414;
  background: #f9edc4;
  font-size: .7rem;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: 300px;
  overflow: auto;
  padding: 2px 3px 4px 2px;
}

.color-swatch {
  position: relative;
  min-height: 52px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 7px 7px;
  border: 1px solid rgba(33,27,19,.11);
  border-radius: 11px;
  color: var(--studio-muted);
  background: #fff;
  text-align: left;
}

.color-swatch-dot {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(33,27,19,.16);
  border-radius: 8px;
  background: var(--swatch-color);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.35);
}

.color-swatch-name {
  min-width: 0;
  overflow: hidden;
  font-size: .6rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.color-swatch[aria-pressed="true"] {
  border-color: var(--gold-deep);
  color: var(--ink);
  background: #fffaf0;
  box-shadow: 0 0 0 1px var(--gold-deep);
}

.color-swatch[aria-pressed="true"]::after {
  content: "✓";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--gold);
  font-size: .5rem;
  font-weight: 900;
}

.custom-color-row {
  display: grid;
  grid-template-columns: 1fr 46px auto;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}

.custom-color-row input[type="color"] {
  width: 46px;
  height: 40px;
  padding: 3px;
  border: 1px solid rgba(33,27,19,.16);
  border-radius: 10px;
  background: #fff;
}

.layer-colors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid rgba(33,27,19,.08);
}

.layer-colors label {
  display: grid;
  gap: 5px;
  color: var(--studio-muted);
  font-size: .68rem;
  font-weight: 800;
}

.layer-colors select {
  min-height: 42px;
  padding: 7px 9px;
  font-size: .72rem;
}

.scale-slider-group {
  display: grid;
  gap: 8px;
}

.logo-scale-field {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(33, 27, 19, .1);
}

.logo-scale-field small {
  color: #716a5b;
  font-size: .74rem;
  line-height: 1.35;
}

.scale-slider-group input[type="range"] {
  width: 100%;
  height: 4px;
  accent-color: var(--studio-gold);
  cursor: pointer;
}

.form-status {
  min-height: 0;
  border-radius: 12px;
  color: #962d31;
  font-size: .78rem;
  font-weight: 800;
}

.form-status:not(:empty) {
  padding: 12px 14px;
  border: 1px solid rgba(167,46,49,.18);
  background: #fff0f0;
}

.studio-actions {
  position: sticky;
  z-index: 5;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 14px 13px 16px;
  border: 1px solid rgba(33,27,19,.1);
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -22px rgba(33,27,19,.42);
}

.studio-actions > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.secure-mark {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #3a8c58;
  font-size: .72rem;
  font-weight: 900;
}

.studio-actions p {
  display: flex;
  flex-direction: column;
}

.studio-actions strong {
  font-size: .72rem;
}

.studio-actions small {
  color: var(--studio-muted);
  font-size: .6rem;
}

.finalize-button {
  justify-content: center;
  padding: 14px 22px;
  font-size: .9rem;
  font-weight: 800;
}

/* ---------- Order flow and help ---------- */

.order-flow-section {
  padding: 88px 0;
  color: var(--cream);
  background: var(--ink);
}

.order-flow-section .section-inner {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 64px;
}

.order-flow-copy .eyebrow {
  color: var(--gold-light);
}

.order-flow-copy h2 {
  max-width: 430px;
  font-size: clamp(2rem, 1.5rem + 1.6vw, 3rem);
  line-height: 1.08;
}

.order-flow-copy > p:last-child {
  max-width: 480px;
  margin-top: 16px;
  color: rgba(250,247,242,.65);
}

.order-flow-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.order-flow-cards article {
  padding: 22px 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.06);
}

.order-flow-cards article > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 32px;
  border-radius: 12px;
  color: var(--ink);
  background: var(--gold);
  font-size: 1.15rem;
  font-weight: 900;
}

.order-flow-cards h3 {
  margin-bottom: 7px;
  font-size: .94rem;
}

.order-flow-cards p {
  color: rgba(250,247,242,.58);
  font-size: .76rem;
}

.order-flow-disclaimer {
  grid-column: 2;
  padding: 14px 16px;
  border-left: 3px solid var(--gold);
  color: rgba(250,247,242,.63);
  background: rgba(255,255,255,.04);
  font-size: .76rem;
}

.order-flow-disclaimer strong {
  color: var(--gold-light);
}

.customizer-help {
  padding: 70px 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(255,133,220,.12), transparent 20rem),
    var(--cream-deep);
}

.help-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.help-inner > div {
  max-width: 670px;
}

.help-inner h2 {
  margin-bottom: 9px;
}

.help-inner > div > p:last-child {
  color: var(--studio-muted);
}

/* ---------- Proof dialog ---------- */

.proof-dialog {
  width: min(1180px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 40px 120px rgba(0,0,0,.32);
}

.proof-dialog:not([open]) {
  display: none;
}

.proof-dialog[open] {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: block;
  margin: auto;
  box-shadow: 0 0 0 100vmax rgba(18,15,10,.76), 0 40px 120px rgba(0,0,0,.32);
}

/* Native modal dialogs already receive the backdrop below. */
.proof-dialog:modal {
  box-shadow: 0 40px 120px rgba(0,0,0,.32);
}

.proof-dialog::backdrop {
  background: rgba(18,15,10,.76);
  backdrop-filter: blur(7px);
}

.proof-dialog-shell {
  max-height: calc(100dvh - 28px);
  display: flex;
  flex-direction: column;
}

.proof-dialog-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--studio-line);
}

.proof-dialog-head .eyebrow {
  margin-bottom: 3px;
}

.proof-dialog-head h2 {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.15rem);
}

.dialog-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--studio-line);
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  font-size: 1.6rem;
  line-height: 1;
}

.proof-dialog-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  overflow: auto;
}

.proof-image-wrap {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: #eee8dc;
}

.proof-image-wrap img {
  width: 100%;
  max-height: calc(100dvh - 180px);
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 20px 50px -28px rgba(33,27,19,.5);
}

.proof-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  overflow: auto;
}

.design-reference {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px;
  border-radius: 12px;
  background: #f6f1e6;
}

.design-reference span {
  color: var(--studio-muted);
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.design-reference strong {
  font-family: "Courier New", monospace;
  font-size: 1.06rem;
  letter-spacing: .05em;
}

.design-code {
  border: 1px solid rgba(212, 175, 55, .45);
  background: #fbf3dd;
}

.design-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.design-code strong {
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.design-code small {
  color: var(--studio-muted);
  font-size: .65rem;
  line-height: 1.45;
}

.code-copy {
  flex: none;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-full, 999px);
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  cursor: pointer;
}

.code-copy:hover {
  color: var(--gold-light);
  background: var(--ink);
}

/* Copy that swaps depending on whether a Stripe Payment Link is available.
   body.stripe-ready is set by customize.js when the proof is built. */
.proof-actions .if-stripe,
.proof-actions li.if-stripe {
  display: none;
}

body.stripe-ready .proof-actions .if-stripe {
  display: inline;
}

body.stripe-ready .proof-actions li.if-stripe {
  display: flex;
}

body.stripe-ready .proof-actions .if-etsy,
body.stripe-ready .proof-actions li.if-etsy {
  display: none;
}

/* Stripe is the primary CTA when a Payment Link exists; when it does not,
   the button stays hidden and the proof download carries the gold treatment. */
body:not(.stripe-ready) #download-proof {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
}

body:not(.stripe-ready) #download-proof:hover {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
}

.proof-actions ol {
  display: grid;
  gap: 8px;
  padding: 5px 0;
  counter-reset: none;
}

.proof-actions li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--studio-muted);
  font-size: .73rem;
}

.proof-actions li > span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--gold-light);
  font-size: .64rem;
  font-weight: 900;
}

.proof-actions .btn {
  width: 100%;
  justify-content: center;
  padding: 12px 15px;
  font-size: .8rem;
}

.btn-dark {
  color: var(--gold-light);
  background: var(--ink);
}

.btn-dark:hover {
  color: var(--ink);
  background: var(--gold);
  transform: translateY(-2px);
}

.proof-message-link {
  padding: 6px;
  text-align: center;
}

.proof-status {
  min-height: 1em;
  color: #315d43;
  font-size: .7rem;
  font-weight: 800;
  text-align: center;
}

.proof-warning {
  padding: 10px 11px;
  border-radius: 9px;
  color: #795f16;
  background: #fff7d7;
  font-size: .65rem;
  line-height: 1.45;
}

.noscript-notice {
  position: fixed;
  z-index: 1000;
  left: 14px;
  right: 14px;
  bottom: 14px;
  max-width: 720px;
  margin: auto;
  padding: 16px 18px;
  border-radius: 12px;
  color: #fff;
  background: #8f2635;
  box-shadow: 0 16px 40px rgba(0,0,0,.28);
  font-size: .85rem;
}

.noscript-notice a {
  text-decoration: underline;
}

/* ---------- Focus / motion ---------- */

.customizer-page input:focus-visible,
.customizer-page select:focus-visible,
.customizer-page button:focus-visible,
.customizer-page .choice-card:has(input:focus-visible) {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .live-dot::after {
    animation: none;
  }

  .nameplate-render,
  .nameplate-face,
  .airtag-render,
  .product-switch-btn {
    transition: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .customizer-hero-inner {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .customizer-steps {
    max-width: 620px;
  }

  .studio-layout {
    grid-template-columns: minmax(0, 1fr) minmax(390px, .9fr);
  }

  .preview-stage {
    min-height: 430px;
  }

  .palette-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .order-flow-section .section-inner {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .order-flow-disclaimer {
    grid-column: 1;
  }
}

@media (max-width: 900px) {
  .customizer-site-header .nav-links {
    position: absolute;
    left: 14px;
    right: 14px;
    top: calc(100% + 8px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--studio-line);
    border-radius: 16px;
    background: rgba(250,247,242,.98);
    box-shadow: 0 18px 42px -24px rgba(33,27,19,.55);
  }

  .customizer-site-header .nav-links.is-open {
    display: flex;
  }

  .customizer-site-header .nav-links a {
    padding: 12px 13px;
    border-radius: 10px;
  }

  .customizer-site-header .nav-links a:hover {
    background: var(--cream-deep);
  }

  .customizer-site-header .nav-links a[aria-current="page"]::after {
    display: none;
  }

  .header-home-link,
  .menu-toggle {
    display: inline-flex;
  }

  .header-shop-link {
    display: none;
  }

  .studio-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .product-switch {
    align-self: flex-start;
  }

  .studio-layout {
    grid-template-columns: 1fr;
  }

  .preview-column {
    position: static;
  }

  .preview-stage {
    min-height: 510px;
  }

  .palette-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .customizer-site-header .header-inner {
    padding: 11px 14px;
    gap: 9px;
  }

  .customizer-site-header .brand-logo {
    height: 28px;
  }

  .header-home-link {
    min-height: 42px;
    padding: 8px 12px;
    font-size: .78rem;
  }

  .customizer-hero {
    padding: 48px 18px 44px;
  }

  .customizer-hero h1 {
    font-size: clamp(2.35rem, 13vw, 3.6rem);
  }

  .customizer-hero-copy > p:last-child {
    font-size: .96rem;
  }

  .customizer-steps {
    padding: 14px 8px;
  }

  .customizer-steps small {
    display: none;
  }

  .customizer-steps li > span {
    width: 38px;
    height: 38px;
  }

  .customizer-studio {
    padding: 48px 14px 70px;
  }

  .studio-heading {
    margin-bottom: 20px;
  }

  .product-switch {
    width: 100%;
  }

  .product-switch-btn {
    min-width: 0;
    flex: 1;
    min-height: 58px;
    padding: 8px 10px;
  }

  .product-switch-icon {
    width: 30px;
    height: 30px;
  }

  .product-switch-btn small {
    display: none;
  }

  .preview-card {
    border-radius: 22px;
  }

  .preview-card-top,
  .preview-meta {
    padding-left: 16px;
    padding-right: 16px;
  }

  .view-tabs {
    padding-left: 16px;
    padding-right: 16px;
  }

  .preview-stage {
    min-height: 360px;
  }

  .nameplate-render,
  .nameplate-render.is-large {
    width: 88%;
  }

  .nameplate-face {
    border-radius: 10px;
  }

  .nameplate-logo-mark {
    font-size: clamp(2.4rem, 13vw, 4rem);
  }

  .preview-name {
    font-size: var(--name-size-mobile, clamp(1.55rem, 8.5vw, 3rem));
  }

  .nameplate-trim {
    inset: 0;
    border-width: 3px;
    border-radius: 10px;
  }

  .engraved-brand {
    width: 70%;
  }

  .airtag-render {
    width: min(58%, 250px);
  }

  .airtag-loop {
    border-width: 12px;
  }

  .keyring {
    border-width: 6px;
  }

  .airtag-logo-mark {
    font-size: clamp(3.3rem, 18vw, 5.5rem);
  }

  .preview-meta {
    grid-template-columns: 1fr 1fr;
    gap: 12px 0;
  }

  .preview-meta > div:nth-child(3) {
    grid-column: 1 / -1;
    padding-left: 0;
    border-left: 0;
    padding-top: 10px;
    border-top: 1px solid var(--studio-line);
  }

  .control-card > legend {
    padding: 16px 15px 13px;
  }

  .control-card-content {
    padding: 16px 15px;
  }

  .airtag-style-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .palette-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .upload-option {
    grid-template-columns: 1fr;
  }

  .upload-button {
    width: 100%;
  }

  .custom-color-row {
    grid-template-columns: 1fr 44px;
  }

  .custom-color-row .btn {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .studio-actions {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .finalize-button {
    width: 100%;
  }

  .order-flow-section {
    padding: 64px 0;
  }

  .order-flow-cards {
    grid-template-columns: 1fr;
  }

  .order-flow-cards article {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 0 12px;
    align-items: center;
  }

  .order-flow-cards article > span {
    grid-row: 1 / 3;
    margin-bottom: 0;
  }

  .help-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .proof-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 20px;
  }

  .proof-dialog-shell {
    max-height: calc(100dvh - 16px);
  }

  .proof-dialog-head {
    padding: 16px;
  }

  .proof-dialog-body {
    grid-template-columns: 1fr;
  }

  .proof-image-wrap {
    padding: 12px;
  }

  .proof-image-wrap img {
    max-height: none;
  }

  .proof-actions {
    padding: 16px;
  }
}

@media (max-width: 390px) {
  .header-home-link {
    display: none;
  }

  .size-options,
  .layer-colors {
    grid-template-columns: 1fr;
  }

  .palette-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .preview-meta {
    grid-template-columns: 1fr;
  }

  .preview-meta > div,
  .preview-meta > div:first-child,
  .preview-meta > div:nth-child(3) {
    grid-column: 1;
    padding: 8px 0;
    border-left: 0;
    border-top: 1px solid var(--studio-line);
  }

  .preview-meta > div:first-child {
    border-top: 0;
  }
}
