:root {
  color-scheme: light;
  --ink: #0b0b0b;
  --paper: #f6f2eb;
  --paper-deep: #eee7dc;
  --surface: rgba(255, 255, 255, 0.62);
  --line: #d7cfc4;
  --muted: #6b665f;
  --gold: #a87930;
  --gold-soft: #ddc087;
  --serif: "Libre Caslon Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

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

html,
body {
  margin: 0;
  min-width: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 51% 42%, rgba(255, 255, 255, 0.82) 0, rgba(255, 255, 255, 0) 35%),
    var(--paper);
  animation: pdm-page-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

button,
input {
  font: inherit;
}

button {
  touch-action: manipulation;
}

.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;
}

.configurator {
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(420px, 1.45fr) minmax(320px, 0.9fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: center;
  width: 100%;
  max-width: 1480px;
  margin: auto;
  padding: clamp(46px, 6vw, 96px) clamp(24px, 5vw, 88px);
}

.configurator > * {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 18px;
  color: #40352a;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
}

h1 {
  margin: 0 0 26px;
  font-family: var(--serif);
  font-size: clamp(46px, 5.2vw, 82px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.lede {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.product-stage {
  min-width: 0;
  text-align: center;
}

.bracelet-wrap {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: clamp(220px, 25vw, 340px);
  overflow: hidden;
}

.bracelet-image {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
  filter: drop-shadow(0 24px 22px rgba(43, 34, 22, 0.11));
  backface-visibility: hidden;
  pointer-events: none;
  will-change: opacity;
}

.product-images-ready .bracelet-image {
  transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.bracelet-image.is-active {
  z-index: 1;
  opacity: 1;
}

.bracelet-wrap[data-finish="dorada"] .bracelet-image.is-active {
  filter: drop-shadow(0 24px 24px rgba(91, 61, 19, 0.14));
}

.engraving {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: block;
  width: 86%;
  height: auto;
  overflow: visible;
  transform: translate(-50%, -20%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.engraving text {
  fill: #191715;
  stroke: rgba(25, 23, 21, 0.78);
  stroke-width: 1.05px;
  font-family: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 34px;
  font-stretch: condensed;
  font-weight: 700;
  letter-spacing: 0.2px;
  paint-order: stroke fill;
  stroke-linejoin: round;
  text-rendering: geometricPrecision;
}

.preview-note {
  margin: 2px 0 0;
  color: #625d56;
  font-size: 11px;
  letter-spacing: 0.045em;
}

.controls {
  display: grid;
  min-width: 0;
  gap: 22px;
}

fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

legend,
.field-label label {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
}

.finish-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 11px;
}

.finish {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--ink);
  cursor: pointer;
  transition:
    border-color 0.24s ease,
    background-color 0.24s ease,
    box-shadow 0.24s ease,
    transform 0.24s ease;
}

.finish.is-active {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px var(--ink), 0 8px 20px rgba(30, 25, 19, 0.06);
}

.finish[aria-busy="true"] {
  cursor: progress;
}

.swatch {
  flex: 0 0 auto;
  display: block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
}

.silver {
  background: linear-gradient(135deg, #fff 4%, #a9aaab 48%, #f0f0ee 96%);
}

.gold {
  background: linear-gradient(135deg, #f1ddb0 5%, #aa792d 51%, #dfc284 96%);
}

.field {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.field-label {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.field-label label {
  margin: 0;
}

#counter {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.input-wrap {
  position: relative;
  min-width: 0;
}

input {
  width: 100%;
  height: 54px;
  padding: 0 48px 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font-size: 16px;
  text-transform: uppercase;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

input::placeholder {
  color: #837d75;
  opacity: 1;
}

input:focus {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 0 1px var(--ink), 0 8px 22px rgba(28, 23, 17, 0.06);
}

#clear {
  position: absolute;
  top: 50%;
  right: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #67615a;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

#engraving-help {
  margin: 0;
  color: #625d56;
  font-size: 11px;
  line-height: 1.45;
}

.offer {
  display: grid;
  min-width: 0;
  gap: 9px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.offer div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 14px;
}

.offer strong {
  min-width: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  white-space: nowrap;
}

.offer span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}

.primary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 15px 54px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 14px 28px rgba(12, 11, 10, 0.14);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.015em;
  transition: transform 0.24s ease, background-color 0.2s ease, box-shadow 0.24s ease;
}

.primary-lock,
.primary-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.primary-lock {
  left: 20px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.primary-arrow {
  right: 20px;
  opacity: 0.72;
  font-size: 15px;
}

.primary:disabled {
  background: #c8c2ba;
  box-shadow: none;
  color: #726d66;
  cursor: not-allowed;
}

.finish:focus-visible,
#clear:focus-visible,
.primary:focus-visible,
input:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.checkout-note {
  margin: -14px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.validation {
  min-height: 17px;
  margin: -13px 0 0;
  color: #96372e;
  font-size: 11px;
  text-align: center;
}

@media (hover: hover) {
  .finish:hover {
    border-color: #797168;
    transform: translateY(-1px);
  }

  .finish.is-active:hover {
    border-color: var(--ink);
  }

  .primary:hover:not(:disabled) {
    background: #252321;
    box-shadow: 0 17px 34px rgba(12, 11, 10, 0.18);
    transform: translateY(-1px);
  }
}

@keyframes pdm-page-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .configurator {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .intro {
    grid-column: 1 / -1;
    text-align: center;
  }

  .lede {
    margin: auto;
  }

  .product-stage {
    align-self: start;
  }

  .controls {
    align-self: center;
  }
}

@media (max-width: 680px) {
  body {
    background:
      radial-gradient(circle at 50% 31%, rgba(255, 255, 255, 0.82) 0, rgba(255, 255, 255, 0) 30%),
      var(--paper);
  }

  .configurator {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 0;
    padding: 22px max(16px, env(safe-area-inset-right)) 28px max(16px, env(safe-area-inset-left));
  }

  .intro,
  .product-stage,
  .controls {
    width: 100%;
  }

  .eyebrow {
    margin-bottom: 10px;
    font-size: 9px;
  }

  h1 {
    margin-bottom: 11px;
    font-size: clamp(40px, 11vw, 46px);
    line-height: 0.94;
  }

  .lede {
    max-width: 340px;
    font-size: 13px;
    line-height: 1.48;
  }

  .bracelet-wrap {
    height: clamp(140px, 38vw, 158px);
  }

  .engraving {
    width: 86%;
    transform: translate(-50%, -20%);
  }

  .preview-note {
    margin-top: -1px;
    font-size: 10px;
  }

  .controls {
    gap: 15px;
  }

  legend,
  .field-label label {
    font-size: 12px;
  }

  .finish-options {
    gap: 8px;
    margin-top: 9px;
  }

  .finish {
    min-height: 45px;
    padding: 9px 10px;
    font-size: 14px;
  }

  input {
    height: 52px;
  }

  .offer {
    margin-top: 1px;
  }

  .offer strong {
    font-size: 19px;
  }
}

@media (max-width: 360px) {
  .configurator {
    padding-right: 14px;
    padding-left: 14px;
  }

  .swatch {
    width: 16px;
    height: 16px;
    margin-right: 6px;
  }

  .offer div {
    gap: 9px;
  }

  .offer span {
    max-width: 148px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
