/* ============================================================
   Yuly Danza 9 — ficha de producto
   Se enlaza desde templates/catalog/product.tpl. Todo bajo body#product.
   ============================================================ */
body#product {
  --yp-ink: #2b2528;
  --yp-ink-soft: #6f6367;
  --yp-muted: #8d8386;
  --yp-line: #ebe4e3;
  --yp-border: #ddd3d4;
  --yp-pink: #c36975; /* rosa empolvado, igual que la portada */
  --yp-pink-dark: #ab4f5c;
  --yp-pink-soft: #f6e9ea;
  --yp-stage: #f1ecea;
  --yp-serif: "Playfair Display", Georgia, serif; /* cifras alineadas: 6,5 · 99,00 */
  --yp-sans: "Jost", "Poppins", "Helvetica Neue", Arial, sans-serif;
}

body#product #wrapper { padding: 0 0 48px; }
body#product #wrapper > .container {
  max-width: 1300px;
  width: 100%;
  padding-left: 24px;
  padding-right: 24px;
}
body#product #wrapper .breadcrumb {
  font-family: var(--yp-sans);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}
body#product .yp { font-family: var(--yp-sans); color: var(--yp-ink); }

/* ---------- Estructura: galería | información ---------- */
body#product .yp-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  margin: 0;
}
body#product .yp-top::before,
body#product .yp-top::after { display: none; }
body#product .yp-media { position: relative; min-width: 0; }
body#product .yp-media .page-content,
body#product #content { max-width: none; margin: 0; padding: 0; background: none; box-shadow: none; } /* classic limita #content a 452px */

/* ---------- Galería ---------- */
body#product .yp-gallery {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-areas: "thumbs stage" ". dots";
  gap: 14px 16px;
  margin: 0;
}
body#product .yp-gallery:not(:has(.yp-thumbs)) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "dots"; }
body#product .yp-thumbs,
body#product #main .images-container .js-qv-mask.scroll.yp-thumbs { grid-area: thumbs; width: auto; height: auto; overflow: visible; margin: 0; } /* classic resta 60px con .scroll */
body#product .yp-thumbs .product-images {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: auto !important;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: none !important;
}
body#product .yp-thumbs .thumb-container { display: block; width: 64px; height: auto; margin: 0; }
body#product .images-container .yp-thumbs .thumb {
  display: block;
  width: 64px;
  max-width: none;
  height: 76px;
  margin: 0;
  padding: 0;
  object-fit: cover;
  background: var(--yp-stage);
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  opacity: .78;
  transition: opacity .15s ease, border-color .15s ease;
}
body#product .yp-thumbs .thumb:hover { opacity: 1; }
body#product .yp-thumbs .thumb.selected { border-color: var(--yp-pink); opacity: 1; }

body#product .yp-stage { grid-area: stage; position: relative; min-width: 0; }
body#product .yp-stage .product-cover {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  background: var(--yp-stage);
  border-radius: 4px;
  overflow: hidden;
}
body#product .yp-stage .product-cover picture,
body#product .yp-stage .product-cover img {
  display: block;
  width: 100%;
  height: 100%;
}
body#product .yp-stage .product-cover img { object-fit: contain; mix-blend-mode: multiply; box-shadow: none; }
body#product .yp-stage .product-cover .layer { position: absolute; inset: 0; background: transparent; opacity: 1; cursor: zoom-in; }
body#product .yp-stage .product-cover .layer:hover { background: transparent; }

body#product .yp-stage-arrow,
body#product .yp-fav-heart {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--yp-ink);
  box-shadow: 0 2px 8px rgba(60, 30, 40, .12);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
body#product .yp-stage-arrow svg,
body#product .yp-fav-heart svg { width: 18px; height: 18px; }
body#product .yp-stage-arrow:hover,
body#product .yp-fav-heart:hover { background: #fff; color: var(--yp-pink); }
body#product .yp-stage-arrow { top: 50%; transform: translateY(-50%); }
body#product .yp-stage-arrow.is-prev { left: 14px; }
body#product .yp-stage-arrow.is-next { right: 14px; }
body#product .yp-fav-heart { top: 14px; right: 14px; }
body#product .yp-stage-arrow:focus-visible,
body#product .yp-fav-heart:focus-visible { outline: 2px solid var(--yp-pink); outline-offset: 2px; }

body#product .yp-dots { grid-area: dots; display: flex; justify-content: center; gap: 8px; margin: 0; }
body#product .yp-dots span { width: 7px; height: 7px; border-radius: 50%; background: #d9cfd1; transition: background .15s ease; }
body#product .yp-dots span.is-active { background: var(--yp-pink); }

