/*
Theme Name: Manta Electrica Editorial
Description: Tema editorial para comparativas y guias de MantaElectrica.com.
Version: 0.2.3
Author: MantaElectrica.com
Text Domain: manta-electrica-editorial
*/

:root {
	--paper: #f6f1e9;
	--paper-strong: #fffaf3;
	--ink: #241d1a;
	--muted: #695d58;
	--line: #dccdc0;
	--brand: #9a3d38;
	--brand-dark: #6c2527;
	--green: #4d6851;
	--gold: #d89b37;
	--wash: #efe4da;
	--notice: #fff0c9;
}

* {
	box-sizing: border-box;
}

body {
	background: var(--paper);
	color: var(--ink);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	letter-spacing: 0;
	line-height: 1.62;
	margin: 0;
}

a {
	color: inherit;
}

.skip-link {
	background: var(--brand-dark);
	color: #fff;
	left: 1rem;
	padding: .7rem 1rem;
	position: absolute;
	top: -4rem;
	z-index: 5;
}

.skip-link:focus {
	top: 1rem;
}

.site-header,
.site-footer,
.shell,
.home-panels,
.home-guides {
	margin: auto;
	max-width: 1180px;
	padding-left: clamp(1rem, 4vw, 2.5rem);
	padding-right: clamp(1rem, 4vw, 2.5rem);
}

.site-header,
.site-footer {
	align-items: center;
	display: flex;
	gap: 1.2rem;
	justify-content: space-between;
	padding-bottom: 1.15rem;
	padding-top: 1.15rem;
}

.brand {
	color: var(--brand-dark);
	font-size: 1.22rem;
	font-weight: 900;
	text-decoration: none;
}

.site-nav > ul,
.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: .95rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav .sub-menu {
	display: none;
}

.site-nav a,
.footer-links a {
	color: var(--muted);
	text-decoration: none;
}

.home-hero {
	isolation: isolate;
	min-height: min(78vh, 780px);
	position: relative;
}

.home-hero img {
	height: 100%;
	inset: 0;
	object-fit: cover;
	position: absolute;
	width: 100%;
	z-index: -2;
}

.home-hero::after {
	background: linear-gradient(90deg, rgba(246, 241, 233, .98), rgba(246, 241, 233, .88) 42%, rgba(246, 241, 233, .14) 76%);
	content: "";
	inset: 0;
	position: absolute;
	z-index: -1;
}

.hero-copy {
	display: grid;
	gap: 1rem;
	max-width: 610px;
	padding: clamp(4rem, 10vw, 8.5rem) clamp(1rem, 7vw, 6.4rem);
}

.eyebrow {
	color: var(--brand);
	font-size: .78rem;
	font-weight: 900;
	margin: 0;
	text-transform: uppercase;
}

h1,
h2,
h3,
p {
	margin-top: 0;
}

h1 {
	font-size: clamp(2.25rem, 4vw, 4.8rem);
	line-height: 1.02;
	margin-bottom: 0;
}

h2 {
	font-size: clamp(1.35rem, 2vw, 2.25rem);
	line-height: 1.18;
}

h3 {
	font-size: 1.08rem;
	line-height: 1.3;
}

.button,
.wp-block-button__link,
.entry a[href*="amazon"],
.entry a[href*="amzn"] {
	background: var(--brand-dark);
	border-radius: 6px;
	color: #fff;
	display: inline-flex;
	justify-content: center;
	padding: .72rem 1rem;
	text-decoration: none;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .8rem;
}

.hero-actions .quiet {
	background: var(--green);
}

.signal-bar {
	background: var(--paper-strong);
	display: grid;
	gap: 1rem;
	grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
	margin: -2rem auto 0;
	max-width: 1180px;
	min-height: 5.8rem;
	padding: 1rem clamp(1rem, 4vw, 2.5rem);
	position: relative;
}

.home-panels,
.home-guides,
.shell {
	padding-bottom: clamp(2.5rem, 6vw, 5rem);
	padding-top: clamp(2.5rem, 6vw, 5rem);
}

