/*
 * Frutas de Granada — estilos complementarios a theme.json.
 * Las clases fdg-* se aplican desde el editor (Bloque › Avanzado › Clases CSS adicionales)
 * y ya vienen puestas en las secciones prediseñadas.
 */

/* ---------- Base ---------- */
body { -webkit-font-smoothing: antialiased; }
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--verde-aguacate);
	outline-offset: 2px;
}
img { height: auto; }

/* Antetítulo en mayúsculas ("DE LA FINCA A TU PUERTA") */
.fdg-eyebrow {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--verde-hoja-texto);
	margin-bottom: 8px !important;
}
.has-verde-finca-background-color .fdg-eyebrow,
.fdg-section--dark .fdg-eyebrow { color: var(--wp--preset--color--verde-aguacate); }

/* ---------- Barra superior y cabecera ---------- */
.fdg-topbar p { margin: 0; }
.fdg-header { border-bottom: 1px solid var(--wp--preset--color--arena); }
.fdg-logo img { height: 38px !important; width: auto !important; max-width: none; border-radius: 0; }
.fdg-logo { flex-shrink: 0; margin: 0; }
.fdg-header .wp-block-navigation a { text-decoration: none; }
.fdg-header .wp-block-navigation a:hover { text-decoration: underline; text-underline-offset: 6px; }
.fdg-header .wp-block-navigation .current-menu-item > a { font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }
.fdg-header-icons { gap: 18px; }
.fdg-header-icons svg { fill: var(--wp--preset--color--verde-finca); }
/* Menú: por debajo de 1080 px pasa a icono de líneas (hamburguesa), a la derecha. */
@media (max-width: 1080px) {
	.fdg-header { justify-content: flex-start !important; }
	.fdg-header .fdg-header-icons { margin-left: auto; order: 2; }
	.fdg-header .wp-block-navigation { order: 3; }
	.fdg-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.fdg-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
.fdg-header .wp-block-navigation__responsive-container-open svg,
.fdg-header .wp-block-navigation__responsive-container-close svg { fill: var(--wp--preset--color--verde-finca); width: 28px; height: 28px; }
.fdg-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--crema) !important; padding: 24px; }
.fdg-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a { font-size: 20px; padding: 6px 0; color: var(--wp--preset--color--verde-finca); }

/* ---------- Tarjetas ---------- */
.fdg-card {
	background: var(--wp--preset--color--blanco);
	border-radius: 14px;
	padding: 18px 16px;
	height: 100%;
}
.fdg-card--crema { background: var(--wp--preset--color--crema); }
.fdg-card--borde { border: 1px solid var(--wp--preset--color--arena); border-radius: 16px; }
.fdg-card--dark { background: var(--wp--preset--color--verde-finca); color: rgba(248, 245, 236, .85); }
.fdg-card--dark :where(h2, h3, h4, strong) { color: var(--wp--preset--color--crema); }
.fdg-card :where(h3, h4) { font-size: 14px; margin: 0 0 4px; }
.fdg-card p { font-size: 13px; line-height: 1.5; margin: 0; color: var(--wp--preset--color--texto-sec); }
.fdg-card--dark p { color: rgba(248, 245, 236, .85); }
.fdg-card .fdg-icon { margin: 0 0 8px; }
.fdg-icon img { width: 32px; height: 32px; border-radius: 0; }

/* Número de paso en círculo */
.fdg-step {
	width: 28px; height: 28px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--wp--preset--color--verde-finca);
	color: var(--wp--preset--color--crema);
	font-size: 12px; font-weight: 700;
	margin: 0 0 10px !important;
}

/* Lista con iconos (suscripción) */
.fdg-lista-iconos { gap: 10px; }
.fdg-lista-iconos .wp-block-group { gap: 10px; align-items: center; }
.fdg-lista-iconos img { width: 24px; height: 24px; border-radius: 0; }

