/*
Theme Name: Staticlabs
Description: Tema minimalista para la tienda Staticlabs. Requiere el plugin Staticlabs Core.
Author: Staticlabs
Version: 1.3.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: staticlabs
*/

:root {
	--ink: #0b0b0d;
	--navy: #1c2644;
	--mist: #c9d3e8;
	--paper: #f4f5f7;
	--white: #fff;
	--line: #d8dbe3;
	--muted: #5c6273;
	--alert: #b3261e;
	--w: 1280px;
	--gap: clamp(16px, 2.2vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1rem/1.6 "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.site-header :focus-visible, .hero :focus-visible, .site-footer :focus-visible { outline-color: var(--mist); }

.wrap { width: min(100% - 2 * var(--gap), var(--w)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; background: #fff; color: var(--ink); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* Cabecera */
.site-header { background: var(--ink); color: #fff; }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }
.brand { text-decoration: none; font-size: 1.5rem; line-height: 1; font-weight: 800; white-space: nowrap; }
.brand .wm-b { font-style: italic; color: var(--mist); margin-left: 0.2em; }
.brand img { max-height: 44px; width: auto; }
.primary-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.primary-nav a { text-decoration: none; padding: 6px 0; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { text-decoration: underline; text-underline-offset: 6px; }
.nav-toggle { display: none; background: none; border: 1px solid #4a5068; color: #fff; padding: 8px 14px; font: inherit; cursor: pointer; }

/* Hero */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.hero.has-img { background-size: cover; background-position: center; }
.hero.has-img::before { content: ""; position: absolute; inset: 0; background: rgba(11, 11, 13, 0.55); }
.hero-in { position: relative; display: grid; grid-template-columns: 1.3fr 0.7fr; align-items: center; gap: var(--gap); min-height: min(76vh, 700px); padding-block: 64px; }
.hero h1 { margin: 0; font-size: clamp(3rem, 9vw, 8rem); line-height: 0.92; font-weight: 800; letter-spacing: -0.04em; }
.hero p { max-width: 36ch; margin: 24px 0 32px; font-size: 1.125rem; color: var(--mist); }
.hero-mark { width: min(32vw, 380px); justify-self: end; filter: brightness(0) invert(1); }

.btn { display: inline-block; padding: 14px 28px; background: var(--navy); color: #fff; border: 1px solid var(--navy); text-decoration: none; font: inherit; font-weight: 700; cursor: pointer; }
.btn:hover { background: var(--ink); border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: var(--mist); border-color: var(--mist); }

/* Secciones */
.section { padding-block: clamp(56px, 8vw, 112px); }
.section + .section { padding-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 32px; }
.section-head h2, .page-head h1 { margin: 0; font-size: clamp(1.75rem, 3.4vw, 3rem); }
.more { font-weight: 700; text-underline-offset: 5px; }
.page-head { padding-block: clamp(40px, 6vw, 80px) 32px; }
.page-head p { max-width: 60ch; color: var(--muted); margin: 12px 0 0; }
.empty { color: var(--muted); }

/* Colecciones */
.tiles { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.tile { grid-column: span 12; text-decoration: none; display: block; }
.tile-img { height: clamp(320px, 46vw, 620px); background: var(--mist); overflow: hidden; display: grid; place-items: center; }
.tile-img img.wp-post-image { width: 100%; height: 100%; object-fit: cover; }
.ph img { width: 96px; opacity: 0.9; }
.tile-meta { padding-top: 14px; }
.tile-meta h3 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.75rem); }
.tile-meta p { margin: 4px 0 0; color: var(--muted); }
.tile:hover h3 { text-decoration: underline; text-underline-offset: 6px; }
@media (min-width: 800px) {
	.tile:nth-child(4n+1), .tile:nth-child(4n+4) { grid-column: span 7; }
	.tile:nth-child(4n+2), .tile:nth-child(4n+3) { grid-column: span 5; }
	.tiles.single .tile { grid-column: span 12; }
}

/* Prendas */
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(var(--gap) * 1.5) var(--gap); }
.card-img { display: block; aspect-ratio: 4 / 5; background: var(--mist); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img.ph { display: grid; place-items: center; }
.card-body { padding-top: 12px; }
.card-body h3 { margin: 0; font-size: 1rem; letter-spacing: 0; }
.card-body h3 a { text-decoration: none; }
.card-body h3 a:hover { text-decoration: underline; }
.card-col { margin: 2px 0 0; color: var(--muted); font-size: 0.875rem; }
.price-line { margin: 6px 0 0; }
.price { font-weight: 700; }
.price-line del { color: var(--muted); margin-left: 6px; }
.sl-soldout { margin: 12px 0 0; font-weight: 700; color: var(--muted); }

[hidden] { display: none !important; }

/* Bloque de pedido */
.sl-order { margin-top: 12px; }
.sl-sizes, .sl-colors { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.sl-legend { width: 100%; padding: 0; margin-bottom: 2px; font-size: 0.875rem; font-weight: 700; }
.sl-order-card .sl-legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sl-sizes label, .sl-colors label { position: relative; }
.sl-sizes input, .sl-colors input { position: absolute; opacity: 0; pointer-events: none; }
.sl-sizes span, .sl-colors span { display: inline-flex; min-width: 40px; height: 40px; padding: 0 12px; align-items: center; justify-content: center; border: 1px solid var(--line); background: #fff; font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.sl-sizes input:checked + span, .sl-colors input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.sl-sizes input:focus-visible + span, .sl-colors input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
.needs-choice .sl-sizes span, .needs-choice .sl-colors span { border-color: var(--alert); }
.sl-variants { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.sl-variants label { position: relative; }
.sl-variants input { position: absolute; opacity: 0; pointer-events: none; }
.sl-variants span { display: inline-flex; min-height: 40px; padding: 6px 14px; align-items: center; justify-content: center; border: 1px solid var(--line); background: #fff; font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.sl-variants input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.sl-variants input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
.sl-select { display: block; margin-bottom: 12px; }
.sl-select select { width: 100%; padding: 10px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 0.875rem; font-weight: 600; border-radius: 0; }
.sl-media { display: grid; gap: 12px; }
.sl-wa { display: block; text-align: center; padding: 12px; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 700; background: transparent; }
.sl-wa:hover { background: var(--ink); color: #fff; }
.sl-hint { margin: 8px 0 0; font-size: 0.875rem; color: var(--alert); }
.sl-hint:empty { display: none; }

/* Contenido */
.entry-content > *:not(.sl-contact) { max-width: 72ch; }
.entry-content h2 { margin: 2em 0 0.5em; font-size: 1.5rem; }
.entry-content ul, .entry-content ol { padding-left: 1.25em; }
.entry-content li { margin: 0.4em 0; }
.entry-content { padding-bottom: clamp(56px, 8vw, 112px); }
.sl-missing { background: #ffe9a8; color: var(--ink); padding: 0 4px; }

/* Colección y prenda individuales */
.coll-banner { width: 100%; height: clamp(240px, 42vw, 560px); object-fit: cover; }
.coll-text { padding-block: 32px; }
.coll-text h1 { margin: 0; font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -0.03em; }
.coll-text .tag { color: var(--muted); margin: 8px 0 0; }
.filters-wrap { margin-bottom: 32px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.filters-label { min-width: 84px; font-weight: 700; }
.filters a { padding: 8px 16px; border: 1px solid var(--line); background: #fff; text-decoration: none; }
.filters a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.product { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(24px, 4vw, 64px); padding-block: 40px clamp(56px, 8vw, 112px); }
.product-media { display: grid; gap: 12px; align-content: start; }
.product-media img { width: 100%; }
.product-info { position: sticky; top: 24px; align-self: start; }
.product-info h1 { margin: 0; font-size: clamp(1.75rem, 3.4vw, 2.75rem); letter-spacing: -0.03em; }
.product-info .crumb { margin: 0 0 8px; color: var(--muted); }
.product-info .crumb a { text-underline-offset: 4px; }
.product-info .price-line { font-size: 1.25rem; margin-block: 12px 20px; }
.product-info dl { margin: 24px 0 0; }
.product-info dt { font-weight: 700; }
.product-info dd { margin: 0 0 12px; }
.product-info .entry-content { padding: 24px 0 0; }
.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--line); background: #fff; text-decoration: none; }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Contacto */
.sl-contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 5vw, 72px); }
.sl-contact h2 { margin-top: 0; }
.sl-contact dt { font-weight: 700; margin-top: 12px; }
.sl-contact dd { margin: 0; }
.sl-field label { display: block; font-weight: 600; margin-bottom: 6px; }
.sl-field input, .sl-field textarea { width: 100%; padding: 12px; border: 1px solid var(--ink); background: #fff; font: inherit; border-radius: 0; }
.sl-hp { position: absolute; left: -9999px; }
.sl-notice { padding: 12px 16px; border: 1px solid var(--ink); background: #fff; }
.sl-notice-error { border-color: var(--alert); color: var(--alert); }

/* Pie */
.site-footer { background: var(--ink); color: #d7dbe6; padding-block: 64px 28px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--gap); }
.foot-h { margin: 0 0 14px; font-size: 0.95rem; font-weight: 700; color: #fff; letter-spacing: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer .brand { color: #fff; }
.foot-brand p { max-width: 30ch; margin: 14px 0; }
.foot-base { border-top: 1px solid #2a2f3f; margin-top: 48px; padding-top: 20px; font-size: 0.875rem; color: #9aa1b5; }

@media (prefers-reduced-motion: no-preference) {
	.btn, .sl-wa, .sl-sizes span, .sl-colors span, .sl-variants span { transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
}

@media (max-width: 960px) {
	.products { grid-template-columns: repeat(2, 1fr); }
	.foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
	.nav-toggle { display: inline-block; }
	.primary-nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: var(--ink); padding: 8px var(--gap) 24px; z-index: 5; }
	.primary-nav.is-open { display: block; }
	.primary-nav ul { flex-direction: column; gap: 4px; }
	.site-header { position: relative; }
	.hero-in { grid-template-columns: 1fr; min-height: 0; }
	.hero-mark { width: 120px; justify-self: start; order: -1; }
	.product, .sl-contact { grid-template-columns: 1fr; }
	.product-info { position: static; }
	.foot-grid { grid-template-columns: 1fr; }
}
