/*
Theme Name: mrtech
Description: Tema de la tienda de karaoke Mr Tech Puerto Rico.
Version: 0.7.0
Requires PHP: 8.3
Text Domain: mrtech
*/

:root {
	--bg: #07070B;
	--surface: #0F0F17;
	--surface-2: #161622;
	--line: #22222F;
	--text: #F3F3F7;
	--muted: #9696AC;
	--accent: #3B7BFF;
	--accent-glow: #36C8FF;
	--hot: #FF2E88;
	--font-display: "Unbounded", sans-serif;
	--font-body: "Manrope", sans-serif;
	--gutter: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--text);
	font: 400 14px/1.5 var(--font-body);
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.site-main { flex: 1; padding: 48px var(--gutter); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* Nav */
.site-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	padding: 22px var(--gutter);
	border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand__mark {
	display: grid;
	place-items: center;
	width: 36px; height: 36px;
	border-radius: 8px;
	background: var(--accent);
	font: 800 14px var(--font-display);
}

.brand__name {
	font: 700 16px var(--font-display);
	letter-spacing: 1px;
	text-transform: uppercase;
}

.brand__tag { color: var(--muted); font-size: 13px; }

.site-nav ul { display: flex; gap: 36px; margin: 0; padding: 0; list-style: none; }

/* Es un popover (menú de móvil): en escritorio se anulan los estilos del navegador para que quede en línea. */
.site-nav { display: block; position: static; inset: auto; width: auto; height: auto; margin: 0; padding: 0; border: 0; overflow: visible; background: none; color: inherit; }

.site-nav a { color: var(--muted); font-weight: 500; }

.site-nav a:hover,
.site-nav .current-menu-item > a:not([href*="#"]) { color: var(--text); font-weight: 700; }

.cart-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-weight: 600;
}

.cart-link:hover { border-color: var(--muted); }

.cart-link svg { width: 18px; height: 18px; }

.cart-count {
	display: grid;
	place-items: center;
	min-width: 22px; height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--accent);
	font-size: 12px;
	font-weight: 700;
}

/* Footer */
.site-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 28px var(--gutter);
	color: var(--muted);
	font-size: 13px;
}

.site-footer ul { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }

.site-footer a:hover { color: var(--text); }

.menu-btn, .cart-bar { display: none; }