/* ---------- Botones ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--verde-finca);
	border: 1.5px solid var(--wp--preset--color--verde-finca);
	padding: 12.5px 24.5px;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--verde-finca);
	color: var(--wp--preset--color--crema);
}
.fdg-boton-claro > .wp-block-button__link {
	background: var(--wp--preset--color--crema) !important;
	color: var(--wp--preset--color--verde-finca) !important;
}
.wp-block-button__link { min-height: 44px; }

/* ---------- Productos (WooCommerce) ---------- */
.fdg-productos ul.products {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 20px;
	margin: 0; padding: 0; list-style: none;
}
.fdg-productos ul.products::before, .fdg-productos ul.products::after { display: none; }
.fdg-productos ul.products li.product,
.woocommerce ul.products li.product {
	position: relative;
	width: auto !important; margin: 0 !important; float: none !important;
	background: var(--wp--preset--color--blanco);
	border: 1px solid var(--wp--preset--color--arena);
	border-radius: 16px;
	overflow: hidden;
	display: flex; flex-direction: column;
	padding: 0 0 16px;
}
.woocommerce ul.products li.product a img {
	width: 100%; aspect-ratio: 12 / 5; object-fit: cover;
	margin: 0 0 14px; border-radius: 0;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 15px !important; font-weight: 700;
	color: var(--wp--preset--color--verde-finca);
	padding: 0 16px !important; margin: 0 0 6px;
}
.woocommerce ul.products li.product .price {
	color: var(--wp--preset--color--verde-finca) !important;
	font-size: 20px !important; font-weight: 700;
	padding: 0 16px; margin: 0 0 12px !important;
}
.woocommerce ul.products li.product .price del { font-size: 14px; opacity: .7; }
.woocommerce ul.products li.product .button {
	margin: auto 16px 0 !important;
	display: flex; align-items: center; justify-content: center;
	background: var(--wp--preset--color--verde-finca);
	color: var(--wp--preset--color--crema);
	border-radius: 10px; padding: 12px; min-height: 44px;
	font-size: 14px; font-weight: 700; text-align: center;
}
.woocommerce ul.products li.product .button:hover { background: var(--wp--preset--color--verde-hoja-texto); color: var(--wp--preset--color--crema); }
.woocommerce ul.products li.product a { text-decoration: none; }
.woocommerce span.onsale {
	top: 10px; right: 10px; left: auto; margin: 0;
	min-height: 0; min-width: 0; line-height: 1;
	padding: 6px 10px; border-radius: 20px;
	background: var(--wp--preset--color--verde-finca);
	color: var(--wp--preset--color--crema);
	font-size: 12px; font-weight: 600;
}