body#product .yp-media .product-flags { position: absolute; top: 12px; left: 92px; z-index: 2; margin: 0; padding: 0; pointer-events: none; }
body#product .yp-media .product-flags li.product-flag {
  margin: 0 0 6px;
  padding: 3px 8px;
  background: var(--yp-pink);
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  min-height: 0;
}
body#product .yp-media .product-flags li.product-flag.out_of_stock { background: var(--yp-muted); }

/* ---------- Información ---------- */
body#product .yp-info { min-width: 0; padding-top: 4px; }
body#product .yp-title {
  margin: 0 0 10px;
  font-family: var(--yp-serif);
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: none;
  color: var(--yp-ink);
}
body#product .yp-short,
body#product .yp-short p {
  margin: 0;
  max-width: 52ch;
  font-size: 14px;
  line-height: 1.6;
  color: var(--yp-ink-soft);
}
body#product .yp-short { margin-bottom: 16px; }

body#product .yp-prices { margin: 0 0 22px; }
body#product .yp-prices .product-price { margin: 0; }
body#product .yp-prices .current-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; color: var(--yp-ink); }
body#product .yp-prices .current-price-value {
  font-family: var(--yp-serif);
  font-size: 28px;
  font-weight: 700; /* precio actual en negrita */
  font-variant-numeric: lining-nums;
  letter-spacing: 0;
  color: var(--yp-ink);
}
body#product .yp-prices .regular-price { font-size: 16px; color: var(--yp-muted); text-decoration: line-through; }
body#product .yp-prices .discount {
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--yp-pink);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  margin: 0;
}
body#product .yp-prices .tax-shipping-delivery-label { margin-top: 2px; font-size: 12px; color: var(--yp-muted); }

/* Variantes */
body#product .product-variants { margin: 0 0 20px; }
body#product .yp-variant { margin: 0 0 18px; }
body#product .yp-variant-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
body#product .yp-variant .control-label {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--yp-ink);
  text-transform: none;
}
body#product .yp-variant .control-label::first-letter { text-transform: uppercase; }
body#product .yp-size-guide { white-space: nowrap; font-size: 12px; color: var(--yp-ink-soft); text-decoration: underline; text-underline-offset: 3px; }
body#product .yp-size-guide:hover { color: var(--yp-pink); }

body#product .yp-colors,
body#product .yp-sizes { list-style: none; margin: 0; padding: 0; }
body#product .yp-colors { display: flex; flex-wrap: wrap; gap: 10px; }
body#product .yp-colors li,
body#product .yp-sizes li { float: none; margin: 0; }
body#product .yp-colors label,
body#product .yp-sizes label { display: block; margin: 0; cursor: pointer; }
body#product .product-variants .input-color,
body#product .product-variants .input-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
}
body#product .yp-colors .color {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--yp-border);
  background-size: cover;
  transition: box-shadow .15s ease;
}
body#product .yp-colors label:hover .color { box-shadow: 0 0 0 1px var(--yp-ink-soft); }
body#product .yp-colors .input-color:checked + .color { box-shadow: 0 0 0 1.5px var(--yp-pink); }
body#product .yp-colors .input-color:focus-visible + .color { outline: 2px solid var(--yp-pink); outline-offset: 3px; }

/* Tantas columnas como quepan (unas 6-7): sirve igual para S/M/L que para 34-41 con medias tallas */
body#product .yp-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
body#product .yp-sizes .radio-label {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 6px 4px;
  margin: 0;
  background: #fff;
  border: 1px solid var(--yp-border);
  border-radius: 3px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 400;
  color: var(--yp-ink);
  font-variant-numeric: tabular-nums;
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
}
body#product .yp-sizes label:hover .radio-label { border-color: var(--yp-ink-soft); }
body#product .yp-sizes .input-radio:checked + .radio-label { border-color: var(--yp-pink); background: #fff; box-shadow: inset 0 0 0 1px var(--yp-pink); }
body#product .yp-sizes .input-radio:focus-visible + .radio-label { outline: 2px solid var(--yp-pink); outline-offset: 2px; }

/* Opciones con texto largo (p. ej. «X (Estrecho)»): botones de ancho libre */
body#product .yp-sizes.is-wide { display: flex; flex-wrap: wrap; }
body#product .yp-sizes.is-wide .radio-label { min-width: 62px; padding: 6px 14px; white-space: nowrap; }

/* Agotado en todas las combinaciones: gris y tachado en diagonal */
body#product .yp-sizes .is-sold-out .radio-label {
  position: relative;
  color: #b3a9ab;
  background: #faf8f8;
  border-color: #e6dfe0;
  overflow: hidden;
}
body#product .yp-sizes .is-sold-out .radio-label::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right, transparent calc(50% - .5px), #d6cdcf calc(50% - .5px), #d6cdcf calc(50% + .5px), transparent calc(50% + .5px));
  pointer-events: none;
}
body#product .yp-colors .is-sold-out .color { position: relative; opacity: .45; }
body#product .yp-colors .is-sold-out .color::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 1.5px;
  background: var(--yp-ink-soft);
  transform: translateX(-50%) rotate(45deg);
}

