/* ClaveYa sobre Storefront. Mismos tokens que el prototipo (prototipo/estilos.css). */
:root {
	--accent: #0f9d58;
	--accent-dark: #0b7a44;
	--ink: #0b1b2b;
	--muted: #5b6b7b;
	--soft: #eef7f2;
	--line: #dfe7ee;
	--bg: #f6f8fa;
	--card: #fff;
	--radius: 14px;
}

/* ---------- Base (anula tipografía y colores de Storefront) ---------- */
body {
	font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--ink);
	background: var(--bg);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
body h1, body h2, body h3, body h4, body h5, body h6,
body .product_title, body .entry-title, body .page-title {
	font-family: inherit;
	color: var(--ink);
	font-weight: 800;
	letter-spacing: -.02em;
}
body a { color: inherit; }
body a:focus, body button:focus, body input:focus { outline-color: var(--accent); }
.cy-wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
body .col-full { max-width: 1120px; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
body .site-content { padding-top: 0; }
body .site-main { margin-bottom: 48px; }
body .hentry { margin-bottom: 0; }

/* Botones: píldora oscura; "Comprar ahora" / finalizar pedido en verde */
body button, body .button, body input[type="submit"], body .wc-block-components-button {
	font-family: inherit;
	font-weight: 700;
	border-radius: 999px;
	background: var(--ink);
	border: 2px solid var(--ink);
	color: #fff;
	padding: .75em 1.4em;
	line-height: 1.2;
	transition: background .15s, border-color .15s;
}
body button:hover, body .button:hover, body input[type="submit"]:hover {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}
body .button.alt, body button.alt, body #place_order {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}
body .button.alt:hover, body button.alt:hover, body #place_order:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* Campos */
body input[type="text"], body input[type="email"], body input[type="tel"], body input[type="search"],
body input[type="number"], body input[type="password"], body select, body textarea, body .select2-container .select2-selection {
	font-family: inherit;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 10px;
	box-shadow: none;
	color: var(--ink);
}
body input[type="text"], body input[type="email"], body input[type="tel"], body input[type="search"], body input[type="password"], body select { min-height: 44px; padding: 0 12px; }
body textarea { padding: 10px 12px; }

/* ---------- Cabecera ---------- */
.cy-topbar { background: var(--ink); color: #cfe0ee; font-size: 13px; }
.cy-topbar .cy-wrap { display: flex; justify-content: center; gap: 24px; padding: 8px 16px; flex-wrap: wrap; }
.cy-topbar b { color: #fff; font-weight: 600; }
.cy-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.admin-bar .cy-header { top: 32px; }
.cy-header .cy-wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.cy-logo { font-weight: 800; font-size: 22px; letter-spacing: -.02em; text-decoration: none; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.cy-logo i { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; color: #fff; font-style: normal; font-size: 15px; }
.cy-search { flex: 1; max-width: 460px; margin: 0 0 0 auto; }
body .cy-search input[type="search"] { width: 100%; height: 40px; min-height: 40px; border-radius: 999px; padding: 0 16px; background: var(--bg); }
.cy-cart { text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; color: var(--ink); }

/* Migas de pan: separador de texto (el icono de Storefront no siempre carga) */
body .woocommerce-breadcrumb { background: none; border: 0; margin: 0; padding: 16px 0; font-size: 13px; color: var(--muted); }
body .woocommerce-breadcrumb a { color: var(--muted); text-decoration: none; }
body .woocommerce-breadcrumb a:first-of-type::before { content: none; }
body .woocommerce-breadcrumb .breadcrumb-separator { text-indent: 0; display: inline; padding: 0 6px; }
body .woocommerce-breadcrumb .breadcrumb-separator::after { content: none; }

/* ---------- Portada ---------- */
.cy-hero { padding: 48px 0 24px; }
.cy-hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 12px; max-width: 16ch; }
.cy-hero p { color: var(--muted); font-size: 18px; margin: 0 0 24px; max-width: 52ch; }
.cy-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cy-chip { padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink); }
.cy-chip.is-on, .cy-chip:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.cy-catalog { padding: 8px 0 24px; }
.cy-more { text-align: center; margin: 8px 0 0; }
.cy-btn { display: inline-block; padding: 12px 22px; border-radius: 999px; border: 2px solid var(--ink); font-weight: 700; text-decoration: none; color: var(--ink); }
.cy-btn:hover { background: var(--ink); color: #fff; }
.cy-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding: 32px 24px; margin: 24px 0 48px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.cy-steps b { display: block; font-size: 16px; margin-bottom: 4px; }
.cy-steps span { color: var(--muted); font-size: 14px; }
.cy-steps em { font-style: normal; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); color: var(--accent-dark); font-weight: 800; margin-bottom: 8px; }

/* ---------- Grilla de productos (anula los flotados de Storefront) ---------- */
body ul.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 0 0 24px; padding: 0; }
body ul.products::before, body ul.products::after { content: none; display: none; }
body ul.products li.product {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
	clear: none !important;
	display: flex;
	flex-direction: column;
	text-align: left;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 16px;
	transition: box-shadow .15s, transform .15s;
}
body ul.products li.product:hover { box-shadow: 0 10px 30px rgba(11, 27, 43, .08); transform: translateY(-2px); }
body ul.products li.product a.woocommerce-LoopProduct-link { display: flex; flex-direction: column; flex: 1; text-decoration: none; }
body ul.products li.product img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 10px; margin: 0 0 12px; background: #fff; }
.cy-brand { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
body ul.products li.product .woocommerce-loop-product__title { font-size: 15px; font-weight: 700; line-height: 1.35; letter-spacing: 0; padding: 0; margin: 4px 0 10px; color: var(--ink); }
body ul.products li.product .price { margin-top: auto; margin-bottom: 12px; font-size: 20px; font-weight: 800; color: var(--ink); }
body ul.products li.product .button { margin: 0; align-self: flex-start; padding: 9px 18px; font-size: 14px; }
body ul.products li.product .added_to_cart { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--accent-dark); }
body .woocommerce-result-count, body .woocommerce-ordering { font-size: 14px; color: var(--muted); }
body .storefront-sorting { margin-bottom: 16px; }

/* ---------- Ficha de producto ---------- */
body.single-product div.product { padding-top: 8px; }
body.single-product div.product .woocommerce-product-gallery {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 18px;
	padding: 16px;
}
body.single-product div.product .woocommerce-product-gallery img { border-radius: 10px; }
body.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__trigger, .storefront-product-pagination { display: none !important; }
body.single-product div.product .product_title { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.15; margin: 0 0 12px; }
body.single-product div.product p.price { font-size: 38px; font-weight: 800; color: var(--ink); margin: 8px 0 2px; letter-spacing: -.02em; }
.cy-igv { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
body.single-product div.product .woocommerce-product-details__short-description { color: var(--muted); font-size: 15px; }
body.single-product div.product form.cart { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin: 0 0 12px; padding: 0; border: 0; }
body.single-product div.product form.cart .quantity { margin: 0; }
body.single-product div.product form.cart .quantity .qty { height: 50px; width: 72px; border-radius: 999px; text-align: center; font-weight: 600; }
body.single-product div.product form.cart .single_add_to_cart_button {
	flex: 1;
	min-width: 150px;
	height: 50px;
	background: #fff;
	color: var(--ink);
	border: 2px solid var(--ink);
	font-size: 16px;
}
body.single-product div.product form.cart .single_add_to_cart_button:hover { background: var(--ink); color: #fff; }
body.single-product div.product form.cart .mr-buy-now { flex: 1 1 100%; height: 52px; margin: 0 !important; font-size: 17px; }

/* Pestañas horizontales en lugar de la columna lateral de Storefront */
body .woocommerce-tabs { padding-top: 32px; }
body .woocommerce-tabs ul.tabs { width: auto; float: none; display: flex; gap: 8px; margin: 0 0 16px; padding: 0; border: 0; }
body .woocommerce-tabs ul.tabs li { border: 0; margin: 0; }
body .woocommerce-tabs ul.tabs li::after { content: none; }
body .woocommerce-tabs ul.tabs li a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; text-decoration: none; }
body .woocommerce-tabs ul.tabs li.active a { background: var(--ink); border-color: var(--ink); color: #fff; }
body .woocommerce-tabs .panel { width: auto; float: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
body .woocommerce-tabs .panel h3 { font-size: 18px; margin: 20px 0 8px; }
body .woocommerce-tabs .panel h3:first-child { margin-top: 0; }
body .woocommerce-tabs .panel p, body .woocommerce-tabs .panel li { color: #334454; }
body .related.products > h2, body .upsells.products > h2 { font-size: 22px; margin: 40px 0 16px; }

/* ---------- Carrito y checkout ---------- */
body .woocommerce-cart-form, body .cart-collaterals .cart_totals, body #order_review, body form.checkout .col2-set {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px;
}
body table.shop_table { border: 0; margin: 0; }
body table.shop_table th, body table.shop_table td { background: transparent; border-color: var(--line); }
body table.cart img { width: 64px; border-radius: 8px; border: 1px solid var(--line); }
body .cart-collaterals .cart_totals h2, body #order_review_heading, body form.checkout h3 { font-size: 18px; }
body .checkout-button, body #place_order { width: 100%; height: 54px; font-size: 17px; }
body form.checkout .form-row label { font-weight: 600; font-size: 14px; }
body form.checkout .form-row .description { font-size: 12px; color: var(--muted); }
body #payment { background: var(--bg); border-radius: 10px; }
body #payment .payment_methods > li { background: #fff; border-radius: 10px; margin-bottom: 8px; }
body .woocommerce-terms-and-conditions-wrapper { font-size: 14px; }
.mr-hidden { display: none !important; }

/* ---------- Páginas legales y de contenido ---------- */
body.page:not(.woocommerce-page) .site-main .hentry { max-width: 760px; }
body.page .entry-header { padding: 32px 0 8px; border: 0; }
body.page .entry-title { font-size: clamp(28px, 4vw, 38px); }
body.page .entry-content p, body.page .entry-content li { color: #334454; font-size: 16px; line-height: 1.65; }
body.page .entry-content h2 { font-size: 20px; margin: 28px 0 8px; }
body.page .entry-content a { color: var(--accent-dark); }

/* Avisos de WooCommerce */
body .woocommerce-message, body .woocommerce-info, body .woocommerce-error, body .woocommerce-noreviews {
	border-radius: 10px;
	border-left: 0;
	background: var(--soft);
	color: var(--ink);
}
body .woocommerce-message a, body .woocommerce-info a { color: var(--accent-dark); }
body .woocommerce-error { background: #fdecec; color: #8a1f1f; }

/* ---------- Pie ---------- */
.cy-footer { background: var(--ink); color: #9fb3c5; font-size: 13px; padding: 32px 0 24px; }
.cy-footer .cy-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; margin-bottom: 20px; }
.cy-footer b { color: #fff; display: block; margin-bottom: 8px; }
.cy-footer a { display: block; text-decoration: none; margin-bottom: 4px; color: #9fb3c5; }
.cy-footer a:hover { color: #fff; }
.cy-footer .cy-legal { border-top: 1px solid #22364a; padding-top: 16px; }

/* ---------- Móvil ---------- */
@media (max-width: 820px) {
	.cy-topbar span:not(:first-child) { display: none; }
	.cy-search { display: none; }
	.cy-cart { margin-left: auto; }
	body ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	body ul.products li.product { padding: 10px; }
	body ul.products li.product .woocommerce-loop-product__title { font-size: 14px; }
	body ul.products li.product .price { font-size: 17px; }
	body.single-product div.product .woocommerce-product-gallery { max-width: 300px; margin: 0 auto 16px; }
	body.single-product div.product p.price { font-size: 32px; }
	.cy-hero { padding-top: 28px; }
	.cy-hero p { font-size: 16px; }
}
@media (max-width: 782px) { .admin-bar .cy-header { top: 0; } }
