/*
 * Estilos base del tema Macfry Core.
 * Identidad visual real de MACFRY (Fase 2) — paleta y tipografía extraídas
 * de los materiales de marca ya existentes (macfry-web.html, logo oficial
 * en Escritorio\MACFRY). Ver docs/DECISIONS.md.
 */

:root {
	--navy: #07111e;
	--navy-2: #0b1929;
	--navy-3: #0f2240;
	--graphite: #141c27;
	--graphite-2: #1a2232;
	--graphite-3: #222d3d;
	--steel: #2d3d52;
	--silver: #6a7d95;
	--mist: #a8bccf;
	--white: #edf2f7;
	--pure: #ffffff;
	--gold: #c9a84c;
	--gold-2: #e8c56a;
	--gold-3: #f5d98a;
	--line: rgba(255, 255, 255, 0.08);
	--line-2: rgba(255, 255, 255, 0.14);
	--radius: 4px;
	--font-display: 'Barlow Condensed', sans-serif;
	--font-body: 'Barlow', system-ui, -apple-system, sans-serif;
	--font-mono: 'Roboto Mono', monospace;
	--max-width: 1280px;
}

*, *::before, *::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--font-body);
	background: var(--navy);
	color: var(--white);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
	margin: 0 0 0.5em;
	color: var(--pure);
}

p {
	margin: 0 0 1em;
	color: var(--mist);
}

a {
	color: var(--gold-2);
	text-decoration: none;
}
a:hover {
	color: var(--gold-3);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

.macfry-container {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 24px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
}
.macfry-skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 10000;
	width: auto;
	height: auto;
	clip: auto;
	background: var(--gold);
	color: var(--navy);
	padding: 10px 16px;
	border-radius: var(--radius);
	font-weight: 700;
}

/* ── BOTONES / CTA ── */
.macfry-btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce #respond input#submit,
.woocommerce input.button,
.woocommerce-message a.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--gold);
	color: var(--navy) !important;
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.02em;
	padding: 12px 24px;
	border: none;
	border-radius: var(--radius);
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
}
.macfry-btn:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce input.button:hover {
	background: var(--gold-2);
	color: var(--navy) !important;
}
.macfry-btn--outline {
	background: transparent;
	border: 1px solid var(--line-2);
	color: var(--white) !important;
}
.macfry-btn--outline:hover {
	border-color: var(--gold);
	color: var(--gold-2) !important;
}

/* ── HEADER ── */
.macfry-site-header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 16px 24px;
	border-bottom: 1px solid var(--line);
	flex-wrap: wrap;
}
.macfry-site-logo img {
	height: 44px;
	width: auto;
}
.macfry-site-title a {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 22px;
	letter-spacing: 0.02em;
	color: var(--pure);
	text-transform: uppercase;
}
.macfry-primary-menu ul {
	display: flex;
	gap: 28px;
	list-style: none;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}
.macfry-primary-menu a {
	color: var(--mist);
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.macfry-primary-menu a:hover {
	color: var(--gold-2);
}
.macfry-header-actions {
	display: flex;
	align-items: center;
	gap: 16px;
}
.macfry-header-actions a {
	color: var(--white);
}
.macfry-search-toggle {
	display: none;
	background: none;
	border: none;
	color: var(--white);
	cursor: pointer;
	padding: 4px;
	align-items: center;
}
.macfry-header-search {
	display: flex;
	gap: 8px;
}
.macfry-header-search input[type="search"] {
	background: var(--graphite);
	border: 1px solid var(--line-2);
	color: var(--white);
	padding: 8px 12px;
	border-radius: var(--radius);
	width: 180px;
	font-size: 13px;
}
.macfry-header-search button {
	background: var(--steel);
	color: var(--white);
	border: none;
	padding: 8px 12px;
	border-radius: var(--radius);
	cursor: pointer;
	font-size: 13px;
}

/* ── NAV: SUBMENÚ "CATEGORÍAS" ── */
.macfry-primary-menu li {
	position: relative;
}
.macfry-primary-menu ul ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 20;
	background: var(--graphite);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	min-width: 200px;
	padding: 8px 0;
	margin: 8px 0 0;
	flex-direction: column;
	gap: 0;
}
.macfry-primary-menu li:hover > ul,
.macfry-primary-menu li:focus-within > ul {
	display: flex;
}
.macfry-primary-menu ul ul a {
	display: block;
	padding: 8px 16px;
	text-transform: none;
	letter-spacing: normal;
	font-weight: 500;
}