/* Compra */
body#product .product-actions { margin: 0; }
body#product .product-add-to-cart { margin: 0; }
body#product .yp-buy {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}
body#product .yp-qty { display: none; }
body#product .yp-buy .add { width: auto; margin: 0; }
body#product .yp-module-actions { display: none; }
body#product .yp-add,
body#product .yp-fav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  width: 100%;
  margin: 0;
  padding: 0 16px;
  border-radius: 3px;
  font-family: var(--yp-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .01em;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
body#product .yp-add svg,
body#product .yp-fav svg { width: 19px; height: 19px; flex: none; }
body#product .yp-add { background: var(--yp-pink); border: 1px solid var(--yp-pink); color: #fff; }
body#product .yp-add:hover:not([disabled]) { background: var(--yp-pink-dark); border-color: var(--yp-pink-dark); }
body#product .yp-add[disabled] { background: #cfc6c8; border-color: #cfc6c8; cursor: not-allowed; opacity: 1; }
body#product .yp-fav { background: #fff; border: 1px solid var(--yp-border); color: var(--yp-ink); }
body#product .yp-fav:hover { border-color: var(--yp-pink); color: var(--yp-pink); }
body#product .yp-add:focus-visible,
body#product .yp-fav:focus-visible { outline: 2px solid var(--yp-pink); outline-offset: 2px; }

body#product .product-availability { margin: 0; }
body#product .yp-stock { margin: 10px 0 0; font-size: 13px; color: var(--yp-pink-dark); }
body#product .yp-stock small { display: block; color: var(--yp-muted); }
body#product .product-minimal-quantity { margin: 6px 0 0; font-size: 12px; color: var(--yp-muted); }
body#product .product-minimal-quantity:empty { display: none; }
body#product .product-discounts { margin: 0; }

/* Compartir en redes y demás módulos: fuera de la zona de compra */
body#product .yp-additional-info .social-sharing { display: none; }
body#product .yp-additional-info .product-additional-info:empty { display: none; }

/* Garantías */
body#product .yp-trust {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 26px 0 0;
  padding: 18px 0 0;
  list-style: none;
  border-top: 1px solid var(--yp-line);
}
body#product .yp-trust li {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 2px 10px;
  text-align: center;
  font-size: 13px;
  color: var(--yp-ink-soft);
}
body#product .yp-trust li + li { border-left: 1px solid var(--yp-line); }
body#product .yp-trust svg { width: 26px; height: 26px; color: var(--yp-ink); }

/* ---------- Pestañas ---------- */
body#product .yp-tabs {
  margin: 44px 0 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
body#product .yp-tabs .nav-tabs {
  display: flex;
  gap: 32px;
  margin: 0;
  border-bottom: 1px solid var(--yp-line);
}
body#product .yp-tabs .nav-item { margin: 0; }
body#product .yp-tabs .nav-link {
  display: block;
  margin: 0 0 -1px;
  padding: 10px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--yp-ink-soft);
  font-size: 15px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
body#product .yp-tabs .nav-link:hover { color: var(--yp-ink); }
body#product .yp-tabs .nav-link.active { border-bottom-color: var(--yp-pink); color: var(--yp-ink); font-weight: 500; }
body#product .yp-tabs .tab-content { padding: 20px 0 0; font-size: 14px; line-height: 1.7; color: var(--yp-ink-soft); }
body#product .yp-tabs .product-description { max-width: 80ch; }
body#product .yp-tabs .product-description p { margin: 0 0 .6em; }
body#product .yp-tabs .product-description ul { padding-left: 1.1em; }
body#product .yp-shipping p { margin: 0 0 .5em; }
body#product .yp-shipping ul,
body#product .yp-shipping ol { margin: 0 0 .5em; padding-left: 1.2em; }
body#product .yp-shipping ul { list-style: disc; }
body#product .yp-shipping ol { list-style: decimal; }
body#product .yp-shipping a { color: var(--yp-pink); text-decoration: underline; text-underline-offset: 3px; }
body#product .yp-shipping a:hover { color: var(--yp-pink-dark); }

/* ---------- También te puede interesar ---------- */
body#product .yp-related { margin: 48px 0 0; padding: 0; border: 0; }
body#product .yp-related-title {
  margin: 0 0 16px;
  font-family: var(--yp-serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--yp-ink);
  text-transform: none;
  letter-spacing: 0;
}
body#product .yp-related-wrap { position: relative; }
body#product .yp-related-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 4 * 16px) / 5);
  gap: 16px;
  margin: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
