/* ==========================================================================
   LuckStar Ibiza · v2 · Ficha de producto + probador virtual
   (markup generado por js/producto.js; no se cambian clases ni IDs)
   ========================================================================== */

html[data-ls-tone="sunset"] body {
  background-color: #fbe3d8;
  background-color: color-mix(in oklab, var(--ls-pink) 12%, #fbe7dc);
}

html[data-ls-tone="day"] body {
  background-color: var(--ls-paper);
}

.ls-pdp-wrap {
  padding: clamp(20px, 3vw, 36px) 0 clamp(64px, 8vw, 120px);
}

.ls-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(20px, 3vw, 36px);
  font-size: 0.8rem;
  color: var(--ls-ink-3);
}

.ls-crumbs a {
  color: var(--ls-ink-2);
  transition: color 0.3s;
}

.ls-crumbs a:hover {
  color: var(--ls-ink);
}

.ls-crumbs [aria-current] {
  color: var(--ls-ink);
  font-weight: 600;
}

/* ---------- Estructura ---------- */
.ls-pdp {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(340px, 0.72fr);
  grid-template-areas:
    "gallery info"
    "extras info";
  column-gap: clamp(32px, 5vw, 88px);
  row-gap: 0;
  align-items: start;
}

.ls-pdp > .product-gallery {
  grid-area: gallery;
  min-width: 0;
}

.ls-pdp > .ls-pdp__extras {
  grid-area: extras;
  min-width: 0;
}

.ls-pdp > .product-info {
  grid-area: info;
  align-self: stretch;
  min-width: 0;
}

.ls-pdp__sticky {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: grid;
  gap: 22px;
  padding-bottom: 20px;
}

html.ls-header-hidden .ls-pdp__sticky {
  top: 24px;
}

.ls-pdp__skeleton .placeholder {
  border-radius: var(--r-lg);
}

.product-error {
  padding: 48px;
  border-radius: var(--r-lg);
  background: var(--ls-paper);
  font-family: var(--ls-serif);
  font-size: 1.4rem;
  text-align: center;
  color: var(--ls-ink);
}

/* ---------- Galería (escritorio: miniaturas verticales + imagen grande) ---------- */
.product-carousel {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.product-thumbs {
  order: -1;
  display: grid;
  gap: 10px;
  max-height: calc((100vw * 0.5) * 1.41);
  overflow-y: auto;
  scrollbar-width: none;
}

.product-thumbs::-webkit-scrollbar {
  display: none;
}

.product-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 1412;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ls-shell);
  opacity: 0.55;
  transition: opacity 0.35s, transform 0.45s var(--ease-out);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px var(--ls-ink);
  opacity: 0;
  transition: opacity 0.3s;
}

.product-thumb:hover {
  opacity: 0.9;
}

.product-thumb.is-active {
  opacity: 1;
}

.product-thumb.is-active::after {
  opacity: 1;
}

.product-main-frame {
  position: relative;
  aspect-ratio: 1000 / 1412;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--ls-shell);
}

.product-main,
.product-main img {
  display: block;
  width: 100%;
  height: 100%;
}

.product-main {
  cursor: zoom-in;
}

.product-main img {
  object-fit: cover;
}

.product-nav {
  position: absolute;
  bottom: 18px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ls-ink);
  box-shadow: 0 8px 24px rgba(47, 36, 32, 0.14);
  transition: background 0.3s, color 0.3s, transform 0.45s var(--ease-out);
}

.product-nav svg {
  width: 18px;
  height: 18px;
}

.product-nav:hover {
  background: var(--ls-ink);
  color: var(--ls-paper);
}

.product-nav-prev {
  right: 72px;
}

.product-nav-next {
  right: 18px;
}

.product-main-frame .ai-badge {
  top: 16px;
  right: 16px;
  bottom: auto;
}

/* Cuadradas (foto de producto sobre blanco) */
.product-square-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
  margin-left: 102px;
}

.product-square-list:not(.is-multiple) {
  grid-template-columns: minmax(0, 1fr);
}

.product-square-list:not(.is-multiple) .product-square-card {
  max-width: 560px;
}

.product-extra-card {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #fff;
}

.product-square-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 1s var(--ease-out);
}

.product-square-card:hover .product-square-img {
  transform: scale(1.04);
}

.product-square-card .ai-badge {
  top: 12px;
  left: 12px;
  right: auto;
  bottom: auto;
}