/* ── VOLVER A LA TIENDA ── */
.macfry-back-to-shop {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 16px 0 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--mist);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.macfry-back-to-shop:hover {
	color: var(--gold-2);
}

/* ── CATEGORÍAS (HOME) ── */
.macfry-category-chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 24px;
}
.macfry-category-chip {
	background: var(--graphite);
	border: 1px solid var(--line-2);
	color: var(--white);
	font-size: 13px;
	font-weight: 600;
	padding: 10px 20px;
	border-radius: 999px;
}
.macfry-category-chip:hover {
	border-color: var(--gold);
	color: var(--gold-2);
}
.macfry-cart-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	background: var(--gold);
	color: var(--navy);
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 700;
	border-radius: 999px;
	margin-left: 4px;
}
.macfry-nav-toggle {
	display: none;
	background: none;
	border: 1px solid var(--line-2);
	color: var(--white);
	border-radius: var(--radius);
	padding: 8px 12px;
	cursor: pointer;
}

/* ── FOOTER ── */
.macfry-site-footer {
	background: var(--graphite);
	border-top: 1px solid var(--line);
	margin-top: 64px;
}
.macfry-footer-inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 48px 24px 24px;
}
.macfry-footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 32px;
	margin-bottom: 32px;
}
.macfry-footer-widget__title {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--gold-2);
}
.macfry-legal-menu ul {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
	border-top: 1px solid var(--line);
	padding-top: 16px;
}
.macfry-legal-menu a {
	color: var(--silver);
	font-size: 13px;
}
.macfry-copyright {
	color: var(--silver);
	font-size: 13px;
	margin: 0;
}

/* ── HOME: HERO ── */
.macfry-hero {
	position: relative;
	padding: 96px 24px;
	background: linear-gradient(180deg, var(--navy-2) 0%, var(--navy) 100%);
	text-align: center;
	border-bottom: 1px solid var(--line);
}
.macfry-hero__eyebrow {
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--gold);
}
.macfry-hero__title {
	font-size: clamp(32px, 6vw, 56px);
	max-width: 800px;
	margin: 16px auto;
}
.macfry-hero__subtitle {
	max-width: 620px;
	margin: 0 auto 32px;
	font-size: 17px;
}
.macfry-hero__actions {
	display: flex;
	gap: 16px;
	justify-content: center;
	flex-wrap: wrap;
}

/* ── HOME: SECCIONES ── */
.macfry-section {
	padding: 64px 24px;
	max-width: var(--max-width);
	margin: 0 auto;
}
.macfry-section__title {
	font-size: clamp(24px, 4vw, 34px);
	text-align: center;
	margin-bottom: 8px;
}
.macfry-section__subtitle {
	text-align: center;
	max-width: 560px;
	margin: 0 auto 40px;
}

.macfry-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 24px;
}

.macfry-card {
	background: var(--graphite);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 28px 24px;
}
.macfry-card h3 {
	font-size: 19px;
	margin-bottom: 8px;
}
.macfry-card p {
	font-size: 14px;
	margin-bottom: 0;
}
.macfry-card__icon {
	color: var(--gold);
	font-family: var(--font-mono);
	font-size: 13px;
	margin-bottom: 12px;
	display: block;
}

.macfry-trust {
	background: var(--graphite-2);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}
.macfry-trust__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 24px;
	text-align: center;
}
.macfry-trust__item strong {
	display: block;
	font-family: var(--font-display);
	font-size: 15px;
	color: var(--pure);
}
.macfry-trust__item span {
	color: var(--silver);
	font-size: 13px;
}

.macfry-cta-band {
	background: var(--navy-3);
	border-radius: var(--radius);
	padding: 48px 32px;
	text-align: center;
}

.macfry-placeholder-note {
	display: inline-block;
	margin-top: 8px;
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--orange, #e8720c);
	border: 1px dashed rgba(232, 114, 12, 0.4);
	padding: 4px 8px;
	border-radius: var(--radius);
}