body#product .yp-related-track::-webkit-scrollbar { display: none; }
body#product .yp-related-track::before,
body#product .yp-related-track::after { display: none; }
body#product .yp-related-track > .js-product,
body#product .yp-related-track > .product {
  width: auto;
  max-width: none;
  float: none;
  padding: 0;
  margin: 0;
  scroll-snap-align: start;
}
body#product .yp-related-arrow {
  position: absolute;
  top: 38%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--yp-line);
  border-radius: 50%;
  background: #fff;
  color: var(--yp-ink);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(60, 30, 40, .1);
}
body#product .yp-related-arrow svg { width: 17px; height: 17px; }
body#product .yp-related-arrow.is-prev { left: -17px; }
body#product .yp-related-arrow.is-next { right: -17px; }
body#product .yp-related-arrow:hover { color: var(--yp-pink); }

/* Tarjetas de producto (mismo estilo que el listado de categoría) */
body#product .yp-related .product-miniature .thumbnail-container {
  height: 100%;
  margin: 0;
  border: 1px solid var(--yp-line);
  border-radius: 4px;
  box-shadow: none;
  background: #fff;
  transform: none;
}
body#product .yp-related .product-miniature .thumbnail-container:hover { transform: none; box-shadow: 0 10px 24px -16px rgba(60, 30, 40, .28); }
body#product .yp-related .product-miniature .thumbnail-top { background: var(--yp-stage); }
body#product .yp-related .product-miniature .product-thumbnail img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
body#product .yp-related .product-miniature .thumbnail-container:hover .product-thumbnail img { transform: none; }
body#product .yp-related .product-miniature .highlighted-informations { display: none; }
body#product .yp-related .product-miniature .product-description { min-height: 0; padding: 10px 12px 12px; text-align: center; }
body#product .yp-related .product-miniature .product-title {
  margin: 0 0 4px;
  font-family: var(--yp-sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  text-transform: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body#product .yp-related .product-miniature .product-title a { color: var(--yp-ink-soft); }
body#product .yp-related .product-miniature .product-price-and-shipping { font-size: 13px; font-weight: 600; color: var(--yp-ink); text-align: center; }
body#product .yp-related .product-miniature .product-price-and-shipping .price { color: var(--yp-ink); }
body#product .yp-related .yuly-card-colors { display: none; }

/* ---------- Tablet ---------- */
@media (max-width: 991px) {
  body#product .yp-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
  body#product .yp-buy { grid-template-columns: 1fr; }
  body#product .yp-related-track { grid-auto-columns: calc((100% - 2 * 16px) / 3); }
}

/* ---------- Móvil ---------- */
@media (max-width: 767px) {
  body#product #wrapper > .container { padding-left: 16px; padding-right: 16px; }
  body#product .yp-top { display: block; }
  body#product .yp-media { margin: 0 -16px 18px; }

  body#product .yp-gallery { display: flex; flex-direction: column; gap: 10px; }
  body#product .yp-stage { order: 1; }
  body#product .yp-thumbs,
  body#product #main .images-container .js-qv-mask.scroll.yp-thumbs { order: 2; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  body#product .yp-thumbs::-webkit-scrollbar { display: none; }
  body#product .yp-dots { order: 3; }
  body#product .yp-thumbs .product-images { flex-direction: row; width: max-content !important; }
  body#product .yp-thumbs .thumb-container { width: 52px; }
  body#product .images-container .yp-thumbs .thumb { width: 52px; height: 60px; }
  body#product .yp-stage .product-cover { border-radius: 0; aspect-ratio: 1 / 1.05; }
  body#product .yp-stage-arrow { width: 32px; height: 32px; }
  body#product .yp-stage-arrow.is-prev { left: 10px; }
  body#product .yp-stage-arrow.is-next { right: 10px; }
  body#product .yp-media .product-flags { left: 12px; }

  body#product .yp-title { font-size: 24px; }
  body#product .yp-short { font-size: 13px; }
  body#product .yp-prices .current-price-value { font-size: 24px; }
  body#product .yp-sizes { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
  body#product .yp-sizes .radio-label { min-height: 34px; font-size: 12px; }
  body#product .yp-buy { grid-template-columns: 1fr; }

  body#product .yp-tabs { margin-top: 32px; }
  body#product .yp-tabs .nav-tabs { gap: 22px; overflow-x: auto; flex-wrap: nowrap; }
  body#product .yp-tabs .nav-link { white-space: nowrap; }

  body#product .yp-related { margin-top: 36px; }
  body#product .yp-related-track { grid-auto-columns: 44%; gap: 12px; margin-right: -16px; padding-right: 16px; }
  body#product .yp-related-arrow { display: none; }
}
