/*
Theme Name: Agrohaus
Theme URI: https://agrohaus.com.ar
Description: Tema hijo de Storefront para Agrohaus — equipamiento rural y energías renovables, Entre Ríos. Prioriza la ficha de producto: imagen grande, precio visible, ficha técnica clara y consulta por WhatsApp.
Author: Agrohaus
Template: storefront
Version: 1.0.0
Text Domain: agrohaus-child
*/

/* ==========================================================================
   1. Paleta y variables
   ========================================================================== */
:root {
	--ah-verde-monte: #3f4d3a;   /* verde oliva oscuro — headers, botones primarios */
	--ah-verde-claro: #6b7a5e;   /* verde oliva claro — hover, acentos secundarios */
	--ah-tierra: #8a6d4b;        /* marrón tierra — bordes, detalles */
	--ah-crema: #faf7f2;         /* fondo general */
	--ah-crema-oscuro: #f0ebe1;  /* fondo de tarjetas / secciones alternadas */
	--ah-texto: #2e2a22;         /* texto principal, marrón casi negro */
	--ah-texto-suave: #6a6255;   /* texto secundario */
	--ah-precio: #3f4d3a;        /* color del precio */
	--ah-whatsapp: #25d366;      /* verde WhatsApp de marca, sin tocar */
	--ah-borde: #ddd4c4;
	--ah-radio: 4px;
}

body {
	background-color: var(--ah-crema);
	color: var(--ah-texto);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.55;
}

a {
	color: var(--ah-verde-monte);
}
a:hover {
	color: var(--ah-verde-claro);
}

h1, h2, h3, h4, h5, h6 {
	color: var(--ah-texto);
	font-weight: 700;
	letter-spacing: -0.01em;
}

/* ==========================================================================
   2. Header / navegación — limpio, sin ruido
   ========================================================================== */
.site-header {
	background-color: #ffffff;
	border-bottom: 1px solid var(--ah-borde);
	box-shadow: none;
}

.main-navigation ul li a {
	color: var(--ah-texto);
	font-weight: 600;
	text-transform: none;
}
.main-navigation ul li a:hover {
	color: var(--ah-verde-monte);
}

.storefront-primary-navigation {
	background-color: transparent;
}

/* botones generales */
.button,
button,
input[type="button"],
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button {
	background-color: var(--ah-verde-monte);
	color: #fff;
	border-radius: var(--ah-radio);
	border: none;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	padding: 0.75em 1.5em;
	transition: background-color 0.15s ease;
}
.button:hover,
button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
	background-color: var(--ah-verde-claro);
	color: #fff;
}

/* ==========================================================================
   3. Grilla de catálogo — limpia, sin ruido
   ========================================================================== */
ul.products {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 28px;
}

ul.products li.product {
	background: #fff;
	border: 1px solid var(--ah-borde);
	border-radius: var(--ah-radio);
	padding: 16px;
	text-align: center;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
	margin: 0 !important;
}
ul.products li.product:hover {
	box-shadow: 0 4px 14px rgba(46, 42, 34, 0.08);
	transform: translateY(-2px);
}

/* imagen del producto en la grilla: cuadrada, consistente, sin recortes raros */
ul.products li.product a img {
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: var(--ah-crema-oscuro);
	border-radius: var(--ah-radio);
	margin-bottom: 12px;
}

ul.products li.product .woocommerce-loop-product__title {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--ah-texto);
	margin: 8px 0 4px;
}

ul.products li.product .price {
	color: var(--ah-precio);
	font-weight: 700;
	font-size: 1.05rem;
}

/* ocultar ruido que no usamos: rating por defecto sin reseñas reales, badges de venta genéricos */
ul.products li.product .star-rating {
	display: none;
}
ul.products li.product .onsale {
	background-color: var(--ah-tierra);
	font-weight: 600;
	text-transform: none;
	font-size: 0.75rem;
}

