/* =========================================================
 * PÁGINAS
 * ========================================================= */

/* ---------- Inicio: hero ----------
 * Composición tipo portada del manual: marco con retícula, titular grande en Anton
 * y la fotografía de campaña con los destellos del logotipo. */
.hero { padding-block: clamp(20px, 3vw, 40px) clamp(56px, 7vw, 96px); overflow: hidden; }
.hero__frame {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(28px, 5vw, 72px) clamp(20px, 4vw, 56px);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.hero__title {
  margin-top: 22px;
  font-size: clamp(76px, 9.8vw, 156px);
  line-height: .86;
}
.hero__title > span { display: inline-block; animation: rise 1s var(--ease-out) both; }
.hero__title > span:nth-child(2) { animation-delay: .08s; }
.hero__title > span:nth-child(3) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(.35em); } }
.hero__eyebrow, .hero__lead, .hero__actions, .hero__stats { animation: rise .9s var(--ease-out) .25s both; }
.hero__lead { max-width: 46ch; margin-top: 26px; font-size: 18px; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; margin-top: 44px; border-top: 1px solid var(--fg); }
.hero__stats div { padding: 12px 32px 0 0; margin-right: 32px; border-right: 1px solid var(--line); }
.hero__stats div:last-child { border-right: 0; margin-right: 0; }
.hero__stats dt { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.hero__stats dd { font-family: var(--f-display); font-size: 44px; line-height: 1.05; }

.hero__visual { position: relative; padding: 0 0 56px 40px; }
.hero__pattern {
  position: absolute;
  inset: -40px -60px 20px 0;
  background: url('../assets/brand/patterns/orbitas.svg') 0 0 / 98px 120px;
  opacity: .35;
  -webkit-mask: radial-gradient(ellipse 65% 60% at 70% 45%, #000 35%, transparent 72%);
  mask: radial-gradient(ellipse 65% 60% at 70% 45%, #000 35%, transparent 72%);
}
.hero__photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; animation: photo-in 1.2s var(--ease-out) .1s both; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
@keyframes photo-in { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }
.hero__spark { position: absolute; top: -18px; right: -14px; font-size: 54px; color: var(--arena); }
.hero__spark--b { top: auto; right: auto; bottom: 120px; left: 8px; font-size: 32px; }
.hero__seal { position: absolute; top: 32px; left: 0; animation: rise .9s var(--ease-out) .6s both; }
.hero__pick {
  position: absolute;
  right: 24px;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(340px, 86%);
  padding: 10px 18px 10px 10px;
  background: var(--arena);
  color: var(--navy);
  box-shadow: 0 18px 40px rgb(0 0 31 / .5);
  animation: rise .9s var(--ease-out) .75s both;
  transition: transform .4s var(--ease-out);
}
.hero__pick:hover { transform: translateY(-4px); }
.hero__pick img { width: 64px; aspect-ratio: 4 / 5; object-fit: cover; flex: none; }
.hero__pick > span:not(.btn__arrow) { display: grid; flex: 1; min-width: 0; }
.hero__pick small { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--scarlet-deep); }
.hero__pick strong { font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.05; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero__pick em { font-style: normal; font-weight: 700; font-size: 14px; }
.hero__pick .btn__arrow { font-size: 22px; }
.hero__pick:hover .btn__arrow { transform: translateX(4px); }

@media (max-width: 960px) {
  .hero__frame { grid-template-columns: 1fr; }
  .hero__visual { max-width: 560px; width: 100%; margin-inline: auto; padding-left: 0; }
  .hero__seal { left: -12px; }
}
@media (max-width: 600px) {
  .hero { padding-top: 12px; }
  .hero__frame { padding: 28px 16px 36px; gap: 36px; }
  .hero__title { font-size: clamp(64px, 22vw, 96px); margin-top: 16px; }
  .hero__lead { font-size: 16px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .hero__stats { grid-template-columns: repeat(3, 1fr); margin-top: 32px; }
  .hero__stats div { padding-right: 0; margin-right: 0; padding-left: 12px; }
  .hero__stats div:first-child { padding-left: 0; }
  .hero__stats dd { font-size: 34px; }
  .hero__visual { padding-bottom: 40px; }
  .hero__seal { width: 96px; height: 96px; top: -30px; left: auto; right: 8px; }
  .hero__seal .ico { font-size: 26px; }
  .hero__spark { display: none; }
  .hero__spark--b { display: block; bottom: 90px; left: 10px; }
  .hero__pick { right: 12px; left: 12px; width: auto; }
}

/* ---------- Banda promocional ----------
 * Fotografía de campaña + patrón "kova" (3.6) como textura de fondo. */
.promo { position: relative; padding-block: clamp(64px, 9vw, 128px); overflow: hidden; }
.promo__pattern { position: absolute; inset: 0; background: url('../assets/brand/patterns/kova.svg') 0 0 / 288px 169px; opacity: .1; }
@media (max-width: 860px) { .promo__pattern { opacity: .06; } }
/* Parallax (js/components/parallax.js): la foto queda más alta que su marco y se desliza dentro de él; el patrón
 * de fondo va en sentido contrario. Sin JS o con «reducir movimiento» todo queda quieto y en su sitio. */
.has-parallax .promo__pattern { inset: -12% 0; will-change: translate; }
.has-parallax .promo__photo { position: relative; }
.has-parallax .promo__photo img { position: absolute; left: 0; top: -9%; height: 118%; will-change: translate; }
.promo__inner { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 6vw, 96px); }
.promo__photo { aspect-ratio: 4 / 5; overflow: hidden; outline: 1px solid var(--line-strong); outline-offset: 10px; }
.promo__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.promo__photo:hover img { transform: scale(1.04); }
.promo__tag { font-size: 18px; padding: 8px 14px 7px; }
.promo__title { font-size: clamp(60px, 8.6vw, 136px); margin: 22px 0 24px; }
.promo__copy p { max-width: 42ch; font-size: 18px; color: var(--muted); margin-bottom: 34px; }
@media (max-width: 860px) {
  .promo__inner { grid-template-columns: 1fr; }
  .promo__photo { aspect-ratio: 4 / 3; outline-offset: 6px; }
  .promo__copy .btn { width: 100%; }
}

/* ---------- Cómo comprar ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: step; padding: 0; list-style: none; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.step { position: relative; padding: clamp(24px, 3vw, 40px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; transition: background-color .4s var(--ease); }
.step:hover { background: rgb(240 231 222 / .04); }
.step__num { position: absolute; right: clamp(16px, 2vw, 28px); top: clamp(14px, 2vw, 24px); font-family: var(--f-display); font-size: clamp(72px, 7vw, 104px); line-height: .9; color: var(--ghost); pointer-events: none; transition: transform .6s var(--ease-out); }
.step:hover .step__num { transform: translateY(-6px); }
.step__ico { font-size: 44px; width: 1.4em; margin-bottom: 44px; color: var(--scarlet); }
.step__title { font-size: clamp(34px, 3.4vw, 48px); margin-bottom: 12px; }
.step p { max-width: 30ch; color: var(--muted); }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .step { display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; align-items: start; }
  .step__ico { grid-row: span 2; margin: 4px 0 0; font-size: 36px; }
  .step__num { font-size: 64px; }
  .step__title, .step p { padding-right: 64px; }
}

/* ---------- Contacto ---------- */
.contact { position: relative; padding-block: clamp(80px, 11vw, 160px); overflow: hidden; border-top: 1px solid var(--line); }
.contact__pattern {
  position: absolute;
  inset: 0;
  background: url('../assets/brand/patterns/orbitas.svg') 0 0 / 98px 120px;
  opacity: .22;
  -webkit-mask: radial-gradient(ellipse 60% 70% at 85% 50%, #000, transparent 70%);
  mask: radial-gradient(ellipse 60% 70% at 85% 50%, #000, transparent 70%);
}
.contact__inner { position: relative; }
.contact__title { font-size: clamp(68px, 11vw, 176px); margin: 20px 0 28px; }
.contact__lead { max-width: 48ch; font-size: 18px; color: var(--muted); }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; margin-top: 40px; }
.contact__handle { font-family: var(--f-display); font-size: clamp(26px, 3vw, 36px); text-transform: uppercase; background: linear-gradient(var(--scarlet), var(--scarlet)) 0 100% / 0 3px no-repeat; transition: background-size .45s var(--ease-out); }
.contact__handle:hover { background-size: 100% 3px; }
@media (max-width: 600px) {
  .contact__title { font-size: clamp(60px, 19vw, 88px); }
  .contact__actions .btn { width: 100%; white-space: normal; }
}

/* ---------- Página de producto ---------- */
.pdp { padding-block: 22px clamp(64px, 8vw, 112px); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: clamp(20px, 3vw, 36px); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.crumbs a:hover { color: var(--fg); }
.crumbs .ico { font-size: 11px; color: var(--scarlet); }
.crumbs [aria-current] { color: var(--fg); }
.pdp__grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }

.gallery { display: grid; gap: 12px; }
.gallery__main { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--arena); touch-action: pan-y; }
.gallery__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity .5s var(--ease), transform .8s var(--ease-out); }
.gallery__img.is-active { opacity: 1; transform: none; }
.gallery__count { position: absolute; right: 16px; top: 14px; font-size: 13px; font-weight: 600; letter-spacing: .12em; color: var(--navy); }
.gallery__thumbs { display: flex; gap: 10px; }
.gallery__thumb { width: 84px; aspect-ratio: 4 / 5; overflow: hidden; background: var(--arena); outline: 1.5px solid transparent; outline-offset: 3px; opacity: .55; transition: opacity .25s, outline-color .25s; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb:hover { opacity: .85; }
.gallery__thumb.is-active { opacity: 1; outline-color: var(--fg); }

.pdp__info { position: sticky; top: calc(var(--header-h) + 24px); }
.pdp__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pdp__name { font-size: clamp(56px, 6.6vw, 104px); margin: 16px 0 20px; overflow-wrap: anywhere; }
.pdp__priceRow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-block: 1px solid var(--fg); }
.pdp__price { font-family: var(--f-display); font-size: 38px; line-height: 1; font-variant-numeric: tabular-nums; }
.pdp__desc { margin: 22px 0 26px; font-size: 17px; color: var(--muted); max-width: 52ch; }
.pdp__note { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.pdp__note .ico { font-size: 22px; width: 1.4em; color: var(--fg); }

/* Selector de tallas: la talla elegida se encierra en un círculo, como en la etiqueta colgante. */
.sizes { border: 0; padding: 0; margin: 0 0 24px; }
.sizes__legend { display: flex; justify-content: space-between; width: 100%; margin-bottom: 12px; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.sizes__hint { font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--muted); }
.sizes__list { display: flex; flex-wrap: wrap; gap: 10px; }
.size { position: relative; cursor: pointer; }
.size input { position: absolute; opacity: 0; pointer-events: none; }
.size span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  font-family: var(--f-display);
  font-size: 22px;
  transition: border-color .25s, background-color .25s, color .25s, transform .2s var(--ease-out);
}
.size:hover span { border-color: var(--fg); }
.size input:checked + span { border-color: var(--fg); background: var(--fg); color: var(--bg); transform: scale(1.06); }
.size input:focus-visible + span { outline: 2px solid var(--scarlet); outline-offset: 3px; }
.size.is-out { cursor: not-allowed; }
.size.is-out span { opacity: .35; background: linear-gradient(135deg, transparent calc(50% - 1px), currentColor calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)); }
.sizes.is-error .sizes__hint { color: var(--scarlet); font-weight: 700; }
.sizes.is-error .sizes__list { animation: nudge .4s var(--ease); }
.sizes.is-error .size:not(.is-out) span { border-color: var(--scarlet); }
@keyframes nudge { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* Etiqueta colgante (mockup de etiquetas del manual): marca responsive + datos del producto. */
.hangtag {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px 22px;
  margin-top: 30px;
  padding: 26px 24px 18px 26px;
  border: 1px solid var(--line-strong);
}
.hangtag__hole { position: absolute; top: 50%; left: -9px; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-strong); }
.hangtag__mark { width: 72px; height: auto; transition: transform 1.2s var(--ease-out); }
.hangtag:hover .hangtag__mark { transform: rotate(90deg); }
.hangtag__list { display: grid; gap: 4px; font-size: 15px; }
.hangtag__list li { display: flex; align-items: center; gap: 10px; }
.hangtag__list li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--scarlet); }
.hangtag__ref { grid-column: 1 / -1; padding-top: 10px; margin-top: 6px; border-top: 1px dashed var(--line-strong); font-size: 12px; font-weight: 600; letter-spacing: .2em; color: var(--muted); text-align: right; }