.product-square-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 20px rgba(47, 36, 32, 0.14);
  color: var(--ls-ink);
  transition: transform 0.45s var(--ease-out), background 0.3s, color 0.3s;
}

.product-square-zoom svg {
  width: 17px;
  height: 17px;
}

.product-square-zoom:hover {
  background: var(--ls-ink);
  color: var(--ls-paper);
  transform: scale(1.08);
}

.product-gallery-item .placeholder {
  border-radius: var(--r-lg);
}

/* ---------- Vídeo "en movimiento" (escritorio) ---------- */
.ls-pdp__extras {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  margin-top: clamp(48px, 6vw, 96px);
  margin-left: 102px;
}

.ls-pdp__extras:has(#productExtras:empty) {
  display: none;
}

.ls-pdp__extras-copy {
  display: grid;
  gap: 16px;
}

.ls-pdp__extras-copy h2 {
  font-size: clamp(2.2rem, 3.6vw, 3.4rem);
}

.ls-pdp__extras-copy h2 em {
  color: color-mix(in oklab, var(--ls-pink) 55%, var(--ls-ink));
}

.ls-pdp__extras-copy p:not(.ls-kicker) {
  color: var(--ls-ink-2);
}

.product-extras {
  display: grid;
  gap: 16px;
}

.product-video-card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--ls-shell);
}

.product-video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 15;
  object-fit: cover;
}

.product-video-card .ai-badge {
  top: 14px;
  right: 14px;
  bottom: auto;
}

.product-video-cta {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--ls-grad);
  color: var(--ls-on-accent);
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  box-shadow: var(--shadow-glow);
  transform: translateX(-50%);
  transition: transform 0.5s var(--ease-out), box-shadow 0.4s;
}

.product-video-cta svg {
  width: 17px;
  height: 17px;
}

.product-video-cta:hover {
  transform: translateX(-50%) translateY(-3px) scale(1.03);
}

/* ---------- Panel de información ---------- */
.product-head {
  display: grid;
  gap: 12px;
}

.product-head .product-meta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ls-ink-3);
}

.product-title {
  font-size: clamp(2.4rem, 3.8vw, 3.9rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}

.product-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-flags:empty {
  display: none;
}

.product-flags .product-flag {
  background: var(--ls-paper);
  box-shadow: inset 0 0 0 1px var(--ls-line);
}

.product-price {
  font-family: var(--ls-serif);
  font-size: clamp(1.7rem, 2.2vw, 2.1rem);
  font-weight: 300;
  color: var(--ls-ink);
  font-variant-numeric: tabular-nums;
}

.ls-pdp__label {
  margin-bottom: -10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ls-ink-3);
}

.ls-pdp__label span {
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 600;
  color: var(--ls-ink);
}

.product-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variant-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 16px 0 8px;
  border: 1px solid var(--ls-line-strong);
  border-radius: var(--r-pill);
  background: transparent;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ls-ink);
  transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.4s var(--ease-out);
}

.variant-btn:hover {
  background: var(--ls-paper);
}

.variant-btn.is-active {
  background: var(--ls-ink);
  border-color: var(--ls-ink);
  color: var(--ls-paper);
}

.variant-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.variant-btn.is-active .variant-swatch {
  box-shadow: 0 0 0 2px var(--ls-ink), 0 0 0 3.5px rgba(255, 255, 255, 0.9);
}

.ls-pdp .product-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}

.ls-pdp .product-actions .ls-pdp__fav {
  grid-column: 1 / -1;
}

.product-qty {
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 0 6px;
  border: 1px solid var(--ls-line-strong);
  border-radius: var(--r-pill);
}

.qty-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 1.2rem;
  color: var(--ls-ink);
  transition: background 0.3s;
}

.qty-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--ls-ink) 8%, transparent);
}

.qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.product-qty input {
  width: 38px;
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

.product-qty input::-webkit-outer-spin-button,
.product-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ls-pdp .product-actions .btn {
  min-height: 56px;
  font-size: 1rem;
}

.ls-pdp__fav.is-active {
  border-color: transparent;
  background: color-mix(in srgb, var(--ls-pink) 18%, var(--ls-paper));
}

.ls-pdp__fav.is-active::after {
  content: "♥";
  color: var(--ls-pink);
}

.product-action-status {
  min-height: 1.2em;
  margin-top: -10px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ls-ink-3);
}