/* botón "añadir al carrito" discreto en la grilla, la decisión fuerte pasa en la ficha */
ul.products li.product .button {
	background-color: transparent;
	color: var(--ah-verde-monte);
	border: 1px solid var(--ah-verde-monte);
	font-size: 0.85rem;
	padding: 0.5em 1em;
}
ul.products li.product .button:hover {
	background-color: var(--ah-verde-monte);
	color: #fff;
}

/* ==========================================================================
   4. Ficha de producto — imagen grande, precio visible, ficha técnica clara
   ========================================================================== */
.single-product div.product {
	background: #fff;
	border: 1px solid var(--ah-borde);
	border-radius: var(--ah-radio);
	padding: 32px;
}

/* imagen principal grande */
.single-product div.product div.images {
	max-width: 100%;
}
.single-product div.product div.images .woocommerce-product-gallery__image {
	background: var(--ah-crema-oscuro);
	border-radius: var(--ah-radio);
}
.single-product div.product div.images img {
	object-fit: contain;
	max-height: 640px;
}

/* miniaturas de galería */
.flex-control-thumbs li img {
	border-radius: var(--ah-radio);
	opacity: 0.65;
}
.flex-control-thumbs li img.flex-active {
	opacity: 1;
	border: 2px solid var(--ah-verde-monte);
}

/* título y precio */
.single-product div.product .product_title {
	font-size: 1.75rem;
	margin-bottom: 0.3em;
}
.single-product div.product p.price,
.single-product div.product .price {
	color: var(--ah-precio);
	font-size: 2rem;
	font-weight: 800;
	margin: 0.4em 0 0.6em;
}
.single-product div.product p.price ins {
	color: var(--ah-precio);
	text-decoration: none;
}

/* SKU y meta, discretos pero legibles */
.single-product div.product .product_meta {
	color: var(--ah-texto-suave);
	font-size: 0.9rem;
	border-top: 1px solid var(--ah-borde);
	margin-top: 24px;
	padding-top: 12px;
}

/* ficha técnica: tabla de atributos / descripción larga, clara y ordenada */
.woocommerce-tabs {
	margin-top: 40px;
}
.woocommerce-tabs ul.tabs {
	border-bottom: 2px solid var(--ah-borde);
}
.woocommerce-tabs ul.tabs li {
	background: transparent;
	border: none;
	font-weight: 600;
}
.woocommerce-tabs ul.tabs li.active {
	border-bottom: 3px solid var(--ah-verde-monte);
}
.woocommerce-tabs table.shop_attributes {
	border: 1px solid var(--ah-borde);
	border-collapse: collapse;
	width: 100%;
}
.woocommerce-tabs table.shop_attributes th,
.woocommerce-tabs table.shop_attributes td {
	border: 1px solid var(--ah-borde);
	padding: 10px 14px;
	text-align: left;
}
.woocommerce-tabs table.shop_attributes th {
	background: var(--ah-crema-oscuro);
	font-weight: 600;
	width: 220px;
}

/* ==========================================================================
   5. Botón de consulta por WhatsApp
   ========================================================================== */
.ah-whatsapp-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background-color: var(--ah-whatsapp);
	color: #fff !important;
	font-weight: 700;
	font-size: 1.05rem;
	padding: 0.9em 1.4em;
	border-radius: var(--ah-radio);
	margin-top: 14px;
	text-decoration: none !important;
	transition: filter 0.15s ease;
}
.ah-whatsapp-button:hover {
	filter: brightness(0.93);
	color: #fff !important;
}
.ah-whatsapp-button svg {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
}

/* ==========================================================================
   6. Responsive
   ========================================================================== */
@media (max-width: 768px) {
	.single-product div.product {
		padding: 18px;
	}
	.single-product div.product p.price,
	.single-product div.product .price {
		font-size: 1.6rem;
	}
	ul.products {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 16px;
	}
}