/* Fuera de temporada */
.fdg-badge {
	position: absolute; top: 10px; right: 10px; z-index: 2;
	padding: 5px 10px; border-radius: 20px;
	font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.fdg-badge--off { background: var(--wp--preset--color--texto-sec); color: var(--wp--preset--color--blanco); }
.fdg-fuera-de-temporada a img { filter: grayscale(.4); }
.woocommerce ul.products li.product.fdg-fuera-de-temporada .button {
	background: var(--wp--preset--color--arena);
	color: var(--wp--preset--color--texto-sec);
}
.woocommerce div.product .stock.out-of-stock { color: var(--wp--preset--color--texto-sec); font-weight: 600; }

/* ---------- Preguntas frecuentes ---------- */
.wp-block-details { margin-bottom: 10px !important; }
.wp-block-details summary {
	font-weight: 600; font-size: 15px; cursor: pointer;
	color: var(--wp--preset--color--verde-finca);
}
.wp-block-details p { font-size: 14px; color: var(--wp--preset--color--texto-sec); margin-top: 10px; }

/* ---------- Pie ---------- */
.fdg-footer { color: rgba(248, 245, 236, .8); }
.fdg-footer a { color: rgba(248, 245, 236, .85); text-decoration: none; }
.fdg-footer a:hover { color: var(--wp--preset--color--crema); text-decoration: underline; }
.fdg-footer .fdg-footer-titulo {
	font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
	color: var(--wp--preset--color--verde-aguacate); margin-bottom: 14px;
}
.fdg-footer .fdg-footer-logo { display: inline-block; margin: 0 0 8px; }
.fdg-footer-logo img { height: 44px !important; width: auto !important; border-radius: 0; }
.fdg-footer .fdg-footer-legal { border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 20px; }
.fdg-footer .fdg-footer-legal a { text-decoration: underline; }
.fdg-footer .wp-block-separator { border-color: rgba(255, 255, 255, .15); opacity: 1; }
.fdg-pendiente {
	display: inline-block; border: 1.5px dashed #C9A227; background: #FFF8E1; color: #7A5B00;
	border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 600;
}

/* ---------- Imágenes ---------- */
.fdg-foto-hero img { width: 100%; height: 420px; object-fit: cover; }
.fdg-foto-finca img { width: 100%; height: 280px; object-fit: cover; }
@media (max-width: 781px) {
	.fdg-foto-hero img { height: 280px; }
	.fdg-foto-finca img { height: 220px; }
}

/* Ajustes */
.fdg-card .fdg-step { color: var(--wp--preset--color--crema); font-size: 12px; line-height: 1; }
.fdg-card--crema .fdg-eyebrow { color: var(--wp--preset--color--verde-hoja-texto); }
.fdg-foto-mini img { width: 120px; height: 120px; object-fit: cover; border-radius: 16px; }
.fdg-footer p a { text-decoration: underline; }
.fdg-footer .fdg-footer-titulo + p a, .fdg-footer .wp-block-column p.has-s-font-size a { text-decoration: none; }
@media (max-width: 781px) { .fdg-foto-mini { display: none; } }
@media (max-width: 600px) { .fdg-topbar p { font-size: 12px; } }
@media (max-width: 600px) { .fdg-logo img { height: 26px !important; } }
.fdg-footer .fdg-footer-logo figcaption { margin: 6px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; text-align: center; color: var(--wp--preset--color--crema); }

/* Bloque "Para regalar" (v0.1.3) */
.fdg-foto-regalo img { width: 100%; height: 380px; object-fit: cover; border-radius: 20px; }
@media (max-width: 781px) { .fdg-foto-regalo img { height: 240px; } }
.fdg-lista-check { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 10px; }
.fdg-lista-check li { position: relative; padding-left: 28px; font-size: 14px; line-height: 1.5; }
.fdg-lista-check li::before {
	content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px;
	background: no-repeat center / 18px 18px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7F3F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E");
}

/* ---------- Avisos de WooCommerce (con los colores de la marca) ---------- */
.wc-block-components-notice-banner,
.woocommerce-info, .woocommerce-message, .woocommerce-error {
	background: var(--wp--preset--color--blanco) !important;
	border: 1px solid var(--wp--preset--color--arena) !important;
	border-left: 4px solid var(--wp--preset--color--verde-finca) !important;
	border-radius: 12px !important;
	color: var(--wp--preset--color--texto) !important;
	font-size: 14px; line-height: 1.5;
	box-shadow: none !important;
}
.wc-block-components-notice-banner > svg {
	background: var(--wp--preset--color--verde-finca) !important;
	fill: var(--wp--preset--color--crema) !important;
}
.wc-block-components-notice-banner.is-success { background: #EBEEDD !important; border-color: #EBEEDD !important; border-left-color: var(--wp--preset--color--verde-hoja) !important; }
.wc-block-components-notice-banner.is-success > svg { background: var(--wp--preset--color--verde-hoja) !important; }
.wc-block-components-notice-banner.is-error,
.woocommerce-error { background: #FCF1F0 !important; border-color: #F3D3D0 !important; border-left-color: #B3261E !important; }
.wc-block-components-notice-banner.is-error > svg { background: #B3261E !important; }
.wc-block-components-notice-banner a,
.woocommerce-info a, .woocommerce-message a, .woocommerce-error a { color: var(--wp--preset--color--verde-finca) !important; font-weight: 600; text-decoration: underline; }
.wc-block-components-notice-banner .wc-forward,
.woocommerce-message .button { float: none !important; background: none !important; border: 0 !important; padding: 0 !important; color: var(--wp--preset--color--verde-finca) !important; text-decoration: underline; font-weight: 600; }

/* ---------- Panel lateral del carrito ---------- */
.wc-block-mini-cart__drawer .components-modal__content,
.wc-block-mini-cart__drawer .wc-block-components-drawer__content { background: var(--wp--preset--color--crema); }
.wc-block-mini-cart__title { font-size: 22px !important; color: var(--wp--preset--color--verde-finca); }
.wc-block-mini-cart__footer { background: var(--wp--preset--color--blanco); border-top: 1px solid var(--wp--preset--color--arena) !important; }
.wc-block-mini-cart__footer .wc-block-components-totals-item__label,
.wc-block-mini-cart__footer .wc-block-components-totals-item__value { font-weight: 700; color: var(--wp--preset--color--verde-finca); }
.wc-block-mini-cart__footer .wc-block-components-totals-item__description { display: block !important; color: var(--wp--preset--color--verde-finca); font-weight: 600; }
.wc-block-mini-cart__footer-checkout { background: var(--wp--preset--color--verde-finca) !important; color: var(--wp--preset--color--crema) !important; border-color: var(--wp--preset--color--verde-finca) !important; }
.wc-block-mini-cart__footer-checkout:hover { background: var(--wp--preset--color--verde-hoja-texto) !important; }
.wc-block-mini-cart__footer-cart { color: var(--wp--preset--color--verde-finca) !important; border-color: var(--wp--preset--color--verde-finca) !important; }
.wc-block-mini-cart-items .wc-block-cart-item__product a,
.wc-block-mini-cart-items .wc-block-components-product-name { color: var(--wp--preset--color--verde-finca); font-weight: 700; text-decoration: none; }

/* Banner de cookies (Complianz) con los colores de la marca. Aceptar y Denegar con el mismo peso visual (06/10). */
body .cmplz-cookiebanner {
	--cmplz_banner_background_color: var(--wp--preset--color--crema, #F8F5EC);
	--cmplz_banner_border_color: var(--wp--preset--color--arena, #EEEEDD);
	--cmplz_text_color: var(--wp--preset--color--texto, #2B2A27);
	--cmplz_hyperlink_color: var(--wp--preset--color--verde-finca, #1E3A2B);
	--cmplz_button_accept_background_color: var(--wp--preset--color--verde-finca, #1E3A2B);
	--cmplz_button_accept_border_color: var(--wp--preset--color--verde-finca, #1E3A2B);
	--cmplz_button_accept_text_color: #F8F5EC;
	--cmplz_button_deny_background_color: var(--wp--preset--color--verde-finca, #1E3A2B);
	--cmplz_button_deny_border_color: var(--wp--preset--color--verde-finca, #1E3A2B);
	--cmplz_button_deny_text_color: #F8F5EC;
	--cmplz_button_settings_background_color: transparent;
	--cmplz_button_settings_border_color: var(--wp--preset--color--verde-finca, #1E3A2B);
	--cmplz_button_settings_text_color: var(--wp--preset--color--verde-finca, #1E3A2B);
	--cmplz_slider_active_color: var(--wp--preset--color--verde-finca, #1E3A2B);
	--cmplz_button_border_radius: 12px;
	--cmplz_banner_border_radius: 16px;
	font-family: inherit;
}
body .cmplz-cookiebanner .cmplz-btn { font-family: inherit; font-weight: 600; min-height: 44px; }

/* M1 (06/10): en móvil, letra de 16 px en todos los campos. Con menos, Safari (iPhone) amplía la página al tocar un campo y queda descolocada. */
@media (max-width: 782px) {
	input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"],
	input[type="search"], input[type="url"], input:not([type]), select, textarea,
	.select2-container .select2-selection, .select2-search__field { font-size: 16px !important; }
}

/* M2 (06/10): en móvil, los botones pueden partirse en dos líneas (p. ej. «Fuera de temporada · vuelve en noviembre» en la caja de 15 kg) y no salirse de la pantalla. */
@media (max-width: 600px) {
	body .fdg-btn, body .fdg-btn.fdg-btn--crema, body .fdg-b2b .fdg-btn { white-space: normal; max-width: 100%; text-align: center; }
	.fdg-quince, .fdg-quince * { min-width: 0; }
}

/* Newsletter del pie (Mailchimp for WordPress, formulario 2636 «Newsletter pie (web nueva)»). */
.mc4wp-form .fdg-nl { display: flex; gap: 8px; flex-wrap: wrap; max-width: 460px; }
.mc4wp-form .fdg-nl input[type="email"] { flex: 1 1 200px; min-width: 0; min-height: 46px; box-sizing: border-box; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.35); border-radius: 10px; padding: 10px 14px; font: inherit; font-size: 15px; color: var(--wp--preset--color--crema, #F8F5EC); }
.mc4wp-form .fdg-nl input[type="email"]::placeholder { color: rgba(248,245,236,.7); }
.mc4wp-form .fdg-nl input[type="submit"] { min-height: 46px; background: var(--wp--preset--color--crema, #F8F5EC); color: var(--wp--preset--color--verde-finca, #1E3A2B); border: 0; border-radius: 10px; padding: 0 20px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.mc4wp-form .mc4wp-response { margin-top: 10px; font-size: 14px; }
.mc4wp-form .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.mc4wp-form .fdg-nl br { display: none; }