.product-action-status:empty {
  display: none;
}

.product-action-status[data-tone="error"] {
  color: #b0413e;
}

.product-action-status[data-tone="success"] {
  color: #3b7a57;
}

.ls-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--ls-line);
  list-style: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ls-ink-2);
}

.ls-perks li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ls-perks svg {
  width: 16px;
  height: 16px;
  color: color-mix(in oklab, var(--ls-pink) 70%, var(--ls-ink));
}

/* Acordeones */
.ls-accs {
  border-top: 1px solid var(--ls-line);
}

.ls-acc {
  border-bottom: 1px solid var(--ls-line);
}

.ls-acc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  font-family: var(--ls-serif);
  font-size: 1.25rem;
  color: var(--ls-ink);
  cursor: pointer;
  list-style: none;
}

.ls-acc summary::-webkit-details-marker {
  display: none;
}

.ls-acc summary svg {
  width: 18px;
  height: 18px;
  transition: transform 0.45s var(--ease-out);
}

.ls-acc[open] summary svg {
  transform: rotate(45deg);
}

.ls-acc > :not(summary) {
  padding-bottom: 22px;
}

.product-description,
.product-measurements {
  white-space: pre-line;
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--ls-ink-2);
}

.ls-material {
  display: grid;
  gap: 10px;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--ls-ink-2);
}

.ls-material strong {
  color: var(--ls-ink);
}

.ls-tryon-link {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--ls-grad-soft);
  color: var(--ls-ink);
  text-align: left;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}

.ls-tryon-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.ls-tryon-link > span:nth-child(2) {
  display: grid;
  flex: 1;
}

.ls-tryon-link strong {
  font-family: var(--ls-serif);
  font-size: 1.2rem;
  font-weight: 400;
}

.ls-tryon-link small {
  font-size: 0.82rem;
  color: var(--ls-ink-3);
}

.ls-tryon-link__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ls-grad);
  color: #fff;
}

.ls-tryon-link svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   Probador virtual
   ========================================================================== */
.ls-tryon {
  padding-top: clamp(40px, 6vw, 80px);
}

.tryon-card {
  position: relative;
  padding: clamp(28px, 5vw, 72px);
  border-radius: var(--r-xl);
  background: var(--ls-sunset);
  overflow: hidden;
  isolation: isolate;
}

.tryon-card::before {
  content: "";
  position: absolute;
  right: -12%;
  top: -30%;
  z-index: -1;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7), transparent 65%);
}

.tryon-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.tryon-title {
  display: grid;
  gap: 14px;
  max-width: 640px;
}

.tryon-title h2 {
  font-size: clamp(2.3rem, 4.6vw, 4.4rem);
}

.tryon-title h2 em {
  color: color-mix(in oklab, var(--ls-pink) 50%, var(--ls-ink));
}

.tryon-title > p:last-child {
  font-size: 1.05rem;
  color: var(--ls-ink-2);
}

.tryon-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  background: var(--ls-ink);
  color: var(--ls-paper);
  font-size: 0.85rem;
  font-weight: 700;
}

.tryon-pill svg {
  width: 16px;
  height: 16px;
  color: var(--ls-pink);
}

.tryon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tryon-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: clamp(18px, 2.4vw, 28px);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(47, 36, 32, 0.08);
}

.tryon-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tryon-panel-head h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
}

.ls-step {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ls-ink);
  color: var(--ls-paper);
  font-family: var(--ls-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0;
}

.tryon-hint {
  font-size: 0.8rem;
  color: var(--ls-ink-3);
}

.tryon-upload {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 26px 18px;
  border: 1.5px dashed var(--ls-line-strong);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ls-ink);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, transform 0.4s var(--ease-out);
}

.tryon-upload:hover {
  border-color: var(--ls-pink);
  background: #fff;
  transform: translateY(-2px);
}

.tryon-upload input {
  display: none;
}

.tryon-upload svg {
  width: 30px;
  height: 30px;
  color: color-mix(in oklab, var(--ls-pink) 70%, var(--ls-ink));
}

.tryon-upload-text {
  font-weight: 700;
}

.tryon-preview,
.tryon-result {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.35));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.tryon-preview img,
.tryon-result img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tryon-preview.is-loaded img,
.tryon-result.is-loaded img {
  display: block;
  animation: ls-fade-in 0.8s var(--ease-out) both;
}