@media (max-width: 900px) {
	:root { --gutter: 20px; }
	.site-header { gap: 10px; padding-block: 14px; }
	.brand { gap: 8px; margin-right: auto; }
	.brand__mark { width: 32px; height: 32px; font-size: 12px; }
	.brand__name { font-size: 15px; }
	.brand__tag, .cart-link__label { display: none; }

	.site-nav:not(:popover-open) { display: none; }
	.site-nav:popover-open { position: fixed; inset: 68px var(--gutter) auto auto; min-width: 220px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 20px 60px #000A; }
	.site-nav ul { flex-direction: column; gap: 0; }
	.site-nav a { display: block; padding: 12px 16px; border-radius: 8px; color: var(--text); font-size: 16px; }
	.site-nav a:hover { background: var(--surface-2); }

	.cart-link, .menu-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: none; color: var(--text); cursor: pointer; }
	.cart-count { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 10px; }
	.site-footer { flex-direction: column; }

	/* Barras fijas abajo: "Ver carrito" (inicio), "Comprar / Añadir" (ficha), "Total / Ir a pagar" (carrito y checkout). */
	.sticky-bar { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; padding: 14px var(--gutter); border-top: 1px solid var(--line); background: var(--bg); }
	body:has(.sticky-bar:not([hidden])) { padding-bottom: 140px; }
	.cart-bar { display: flex; justify-content: space-between; align-items: center; margin: 14px 16px; padding: 16px 18px; border: 0; border-radius: 12px; background: var(--accent); font-size: 16px; font-weight: 700; box-shadow: 0 8px 32px #000C; }
	.cart-bar strong { font-size: 18px; }
}

[hidden] { display: none !important; }

/* Comunes */
.icon {
	width: 18px; height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: none;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	border: 0;
	border-radius: 10px;
	background: var(--accent);
	color: var(--text);
	font: 600 15px var(--font-body);
	cursor: pointer;
}

.btn:hover { filter: brightness(1.1); }
.btn.loading { opacity: .6; pointer-events: none; }
.btn--lg { padding: 16px 28px; border-radius: 12px; font-size: 16px; }
.btn--in-cart { background: var(--surface-2); color: var(--accent-glow); }
.btn--in-cart .icon { width: 16px; height: 16px; }

.eyebrow {
	margin: 0 0 16px;
	color: var(--accent-glow);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
}

.muted { color: var(--muted); }

.section-title { margin: 0; font: 700 36px/1.2 var(--font-display); }

.price del { color: var(--muted); font-weight: 400; margin-right: 6px; }
.price ins { text-decoration: none; }

/* Hero */
.hero {
	padding: 80px var(--gutter) 64px;
	background: radial-gradient(ellipse at 85% 0, #3B7BFF33, transparent 60%);
}

.hero__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }

.hero__title { max-width: 800px; margin: 0; font: 700 60px/1.05 var(--font-display); }

.hero__stats { display: flex; gap: 40px; margin: 0; }
.hero__stats dt { font: 700 28px var(--font-display); }
.hero__stats dd { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.search {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 32px;
	padding: 10px 10px 10px 24px;
	border: 1px solid var(--accent);
	border-radius: 16px;
	background: var(--surface);
	box-shadow: 0 0 24px #3B7BFF33;
}

.search > .icon { width: 22px; height: 22px; color: var(--muted); }

.search input[type="search"] {
	flex: 1;
	min-width: 0;
	border: 0;
	background: none;
	color: var(--text);
	font: 400 18px var(--font-body);
	outline: none;
}

.search input::placeholder { color: var(--muted); }
.search .btn { padding: 16px 28px; font-size: 16px; }

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 32px; color: var(--muted); font-size: 13px; }

.chip {
	padding: 8px 14px;
	border: 0;
	border-radius: 999px;
	background: var(--surface-2);
	color: var(--text);
	font: 500 13px var(--font-body);
	cursor: pointer;
}

.chip:hover { background: var(--line); }

/* Pack destacado */
.pack {
	display: flex;
	align-items: center;
	gap: 40px;
	margin: 16px var(--gutter) 0;
	padding: 28px 40px 28px 28px;
	border: 1px solid var(--line);
	border-radius: 20px;
	background: linear-gradient(90deg, #FF2E8822, #3B7BFF11 60%, transparent), var(--surface);
}

.pack__cover img { display: block; width: 200px; height: 200px; object-fit: cover; border-radius: 12px; }
.pack__body { flex: 1; }

.badge {
	display: inline-block;
	margin: 0 0 12px;
	padding: 4px 12px;
	border-radius: 999px;
	background: #FF2E8822;
	color: var(--hot);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 2px;
	text-transform: uppercase;
}

.pack__title { margin: 0 0 12px; font: 700 36px/1.2 var(--font-display); }
.pack__tracks { margin: 0; color: var(--muted); font-size: 16px; }
.pack__buy { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; text-align: right; }
.pack__price { margin: 0; font: 700 44px var(--font-display); }
.pack__note { margin: 0; color: var(--muted); font-size: 12px; }

/* Cancionero */
.songbook { padding: 64px var(--gutter) 96px; }
.songbook > .muted { margin: 4px 0 24px; }

.az {
	display: flex;
	justify-content: space-between;
	padding: 12px 16px;
	border-radius: 12px;
	background: var(--surface);
	font-size: 13px;
	font-weight: 700;
}

.az a, .az span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; }
.az span { color: var(--line); }
.az a:hover, .az a:focus { background: var(--accent); }

.letter { scroll-margin-top: 24px; }

.letter__title {
	display: flex;
	align-items: center;
	gap: 20px;
	margin: 40px 20px 8px;
	color: var(--accent-glow);
	font: 700 22px var(--font-display);
}

.letter__title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.song-row {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 14px 20px;
	border-bottom: 1px solid var(--line);
}

.song-row__num { width: 28px; color: var(--muted); font-size: 13px; }
.song-row__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.song-row__info strong { font-size: 16px; font-weight: 700; }
.song-row__info span { color: var(--muted); font-size: 13px; }
.song-row__info:hover strong { color: var(--accent-glow); }

.tag {
	padding: 3px 9px;
	border: 1px solid var(--line);
	border-radius: 6px;
	color: var(--muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
}

.song-row__price { width: 72px; margin-left: 20px; text-align: right; font-size: 16px; font-weight: 700; }
.song-row .btn { width: 132px; padding-inline: 12px; white-space: nowrap; }
.added_to_cart { display: none; }

.songs.is-collapsed [data-extra] { display: none; }
.songs__empty { padding: 40px 20px; color: var(--muted); text-align: center; }

.more {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 40px auto 0;
	padding: 12px 24px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: none;
	color: var(--text);
	font: 600 15px var(--font-body);
	cursor: pointer;
}

.more:hover { border-color: var(--muted); }

/* Cómo funciona: contenido de la página de inicio (bloques de columnas) */
.how {
	padding: 72px var(--gutter);
	border-top: 1px solid var(--line);
	background: var(--surface);
}

.how h2 { margin: 0 0 40px; font: 700 36px/1.2 var(--font-display); }
.how .wp-block-columns { display: flex; gap: 40px; margin: 0; }
.how .wp-block-column { flex: 1; }
.how h3 { margin: 0 0 12px; font-size: 20px; font-weight: 800; }
.how .wp-block-column p { margin: 0; color: var(--muted); font-size: 15px; }

.how .wp-block-column::before {
	content: "";
	display: block;
	width: 48px; height: 48px;
	margin-bottom: 24px;
	border-radius: 10px;
	background: #3B7BFF22 var(--step-icon) center / 20px no-repeat;
}

/* Iconos Lucide: search, credit-card, mail, mic */
.how .wp-block-column:nth-child(1) { --step-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2336C8FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); }
.how .wp-block-column:nth-child(2) { --step-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2336C8FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='14' x='2' y='5' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E"); }
.how .wp-block-column:nth-child(3) { --step-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2336C8FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E"); }
.how .wp-block-column:nth-child(4) { --step-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2336C8FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2'/%3E%3Cpath d='M12 19v3'/%3E%3C/svg%3E"); }

.how .notice {
	position: relative;
	margin: 40px 0 0;
	padding: 18px 24px 18px 56px;
	border: 1px solid var(--line);
	border-radius: 12px;
	color: var(--muted);
	font-size: 13px;
}

.how .notice::before {
	content: "i";
	position: absolute;
	left: 24px;
	top: 18px;
	display: grid;
	place-items: center;
	width: 18px; height: 18px;
	border: 2px solid var(--muted);
	border-radius: 50%;
	font-size: 11px;
	font-weight: 800;
}

.how .notice a { color: var(--text); }

@media (max-width: 900px) {
	.hero { padding: 28px var(--gutter) 24px; }
	.eyebrow { margin-bottom: 10px; font-size: 11px; }
	.hero__title { font-size: 30px; }
	.hero__stats { display: none; }
	/* Sin botón "Buscar": filtra mientras escribes y Enter sigue enviando el formulario. */
	.search { margin-top: 24px; padding: 14px 16px; border-radius: 12px; }
	.search .btn { display: none; }
	.search input[type="search"] { font-size: 16px; }
	.chips { flex-wrap: nowrap; overflow-x: auto; margin: 20px calc(-1 * var(--gutter)) 0; padding-inline: var(--gutter); scrollbar-width: none; }
	.chips > span { display: none; }
	.chip { flex: none; }

	/* Pack: tarjeta compacta, portada a la izquierda. */
	.pack { display: grid; grid-template-columns: 96px 1fr; gap: 4px 16px; align-items: center; margin-top: 0; padding: 16px; border-radius: 16px; }
	.pack__cover { grid-row: span 2; }
	.pack__cover img { width: 96px; height: 96px; border-radius: 8px; }
	.badge { margin-bottom: 6px; padding: 0; background: none; font-size: 11px; }
	.pack__title { margin: 0; font-size: 17px; }
	.pack__tracks, .pack__note, .pack__buy .icon { display: none; }
	.pack__buy { flex-direction: row; align-items: center; gap: 0; color: var(--muted); }
	.pack__price { font: 500 14px var(--font-body); }
	.pack__buy .btn { padding: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 500; }
	.pack__buy .btn::before { content: "·"; margin: 0 6px; }
	.pack__buy .btn::after { content: "→"; margin-left: 4px; }

	.songbook { padding: 32px var(--gutter) 40px; }
	.songbook .section-title { font-size: 24px; }
	.songbook > .muted { margin-bottom: 16px; }
	/* Barra A–Z de borde a borde, con scroll horizontal. */
	.az { gap: 4px; margin-inline: calc(-1 * var(--gutter)); padding: 10px var(--gutter); overflow-x: auto; border-block: 1px solid var(--line); border-radius: 0; scrollbar-width: none; }
	.az a, .az span { flex: none; }
	.letter__title { margin: 24px 0 4px; font-size: 18px; }
	.letter__title::after { display: none; }

	.song-row { gap: 12px; padding: 14px 0; }
	.song-row__num, .tag { display: none; }
	.song-row__info strong { font-size: 15px; }
	.song-row__price { width: auto; margin: 0; font-size: 15px; }
	/* Botón redondo "+" / "✓": el texto queda para lectores de pantalla. */
	.song-row .btn { width: 40px; height: 40px; padding: 0; border-radius: 50%; font-size: 0; }
	.more { width: 100%; justify-content: center; margin-top: 24px; padding-block: 16px; }

	.how { padding: 48px var(--gutter); }
	.how h2 { margin-bottom: 24px; font-size: 24px; }
	.how .wp-block-columns { flex-direction: column; gap: 28px; }
	.how .wp-block-column::before { margin-bottom: 14px; }
}


/* Ficha de producto */
.product { flex: 1; }

.crumbs { display: flex; align-items: center; gap: 6px; padding: 32px var(--gutter) 0; color: var(--muted); }
.crumbs .icon { width: 16px; height: 16px; margin-right: 6px; }
.crumbs a:hover { color: var(--text); }

.product__main { display: flex; align-items: flex-start; gap: 64px; padding: 24px var(--gutter) 64px; }

.product__cover { flex: 0 0 520px; }
.product__cover img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 20px; box-shadow: 0 40px 100px #3B7BFF40; }

.product__info { flex: 1; min-width: 0; padding-top: 16px; }
.eyebrow--hot { color: var(--hot); }
.product__title { margin: 0; font: 700 60px/1.05 var(--font-display); }
.product__subtitle { margin: 16px 0 0; color: var(--muted); font-size: 16px; }

.product__price { display: flex; align-items: center; gap: 20px; margin: 28px 0; }
.product__price .price { font: 700 40px var(--font-display); }

.pill { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 13px; }

.btn--block { width: 100%; }
.product__info .btn--lg { min-height: 58px; font-size: 17px; }
.product__info .single_add_to_cart_button { font-weight: 700; }
.btn--ghost { margin-top: 12px; border: 1px solid var(--line); background: none; }
.btn--ghost:hover { border-color: var(--muted); filter: none; }

/* ponytail: el JS de Stripe muestra su elemento (quita el display:none) solo si hay Apple Pay/Google Pay; entonces sobra "Comprar ahora". */
#wc-stripe-express-checkout-element { margin-top: 12px !important; }
.product__info:has(#wc-stripe-express-checkout-element:not([style*="none"])) .buy-now { display: none; }

.product__note { margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.product__note a:hover { color: var(--text); }

.perks { margin: 28px 0 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.perks li { display: flex; align-items: center; gap: 18px; padding: 20px 20px; }
.perks li + li { border-top: 1px solid var(--line); }
.perks .icon { width: 20px; height: 20px; color: var(--accent-glow); }
.perks div { color: var(--muted); }
.perks strong { display: block; color: var(--text); font-size: 15px; font-weight: 700; }

.product__more { padding: 56px var(--gutter) 96px; border-top: 1px solid var(--line); }
.product__more-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.product__more .song-row { padding-block: 20px; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-glow); font-weight: 700; }
.link-arrow .icon { width: 16px; height: 16px; }

.tracklist { columns: 3; column-gap: 40px; margin: 0; padding: 0; list-style: none; font-size: 16px; font-weight: 500; }
.tracklist li { break-inside: avoid; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tracklist span { margin-right: 12px; color: var(--hot); font-size: 13px; font-weight: 700; }

.buy__mob { display: none; }

@media (max-width: 900px) {
	/* Migas: solo "← Cancionero". */
	.crumbs { padding-top: 16px; font-size: 0; }
	.crumbs a:first-of-type { font-size: 14px; }
	.crumbs a ~ a, .crumbs span { display: none; }

	.product__main { flex-direction: column; gap: 20px; padding: 16px var(--gutter) 32px; }
	.product__cover { flex: none; width: 100%; }
	.product__cover img { border-radius: 16px; box-shadow: 0 20px 60px #3B7BFF40; }
	.product__info { padding-top: 0; }
	.product__title { font-size: 30px; }
	.product__subtitle { margin-top: 8px; font-size: 15px; }
	.product__price { gap: 12px; margin: 16px 0; }
	.product__price .price { font-size: 30px; }

	/* "Comprar ahora" / "Añadir · $X" fijos abajo. Si Stripe muestra Apple Pay/Google Pay, sus botones quedan en la página y la barra es solo "Añadir". */
	.buy { display: flex; gap: 12px; }
	.buy > .cart, .buy > .btn--in-cart { order: 2; flex: 1; }
	.buy > .buy-now { order: 1; width: auto; margin-top: 0; }
	.buy .btn--lg { min-height: 52px; padding-inline: 18px; font-size: 16px; }
	.buy .btn--ghost { background: var(--surface); }
	.buy__desk { display: none; }
	.buy__mob { display: inline; }

	.perks { margin-top: 20px; padding: 6px 0; }
	.perks li { gap: 12px; padding: 9px 16px; }
	.perks li + li { border-top: 0; }
	.perks div { font-size: 0; }
	.perks strong { font-size: 14px; font-weight: 500; }

	.product__more { padding: 32px var(--gutter) 40px; }
	.product__more .section-title { font-size: 20px; }
	.product__more-head { margin-bottom: 8px; }
	.product__more-head .link-arrow { display: none; }
	.product__more .song-row { padding-block: 14px; }
	.tracklist { columns: 1; font-size: 15px; }
	.tracklist li { padding: 11px 0; }
}

/* Carrito y checkout */
.page-head { margin-bottom: 40px; }
.page-title { margin: 0; font: 700 48px/1.15 var(--font-display); }
.page-head p { margin: 8px 0 0; font-size: 16px; }

.checkout-grid { display: grid; grid-template-columns: 1fr 420px; align-items: start; gap: 48px; }

.cart-items { margin: 0 0 28px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.cart-item { display: flex; align-items: center; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cart-item__cover img { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.cart-item__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cart-item__info strong { font-size: 18px; font-weight: 700; }
.cart-item__info a:hover strong { color: var(--accent-glow); }
.cart-item__info span { color: var(--muted); font-size: 14px; }
.cart-item__price { font-size: 17px; font-weight: 700; }

.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.icon-btn:hover { border-color: var(--muted); color: var(--text); }
.icon-btn .icon { width: 16px; height: 16px; }

.summary { padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.summary__title { margin: 0 0 16px; font-size: 18px; font-weight: 800; }

.review-items { margin: 0 0 8px; padding: 0 0 8px; list-style: none; border-bottom: 1px solid var(--line); }
.review-items li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 6px 0 10px; font-size: 15px; }
.review-items strong { display: block; font-weight: 700; }
.review-items span { color: var(--muted); font-size: 13px; }

.totals { margin: 0 0 24px; }
.totals div { display: flex; justify-content: space-between; padding: 10px 0; color: var(--muted); font-size: 15px; }
.totals dd { margin: 0; color: var(--text); }
.totals .totals__total { align-items: center; color: var(--text); font-size: 18px; font-weight: 800; }
.totals__total dd { font: 700 32px var(--font-display); }

.btn--arrow::after { content: "→"; font-size: 1.1em; }
.summary .btn--lg { min-height: 58px; font-weight: 700; }
.summary .btn:disabled { opacity: .6; cursor: wait; }

.secure-note { display: flex; gap: 10px; margin: 20px 0 0; color: var(--muted); font-size: 13px; }
.secure-note .icon { width: 16px; height: 16px; margin-top: 2px; }

.checkout-step + .checkout-step { margin-top: 40px; }
.checkout-step__title { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; font-size: 20px; font-weight: 800; }
.checkout-step__title span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); font-size: 13px; }

.woocommerce-billing-fields__field-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; }
.form-row { margin: 0; }
.form-row-wide { grid-column: 1 / -1; }
.form-row label { display: block; margin-bottom: 8px; font-weight: 600; }
.form-row .optional, .form-row .required { display: none; }
.form-row .input-text {
	width: 100%;
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--surface);
	color: var(--text);
	font: 400 16px var(--font-body);
}
.form-row .input-text:focus { border-color: var(--accent); outline: none; }
.form-row .input-text::placeholder { color: var(--muted); }
.form-row.woocommerce-invalid .input-text { border-color: var(--hot); }
.form-row .description { margin: 10px 0 0; color: var(--accent-glow); font-size: 13px; }

.wc_payment_methods { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.wc_payment_method { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.wc_payment_method:has(> input:checked) { border-color: var(--accent); }
.wc_payment_method > label { display: flex; align-items: center; gap: 12px; padding: 18px 16px; font-size: 16px; font-weight: 500; cursor: pointer; }
.wc_payment_method > label img { max-height: 24px; margin-left: auto; }
.wc_payment_method > input { position: absolute; opacity: 0; }
.wc_payment_method > label::before { content: ""; flex: none; width: 22px; height: 22px; border: 2px solid var(--muted); border-radius: 50%; }
.wc_payment_method > input:checked + label::before { border: 7px solid var(--accent); background: var(--text); }
.wc_payment_method > input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 12px; }
.payment_box { padding: 0 16px 16px; color: var(--muted); }
.payment_box p { margin: 0 0 12px; }
.payment_box fieldset { margin: 0; padding: 0; border: 0; }

.place-order { margin-top: 28px; }
.woocommerce-terms-and-conditions-wrapper label { display: flex; align-items: center; gap: 12px; color: var(--muted); cursor: pointer; }
.woocommerce-terms-and-conditions-wrapper input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.woocommerce-terms-and-conditions-wrapper a { color: var(--text); text-decoration: underline; }
.woocommerce-terms-and-conditions { max-height: 240px; overflow: auto; margin-bottom: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }

/* Avisos de WooCommerce */
.woocommerce-error, .woocommerce-message, .woocommerce-info, .wc-empty-cart-message {
	margin: 0 0 24px;
	padding: 16px 20px;
	border: 1px solid var(--line);
	border-left: 3px solid var(--accent);
	border-radius: 12px;
	background: var(--surface);
	list-style: none;
}
.woocommerce-error { border-left-color: var(--hot); }
.woocommerce-error li + li { margin-top: 6px; }
.woocommerce-message a, .woocommerce-info a, .woocommerce-error a { color: var(--accent-glow); font-weight: 700; }
.cart-empty { margin: 0; }
.return-to-shop .button { display: inline-flex; padding: 12px 24px; border-radius: 12px; background: var(--accent); font-weight: 600; }

@media (max-width: 900px) {
	.site-main { padding-block: 28px; }
	.page-head { margin-bottom: 20px; }
	.page-title { font-size: 30px; }
	.page-head p { font-size: 14px; }
	.checkout-grid { grid-template-columns: 1fr; gap: 24px; }
	.woocommerce-billing-fields__field-wrapper { grid-template-columns: 1fr; }
	.checkout-step + .checkout-step { margin-top: 28px; }
	.checkout-step__title { font-size: 18px; }
	.cart-items { border-top: 0; }
	.cart-item { gap: 14px; padding: 16px 0; }
	.cart-item__cover img { width: 48px; height: 48px; }
	.cart-item__info strong { font-size: 16px; }
	.cart-item__info span { font-size: 13px; }
	.cart-item__price { font-size: 15px; }
	.cart-item .icon-btn { width: 32px; height: 32px; border: 0; }

	/* El resumen pasa a barra fija: solo el total y el botón (los artículos ya se ven en el carrito). */
	.summary.sticky-bar { padding: 14px var(--gutter) 16px; border-width: 1px 0 0; border-radius: 0; background: var(--bg); }
	.summary__title, .summary .secure-note, .review-items, .totals div:not(.totals__total) { display: none; }
	.totals { margin: 0 0 12px; }
	.totals .totals__total { padding: 0; color: var(--muted); font-size: 15px; font-weight: 500; }
	.totals__total dd { color: var(--text); font-size: 24px; }
	.summary .btn--lg { min-height: 52px; }
}

/* Descargas (confirmación y Mi cuenta) */
.dl-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); overflow: hidden; }
.dl-row { display: flex; align-items: center; gap: 20px; padding: 20px 24px; }
.dl-row + .dl-row { border-top: 1px solid var(--line); }
.dl-row__cover { flex: none; width: 56px; height: 56px; overflow: hidden; border-radius: 8px; background: var(--surface-2); font-size: 0; }
.dl-row__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dl-row__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dl-row__info strong { font-size: 18px; font-weight: 700; }
.dl-row__info span, .dl-row__date { color: var(--muted); }
.dl-row__date { margin-right: 60px; }
.dl-row .btn { min-width: 160px; }

.dl-pill { padding: 6px 12px; border-radius: 999px; background: #36C8FF14; color: var(--accent-glow); font-size: 13px; font-weight: 700; white-space: nowrap; }
.dl-pill--off { background: var(--surface-2); color: var(--muted); }
.btn--muted { background: var(--surface-2); color: var(--muted); }

/* Confirmación del pedido */
.thanks { max-width: 960px; margin: 0 auto; text-align: center; }
.woocommerce-order-received .site-main { background: radial-gradient(ellipse at 50% 0, #3B7BFF33, transparent 50%); }
.thanks__check { display: inline-grid; place-items: center; width: 72px; height: 72px; margin: 24px 0 40px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 48px #3B7BFF80; }
.thanks__check .icon { width: 32px; height: 32px; stroke-width: 2.5; }
.thanks__title { margin: 0; font: 700 56px/1.1 var(--font-display); }
.thanks__lead { margin: 16px 0 40px; font-size: 17px; }
.thanks .dl-list { text-align: left; }

.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 40px 0; padding: 0; list-style: none; text-align: left; }
.tips li { display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; color: var(--muted); font-size: 15px; }
.tips .icon { width: 20px; height: 20px; color: var(--accent-glow); }
.tips a { overflow-wrap: anywhere; }
.tips a:hover { color: var(--text); }
.thanks .more { display: inline-flex; margin: 0; text-decoration: none; }
.thanks .more .icon { width: 16px; height: 16px; }

/* Mi cuenta */
.account { display: grid; grid-template-columns: 240px 1fr; align-items: start; gap: 48px; }
.account__hello { margin: 12px 0 4px; font: 700 22px var(--font-display); }
.account__side > .muted { margin: 0 0 28px; overflow-wrap: anywhere; }
.account-nav ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.account-nav a { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 10px; color: var(--muted); font-size: 15px; font-weight: 500; }
.account-nav a:hover { color: var(--text); }
.account-nav .is-active a { background: var(--surface-2); color: var(--text); font-weight: 600; }
.account-nav .is-active .icon { color: var(--accent-glow); }
.account__main .page-title { margin-bottom: 8px; }
.account__lead { margin: 0 0 24px; font-size: 16px; }

/* Tablas y botones de WC en Mi cuenta (pedidos, ver pedido, mis datos) */
.account__main table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.account__main th, .account__main td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.account__main th { color: var(--muted); font-weight: 600; }
.account__main .button, .woocommerce-form-login .button { display: inline-flex; padding: 10px 18px; border: 0; border-radius: 10px; background: var(--accent); color: var(--text); font: 600 14px var(--font-body); cursor: pointer; }
.account__main td .button + .button { margin-left: 8px; }
.account__main fieldset { margin: 32px 0 0; padding: 0; border: 0; }
.account__main legend { margin-bottom: 16px; font-size: 18px; font-weight: 800; }
.woocommerce-EditAccountForm .form-row, .woocommerce-form-login .form-row { margin-bottom: 20px; }
.password-input { position: relative; display: block; }
.show-password-input { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); padding: 4px 8px; border: 0; background: none; color: var(--muted); font: 600 13px var(--font-body); cursor: pointer; }
.show-password-input::after { content: "Mostrar"; }
.show-password-input.display-password::after { content: "Ocultar"; }

@media (max-width: 900px) {
	.thanks__title { font-size: 32px; }
	.account__main table { display: block; overflow-x: auto; }
	.tips { grid-template-columns: 1fr; }
	.account { grid-template-columns: 1fr; gap: 24px; }
	.dl-row { flex-wrap: wrap; gap: 12px; padding: 16px; }
	.dl-row__info { flex-basis: calc(100% - 80px); }
	.dl-row__date { margin: 0; }
	.dl-row .btn { flex: 1; }
}

/* Páginas legales (template-legal.php) */
.legal { display: grid; grid-template-columns: 280px minmax(0, 720px); align-items: start; gap: 80px; padding-top: 64px; padding-bottom: 96px; }
.toc { position: sticky; top: 24px; }
.toc__title { margin: 0 0 16px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.toc ul { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.toc a { display: block; padding: 8px 12px; border-left: 2px solid transparent; border-radius: 6px; color: var(--muted); }
.toc a:hover { color: var(--text); }
.toc a.is-active { border-left-color: var(--accent); background: var(--surface-2); color: var(--text); font-weight: 600; }

.draft-tag { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 6px 12px; border-radius: 999px; background: #FF2E881F; color: var(--hot); font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.draft-tag .icon { width: 14px; height: 14px; }
.legal__body { counter-reset: legal; color: color-mix(in srgb, var(--text) 75%, var(--muted)); font-size: 16px; line-height: 1.65; }
.legal__body h1 { margin: 0 0 16px; color: var(--text); font: 800 48px/1.1 var(--font-display); }
.legal__body > .muted { margin: 0 0 36px; color: var(--muted); font-size: 14px; }
.legal__body h2 { margin: 36px 0 16px; padding-top: 36px; border-top: 1px solid var(--line); color: var(--text); font-size: 22px; font-weight: 700; scroll-margin-top: 24px; }
.legal__body h2::before { counter-increment: legal; content: counter(legal) ". "; }
.legal__body p { margin: 0 0 12px; }
.legal__body a { color: var(--text); text-decoration: underline; }

.legal__contact { display: flex; align-items: center; gap: 16px; margin-top: 36px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.legal__contact .icon { width: 22px; height: 22px; color: var(--accent-glow); }
.legal__contact div { color: var(--muted); overflow-wrap: anywhere; }
.legal__contact strong { display: block; color: var(--text); }
.legal__contact a { text-decoration: none; }

@media (max-width: 900px) {
	.legal { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 32px; }
	.toc { position: static; }
	.legal__body h1 { font-size: 30px; }
}