/* Barra fija de compra (móvil). */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-strong);
  transform: translateY(100%);
  visibility: hidden;
  transition: transform .4s var(--ease-out), visibility 0s .4s;
}
.sticky-cta.is-visible { transform: none; visibility: visible; transition-delay: 0s; }
.sticky-cta strong { display: block; font-family: var(--f-display); font-weight: 400; font-size: 20px; line-height: 1.05; text-transform: uppercase; }
.sticky-cta span { font-size: 14px; font-weight: 600; color: var(--muted); }
.sticky-cta > div { min-width: 0; }
.sticky-cta strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 860px) {
  .pdp__grid { grid-template-columns: 1fr; }
  .pdp__info { position: static; }
  .gallery { margin-inline: calc(-1 * var(--gutter)); }
  .gallery__thumbs { padding-inline: var(--gutter); }
  .sticky-cta { display: flex; }
  .footer { padding-bottom: 96px; }
}

/* ---------- 404 ---------- */
.notfound { padding-block: clamp(40px, 6vw, 80px) clamp(80px, 10vw, 140px); }
.notfound__frame { padding: clamp(32px, 6vw, 80px) clamp(20px, 5vw, 64px); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.notfound__pill { display: inline-block; padding: 10px 20px 9px; border-radius: 10px; background: var(--arena); color: var(--navy); font-family: var(--f-display); font-size: 20px; text-transform: uppercase; }
.notfound__title { font-size: clamp(56px, 9vw, 140px); margin: 26px 0 20px; }
.notfound p { color: var(--muted); margin-bottom: 32px; max-width: 46ch; }

/* Selector de color (solo si el producto define `colors`). */
.color > span { background: var(--swatch); }
.color__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.color input:checked + span { background: var(--swatch); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--fg); }