@keyframes ls-fade-in {
  from {
    opacity: 0;
    transform: scale(1.03);
  }
}

.tryon-preview-placeholder,
.tryon-result-placeholder {
  max-width: 24ch;
  padding: 16px;
  font-family: var(--ls-serif);
  font-size: 1.15rem;
  font-style: italic;
  text-align: center;
  color: var(--ls-ink-3);
}

.tryon-preview.is-loaded .tryon-preview-placeholder,
.tryon-result.is-loaded .tryon-result-placeholder {
  display: none;
}

.tryon-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: rgba(255, 250, 246, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tryon-loading-inner {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.tryon-loading-text {
  display: grid;
  gap: 4px;
}

.tryon-loading-copy {
  font-family: var(--ls-serif);
  font-size: 1.3rem;
  color: var(--ls-ink);
}

.tryon-loading-sub {
  font-size: 0.85rem;
  color: var(--ls-ink-3);
}

.tryon-spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, var(--ls-pink), var(--ls-lilac));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: ls-spin 1s linear infinite;
}

@keyframes ls-spin {
  to {
    transform: rotate(360deg);
  }
}

.tryon-loading-bars {
  display: flex;
  gap: 6px;
}

.tryon-loading-bar {
  width: 34px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--ls-lilac), var(--ls-pink));
  animation: ls-pulse 1.2s var(--ease-in-out) infinite;
}

.tryon-loading-bar:nth-child(2) {
  animation-delay: 0.15s;
}

.tryon-loading-bar:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes ls-pulse {
  50% {
    opacity: 0.25;
    transform: scaleX(0.6);
  }
}

.tryon-consent {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 1px var(--ls-line);
  transition: box-shadow 0.3s;
}

.tryon-consent[data-state="error"] {
  box-shadow: inset 0 0 0 1.5px #c0504d;
}

.tryon-consent-title {
  font-weight: 700;
  color: var(--ls-ink);
}

.tryon-consent-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ls-ink-2);
  cursor: pointer;
}

.tryon-consent-item input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--ls-ink);
}

.tryon-consent-links a {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ls-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tryon-consent-error {
  font-size: 0.85rem;
  font-weight: 600;
  color: #b0413e;
}

.tryon-garment {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px 14px;
  padding: 16px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.6);
}

.tryon-garment > svg {
  width: 24px;
  height: 24px;
  color: var(--ls-ink-2);
}

.tryon-garment-copy {
  display: grid;
}

.tryon-garment-copy span {
  font-weight: 700;
  color: var(--ls-ink);
}

.tryon-garment-copy small {
  font-size: 0.8rem;
  color: var(--ls-ink-3);
}

.tryon-garment-thumbs {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
}

.tryon-garment-thumb {
  position: relative;
  margin: 0;
  width: 84px;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.tryon-garment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tryon-garment-thumb figcaption {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.64rem;
  font-weight: 700;
  text-align: center;
}

.tryon-generate {
  grid-column: 1 / -1;
  width: 100%;
}

.tryon-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 24px;
  align-items: center;
  margin-top: 22px;
}

.tryon-status {
  font-weight: 700;
  color: var(--ls-ink);
}

.tryon-status[data-tone="error"] {
  color: #b0413e;
}

.tryon-status[data-tone="success"] {
  color: #3b7a57;
}

.tryon-status[data-tone="loading"]::before {
  content: "✦ ";
  color: var(--ls-pink);
}

.tryon-tips {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ls-ink-2);
}

.tryon-tips svg {
  width: 16px;
  height: 16px;
}

.tryon-disclaimer {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: var(--ls-ink-3);
}

/* ---------- Modales ---------- */
body.tryon-modal-open,
body.product-media-modal-open {
  overflow: hidden;
}

.tryon-modal,
.product-square-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.tryon-modal[hidden],
.product-square-modal[hidden] {
  display: none;
}

.tryon-modal-backdrop,
.product-square-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 18, 28, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: ls-fade 0.4s var(--ease-out) both;
}

@keyframes ls-fade {
  from {
    opacity: 0;
  }
}

.tryon-modal-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  width: min(480px, 100%);
  padding: 32px;
  border-radius: var(--r-lg);
  background: var(--ls-paper);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3);
  animation: ls-modal-in 0.6s var(--ease-out) both;
}

