/*
Theme Name:     ViverosDaliz Child
Theme URI:      
Description:    Storefront child theme.
Author:         Rich
Author URI:     
Template:       storefront
Version:        0.1.0
*/

/* ==========================================================================
   Variables y estilos base del child theme
   ========================================================================== */
:root {
	--vivero-color-primary: #4a7c59;
	--vivero-color-secondary: #8fbc8f;
	--vivero-color-accent: #c8553d;
	--vivero-color-bg: #faf9f6;
	--vivero-color-text: #2d2d2d;
	--vivero-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   Reset mínimo para el child theme
   ========================================================================== */
img {
	max-width: 100%;
	height: auto;
}

/* ==========================================================================
   Utilidades globales
   ========================================================================== */
.vivero-container {
	width: 100%;
	max-width: 1280px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
}

/* ==========================================================================
   Botón Añadir al carrito — WooCommerce global
   ========================================================================== */
.woocommerce .button.add_to_cart_button,
.woocommerce .button.single_add_to_cart_button,
.woocommerce .cart .button,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
	background-color: #2A4428;
	color: #fff;
	border: none;
}

.woocommerce .button.add_to_cart_button:hover,
.woocommerce .button.single_add_to_cart_button:hover,
.woocommerce .cart .button:hover,
.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
	background-color: #1e3320;
	color: #fff;
}

/* ==========================================================================
   Grid de productos WooCommerce — 2 columnas en mobile
   ========================================================================== */
.woocommerce ul.products {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr) !important;
	gap: 1rem;
}

.woocommerce ul.products li.product {
	width: 100% !important;
	margin: 0 !important;
	float: none !important;
}

/* ==========================================================================
   Corazón de wishlist — Tienda y categorías
   ========================================================================== */
.vivero-wishlist-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #FFFFFF;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	color: #111111;
	box-shadow: 0 1px 4px rgba(0,0,0,0.1);
	transition: color 0.2s;
	padding: 0;
	gap: 0;
}

.vivero-wishlist-btn span {
	display: none;
}

.vivero-wishlist-btn:hover {
	color: #e74c3c;
}

.vivero-wishlist-btn.is-active {
	color: #e74c3c;
}

.vivero-wishlist-btn.is-active svg {
	fill: #e74c3c;
	stroke: #e74c3c;
}

/* Corazón en producto individual */
.vivero-wishlist-btn--single {
	position: relative;
	top: auto;
	right: auto;
	width: auto;
	height: 40px;
	padding: 0 1.25rem;
	border-radius: 25px;
	border: 1px solid #E0E0E0;
	box-shadow: none;
	gap: 0.5rem;
	font-family: 'Open Sans', sans-serif;
	font-size: 13px;
	font-weight: 400;
	color: #4B4B4B;
	margin-top: 0.5rem;
}

.vivero-wishlist-btn--single span {
	display: inline;
}

.vivero-wishlist-btn--single:hover {
	border-color: #e74c3c;
	color: #e74c3c;
}

.vivero-wishlist-btn--single.is-active {
	border-color: #e74c3c;
	color: #e74c3c;
}

/* Productos en tienda necesitan position relative para el corazón absoluto */
.woocommerce ul.products li.product {
	position: relative;
}

/* ==========================================================================
   Página de Lista de Deseos
   ========================================================================== */
.vivero-wishlist {
	max-width: 800px;
	margin: 0 auto;
	padding: 1rem;
}

.vivero-wishlist__empty {
	text-align: center;
	padding: 3rem 1rem;
}

.vivero-wishlist__empty svg {
	margin-bottom: 1rem;
}

.vivero-wishlist__empty p {
	font-family: 'Open Sans', sans-serif;
	font-size: 16px;
	color: #9E9E9E;
	margin-bottom: 1.5rem;
}

.vivero-wishlist__browse {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.6rem 1.5rem;
	background-color: #2A4428;
	color: #FFFFFF;
	font-family: 'Open Sans', sans-serif;
	font-size: 14px;
	font-weight: 500;
	border-radius: 25px;
	text-decoration: none;
	transition: background-color 0.2s;
}

.vivero-wishlist__browse:hover {
	background-color: #1a2e1a;
	color: #FFFFFF;
}

/* Items de la lista */
.vivero-wishlist__items {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.vivero-wishlist__item {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	background: #FFFFFF;
	border: 1px solid #E0E0E0;
	border-radius: 12px;
}

.vivero-wishlist__item-img {
	width: 80px;
	height: 80px;
	flex-shrink: 0;
	border-radius: 8px;
	overflow: hidden;
}

.vivero-wishlist__item-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vivero-wishlist__item-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.vivero-wishlist__item-name {
	font-family: 'DM Sans', sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: #111111;
	text-decoration: none;
}

.vivero-wishlist__item-name:hover {
	color: #2A4428;
}

.vivero-wishlist__item-sku {
	font-family: 'Open Sans', sans-serif;
	font-size: 12px;
	color: #9E9E9E;
}

.vivero-wishlist__item-price {
	font-family: 'DM Sans', sans-serif;
	font-size: 16px;
	font-weight: 700;
	color: #2A4428;
}

.vivero-wishlist__item-remove {
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 1px solid #E0E0E0;
	border-radius: 50%;
	cursor: pointer;
	color: #9E9E9E;
	transition: color 0.2s, border-color 0.2s;
}

.vivero-wishlist__item-remove:hover {
	color: #e74c3c;
	border-color: #e74c3c;
}

/* Footer — botón WhatsApp */
.vivero-wishlist__footer {
	margin-top: 1.5rem;
	text-align: center;
}

.vivero-wishlist__wa-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: 0.85rem 2rem;
	background-color: #25D366;
	color: #FFFFFF;
	font-family: 'Open Sans', sans-serif;
	font-size: 16px;
	font-weight: 600;
	border: none;
	border-radius: 30px;
	cursor: pointer;
	transition: background-color 0.2s;
	width: 100%;
	max-width: 400px;
}

.vivero-wishlist__wa-btn:hover {
	background-color: #1DA851;
}

@media (min-width: 768px) {
	.vivero-wishlist__item-img {
		width: 100px;
		height: 100px;
	}

	.vivero-wishlist__wa-btn {
		width: auto;
	}
}