/* ── BREADCRUMB ── */
.macfry-breadcrumb {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 16px 24px 0;
	font-size: 13px;
	color: var(--silver);
}
.macfry-breadcrumb a {
	color: var(--silver);
}
.macfry-breadcrumb span {
	color: var(--mist);
}

/* ── SHOP MAIN WRAPPER ── */
.macfry-shop-main,
.macfry-main {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 24px 24px 64px;
}

/* ── TIENDA: CABECERA + LAYOUT DE FILTROS ── */
.macfry-shop-layout {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 32px;
	align-items: flex-start;
}
.macfry-shop-sidebar {
	background: var(--graphite);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px;
	position: sticky;
	top: 16px;
}
.macfry-shop-sidebar h3 {
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--gold-2);
	margin-bottom: 12px;
}
.macfry-filter-group {
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--line);
}
.macfry-filter-group:last-child {
	border-bottom: none;
}
.macfry-filter-group label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--mist);
	margin-bottom: 8px;
	cursor: pointer;
}
.macfry-price-range {
	display: flex;
	gap: 8px;
	align-items: center;
}
.macfry-price-range input {
	width: 100%;
	background: var(--navy);
	border: 1px solid var(--line-2);
	color: var(--white);
	padding: 6px 8px;
	border-radius: var(--radius);
	font-size: 13px;
}

/* ── PRODUCT LOOP / CARD ── */
ul.products {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
	gap: 24px !important;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
ul.products li.product {
	background: var(--graphite);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 16px;
	transition: border-color 0.2s ease, transform 0.15s ease;
}
ul.products li.product:hover {
	border-color: var(--line-2);
	transform: translateY(-2px);
}
ul.products li.product img {
	border-radius: var(--radius);
	margin-bottom: 12px;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}
ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 15px;
	color: var(--white);
	margin-bottom: 4px;
}
ul.products li.product .price {
	color: var(--gold-2);
	font-weight: 700;
	font-family: var(--font-mono);
}
ul.products li.product .price del {
	color: var(--silver);
	opacity: 0.7;
	font-weight: 400;
}

.macfry-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 12px;
}
.macfry-product-search {
	display: flex;
	gap: 8px;
}
.macfry-product-search input[type="search"] {
	background: var(--graphite);
	border: 1px solid var(--line-2);
	color: var(--white);
	padding: 8px 12px;
	border-radius: var(--radius);
	min-width: 220px;
}
.macfry-product-search button {
	background: var(--steel);
	color: var(--white);
	border: none;
	padding: 8px 14px;
	border-radius: var(--radius);
	cursor: pointer;
}
.woocommerce-ordering select {
	background: var(--graphite);
	color: var(--white);
	border: 1px solid var(--line-2);
	border-radius: var(--radius);
	padding: 8px 12px;
}

/* ── FICHA DE PRODUCTO ── */
.macfry-product-page {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 48px;
	margin-bottom: 48px;
}
.macfry-product-gallery img {
	border-radius: var(--radius);
	border: 1px solid var(--line);
}
.macfry-product-summary .price {
	font-family: var(--font-mono);
	font-size: 26px;
	color: var(--gold-2);
	margin: 12px 0;
}
.macfry-product-meta-table {
	width: 100%;
	border-collapse: collapse;
	margin: 20px 0;
	font-size: 13px;
}
.macfry-product-meta-table tr {
	border-bottom: 1px solid var(--line);
}
.macfry-product-meta-table th {
	text-align: left;
	color: var(--silver);
	padding: 8px 12px 8px 0;
	font-weight: 500;
	width: 40%;
}
.macfry-product-meta-table td {
	color: var(--white);
	padding: 8px 0;
}
.macfry-trust-badges {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--line);
}
.macfry-trust-badge {
	font-size: 12px;
	color: var(--mist);
	display: flex;
	align-items: center;
	gap: 6px;
}
.macfry-related-products {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid var(--line);
}