/* ---------- Página del carrito ----------
 * Lista a la izquierda (como una tabla) y resumen fijo a la derecha en azul marino,
 * con la retícula del manual. */
.cartpage { padding-top: 22px; }
.cartpage__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 410px); gap: clamp(24px, 4vw, 56px); align-items: start; }
.cartpage__grid[hidden], .cartpage__empty[hidden] { display: none; }
.cartpage__cols, .cartpage .cart-line { grid-template-columns: 96px minmax(0, 1fr) 150px 130px 92px; }
.cartpage__cols {
  display: grid;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--fg);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.cartpage__cols span:first-child { grid-column: span 2; }
.cartpage__cols span:nth-child(3), .cartpage__cols span:nth-child(4) { text-align: right; }
.cartpage .cart-line { grid-template-areas: "media info qty subtotal remove"; gap: 18px; padding: 20px 0; }
.cartpage .cart-line__media { align-self: center; }
.cartpage .cart-line__name { font-size: clamp(24px, 2.2vw, 30px); }
.cartpage .cart-line__subtotal { font-size: 18px; }
.cartpage .cart-line__subLabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cartpage .cart-line__remove { align-self: center; }
.cartpage .qty { justify-self: start; }
.cartpage__back { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; background: linear-gradient(var(--scarlet), var(--scarlet)) 0 100% / 0 2px no-repeat; padding-bottom: 3px; transition: background-size .45s var(--ease-out); }
.cartpage__back:hover { background-size: 100% 2px; }
.cartpage__back:hover .btn__arrow { transform: translateX(-4px); }

