/*
 * Portada — Camisetas Básicas. Solo se encola en la portada (functions.php).
 * Paleta de la dirección creativa, acotada a .cb-home para no tocar la ficha ni el carrito:
 *   fondo #F8F7F4 · tinta #171717 · acento #E85D3F · blanco #FFF · línea #DCD8D0 · secundario #686868
 * El naranja va SIEMPRE como superficie con texto tinta (5,2:1); nunca como texto pequeño (3,2:1).
 * Todo en px: Shopire fija html{font-size:62.5%}.
 */

/* ── Barra de anuncio (fuera de .cb-home, justo encima de la cabecera) ───────────────── */
.cb-announce { background: #171717; color: #F8F7F4; text-align: center; padding: 10px 16px; }
.cb-announce p { margin: 0; font: 600 12px/1.35 var(--cb-font, "Archivo", system-ui, sans-serif); letter-spacing: .12em; text-transform: uppercase; }
.cb-announce a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* La cabecera de la portada es la original de Shopire (template-parts/site-header.php la delega
   en el tema padre): aquí no se le aplica ningún estilo propio. */

/* ── Base ────────────────────────────────────────────────────────────────────────────── */
.cb-home {
	--h-bg: #F8F7F4; --h-ink: #171717; --h-accent: #E85D3F; --h-white: #FFFFFF; --h-line: #DCD8D0; --h-muted: #686868;
	--h-gutter: 20px; --h-sec: clamp(64px, 9vw, 120px);
	background: var(--h-bg); color: var(--h-ink); overflow-x: clip;
}
.cb-home .cb-wrap { padding-left: var(--h-gutter); padding-right: var(--h-gutter); max-width: 1320px; }
@media (min-width: 760px)  { .cb-home { --h-gutter: 32px; } }
@media (min-width: 1200px) { .cb-home { --h-gutter: 48px; } }
.cb-home .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cb-home :focus-visible { outline: 3px solid var(--h-ink); outline-offset: 3px; }
.cb-home img { display: block; max-width: 100%; height: auto; }

.cb-home h1, .cb-home h2, .cb-home h3 { color: var(--h-ink); }
.h-statement .h-stmt { color: var(--h-bg); }
.h-label { display: inline-flex; align-items: center; gap: 10px; font: 700 12px/1.2 var(--cb-font); letter-spacing: .16em; text-transform: uppercase; color: var(--h-ink); }
.h-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--h-accent); flex: none; }
.h-h2 { font: 850 clamp(34px, 5.4vw, 72px)/.94 var(--cb-font); font-stretch: 64%; text-transform: uppercase; letter-spacing: -.003em; text-wrap: balance; }
.cb-home .h-sub { margin-top: 14px; max-width: 52ch; font-size: 18px; line-height: 1.5; color: var(--h-muted); }
.h-sec { padding: var(--h-sec) 0; }
.h-sec--paper { background: var(--h-white); }
.h-head { margin-bottom: clamp(28px, 4vw, 52px); }
.h-head .h-label { margin-bottom: 14px; }
.h-head--split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.h-textlink, .h-more { font: 700 13px/1 var(--cb-font); letter-spacing: .12em; text-transform: uppercase; }
.h-textlink { padding: 6px 0; border-bottom: 2px solid var(--h-ink); }
.h-textlink:hover { border-color: var(--h-accent); }
.h-more { display: inline-flex; align-items: center; gap: 10px; }
.h-more::after { content: ""; width: 22px; height: 2px; background: currentColor; transition: width .2s ease; }
a:hover > .h-panel-body .h-more::after { width: 36px; }

