/* Tema Dehesa · estilos que theme.json no cubre. Prefijo .dh-, sin !important. */

/* ---------- Base ---------- */
:where(body) { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(img) { height: auto; }
.dh-antetitulo { margin: 0; font-size: var(--wp--preset--font-size--xs); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.dh-lista-limpia { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.dh-lista-limpia a { text-decoration: none; }
.dh-lista-limpia a:hover { text-decoration: underline; }
.skip-link:focus { background: #fff; color: var(--wp--preset--color--tinta); padding: .6rem 1rem; z-index: 100000; }

/* ---------- Cabecera ---------- */
.dh-aviso p { margin: 0; letter-spacing: .02em; }
.dh-cabecera { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.2) blur(6px); background-color: rgba(247, 241, 232, .94); }
.admin-bar .dh-cabecera { top: 32px; }
@media (max-width: 782px) { .admin-bar .dh-cabecera { top: 0; } }
.dh-menu .wp-block-navigation-item__content { text-decoration: none; color: var(--wp--preset--color--tinta); padding: .3rem 0; border-bottom: 2px solid transparent; }
.dh-menu .wp-block-navigation-item__content:hover,
.dh-menu .current-menu-item > .wp-block-navigation-item__content { border-bottom-color: var(--wp--preset--color--oro); }
.dh-iconos .wp-block-search__button { background: transparent; color: var(--wp--preset--color--tinta); padding: .4rem; border: 0; }
.dh-iconos .wc-block-customer-account a, .dh-iconos .wc-block-mini-cart__button { color: var(--wp--preset--color--tinta); }
.wc-block-mini-cart__badge { background: var(--wp--preset--color--burdeos); color: #fff; }
@media (max-width: 1100px) and (min-width: 600px) { .dh-menu .wp-block-navigation__container { gap: 1rem; } }

/* ---------- Héroe ---------- */
.dh-heroe .wp-block-cover__image-background { object-position: 70% 60%; }
.dh-heroe h1 { text-shadow: 0 2px 24px rgba(0, 0, 0, .35); max-width: 15ch; }
.dh-heroe::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(31, 22, 18, .72) 0%, rgba(31, 22, 18, .25) 55%, rgba(31, 22, 18, 0) 100%); pointer-events: none; }
.dh-heroe .wp-block-cover__inner-container { position: relative; z-index: 2; width: min(1280px, 100%); margin-inline: auto; }
.dh-boton-claro .wp-block-button__link { color: #fff; border: 2px solid rgba(255, 255, 255, .75); background: transparent; }
.dh-boton-claro .wp-block-button__link:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- Confianza ---------- */
.dh-confianza__lista { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; max-width: 1280px; }
.dh-confianza__lista li { display: grid; grid-template-columns: 34px 1fr; column-gap: .75rem; align-items: center; font-size: var(--wp--preset--font-size--s); }
.dh-confianza__lista svg { grid-row: span 2; width: 34px; height: 34px; fill: var(--wp--preset--color--burdeos); }
.dh-confianza__lista strong { color: var(--wp--preset--color--tinta); line-height: 1.2; }
.dh-confianza__lista span { color: var(--wp--preset--color--suave); font-size: var(--wp--preset--font-size--xs); }
@media (max-width: 900px) { .dh-confianza__lista { grid-template-columns: 1fr 1fr; row-gap: 1.25rem; } }

/* ---------- Categorías ---------- */
.dh-categorias { list-style: none; margin: var(--wp--preset--spacing--30) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.dh-categoria { box-sizing: border-box; position: relative; display: grid; gap: .4rem; height: 100%; padding: 1.6rem 1.4rem 1.4rem; border-radius: 14px; background: linear-gradient(160deg, #3a241c 0%, #1f1612 100%); color: #f7f1e8; text-decoration: none; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.dh-categoria::before { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(227, 196, 143, .22), transparent 70%); }
.dh-categoria img { width: 64px; height: 64px; }
.dh-categoria__nombre { font-family: var(--wp--preset--font-family--titulos); font-size: var(--wp--preset--font-size--xl); font-weight: 600; color: #fff; }
.dh-categoria__texto { font-size: var(--wp--preset--font-size--s); color: #e8dccb; }
.dh-categoria__ver { margin-top: .4rem; font-weight: 700; font-size: var(--wp--preset--font-size--s); color: var(--wp--preset--color--oro-claro); }
.dh-categoria:hover, .dh-categoria:focus-visible { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(31, 22, 18, .25); color: #f7f1e8; }
@media (max-width: 900px) { .dh-categorias { grid-template-columns: 1fr 1fr; gap: .8rem; } .dh-categoria { padding: 1.1rem; } .dh-categoria__texto { display: none; } }

/* ---------- Tarjetas de producto ---------- */
.dh-rejilla .wc-block-product-template { gap: 1.75rem 1.25rem; }
.dh-rejilla .wc-block-product { display: flex; flex-direction: column; gap: .35rem; background: #fff; border: 1px solid var(--wp--preset--color--borde); border-radius: 14px; padding: .7rem .7rem 1rem; transition: box-shadow .2s ease, transform .2s ease; }
.dh-rejilla .wc-block-product:hover { box-shadow: var(--wp--preset--shadow--suave); transform: translateY(-2px); }
.dh-rejilla .wc-block-components-product-image { margin-bottom: .4rem; overflow: hidden; border-radius: 10px; }
.dh-rejilla .wc-block-components-product-image img { transition: transform .4s ease; }
.dh-rejilla .wc-block-product:hover .wc-block-components-product-image img { transform: scale(1.04); }
.dh-rejilla .wp-block-post-title { margin: 0; line-height: 1.3; font-family: var(--wp--preset--font-family--texto); font-weight: 700; padding: 0 .3rem; }
.dh-rejilla .wc-block-components-product-price { padding: 0 .3rem; margin-top: auto; }
.dh-rejilla .wc-block-components-product-button { padding: 0 .3rem; }
.dh-rejilla .wc-block-components-product-button .wp-block-button__link { width: 100%; justify-content: center; padding: .65rem .8rem; font-size: var(--wp--preset--font-size--xs); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dh-rejilla .dh-precinto { margin: 0 .3rem; align-self: flex-start; }
@media (max-width: 600px) { .dh-rejilla .wc-block-product-template { grid-template-columns: 1fr 1fr; gap: .8rem; } }

/* ---------- Precinto (calidad) ---------- */
.dh-precinto { display: inline-flex; align-items: center; gap: .4rem; padding: .15rem .6rem .15rem .4rem; border-radius: 999px; font-size: var(--wp--preset--font-size--xs); font-weight: 700; background: var(--wp--preset--color--arena); color: var(--wp--preset--color--tinta); line-height: 1.6; }
.dh-precinto__punto { width: .75rem; height: .75rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.dh-precinto--negro .dh-precinto__punto { background: #111; }
.dh-precinto--rojo .dh-precinto__punto { background: #b3261e; }
.dh-precinto--verde .dh-precinto__punto { background: #2e7d32; }
.dh-precinto--blanco .dh-precinto__punto { background: #fff; }
.dh-calidad { margin: 1rem 0 0; padding: .9rem 1rem; border-radius: 12px; background: var(--wp--preset--color--arena); font-size: var(--wp--preset--font-size--s); }
.dh-calidad p { margin: .4rem 0 0; color: var(--wp--preset--color--texto); }

/* ---------- Precintos (sección) ---------- */
.dh-precintos__lista { list-style: none; margin: var(--wp--preset--spacing--40) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.dh-precintos__item { position: relative; padding: 1.4rem 1.3rem 1.3rem; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(227, 196, 143, .18); }
.dh-precintos__item h3 { margin: .8rem 0 .1rem; color: #fff; font-size: var(--wp--preset--font-size--l); text-transform: capitalize; }
.dh-precintos__nombre { margin: 0 0 .5rem; font-weight: 800; color: var(--wp--preset--color--oro-claro); }
.dh-precintos__item p { font-size: var(--wp--preset--font-size--s); }
.dh-precintos__item a { color: #fff; font-weight: 700; font-size: var(--wp--preset--font-size--s); }
.dh-precintos__etiqueta { display: block; width: 46px; height: 18px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }
.dh-precintos__item--negro .dh-precintos__etiqueta { background: #0b0b0b; }
.dh-precintos__item--rojo .dh-precintos__etiqueta { background: #b3261e; }
.dh-precintos__item--verde .dh-precintos__etiqueta { background: #2e7d32; }
.dh-precintos__item--blanco .dh-precintos__etiqueta { background: #f5f5f5; }
@media (max-width: 900px) { .dh-precintos__lista { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .dh-precintos__lista { grid-template-columns: 1fr; } }

/* ---------- Cómo trabajamos ---------- */
.dh-lista-check { list-style: none; padding: 0; display: grid; gap: .5rem; }
.dh-lista-check li { padding-left: 1.8rem; position: relative; }
.dh-lista-check li::before { content: ""; position: absolute; left: 0; top: .35em; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--wp--preset--color--encina) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='m9.5 16.2-4-4L4 13.7l5.5 5.5L20 8.7l-1.5-1.5z'/%3E%3C/svg%3E") center / 80% no-repeat; }
.dh-pasos { list-style: none; counter-reset: paso; margin: 0; padding: 0; display: grid; gap: 1rem; }
.dh-pasos li { counter-increment: paso; display: grid; grid-template-columns: 3rem 1fr; column-gap: 1rem; padding: 1.2rem; background: #fff; border: 1px solid var(--wp--preset--color--borde); border-radius: 14px; }
.dh-pasos li::before { content: counter(paso); grid-row: span 2; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--wp--preset--color--burdeos); color: #fff; font-family: var(--wp--preset--font-family--titulos); font-size: 1.4rem; font-weight: 700; }
.dh-pasos strong { font-size: var(--wp--preset--font-size--l); color: var(--wp--preset--color--tinta); }
.dh-pasos span { color: var(--wp--preset--color--suave); font-size: var(--wp--preset--font-size--s); }

/* ---------- Preguntas ---------- */
.dh-faq .wp-block-details summary { cursor: pointer; font-weight: 700; font-size: var(--wp--preset--font-size--l); color: var(--wp--preset--color--tinta); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.dh-faq .wp-block-details summary::-webkit-details-marker { display: none; }
.dh-faq .wp-block-details summary::after { content: "+"; color: var(--wp--preset--color--burdeos); font-size: 1.5rem; line-height: 1; }
.dh-faq .wp-block-details[open] summary::after { content: "–"; }

/* ---------- Archivo ---------- */
.dh-archivo .wp-block-query-title { margin-bottom: .2rem; }
.dh-intro-categoria { max-width: 70ch; }
.dh-barra-orden { margin: var(--wp--preset--spacing--20) 0; padding: .6rem 0; border-top: 1px solid var(--wp--preset--color--borde); border-bottom: 1px solid var(--wp--preset--color--borde); }
.dh-barra-orden select { font: inherit; padding: .4rem .6rem; border-radius: 8px; border: 1px solid var(--wp--preset--color--borde); background: #fff; }
.woocommerce-breadcrumb, .wc-block-breadcrumbs { color: var(--wp--preset--color--suave); }
.woocommerce-breadcrumb a, .wc-block-breadcrumbs a { color: var(--wp--preset--color--suave); text-decoration: none; }

/* ---------- Ficha ---------- */
.dh-ficha__galeria .woocommerce-product-gallery { border-radius: 16px; overflow: hidden; background: #fff; }
.dh-ficha__galeria .flex-control-thumbs { display: flex; gap: .5rem; margin-top: .5rem; padding: 0; list-style: none; }
.dh-ficha__galeria .flex-control-thumbs li { width: 72px; }
.dh-ficha__galeria .flex-control-thumbs img { border-radius: 8px; cursor: pointer; opacity: .7; }
.dh-ficha__galeria .flex-control-thumbs img.flex-active { opacity: 1; outline: 2px solid var(--wp--preset--color--oro); }
.dh-ficha__resumen .wp-block-post-title { margin-top: 0; }
.dh-ficha__resumen .wp-block-post-excerpt { color: var(--wp--preset--color--texto); }
.dh-ficha form.cart { display: grid; gap: .8rem; margin-top: 1rem; }
.dh-ficha .variations, .dh-ficha .variations tbody, .dh-ficha .variations tr { display: block; width: 100%; border: 0; margin: 0; }
.dh-ficha .variations th, .dh-ficha .variations td { display: block; width: 100%; padding: 0; text-align: left; }
.dh-ficha .variations label { font-weight: 700; font-size: var(--wp--preset--font-size--s); }
.dh-ficha .wp-block-add-to-cart-form form.cart .variations select { width: 100%; min-width: 0; height: auto; font-family: inherit; font-size: var(--wp--preset--font-size--m); line-height: 1.3; color: var(--wp--preset--color--texto); padding: .75rem 2.5rem .75rem .9rem; border-radius: 10px; border: 1px solid #c9bcae; background-color: #fff; margin: .3rem 0 0; }
.dh-ficha .reset_variations { font-size: var(--wp--preset--font-size--xs); }
.dh-ficha .woocommerce-variation-add-to-cart, .dh-ficha form.cart:not(.variations_form) { display: flex; gap: .6rem; align-items: stretch; }
.dh-ficha .quantity input { width: 4.2rem; height: 100%; min-height: 3rem; text-align: center; font: inherit; border-radius: 999px; border: 1px solid #c9bcae; }
.dh-ficha .single_add_to_cart_button { flex: 1; min-height: 3rem; border-radius: 999px; font-size: var(--wp--preset--font-size--m); }
.dh-ficha .stock { font-size: var(--wp--preset--font-size--s); font-weight: 700; }
.dh-ficha .stock.in-stock { color: var(--wp--preset--color--encina); }
.dh-ficha .stock.out-of-stock { color: #b3261e; }
.dh-garantias { list-style: none; margin: 1.2rem 0 0; padding: 1rem 1.1rem; display: grid; gap: .7rem; border: 1px solid var(--wp--preset--color--borde); border-radius: 12px; background: #fff; font-size: var(--wp--preset--font-size--s); }
.dh-garantias li { display: grid; padding-left: 1.7rem; position: relative; }
.dh-garantias li::before { content: ""; position: absolute; left: 0; top: .2em; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--wp--preset--color--encina) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='m9.5 16.2-4-4L4 13.7l5.5 5.5L20 8.7l-1.5-1.5z'/%3E%3C/svg%3E") center / 80% no-repeat; }
.dh-garantias strong { color: var(--wp--preset--color--tinta); }
.dh-garantias span { color: var(--wp--preset--color--suave); font-size: var(--wp--preset--font-size--xs); }
.dh-ficha__detalles { margin-top: var(--wp--preset--spacing--50); }
.dh-ficha__detalles .wc-tabs { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0 0 1rem; list-style: none; border-bottom: 1px solid var(--wp--preset--color--borde); }
.dh-ficha__detalles .wc-tabs li a { display: block; padding: .7rem 1rem; text-decoration: none; font-weight: 700; color: var(--wp--preset--color--suave); border-bottom: 3px solid transparent; }
.dh-ficha__detalles .wc-tabs li.active a { color: var(--wp--preset--color--tinta); border-bottom-color: var(--wp--preset--color--burdeos); }
.dh-ficha__detalles .woocommerce-Tabs-panel { max-width: 80ch; }
@media (max-width: 781px) { .dh-ficha .wp-block-columns { gap: 1.25rem; } }

/* ---------- Pie ---------- */
.dh-pie__titulo { font-family: var(--wp--preset--font-family--texto); font-size: var(--wp--preset--font-size--xs); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .8rem; }
.dh-pie .wp-block-site-title { font-size: var(--wp--preset--font-size--xl); }
.dh-pie p { color: #dccfbd; }

/* ---------- Avisos y formularios WooCommerce ---------- */
.wc-block-components-notice-banner { border-radius: 12px; }
.woocommerce-message, .woocommerce-info { border-radius: 12px; background: #fff; border: 1px solid var(--wp--preset--color--borde); padding: .9rem 1rem; list-style: none; }

@media (prefers-reduced-motion: reduce) {
	.dh-categoria, .dh-rejilla .wc-block-product, .dh-rejilla .wc-block-components-product-image img { transition: none; }
	.dh-categoria:hover, .dh-rejilla .wc-block-product:hover { transform: none; }
}

/* ---------- 0.2.0 · Filtros, textos de categoría y guías ---------- */
.dh-intro-categoria { max-width: 72ch; color: var(--wp--preset--color--suave); font-size: var(--wp--preset--font-size--l); }
.dh-intro-categoria p { margin: .2rem 0 0; }
.dh-filtros { display: grid; gap: .7rem; margin: var(--wp--preset--spacing--30) 0 .5rem; }
.dh-filtros__grupo { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.dh-filtros__titulo { flex: none; width: 4.5rem; font-size: var(--wp--preset--font-size--xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--wp--preset--color--suave); }
.dh-filtros ul { display: flex; gap: .45rem; margin: 0; padding: 0 0 .2rem; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.dh-filtros li { flex: none; }
.dh-filtros a { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .9rem; border: 1px solid var(--wp--preset--color--borde); border-radius: 999px; background: #fff; color: var(--wp--preset--color--tinta); font-size: var(--wp--preset--font-size--s); font-weight: 600; text-decoration: none; white-space: nowrap; }
.dh-filtros a:hover { border-color: var(--wp--preset--color--oro); }
.dh-filtros a[aria-current] { background: var(--wp--preset--color--tinta); border-color: var(--wp--preset--color--tinta); color: #fff; }
.dh-filtros__num { color: var(--wp--preset--color--suave); font-weight: 400; font-size: var(--wp--preset--font-size--xs); }
.dh-filtros a[aria-current] .dh-filtros__num { color: var(--wp--preset--color--oro-claro); }
.dh-punto { width: .7rem; height: .7rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3); }
.dh-punto--negro { background: #111; }
.dh-punto--rojo { background: #b3261e; }
.dh-punto--verde { background: #2e7d32; }
.dh-punto--blanco { background: #fff; }
@media (max-width: 600px) { .dh-filtros__grupo { display: grid; gap: .35rem; } .dh-filtros__titulo { width: auto; } }

.dh-texto-categoria { max-width: 760px; margin: var(--wp--preset--spacing--50) auto 0; padding-top: var(--wp--preset--spacing--40); border-top: 1px solid var(--wp--preset--color--borde); }
.dh-texto-categoria h2 { font-size: var(--wp--preset--font-size--xl); margin-top: 1.6em; }
.dh-texto-categoria h2:first-child { margin-top: 0; }

.dh-articulo__cabecera .wp-block-post-title { margin: .3rem 0 .6rem; }
.dh-articulo__cabecera .dh-antetitulo a { text-decoration: none; }
.dh-entradilla p { margin: 0; }
.dh-articulo__texto { font-size: 1.125rem; }
.dh-articulo__texto h2 { margin-top: 2em; }
.dh-articulo__texto ol, .dh-articulo__texto ul { padding-left: 1.3rem; display: grid; gap: .5rem; }
.dh-cta .wp-block-buttons { margin-top: 1rem; }
.dh-tarjetas-guia > li { background: #fff; border: 1px solid var(--wp--preset--color--borde); border-radius: 14px; padding: 1.3rem 1.3rem 1.1rem; display: flex; flex-direction: column; gap: .3rem; transition: box-shadow .2s ease; }
.dh-tarjetas-guia > li:hover { box-shadow: var(--wp--preset--shadow--suave); }
.dh-tarjetas-guia .wp-block-post-title { margin: 0; }
.dh-tarjetas-guia .wp-block-post-title a { text-decoration: none; }
.dh-tarjetas-guia .wp-block-post-excerpt { color: var(--wp--preset--color--suave); margin: 0; }
.dh-tarjetas-guia .wp-block-read-more { margin-top: auto; font-weight: 700; }

/* ---------- 0.3.0 · Productores ---------- */
.dh-productor__heroe .wp-block-cover__inner-container { width: min(1280px, 100%); margin-inline: auto; }
.dh-productor__heroe .wp-block-post-title { margin: .3rem 0 .6rem; text-shadow: 0 2px 20px rgba(0, 0, 0, .4); }
.dh-productor__datos { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; }
.dh-productor__datos li { padding: .3rem .8rem; border: 1px solid rgba(227, 196, 143, .5); border-radius: 999px; color: #f7f1e8; font-size: var(--wp--preset--font-size--s); }
.dh-productores { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.dh-productor-tarjeta { display: flex; flex-direction: column; gap: .4rem; height: 100%; box-sizing: border-box; padding: 0 0 1.2rem; background: #fff; border: 1px solid var(--wp--preset--color--borde); border-radius: 14px; overflow: hidden; color: var(--wp--preset--color--texto); text-decoration: none; transition: box-shadow .2s ease; }
.dh-productor-tarjeta:hover { box-shadow: var(--wp--preset--shadow--suave); color: var(--wp--preset--color--texto); }
.dh-productor-tarjeta__img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--wp--preset--color--carbon); margin-bottom: .6rem; }
.dh-productor-tarjeta__img img { width: 100%; height: 100%; object-fit: cover; }
.dh-productor-tarjeta > span:not(.dh-productor-tarjeta__img) { padding: 0 1.2rem; }
.dh-productor-tarjeta__nombre { font-family: var(--wp--preset--font-family--titulos); font-size: var(--wp--preset--font-size--xl); font-weight: 600; color: var(--wp--preset--color--tinta); }
.dh-productor-tarjeta__zona { font-size: var(--wp--preset--font-size--xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--burdeos); }
.dh-productor-tarjeta__texto { color: var(--wp--preset--color--suave); font-size: var(--wp--preset--font-size--s); }
.dh-productor-tarjeta__ver { margin-top: auto; padding-top: .4rem; font-weight: 700; color: var(--wp--preset--color--burdeos); }
.dh-garantias a { color: inherit; }
