/* ==========================================================
   NZ Group — ajustes para tema Astra + WooCommerce
   Reemplaza la paleta global de Astra por la de la marca y
   aplica botones, precios y etiquetas de la tienda.
   ========================================================== */

/* 1. Paleta global de Astra -> colores NZ
   (html:root gana a la paleta que Astra imprime en :root) */
html:root {
	--ast-global-color-0: #C8360B; /* Marca: links y acentos (pulse-text) */
	--ast-global-color-1: #0D1530; /* Marca alternativa: hover */
	--ast-global-color-2: #0D1530; /* Títulos */
	--ast-global-color-3: #4A5470; /* Texto */
	--ast-global-color-4: #F5F6FA; /* Fondo principal */
	--ast-global-color-5: #FFFFFF; /* Fondo secundario */
	--ast-global-color-6: #E8ECF7; /* Fondo alternativo (ice) */
	--ast-global-color-7: #DDE1EC; /* Bordes */
	--ast-global-color-8: #FFE3D8; /* Apoyo (pulse-soft) */
}

/* 2. Títulos */
html body :is(h1, h2, h3, h4, h5, h6, .entry-title, .page-title, .ast-archive-title, .woocommerce-products-header__title) {
	color: var(--nz-ink);
	font-family: var(--nz-font-display);
	font-stretch: 125%;
}
html body :is(h1, h2, h3, h4, h5, h6) a { color: inherit; }

/* 3. Botones de WooCommerce y Astra (selectores separados para no subir la especificidad de todos) */
html :is(body.woocommerce, body .woocommerce) a.button,
html :is(body.woocommerce, body .woocommerce) button.button,
html :is(body.woocommerce, body .woocommerce) input.button,
html :is(body.woocommerce, body .woocommerce) a.button.alt,
html :is(body.woocommerce, body .woocommerce) button.button.alt,
html :is(body.woocommerce, body .woocommerce) ul.products li.product .button,
html :is(body.woocommerce-page, body .woocommerce-page) ul.products li.product .button,
html :is(body.woocommerce, body .woocommerce) #respond input#submit {
	background-color: var(--nz-brand-pulse);
	color: var(--nz-on-pulse);
	border: 2px solid transparent;
	border-radius: var(--nz-radius-md);
	font-family: var(--nz-font-body);
	font-weight: 700;
	font-size: 15px;
	line-height: 20px;
	letter-spacing: 0.02em;
	text-transform: none;
	padding: var(--nz-space-3) var(--nz-space-6);
	box-shadow: none;
	text-decoration: none;
}
html body .wc-block-components-button,
html body .wp-element-button,
html body .ast-button,
html body .button,
html body button[type="submit"],
html body input[type="submit"] {
	background-color: var(--nz-brand-pulse);
	color: var(--nz-on-pulse);
	border: 2px solid transparent;
	border-radius: var(--nz-radius-md);
	font-family: var(--nz-font-body);
	font-weight: 700;
	font-size: 15px;
	line-height: 20px;
	letter-spacing: 0.02em;
	text-transform: none;
	padding: var(--nz-space-3) var(--nz-space-6);
	box-shadow: none;
	text-decoration: none;
}
html :is(body.woocommerce, body .woocommerce) a.button:hover,
html :is(body.woocommerce, body .woocommerce) button.button:hover,
html :is(body.woocommerce, body .woocommerce) input.button:hover,
html :is(body.woocommerce, body .woocommerce) a.button.alt:hover,
html :is(body.woocommerce, body .woocommerce) button.button.alt:hover,
html :is(body.woocommerce, body .woocommerce) ul.products li.product .button:hover,
html :is(body.woocommerce-page, body .woocommerce-page) ul.products li.product .button:hover,
html :is(body.woocommerce, body .woocommerce) a.button:focus-visible,
html :is(body.woocommerce, body .woocommerce) button.button:focus-visible,
html :is(body.woocommerce, body .woocommerce) input.button:focus-visible,
html :is(body.woocommerce, body .woocommerce) a.button.alt:focus-visible,
html :is(body.woocommerce, body .woocommerce) button.button.alt:focus-visible,
html :is(body.woocommerce, body .woocommerce) ul.products li.product .button:focus-visible,
html :is(body.woocommerce-page, body .woocommerce-page) ul.products li.product .button:focus-visible,
html :is(body.woocommerce, body .woocommerce) #respond input#submit:hover {
	background-color: var(--nz-pulse-text);
	color: var(--nz-brand-white);
	border-color: transparent;
}
html body .wc-block-components-button:hover,
html body .wp-element-button:hover,
html body .ast-button:hover,
html body .button:hover,
html body button[type="submit"]:hover,
html body input[type="submit"]:hover,
html body .wc-block-components-button:focus-visible,
html body .wp-element-button:focus-visible,
html body .ast-button:focus-visible,
html body .button:focus-visible,
html body button[type="submit"]:focus-visible,
html body input[type="submit"]:focus-visible {
	background-color: var(--nz-pulse-text);
	color: var(--nz-brand-white);
	border-color: transparent;
}
html body :is(.button, button, input[type="submit"]):focus-visible {
	outline: 2px solid var(--nz-focus-ring);
	outline-offset: 2px;
}
/* "Ver carrito" que aparece después de agregar: secundario */
html :is(body.woocommerce, body .woocommerce) ul.products li.product .added_to_cart {
	color: var(--nz-ink);
	font-weight: 600;
	text-decoration: underline;
}