/* Botones */
.h-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 24px; border: 2px solid var(--h-ink); border-radius: 2px; font: 800 13px/1 var(--cb-font); letter-spacing: .1em; text-transform: uppercase; text-align: center; cursor: pointer; transition: background-color .15s ease, color .15s ease, transform .15s ease; }
.h-btn--primary { background: var(--h-accent); color: var(--h-ink); border-color: var(--h-accent); }
.h-btn--primary:hover { background: var(--h-ink); border-color: var(--h-ink); color: #fff; transform: translateY(-1px); }
.h-btn--ghost { background: transparent; color: var(--h-ink); }
.h-btn--ghost:hover { background: var(--h-ink); color: #fff; }
.h-btn:active { transform: translateY(0); }

/* Sin animación de entrada: la portada pinta de golpe, sin esperas entre páginas. */

/* ── 3 · Hero ────────────────────────────────────────────────────────────────────────── */
.h-hero { padding: 28px 0 clamp(40px, 6vw, 88px); }
.h-hero-grid { display: grid; gap: 20px; align-items: center; }
.h-hero-copy .h-label { margin-bottom: 16px; }
.h-display { font: 850 clamp(52px, 15.4vw, 196px)/.86 var(--cb-font); font-stretch: 62%; text-transform: uppercase; letter-spacing: -.005em; white-space: nowrap; }
.h-display span { display: block; }
.h-sun { display: inline-block; width: .15em; height: .15em; margin-left: .05em; border-radius: 50%; background: var(--h-accent); }
.cb-home .h-lede { margin-top: 20px; max-width: 40ch; font-size: 18px; line-height: 1.5; color: var(--h-muted); }
.h-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.h-actions .h-btn { flex: 1 1 200px; }

/* Regla de tallas: guiño a la etiqueta de la prenda; datos reales de la ficha */
.h-ruler { margin-top: 30px; }
.h-ruler ul { display: flex; flex-wrap: wrap; border: 1px solid var(--h-ink); border-right: 0; width: max-content; max-width: 100%; }
.h-ruler li { padding: 7px 10px; border-right: 1px solid var(--h-ink); font: 700 11px/1 var(--cb-font); letter-spacing: .08em; }
.cb-home .h-ruler p { margin-top: 8px; font-size: 13px; color: var(--h-muted); }

/* Lienzo: la foto del producto tiene fondo blanco; multiplicado sobre el lienzo cálido la camiseta
   “flota” sin caja. IMPORTANTE: la figura no crea contexto de apilamiento (sin z-index, opacity ni
   transform) o el multiply dejaría de mezclar con el fondo y con el titular. */
.h-hero-fig { position: relative; margin: 0; }
.h-hero-link { display: block; }
.h-hero-img { width: 100%; max-width: min(100%, 64vh); height: auto; margin-left: auto; mix-blend-mode: multiply; transition: opacity .18s ease; }
.h-hero-img.is-swap { opacity: 0; }
.h-hero-fig.is-light { background: #fff; border-radius: 6px; }
.h-hero-fig.is-light .h-hero-img { mix-blend-mode: normal; }
.h-hero-fig.is-photo .h-hero-img { mix-blend-mode: normal; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }

.h-swatchbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-top: 8px; }
.h-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.h-sw { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--sw, #ddd); box-shadow: inset 0 0 0 1px rgba(23, 23, 23, .22); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.h-sw:hover { transform: scale(1.1); }
.h-sw[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgba(23, 23, 23, .22), 0 0 0 3px var(--h-bg), 0 0 0 5px var(--h-ink); }
.h-swname { font-size: 14px; color: var(--h-muted); }
.h-swname strong { color: var(--h-ink); font-weight: 700; }
.h-swname .h-label { margin-right: 6px; color: var(--h-muted); }

/* Móvil: titular → camiseta → texto y acciones (la imagen sube; no es un escritorio comprimido) */
@media (max-width: 899px) {
	.h-hero { padding-top: 20px; }
	.h-hero-grid { gap: 18px; }
	.h-hero-copy { display: contents; }
	.h-hero-copy .h-label { order: 1; margin-bottom: 0; font-size: 11px; }
	.h-display { order: 2; }
	.h-hero-fig { order: 3; }
	.cb-home .h-lede { order: 4; margin-top: 0; font-size: 16px; }
	.h-actions { order: 5; margin-top: 0; }
	.h-ruler { order: 6; margin-top: 4px; }
}
@media (min-width: 900px) {
	.h-hero { padding-top: 40px; }
	.h-hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0; }
	.h-display { font-size: clamp(76px, 8.4vw, 150px); }
	/* El titular se mete bajo la manga de la camiseta (multiply deja ver ambas cosas) */
	.h-hero-fig { margin-left: -9%; }
	.h-actions .h-btn { flex: 0 0 auto; }
}

/* ── 4 · Compra por sección (Hombre / Mujer + tipos) ────────────────────────────────────────────────────────────── */
.h-panels { display: grid; gap: 16px; }
@media (min-width: 760px) { .h-panels--2 { grid-template-columns: 1fr 1fr; gap: 24px; } }
.h-panel { display: grid; background: var(--h-white); border: 1px solid var(--h-line); transition: border-color .2s ease, transform .2s ease; }
.h-panel:hover { border-color: var(--h-ink); }
.h-panel-ph { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #fff; }
.h-panel-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .3s ease, transform .5s ease; }
.h-panel-alt { opacity: 0; }
.h-panel:hover .h-panel-img:not(.h-panel-alt) { transform: scale(1.03); }
.h-panel-body { display: grid; gap: 8px; padding: 22px 22px 26px; border-top: 1px solid var(--h-line); }
.h-panel-title { font: 850 clamp(30px, 3.6vw, 48px)/.95 var(--cb-font); font-stretch: 64%; text-transform: uppercase; }
.h-panel-meta { font-size: 14px; color: var(--h-muted); }
.h-panel-body .h-more { margin-top: 10px; }
.h-gender { display: grid; gap: 14px; align-content: start; }
.h-types { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.h-type { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--h-ink); border-radius: 999px; font: 650 14px/1 var(--cb-font); color: var(--h-ink); text-decoration: none; background: transparent; transition: background-color .15s ease, color .15s ease; }
.h-type span { font-weight: 500; color: var(--h-muted); }
.h-type:hover, .h-type:focus-visible { background: var(--h-ink); color: var(--h-bg); }
.h-type:hover span, .h-type:focus-visible span { color: inherit; }
/* Con un solo panel: banda horizontal a todo el ancho */
@media (min-width: 760px) {
	.h-panels--1 .h-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.h-panels--1 .h-panel-ph { aspect-ratio: auto; min-height: 420px; }
	.h-panels--1 .h-panel-img { object-fit: contain; }
	.h-panels--1 .h-panel-body { align-content: end; border-top: 0; border-left: 1px solid var(--h-line); padding: 40px; }
}

/* ── 5 · Destacados ──────────────────────────────────────────────────────────────────── */
.h-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 700px)  { .h-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 20px; } }
@media (min-width: 1100px) { .h-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px 24px; } }
.h-card-link { display: block; }
.h-card-ph { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #fff; }
.h-card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .3s ease, transform .5s ease; }
.h-card-alt { opacity: 0; }
@media (hover: hover) {
	.h-card-link:hover .h-card-alt, .h-panel:hover .h-panel-alt { opacity: 1; }
	.h-card-link:hover .h-card-img:not(.h-card-alt) { transform: scale(1.02); }
}
.h-card-name { display: block; margin-top: 14px; font: 700 15px/1.3 var(--cb-font); }
.h-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 6px; font-size: 13px; color: var(--h-muted); }
.h-chip { display: inline-block; width: 14px; height: 14px; margin-right: 3px; border-radius: 50%; background: var(--sw, #ddd); box-shadow: inset 0 0 0 1px rgba(23, 23, 23, .25); }
.h-card-meta .h-chip + .h-chip { margin-left: 0; }
.h-more-n { font-size: 12px; font-weight: 700; }
.h-card-price { display: block; margin-top: 8px; font: 700 16px/1 var(--cb-font); font-variant-numeric: tabular-nums; }
.h-card-price small { font-size: 13px; font-weight: 500; color: var(--h-muted); }
.h-card-link:hover .h-card-name { text-decoration: underline; text-underline-offset: 3px; }

/* ── 7 · Declaración ─────────────────────────────────────────────────────────────────── */
.h-statement { background: var(--h-ink); color: var(--h-bg); padding: clamp(72px, 11vw, 150px) 0; }
.h-stmt { font: 850 clamp(52px, 13.5vw, 210px)/.86 var(--cb-font); font-stretch: 60%; text-transform: uppercase; letter-spacing: -.005em; }
.h-stmt span { display: block; }
.h-stmt span:nth-child(2) { padding-left: clamp(0px, 8vw, 140px); }
.h-stmt span:nth-child(3) { padding-left: clamp(0px, 16vw, 280px); }
.h-stmt .is-accent { color: var(--h-accent); }

/* ── 8 · Calidad ─────────────────────────────────────────────────────────────────────── */
.h-quality { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--h-ink); }
@media (min-width: 900px) { .h-quality { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.h-quality li { padding: 26px 20px 30px 0; }
@media (min-width: 900px) { .h-quality li + li { padding-left: 24px; border-left: 1px solid var(--h-line); } }
.h-quality svg { color: var(--h-ink); }
.cb-home .h-quality h3 { margin-top: 18px; font: 850 24px/1 var(--cb-font); font-stretch: 70%; text-transform: uppercase; }
.cb-home .h-quality p { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--h-muted); }

/* ── 9 · De cerca / en la calle ──────────────────────────────────────────────────────── */
.h-mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; grid-auto-rows: clamp(180px, 46vw, 300px); }
.h-tile { position: relative; margin: 0; overflow: hidden; background: #fff; border: 1px solid var(--h-line); }
.h-tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.h-tile figcaption { position: absolute; left: 0; bottom: 0; padding: 7px 12px; background: var(--h-ink); color: #fff; font: 700 11px/1 var(--cb-font); letter-spacing: .12em; text-transform: uppercase; }
.h-tile.is-zoom .h-tile-img  { transform: scale(2.1); transform-origin: 50% 43%; }
.h-tile.is-collar .h-tile-img { transform: scale(2.8); transform-origin: 50% 2%; }
.h-tile--0 { grid-column: span 2; grid-row: span 2; }
@media (min-width: 900px) {
	.h-mosaic { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(220px, 23vw, 330px); gap: 14px; }
	.h-tile--0 { grid-column: span 5; grid-row: span 2; }
	.h-tile--1 { grid-column: span 4; }
	.h-tile--2 { grid-column: span 3; }
	.h-tile--3 { grid-column: span 7; }
	.h-tile--3 .h-tile-img { object-position: 50% 30%; }
	.h-mosaic--life .h-tile--4 { grid-column: span 5; }
}
.h-mosaic--life .h-tile { border: 0; }

/* ── 10 · Confianza ──────────────────────────────────────────────────────────────────── */
.h-steps { display: grid; gap: 28px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 800px) { .h-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }
.h-steps li { padding-top: 22px; border-top: 2px solid var(--h-ink); }
.h-step-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--h-accent); font: 850 18px/1 var(--cb-font); }
.cb-home .h-steps h3 { margin-top: 18px; font: 850 28px/1 var(--cb-font); font-stretch: 66%; text-transform: uppercase; }
.cb-home .h-steps p { margin-top: 10px; max-width: 36ch; color: var(--h-muted); }
.h-reviews { display: grid; gap: 28px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 800px) { .h-reviews { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.h-reviews li { padding-top: 20px; border-top: 2px solid var(--h-ink); }
.cb-home .h-stars { letter-spacing: .1em; font-size: 18px; }
.cb-home .h-reviews blockquote { margin: 12px 0 0; font-size: 18px; line-height: 1.45; }
.cb-home .h-by { margin-top: 14px; font-size: 14px; color: var(--h-muted); }

/* ── 11 · Boletín ────────────────────────────────────────────────────────────────────── */
.h-news { background: var(--h-line); padding: var(--h-sec) 0; }
.h-news-grid { display: grid; gap: 32px; align-items: end; }
@media (min-width: 900px) { .h-news-grid { grid-template-columns: 1.1fr 1fr; gap: 72px; } }
.h-news-row { display: flex; flex-wrap: wrap; gap: 10px; }
.h-news-row input[type="email"] { flex: 1 1 240px; min-height: 56px; padding: 0 16px; border: 2px solid var(--h-ink); border-radius: 2px; background: #fff; font: 500 16px var(--cb-font); color: var(--h-ink); }
.h-news-row input::placeholder { color: var(--h-muted); }
.h-consent { display: flex; gap: 10px; margin-top: 14px; font-size: 13px; line-height: 1.45; color: #454545; }
.h-consent input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--h-ink); }
.h-consent a { text-decoration: underline; text-underline-offset: 3px; }
.h-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.h-news-msg { font: 700 16px/1.4 var(--cb-font); padding: 14px 16px; border-left: 4px solid var(--h-ink); background: #fff; }
.h-news-msg.is-err { margin-top: 14px; border-color: #B3261E; }

@media (prefers-reduced-motion: reduce) {
	.h-panel-img, .h-card-img, .h-sw, .h-btn, .h-type, .h-more::after { transition: none; }
	.h-panel:hover .h-panel-img:not(.h-panel-alt), .h-card-link:hover .h-card-img:not(.h-card-alt) { transform: none; }
}