.home-panels {
	display: grid;
	gap: clamp(1rem, 3vw, 2rem);
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.guide-card,
.entry table,
.entry .wp-block-table,
.mac-disclosure {
	border-radius: 8px;
}

.panel,
.guide-card {
	background: var(--paper-strong);
	border: 1px solid var(--line);
	display: grid;
	gap: .4rem;
	min-height: 13rem;
	padding: 1rem;
	text-decoration: none;
}

.panel {
	overflow: hidden;
	padding-top: 0;
}

.panel-media {
	background-image: linear-gradient(180deg, rgba(36, 29, 26, .04), rgba(36, 29, 26, .18)), url("https://mantaelectrica.com/wp-content/uploads/2026/05/manta-electrica-editorial-hero.png");
	background-position: center 43%;
	background-size: cover;
	display: block;
	height: 8.5rem;
	margin: 0 -1rem .8rem;
}

.panel:nth-child(2) .panel-media {
	background-position: center 58%;
}

.panel:nth-child(3) .panel-media {
	background-position: center 72%;
}

.panel span,
.entry-meta,
.site-footer {
	color: var(--muted);
}

.home-guides {
	background: var(--wash);
	max-width: none;
}

.home-guides > * {
	margin-left: auto;
	margin-right: auto;
	max-width: 1100px;
}

.guide-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-grid {
	display: grid;
	gap: clamp(1.3rem, 4vw, 3rem);
	grid-template-columns: minmax(0, 1fr) 280px;
}

body .content-grid {
	grid-template-columns: minmax(0, 1fr) 280px;
}

.entry {
	background: var(--paper-strong);
	border: 1px solid var(--line);
	border-radius: 8px;
	overflow: hidden;
	padding: clamp(1rem, 4vw, 2.5rem);
}

.entry > * + *,
.entry-content > * + * {
	margin-top: 1.35rem;
}

.entry-header {
	margin-bottom: 1.5rem;
}

.entry-header h1 {
	font-size: clamp(2rem, 3vw, 3.75rem);
}

.entry-visual {
	border-radius: 8px;
	margin: 0 0 1.6rem;
	overflow: hidden;
	position: relative;
}

.entry-visual::after {
	background: linear-gradient(180deg, rgba(36, 29, 26, 0), rgba(36, 29, 26, .3));
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
}

.entry-visual img {
	aspect-ratio: 16 / 7;
	display: block;
	height: auto;
	object-fit: cover;
	object-position: center 58%;
	width: 100%;
}

.decision-strip {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.decision-strip figure,
.product-visual {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 8px;
	box-shadow: 0 16px 36px rgba(36, 29, 26, .08);
	margin: 0;
	overflow: hidden;
}

.decision-strip img,
.product-visual img {
	aspect-ratio: 16 / 9;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.decision-strip figcaption,
.product-visual figcaption {
	color: var(--muted);
	font-size: .92rem;
	padding: .75rem .9rem .9rem;
}

.product-visual {
	margin: 1rem 0 1.2rem;
}

.category-visual {
	border-radius: 8px;
	margin: 1.4rem 0;
	overflow: hidden;
}

.category-visual img {
	aspect-ratio: 16 / 7;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.category-visual figcaption {
	background: #fff;
	color: var(--muted);
	font-size: .92rem;
	padding: .75rem .9rem;
}

.route-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 1.6rem 0;
}

.route-grid a {
	background: #fff7ec;
	border: 1px solid var(--line);
	border-radius: 8px;
	color: var(--ink);
	display: grid;
	gap: .35rem;
	padding: 1rem;
	text-decoration: none;
}

.route-grid span {
	color: var(--muted);
}

.entry-content > p:first-of-type {
	color: #3a302c;
	font-size: 1.08rem;
}

.entry table {
	border-collapse: collapse;
	background: #fff;
	box-shadow: 0 18px 45px rgba(36, 29, 26, .08);
	display: table;
	min-width: 660px;
	width: 100%;
}

body .entry-content table {
	display: table;
}

.entry .wp-block-table {
	overflow-x: auto;
}

.entry th,
.entry td {
	border-bottom: 1px solid var(--line);
	padding: .8rem;
	text-align: left;
	vertical-align: top;
}

.entry th {
	background: #fff7ec;
	color: var(--brand-dark);
}

.entry ul {
	padding-left: 1.25rem;
}

.mac-disclosure,
.aviso-afiliacion {
	background: var(--notice);
	border-left: 4px solid var(--gold);
	box-shadow: 0 12px 30px rgba(36, 29, 26, .06);
	padding: 1rem;
}

.rail {
	display: grid;
	gap: 1rem;
	align-content: start;
}

.rail-box {
	background: var(--wash);
	border-radius: 8px;
	border: 1px solid var(--line);
	padding: 1rem;
}

.rail-box ul {
	display: grid;
	gap: .45rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.archive-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.site-footer {
	border-top: 1px solid var(--line);
	font-size: .93rem;
}

@media (max-width: 820px) {
	.site-header,
	.site-footer {
		align-items: flex-start;
		flex-direction: column;
	}

	.site-nav > ul {
		gap: .55rem 1rem;
	}

	.home-hero {
		min-height: 700px;
	}

	.home-hero::after {
		background: linear-gradient(180deg, rgba(246, 241, 233, .98), rgba(246, 241, 233, .88) 48%, rgba(246, 241, 233, .15));
	}

	.signal-bar,
	.home-panels,
	.guide-grid,
	.decision-strip,
	.route-grid,
	.content-grid,
	.archive-grid {
		grid-template-columns: 1fr;
	}

	body .content-grid {
		grid-template-columns: 1fr;
	}

	body .entry-content table {
		display: block;
	}

	.rail {
		order: -1;
	}
}