/* 4. Buscador de productos */
html body :is(.woocommerce-product-search, .search-form, .wp-block-search) :is(input[type="search"], .search-field) {
	border: 1px solid var(--nz-control-border);
	border-radius: var(--nz-radius-sm);
	color: var(--nz-ink);
	font-family: var(--nz-font-body);
}
html body :is(.woocommerce-product-search, .wp-block-search) button,
html body .search-form .search-submit {
	background-color: var(--nz-brand-midnight);
	color: var(--nz-brand-white);
	border-radius: var(--nz-radius-sm);
	padding: var(--nz-space-2) var(--nz-space-4);
}

/* 5. Grilla de productos */
html :is(body.woocommerce, body .woocommerce) ul.products li.product .woocommerce-loop-product__title,
html :is(body.woocommerce-page, body .woocommerce-page) ul.products li.product .woocommerce-loop-product__title {
	color: var(--nz-ink);
	font-family: var(--nz-font-display);
	font-stretch: 125%;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.3;
	text-transform: none;
}
/* Línea de marca/categoría sobre el nombre */
html body :is(.ast-woo-product-category, .woocommerce ul.products li.product .ast-woo-product-category) {
	color: var(--nz-ink-muted);
	font-family: var(--nz-font-body);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
/* Precios */
html :is(body.woocommerce, body .woocommerce) :is(ul.products li.product .price, div.product p.price, div.product span.price),
html body .wc-block-components-product-price {
	color: var(--nz-ink);
	font-family: var(--nz-font-display);
	font-stretch: 125%;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}
html :is(body.woocommerce, body .woocommerce) :is(.price ins, .price > .amount, .price > bdi) { color: var(--nz-pulse-text); text-decoration: none; }
html :is(body.woocommerce, body .woocommerce) .price del { color: var(--nz-ink-muted); font-weight: 500; opacity: 1; }

/* 6. Etiqueta de oferta */
html :is(body.woocommerce, body .woocommerce) span.onsale,
html :is(body.woocommerce-page, body .woocommerce-page) span.onsale,
html body .ast-onsale-card,
html body .wc-block-components-product-sale-badge {
	background: var(--nz-brand-pulse);
	color: var(--nz-on-pulse);
	border: 0;
	border-radius: var(--nz-radius-sm);
	box-shadow: none;
	font-family: var(--nz-font-body);
	font-size: 12px;
	line-height: 16px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	min-height: 0;
	min-width: 0;
	padding: 4px var(--nz-space-2);
}

/* 7. Contadores, paginación, orden y avisos */
html body .woocommerce-result-count { color: var(--nz-ink-muted); }
html body .woocommerce-ordering select { border: 1px solid var(--nz-control-border); border-radius: var(--nz-radius-sm); color: var(--nz-ink); font-family: var(--nz-font-body); }
html :is(body.woocommerce, body .woocommerce) nav.woocommerce-pagination ul li :is(a, span) { color: var(--nz-ink); border-color: var(--nz-line); }
html :is(body.woocommerce, body .woocommerce) nav.woocommerce-pagination ul li span.current,
html :is(body.woocommerce, body .woocommerce) nav.woocommerce-pagination ul li a:hover {
	background: var(--nz-brand-midnight);
	color: var(--nz-brand-white);
	border-color: var(--nz-brand-midnight);
}
html body :is(.woocommerce-message, .woocommerce-info) { border-top-color: var(--nz-brand-midnight); }
html body :is(.woocommerce-message, .woocommerce-info)::before { color: var(--nz-brand-midnight); }
html body .woocommerce-error { border-top-color: var(--nz-danger); }
html :is(body.woocommerce, body .woocommerce) .star-rating span::before { color: var(--nz-brand-pulse); }
html body :is(.ast-cart-menu-wrap .count, .ast-site-header-cart .count, .ast-count-text) { color: var(--nz-ink); border-color: var(--nz-ink); }

/* 8. Barra lateral: categorías y widgets */
html body :is(.widget, .wp-block-woocommerce-product-categories) a { color: var(--nz-ink); text-decoration: none; }
html body :is(.widget, .wp-block-woocommerce-product-categories) a:hover { color: var(--nz-pulse-text); }
html body :is(.widget, .wp-block-woocommerce-product-categories) .count { color: var(--nz-ink-muted); }

/* 9. Tarjetas de producto de Astra: misma altura y botón alineado abajo */
html :is(body.woocommerce, body .woocommerce) ul.products li.product {
	display: flex;
	flex-direction: column;
}
html :is(body.woocommerce, body .woocommerce) ul.products li.product .astra-shop-summary-wrap {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}
html :is(body.woocommerce, body .woocommerce) ul.products li.product .astra-shop-summary-wrap > .price {
	margin-bottom: var(--nz-space-4);
}
html :is(body.woocommerce, body .woocommerce) ul.products li.product .astra-shop-summary-wrap > .button {
	margin-top: auto;
	align-self: stretch;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 48px;
}