@keyframes ls-modal-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
}

.tryon-modal-close,
.product-square-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ls-ink) 8%, #fff);
  color: var(--ls-ink);
  transition: background 0.3s, color 0.3s;
}

.tryon-modal-close:hover,
.product-square-modal-close:hover {
  background: var(--ls-ink);
  color: var(--ls-paper);
}

.tryon-modal-close svg,
.product-square-modal-close svg {
  width: 18px;
  height: 18px;
}

.tryon-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 40px;
}

.tryon-modal-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ls-grad);
  color: #fff;
}

.tryon-modal-icon svg {
  width: 22px;
  height: 22px;
}

.tryon-modal-title {
  font-size: 1.6rem;
}

.tryon-modal-copy {
  color: var(--ls-ink-2);
}

.tryon-modal-actions {
  display: flex;
  justify-content: flex-end;
}

.product-square-modal-card {
  position: relative;
  z-index: 1;
  width: min(980px, 94vw);
  max-height: 92vh;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.35);
  animation: ls-modal-in 0.6s var(--ease-out) both;
}

.product-square-modal-image {
  display: block;
  width: 100%;
  max-height: 92vh;
  object-fit: contain;
  background: #fff;
}

/* ---------- Relacionados ---------- */
.ls-related__grid {
  --cols: 4;
}

.ls-related {
  padding-bottom: calc(var(--section) + var(--r-xl));
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1200px) {
  .ls-related__grid {
    --cols: 3;
  }
}

@media (max-width: 980px) {
  .ls-pdp {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "gallery"
      "info"
      "extras";
  }

  .ls-pdp__sticky {
    position: static;
    padding-top: 28px;
  }

  .product-carousel {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .product-thumbs {
    order: 0;
    display: flex;
    gap: 8px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .product-thumb {
    flex: 0 0 64px;
  }

  .product-main-frame {
    border-radius: var(--r-md);
  }

  .product-gallery {
    display: grid;
    gap: 14px;
  }

  .product-gallery-item.product-video-card {
    border-radius: var(--r-md);
  }

  .product-gallery-item .product-video {
    aspect-ratio: 4 / 5;
  }

  .product-square-list,
  .ls-pdp__extras {
    margin-left: 0;
  }

  .ls-pdp__extras {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .ls-pdp__extras-copy {
    display: none;
  }

  .tryon-grid {
    grid-template-columns: 1fr;
  }

  .ls-related__grid {
    --cols: 2;
  }
}

@media (max-width: 980px) {
  /* En móvil: fotos → nombre, precio y compra → vídeo → fotos de producto */
  #productGrid.ls-pdp {
    display: flex;
    flex-direction: column;
  }

  #productGrid > .product-gallery {
    display: contents;
  }

  #productGrid .product-carousel {
    order: 1;
  }

  #productGrid > .product-info {
    order: 2;
  }

  #productGrid .product-gallery-item.product-video-card {
    order: 3;
    width: 100%;
    margin-top: 28px;
  }

  #productGrid > .ls-pdp__extras {
    order: 4;
  }

  #productGrid .product-gallery > .product-gallery-item:not(.product-video-card) {
    order: 1;
  }

  .tryon-panel-head {
    flex-wrap: wrap;
  }

  .tryon-preview:not(.is-loaded),
  .tryon-result:not(.is-loaded) {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 640px) {
  .product-title {
    font-size: 2.5rem;
  }

  .product-nav {
    width: 40px;
    height: 40px;
    bottom: 12px;
  }

  .product-nav-prev {
    right: 58px;
  }

  .product-nav-next {
    right: 12px;
  }

  .tryon-card {
    padding: 24px 16px;
    border-radius: var(--r-lg);
  }

  .tryon-header {
    align-items: flex-start;
  }

  .tryon-panel {
    padding: 16px;
  }

  .tryon-footer {
    grid-template-columns: 1fr;
  }

  .variant-btn {
    height: 40px;
    font-size: 0.8rem;
  }
}

/* Vídeo de producto: los vídeos son verticales 9:16. Se muestran enteros (sin cortar
   cabezas) en ordenador y en móvil. Cuando en su lugar hay una imagen, se ancla arriba. */
.product-video-card video.product-video,
.product-gallery-item video.product-video {
  aspect-ratio: 9 / 16;
}

.product-video-card img.product-video {
  object-position: 50% 12%;
}