.cartpage__summary {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: clamp(22px, 3vw, 32px);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  --row: 64px;
  --cols: 6;
}
.cartpage__sumTitle { font-size: clamp(44px, 4.4vw, 60px); margin: 12px 0 14px; }
.cartpage__continue { margin-top: 10px; }
.cartpage__note { display: flex; gap: 10px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.cartpage__note .ico { flex: none; font-size: 20px; width: 1.4em; color: var(--fg); }

.cartpage__empty { padding: clamp(24px, 5vw, 64px) clamp(20px, 5vw, 64px); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.cartpage__empty .cart-empty { padding: 0; }
.cartpage__empty .cart-empty__title { font-size: clamp(52px, 8vw, 120px); }
.cartpage__empty .btn { width: auto; min-height: 64px; padding-inline: 34px; font-size: 22px; }

@media (max-width: 1100px) {
  .cartpage__cols, .cartpage .cart-line { grid-template-columns: 84px minmax(0, 1fr) 132px 112px 40px; }
  .cartpage .cart-line__removeLabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cartpage .cart-line__remove { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .cartpage__cols span:last-child { visibility: hidden; }
}
@media (max-width: 960px) {
  .cartpage__grid { grid-template-columns: 1fr; }
  .cartpage__summary { position: static; }
}
@media (max-width: 680px) {
  /* En móvil cada línea vuelve al formato compacto del panel. */
  .cartpage__cols { display: none; }
  .cartpage .cart-line {
    grid-template-columns: 76px minmax(0, 1fr) auto;
    grid-template-areas: "media info remove" "media qty subtotal";
    gap: 10px 14px;
    padding: 16px 0;
  }
  .cartpage .cart-line__media { align-self: start; }
  .cartpage .cart-line__name { font-size: 22px; }
  .cartpage .cart-line__subLabel { position: static; width: auto; height: auto; clip: auto; }
  .cartpage .cart-line__remove { width: auto; height: auto; padding: 4px 0 4px 8px; }
  .cartpage .cart-line__removeLabel { position: static; width: auto; height: auto; clip: auto; }
  .cartpage .cart-line:first-child { border-top: 1px solid var(--fg); }
  .cartpage__empty .btn { width: 100%; }
}