/* ── CARRITO / CHECKOUT ── */
.woocommerce-cart table.cart,
.woocommerce-checkout table.shop_table,
table.woocommerce-cart-form__contents {
	width: 100%;
	border-collapse: collapse;
	background: var(--graphite);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.woocommerce-cart table.cart th,
.woocommerce-checkout table.shop_table th {
	text-align: left;
	color: var(--gold-2);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 12px;
	border-bottom: 1px solid var(--line-2);
}
.woocommerce-cart table.cart td,
.woocommerce-checkout table.shop_table td {
	padding: 12px;
	border-bottom: 1px solid var(--line);
	color: var(--white);
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-checkout select,
.woocommerce-additional-fields textarea {
	width: 100%;
	background: var(--navy);
	border: 1px solid var(--line-2);
	color: var(--white);
	padding: 10px 12px;
	border-radius: var(--radius);
}
.woocommerce-checkout #payment {
	background: var(--graphite);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 16px;
}

/* ── MI CUENTA ── */
.woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}
.woocommerce-MyAccount-navigation li {
	border-bottom: 1px solid var(--line);
}
.woocommerce-MyAccount-navigation a {
	display: block;
	padding: 12px 16px;
	color: var(--mist);
	font-size: 14px;
}
.woocommerce-MyAccount-navigation li.is-active a {
	color: var(--gold-2);
	background: var(--graphite);
}

/* ── PÁGINAS DE CONTENIDO (contacto, legales) ── */
.macfry-page-content {
	max-width: 760px;
	margin: 0 auto;
	padding: 48px 24px;
}
.macfry-page-content h1 {
	font-size: 32px;
}
.macfry-contact-form {
	max-width: 480px;
}
.macfry-form-row {
	margin-bottom: 16px;
}
.macfry-form-row label {
	display: block;
	font-size: 13px;
	color: var(--mist);
	margin-bottom: 6px;
}
.macfry-form-row input,
.macfry-form-row textarea {
	width: 100%;
	background: var(--graphite);
	border: 1px solid var(--line-2);
	color: var(--white);
	padding: 10px 12px;
	border-radius: var(--radius);
	font-family: var(--font-body);
}
.macfry-form-success {
	color: #7fd67f;
	background: rgba(127, 214, 127, 0.1);
	border: 1px solid rgba(127, 214, 127, 0.3);
	padding: 12px 16px;
	border-radius: var(--radius);
}
.macfry-form-error {
	color: #ff8a8a;
	background: rgba(255, 138, 138, 0.1);
	border: 1px solid rgba(255, 138, 138, 0.3);
	padding: 12px 16px;
	border-radius: var(--radius);
	list-style: none;
	margin: 0 0 16px;
}
.macfry-page-content h2 {
	margin-top: 32px;
	font-size: 22px;
}
.macfry-page-content ul,
.macfry-page-content ol {
	color: var(--mist);
}
.macfry-pending-tag {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--gold-2);
	background: rgba(201, 168, 76, 0.12);
	border: 1px solid rgba(201, 168, 76, 0.3);
	padding: 2px 8px;
	border-radius: var(--radius);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
	.macfry-shop-layout {
		grid-template-columns: 1fr;
	}
	.macfry-shop-sidebar {
		position: static;
	}
	.macfry-product-page {
		grid-template-columns: 1fr;
		gap: 24px;
	}
}

@media (max-width: 768px) {
	.macfry-primary-menu {
		display: none;
		width: 100%;
		order: 3;
	}
	.macfry-primary-menu.is-open {
		display: block;
	}
	.macfry-primary-menu ul {
		flex-direction: column;
		gap: 4px;
		padding: 16px 0;
		border-top: 1px solid var(--line);
	}
	.macfry-nav-toggle {
		display: inline-flex;
	}
	.macfry-search-toggle {
		display: inline-flex;
	}
	.macfry-header-search {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--navy-2);
		border-bottom: 1px solid var(--line);
		padding: 12px 24px;
	}
	.macfry-header-search.is-open {
		display: flex;
	}
	.macfry-header-search input[type="search"] {
		width: 100%;
	}
	.macfry-primary-menu ul ul {
		position: static;
		border: none;
		background: none;
		padding: 0 0 0 16px;
		margin: 0;
	}
	.macfry-hero {
		padding: 56px 20px;
	}
	.macfry-section {
		padding: 40px 20px;
	}
	ul.products {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 16px !important;
	}
}

@media (max-width: 480px) {
	ul.products {
		grid-template-columns: 1fr !important;
	}
	.macfry-hero__actions {
		flex-direction: column;
	}
}
