/* Posto Verde — Ecommerce (estilos) */

:root{
  --pv-verde:#43B02A;
  --pv-verde-osc:#3B6D11;
  --pv-verde-claro:#F4F8F0;
  --pv-azul:#2E2A80;
  --pv-naranja:#D85A30;
  --pv-borde:#E3E3DD;
  --pv-gris:#6E6E68;
  --pv-gris-claro:#8A8A84;
}

/* =========================================================================
   HEADER
   ========================================================================= */

.pv-topbar{background:var(--pv-azul);color:#EEEDFE;font-size:13px;width:100%}
.pv-topbar__inner{display:flex;align-items:center;justify-content:space-between;
  gap:16px;max-width:1440px;margin:0 auto;padding:8px 24px;box-sizing:border-box}
.pv-topbar__msg{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pv-topbar__links{display:flex;gap:18px;flex-shrink:0}
.pv-topbar a{color:#EEEDFE;text-decoration:none;white-space:nowrap}
.pv-topbar a:hover{text-decoration:underline}

.pv-search{display:flex;align-items:stretch;width:100%;
  border:2px solid var(--pv-verde);border-radius:6px;overflow:hidden;background:#fff}
.pv-search__cat{border:0;border-right:1px solid var(--pv-borde);background:var(--pv-verde-claro);
  color:var(--pv-verde-osc);font-size:14px;padding:0 10px;max-width:170px;
  -webkit-appearance:none;appearance:none;cursor:pointer}
.pv-search__input{flex:1;min-width:0;border:0;padding:11px 14px;font-size:15px;color:#333;background:#fff;outline:none}
.pv-search__input::placeholder{color:var(--pv-gris-claro)}
.pv-search__btn{border:0;background:var(--pv-verde);color:#fff;padding:0 18px;
  display:flex;align-items:center;cursor:pointer;transition:background .15s}
.pv-search__btn:hover{background:var(--pv-verde-osc)}
.pv-search:focus-within{box-shadow:0 0 0 3px rgba(67,176,42,.18)}

.pv-search--off{border-color:#D6D6D0;cursor:not-allowed}
.pv-search--off .pv-search__input{background:#F7F7F4;color:var(--pv-gris-claro);cursor:not-allowed}
.pv-search--off .pv-search__btn{background:#D6D6D0;cursor:not-allowed}

.pv-account,.pv-cart{display:inline-flex;align-items:center;gap:8px;color:var(--pv-azul);
  text-decoration:none;font-size:14px;line-height:1.2;white-space:nowrap}
.pv-account:hover,.pv-cart:hover{color:var(--pv-verde-osc)}
.pv-account__text,.pv-cart__text{display:flex;flex-direction:column}
.pv-account__label,.pv-cart__label{font-size:11px;color:var(--pv-gris-claro)}
.pv-account__name,.pv-cart__total{font-weight:600}
.pv-cart__icon{position:relative;display:inline-flex}
.pv-cart__badge{position:absolute;top:-6px;right:-9px;background:var(--pv-verde);color:#fff;
  font-size:11px;line-height:1;border-radius:10px;padding:3px 6px;font-weight:600}

.pv-acciones .et_pb_code_inner{display:flex;align-items:center;justify-content:flex-end;gap:24px}
.pv-header.et_pb_section{padding-top:0;padding-bottom:0}
.pv-header .et_pb_row{padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0}
.pv-header .et_pb_module,.pv-header .et_pb_column{margin-bottom:0}
.pv-logo .et_pb_image_wrap img{max-width:230px;height:auto}

/* =========================================================================
   HOME
   ========================================================================= */

.pv-confianza{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;
  border-top:1px solid var(--pv-borde);border-bottom:1px solid var(--pv-borde);padding:18px 0}
.pv-confianza__item{display:flex;align-items:center;gap:12px;justify-content:center;color:var(--pv-verde-osc)}
.pv-confianza__item>div{display:flex;flex-direction:column;line-height:1.3}
.pv-confianza__titulo{font-size:14px;font-weight:600;color:#333}
.pv-confianza__bajada{font-size:12.5px;color:var(--pv-gris)}

.pv-cats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.pv-cats__item{display:flex;flex-direction:column;align-items:center;gap:10px;text-decoration:none;
  padding:16px 10px;border:1px solid var(--pv-borde);border-radius:12px;background:#fff;
  transition:border-color .15s,transform .15s}
.pv-cats__item:hover{border-color:var(--pv-verde);transform:translateY(-2px)}
.pv-cats__img{width:88px;height:88px;border-radius:50%;background-size:cover;
  background-position:center;background-color:var(--pv-verde-claro)}
.pv-cats__nombre{font-size:14.5px;font-weight:600;color:var(--pv-azul);text-align:center}

.pv-seccion{margin:0 0 10px}
.pv-seccion__head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;
  margin-bottom:20px;border-bottom:1px solid var(--pv-borde);padding-bottom:10px}
.pv-seccion__titulo{font-size:26px;margin:0;color:var(--pv-verde-osc)}
.pv-seccion__vertodo{font-size:14px;color:var(--pv-azul);text-decoration:none;white-space:nowrap}
.pv-seccion__vertodo:hover{text-decoration:underline}
.pv-seccion__acciones{display:flex;align-items:center;gap:10px;flex-shrink:0}
.pv-carrusel__flecha{width:32px;height:32px;border:1px solid var(--pv-borde);background:#fff;
  border-radius:50%;color:var(--pv-gris);cursor:pointer;padding:0;display:flex;
  align-items:center;justify-content:center;transition:border-color .15s,color .15s}
.pv-carrusel__flecha:hover{border-color:var(--pv-verde);color:var(--pv-verde-osc)}
.pv-carrusel__flecha[disabled]{opacity:.35;cursor:default}

/* Carrusel: la grilla pasa a fila con scroll horizontal */
.pv-seccion--scroll .pv-carrusel{overflow-x:auto;overflow-y:hidden;
  scroll-snap-type:x mandatory;scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;scrollbar-width:thin;padding-bottom:6px;margin:0 -4px}
.pv-seccion--scroll .pv-carrusel::-webkit-scrollbar{height:6px}
.pv-seccion--scroll .pv-carrusel::-webkit-scrollbar-thumb{background:var(--pv-borde);border-radius:3px}
.pv-seccion--scroll .woocommerce ul.products,
.pv-seccion--scroll ul.products{display:flex!important;grid-template-columns:none!important;
  flex-wrap:nowrap;gap:14px;padding:0 4px}
.pv-seccion--scroll ul.products li.product{flex:0 0 214px;scroll-snap-align:start}
@media (max-width:600px){
  .pv-seccion--scroll ul.products li.product{flex:0 0 156px}
  .pv-carrusel__flecha{display:none}
}

/* =========================================================================
   TARJETA DE PRODUCTO
   ========================================================================= */

.woocommerce ul.products li.product.pv-card{border:1px solid var(--pv-borde);border-radius:12px;
  padding:12px;text-align:left;display:flex;flex-direction:column;transition:border-color .15s}
.woocommerce ul.products li.product.pv-card:hover{border-color:var(--pv-verde)}
.pv-card__link{display:flex;flex-direction:column;flex:1;text-decoration:none}
.pv-card__media{position:relative;background:#FAFAF7;border-radius:8px;margin-bottom:10px;overflow:hidden}
.pv-card__media img{width:100%;height:auto;display:block;margin:0}
.pv-card__badge{position:absolute;top:8px;left:8px;z-index:2;background:var(--pv-naranja);color:#fff;
  font-size:11.5px;padding:3px 9px;border-radius:6px;font-weight:600}
.pv-card__lab{font-size:11px;color:var(--pv-gris-claro);text-transform:uppercase;letter-spacing:.03em}
.pv-card__titulo{font-size:14px;line-height:1.35;color:#333;margin:3px 0 8px;min-height:2.7em;font-weight:400}
.pv-card__precio{font-size:19px;font-weight:700;color:var(--pv-verde-osc);margin-top:auto}
.pv-card__precio del{color:var(--pv-gris-claro);font-size:14px;font-weight:400;margin-right:5px}
.pv-card__precio ins{text-decoration:none}
.pv-card__receta{display:block;margin-top:10px;text-align:center;background:#FAEEDA;color:#854F0B;
  font-size:12.5px;padding:7px;border-radius:6px}
.woocommerce ul.products li.product .pv-card__boton{display:block;margin-top:10px;text-align:center;
  background:var(--pv-verde);color:#fff;border-radius:6px;padding:9px;font-size:13.5px}
.woocommerce ul.products li.product .pv-card__boton:hover{background:var(--pv-verde-osc)}

/* =========================================================================
   FICHA DE PRODUCTO — clásica, galería izquierda / datos derecha
   ========================================================================= */

.pv-breadcrumb{font-size:12.5px;color:var(--pv-gris-claro);margin-bottom:16px}
.pv-breadcrumb a{color:var(--pv-gris);text-decoration:none}

.woocommerce div.product.pv-ficha{display:grid;grid-template-columns:minmax(0,420px) minmax(0,1fr);
  gap:38px;align-items:start;max-width:1100px;margin:0 auto}
.woocommerce div.product.pv-ficha .pv-ficha__galeria{margin:0}
.woocommerce div.product.pv-ficha div.summary{width:auto!important;float:none!important;margin:0!important}
.woocommerce div.product.pv-ficha .woocommerce-tabs,
.woocommerce div.product.pv-ficha .related,
.woocommerce div.product.pv-ficha .upsells{grid-column:1 / -1}

/* galería con flechas */
.pv-galeria{position:relative;display:flex;align-items:center;justify-content:center;gap:8px}
.pv-galeria__marco{position:relative;width:100%;max-width:330px;aspect-ratio:1;flex:1;
  background:#FAFAF7;border-radius:12px;overflow:hidden}
.pv-galeria__slide{position:absolute;inset:0;margin:0;display:none;align-items:center;
  justify-content:center;padding:18px;box-sizing:border-box}
.pv-galeria__slide.is-activa{display:flex}
.pv-galeria__slide img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;display:block}
.pv-galeria__flecha{width:34px;height:34px;flex-shrink:0;border:1px solid var(--pv-borde);
  background:#fff;border-radius:50%;color:var(--pv-gris);cursor:pointer;padding:0;
  display:flex;align-items:center;justify-content:center;transition:border-color .15s,color .15s}
.pv-galeria__flecha:hover{border-color:var(--pv-verde);color:var(--pv-verde-osc)}
.pv-galeria__contador{position:absolute;bottom:10px;left:50%;transform:translateX(-50%);
  background:rgba(0,0,0,.55);color:#fff;font-size:11.5px;padding:2px 9px;border-radius:10px}

/* resumen */
.pv-ficha__lab{font-size:12.5px;color:var(--pv-gris-claro);text-transform:uppercase;
  letter-spacing:.05em;margin-bottom:5px}
.woocommerce div.product.pv-ficha .product_title{font-size:27px!important;line-height:1.25;
  color:#2B2B28;margin:0 0 10px!important;padding:0!important;text-align:left}
.pv-ficha__sellos{display:flex;gap:7px;margin-bottom:14px;flex-wrap:wrap}
.pv-sello{font-size:12.5px;padding:4px 11px;border-radius:6px;line-height:1.4}
.pv-sello--bio{background:#FAEEDA;color:#854F0B}
.pv-sello--directa{background:var(--pv-verde-claro);color:var(--pv-verde-osc)}
.pv-sello--receta{background:#FBE9E7;color:#9A3412}

.woocommerce div.product.pv-ficha p.price{color:var(--pv-verde-osc);font-size:30px;font-weight:700;margin:0 0 16px}
.woocommerce div.product.pv-ficha p.price del{color:var(--pv-gris-claro);font-size:18px;font-weight:400}
.woocommerce div.product.pv-ficha p.price ins{text-decoration:none}

.pv-ficha__datos{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;
  border-top:1px solid var(--pv-borde);border-bottom:1px solid var(--pv-borde);
  padding:14px 0;margin:0 0 18px}
.pv-ficha__dato{display:flex;flex-direction:column;gap:2px}
.pv-ficha__dato-label{font-size:11px;color:var(--pv-gris-claro);text-transform:uppercase;letter-spacing:.04em}
.pv-ficha__dato-valor{font-size:14px;color:#333}

.woocommerce div.product.pv-ficha form.cart{margin:0 0 18px}
.woocommerce div.product.pv-ficha form.cart .quantity input{width:70px;height:48px;
  border:1px solid var(--pv-borde);border-radius:6px;text-align:center}
.woocommerce div.product.pv-ficha form.cart .button{background:var(--pv-verde);color:#fff;
  border-radius:6px;padding:14px 34px;font-size:15px}
.woocommerce div.product.pv-ficha form.cart .button:hover{background:var(--pv-verde-osc)}

.pv-ficha__nodisp{background:#FBE9E7;color:#9A3412;border-radius:8px;padding:13px 16px;
  font-size:14px;margin:0 0 18px}

.pv-ficha__despacho{border:1px solid var(--pv-borde);border-radius:8px;padding:13px 15px;
  display:flex;flex-direction:column;gap:10px}
.pv-ficha__despacho-item{display:flex;align-items:center;gap:10px;font-size:13.5px;color:var(--pv-gris)}
.pv-ficha__despacho-item svg{color:var(--pv-verde);flex-shrink:0}

@media (max-width:980px){
  .woocommerce div.product.pv-ficha{grid-template-columns:1fr;gap:24px}
  .pv-galeria__marco{max-width:280px;margin:0 auto}
  .woocommerce div.product.pv-ficha .product_title{font-size:22px!important}
  .woocommerce div.product.pv-ficha p.price{font-size:25px}
}

/* =========================================================================
   CATÁLOGO
   ========================================================================= */

.woocommerce .woocommerce-ordering select{border:1px solid var(--pv-borde);border-radius:6px;padding:8px 10px}
.woocommerce nav.woocommerce-pagination ul{border:0;gap:6px;display:flex;justify-content:center}
.woocommerce nav.woocommerce-pagination ul li{border:0}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span{border-radius:6px;padding:7px 13px;color:var(--pv-gris)}
.woocommerce nav.woocommerce-pagination ul li span.current{background:var(--pv-verde-claro);color:var(--pv-verde-osc)}
.woocommerce span.onsale{display:none}

.pv-aviso{background:var(--pv-verde-claro);border:1px solid var(--pv-verde);color:var(--pv-verde-osc);
  border-radius:8px;padding:12px 16px;margin-bottom:22px;font-size:14px}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width:980px){
  .pv-topbar__links{display:none}
  .pv-search__cat{display:none}
  .pv-account__text,.pv-cart__text{display:none}
  .pv-confianza{grid-template-columns:repeat(2,1fr);gap:16px}
  .pv-cats{grid-template-columns:repeat(3,1fr);gap:12px}
  .pv-fila-principal .et_pb_column{width:100%!important;margin:0 0 10px!important}
  .pv-fila-principal{position:relative}
  .pv-fila-principal .et_pb_column:last-child{position:absolute;top:16px;right:16px;width:auto!important;margin:0!important}
  .pv-logo .et_pb_image_wrap img{max-width:160px}
}

@media (max-width:600px){
  .pv-confianza{grid-template-columns:1fr}
  .pv-confianza__item{justify-content:flex-start}
  .pv-cats{grid-template-columns:repeat(2,1fr)}
  .pv-cats__img{width:68px;height:68px}
  .pv-seccion__titulo{font-size:21px}
  .pv-card__titulo{min-height:0}
}

/* =========================================================================
   CORRECCIONES DE DIVI EN WOOCOMMERCE
   ========================================================================= */

/* Ancho completo: Divi reserva espacio de sidebar y dibuja la línea divisoria */
body.pv-fullwidth #main-content .container:before{display:none!important}
body.pv-fullwidth #left-area{width:100%!important;padding-right:0!important;padding-bottom:0!important}
body.pv-fullwidth #sidebar{display:none!important}
body.pv-fullwidth #main-content .container{width:90%;max-width:1100px}

/* La galería propia reemplaza a la de Divi/Woo */
body.pv-producto .woocommerce-product-gallery,
body.pv-producto div.product.pv-ficha div.images{display:none!important}
body.pv-producto .woocommerce div.product div.summary{
  width:100%!important;float:none!important;margin:0!important;clear:both}

/* Divi le mete altura fija al contenedor de la imagen */
body.pv-producto .woocommerce-product-gallery{margin-bottom:0!important}
body.pv-producto .woocommerce-product-gallery__wrapper{margin:0}
body.pv-producto .flex-viewport{height:auto!important}

/* Divi centra el título con su propia tipografía */
body.pv-producto .woocommerce div.product .product_title{text-align:center}

/* Pestañas: sin valoraciones, si queda una sola no se muestra la barra */
body.pv-producto .woocommerce-tabs ul.tabs li:only-child{display:none}
body.pv-producto .woocommerce-tabs .panel{border:0;padding:0}

body.pv-producto .related.products{max-width:1100px;margin-left:auto;margin-right:auto}

/* =========================================================================
   GRILLA DE PRODUCTOS — alturas parejas y tipografía contenida
   ========================================================================= */

/* Divi flota los <li>; con grid quedan parejos sin importar el largo del título */
.woocommerce ul.products{display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(clamp(150px,22%,240px),1fr));
  gap:18px;margin:0;padding:0;list-style:none;max-width:100%;box-sizing:border-box}
.woocommerce ul.products::before,
.woocommerce ul.products::after{display:none!important}
.woocommerce ul.products li.product{width:auto!important;margin:0!important;float:none!important;
  clear:none!important;display:flex;flex-direction:column}
.woocommerce ul.products li.product .pv-card__link,
.woocommerce ul.products li.product>a{display:flex;flex-direction:column;flex:1}

/* Divi impone su tamaño de h2/h3 dentro del loop */
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product h3,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2.pv-card__titulo{
  font-size:14px!important;line-height:1.35!important;font-weight:400!important;
  color:#333!important;margin:3px 0 8px!important;padding:0!important;
  text-transform:none!important;letter-spacing:0!important}

.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .pv-card__precio{
  font-size:17px!important;font-weight:700;color:var(--pv-verde-osc);margin:auto 0 0!important}

/* Imagen del listado: cuadrada y contenida, no recortada */
.woocommerce ul.products li.product .pv-card__media,
.woocommerce ul.products li.product>a img{background:#FAFAF7;border-radius:8px}
.woocommerce ul.products li.product .pv-card__media{aspect-ratio:1;display:flex;
  align-items:center;justify-content:center;padding:10px;box-sizing:border-box}
.woocommerce ul.products li.product .pv-card__media img{max-height:100%;width:auto;
  max-width:100%;object-fit:contain}

/* Botón de la tarjeta.
   Selectores con html body para ganarle a los estilos de botón de Divi,
   que son muy específicos y pintan todo de azul. */

html body .woocommerce ul.products li.product a.button,
html body .woocommerce ul.products li.product button.button,
html body .woocommerce ul.products li.product .pv-card__boton,
html body .woocommerce ul.products li.product .pv-card__receta{
  display:flex!important;align-items:center;justify-content:center;gap:7px;
  width:100%;box-sizing:border-box;margin:12px 0 0!important;
  font-size:13.5px!important;font-weight:600!important;line-height:1.2!important;
  padding:11px 12px!important;border-radius:8px!important;border:0!important;
  text-align:center;text-decoration:none!important;text-transform:none!important;
  letter-spacing:0!important;cursor:pointer;transition:background .15s,box-shadow .15s}

/* Divi mete un ::after con una flecha en todos sus botones */
html body .woocommerce ul.products li.product a.button::after,
html body .woocommerce ul.products li.product .pv-card__boton::after{
  display:none!important;content:none!important}

/* Comprable */
html body .woocommerce ul.products li.product a.button,
html body .woocommerce ul.products li.product .pv-card__boton{
  background:var(--pv-verde)!important;color:#fff!important}
html body .woocommerce ul.products li.product a.button:hover,
html body .woocommerce ul.products li.product .pv-card__boton:hover{
  background:var(--pv-verde-osc)!important;box-shadow:0 3px 10px rgba(67,176,42,.28)}
html body .woocommerce ul.products li.product .pv-card__boton svg{flex-shrink:0}

/* Pre-lanzamiento */
html body .woocommerce ul.products li.product .pv-card__boton--off{
  background:#F0F0EC!important;color:#9A9A94!important;cursor:not-allowed;box-shadow:none!important}
html body .woocommerce ul.products li.product .pv-card__boton--off:hover{
  background:#F0F0EC!important;box-shadow:none!important}

/* Sin stock o sin precio */
html body .woocommerce ul.products li.product .pv-card__boton--ver{
  background:#fff!important;color:var(--pv-verde-osc)!important;
  border:1px solid var(--pv-borde)!important;font-weight:400!important}
html body .woocommerce ul.products li.product .pv-card__boton--ver:hover{
  background:var(--pv-verde-claro)!important;border-color:var(--pv-verde)!important}

/* Requiere receta */
html body .woocommerce ul.products li.product .pv-card__receta{
  background:#FAEEDA!important;color:#854F0B!important;cursor:default;font-weight:400!important}

/* Estados de WooCommerce al agregar */
html body .woocommerce ul.products li.product a.button.loading{opacity:.7;pointer-events:none}
html body .woocommerce ul.products li.product a.button.added{background:var(--pv-verde-osc)!important}
html body .woocommerce ul.products li.product a.added_to_cart{
  display:block;text-align:center;font-size:12.5px;margin-top:7px;
  color:var(--pv-azul)!important;text-decoration:underline!important;
  background:none!important;padding:0!important;font-weight:400!important}

/* Tarjeta: contorno y respiración, sin depender de la plantilla */
html body .woocommerce ul.products li.product{
  background:#fff;border:1px solid var(--pv-borde);border-radius:12px;
  padding:12px;box-sizing:border-box;transition:border-color .15s,box-shadow .15s}
html body .woocommerce ul.products li.product:hover{
  border-color:var(--pv-verde);box-shadow:0 4px 14px rgba(0,0,0,.05)}

/* Separación de la sección de relacionados */
.related.products,
.upsells.products{margin-top:44px!important;padding-top:0;clear:both}
.related.products>h2,
.upsells.products>h2{font-size:22px!important;color:var(--pv-verde-osc)!important;
  border-bottom:1px solid var(--pv-borde);padding-bottom:10px!important;margin:0 0 20px!important}
.related.products ul.products,
.upsells.products ul.products{grid-template-columns:repeat(auto-fill,minmax(clamp(150px,24%,250px),1fr))}

@media (max-width:980px){
  .woocommerce ul.products{gap:14px}
  .related.products ul.products,
  .upsells.products ul.products{gap:14px}
}
@media (max-width:600px){
  .woocommerce ul.products,
  .related.products ul.products,
  .upsells.products ul.products{gap:10px}
  .woocommerce ul.products li.product h2,
  .woocommerce ul.products li.product h2.pv-card__titulo{font-size:13px!important}
  .woocommerce ul.products li.product .price,
  .woocommerce ul.products li.product .pv-card__precio{font-size:15px!important}
  .related.products>h2{font-size:19px!important}
}


/* =========================================================================
   CARRUSEL HORIZONTAL DE PRODUCTOS
   ========================================================================= */

.pv-seccion__head{display:flex;align-items:center;justify-content:space-between;gap:16px;
  margin-bottom:18px;border-bottom:1px solid var(--pv-borde);padding-bottom:10px;flex-wrap:wrap}
.pv-seccion__acciones{display:flex;align-items:center;gap:10px;flex-shrink:0}
.pv-carrusel__flecha{width:34px;height:34px;border:1px solid var(--pv-borde);background:#fff;
  border-radius:50%;color:var(--pv-gris);cursor:pointer;padding:0;display:flex;
  align-items:center;justify-content:center;transition:border-color .15s,color .15s,opacity .15s}
.pv-carrusel__flecha:hover{border-color:var(--pv-verde);color:var(--pv-verde-osc)}
.pv-carrusel__flecha[disabled]{opacity:.3;cursor:default}

/* La fila: scroll horizontal con anclaje */
.pv-carrusel{position:relative}
.pv-carrusel .pv-pista,
.pv-carrusel .woocommerce ul.products,
.pv-carrusel ul.products{display:flex!important;grid-template-columns:none!important;
  flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;gap:16px;
  scroll-snap-type:x mandatory;scroll-behavior:smooth;
  padding:4px 2px 14px;margin:0;list-style:none;
  scrollbar-width:thin;scrollbar-color:var(--pv-borde) transparent;
  -webkit-overflow-scrolling:touch}
.pv-carrusel ul.products li.product{flex:0 0 216px;width:216px!important;max-width:216px;
  scroll-snap-align:start;margin:0!important}

/* Barra de scroll discreta */
.pv-carrusel ul.products::-webkit-scrollbar{height:6px}
.pv-carrusel ul.products::-webkit-scrollbar-track{background:transparent}
.pv-carrusel ul.products::-webkit-scrollbar-thumb{background:var(--pv-borde);border-radius:3px}
.pv-carrusel ul.products::-webkit-scrollbar-thumb:hover{background:var(--pv-gris-claro)}

@media (max-width:600px){
  .pv-carrusel ul.products li.product{flex:0 0 158px;width:158px!important;max-width:158px}
  .pv-carrusel ul.products{gap:11px}
  .pv-seccion__acciones{gap:8px}
}


/* =========================================================================
   CONVENIOS Y BENEFICIOS
   ========================================================================= */

.pv-convenios{display:flex;gap:14px}
.pv-carrusel .pv-convenios .pv-convenio{flex:0 0 178px;width:178px;scroll-snap-align:start}

.pv-convenio{display:flex;flex-direction:column;align-items:center;gap:9px;
  padding:18px 14px;border:1px solid var(--pv-borde);border-radius:12px;background:#fff;
  text-decoration:none;text-align:center;transition:border-color .15s,transform .15s,box-shadow .15s}
.pv-convenio:hover{border-color:var(--pv-verde);transform:translateY(-2px);
  box-shadow:0 6px 16px rgba(0,0,0,.06)}

.pv-convenio__marco{display:flex;align-items:center;justify-content:center;
  width:100%;height:56px}
.pv-convenio__marco img{max-width:130px;max-height:56px;width:auto;height:auto;
  object-fit:contain;display:block}
.pv-convenio__inicial{width:46px;height:46px;border-radius:50%;background:var(--pv-verde-claro);
  color:var(--pv-verde-osc);font-size:20px;font-weight:700;
  display:flex;align-items:center;justify-content:center}

.pv-convenio__nombre{font-size:13.5px;line-height:1.3;color:var(--pv-azul);font-weight:600}
.pv-convenio__dscto{font-size:12px;color:var(--pv-verde-osc);background:var(--pv-verde-claro);
  padding:3px 10px;border-radius:20px;white-space:nowrap}

/* versión en grilla */
.pv-grilla-convenios .pv-convenios{display:grid;
  grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:14px}

@media (max-width:600px){
  .pv-carrusel .pv-convenios .pv-convenio{flex:0 0 146px;width:146px}
  .pv-convenio{padding:14px 10px;gap:7px}
  .pv-convenio__marco{height:46px}
  .pv-convenio__marco img{max-width:104px;max-height:46px}
  .pv-convenio__nombre{font-size:12.5px}
  .pv-grilla-convenios .pv-convenios{grid-template-columns:repeat(2,1fr)}
}


/* =========================================================================
   TARJETA — estilo referencia
   ========================================================================= */

html body .woocommerce ul.products li.product{padding:0;overflow:hidden}
html body .woocommerce ul.products li.product .pv-card__link{padding:12px 14px 0;gap:0}

.pv-card__media{position:relative;background:#fff;aspect-ratio:1;display:flex;
  align-items:center;justify-content:center;padding:8px;box-sizing:border-box;margin-bottom:12px}
.pv-card__media img{max-height:100%;max-width:100%;width:auto;object-fit:contain}
.pv-card__badge{position:absolute;top:0;left:0;z-index:2;background:var(--pv-azul);color:#fff;
  font-size:12px;font-weight:600;padding:4px 11px;border-radius:6px;letter-spacing:.01em}

html body .woocommerce ul.products li.product .pv-card__lab{
  display:block;font-size:12.5px;color:var(--pv-gris);margin-bottom:5px;
  text-transform:uppercase;letter-spacing:.02em;font-weight:400}

html body .woocommerce ul.products li.product h2.pv-card__titulo,
html body .woocommerce ul.products li.product .woocommerce-loop-product__title{
  font-size:15px!important;font-weight:700!important;line-height:1.32!important;
  color:#1F1F1D!important;margin:0 0 10px!important;min-height:2.6em}

html body .woocommerce ul.products li.product .pv-card__precio,
html body .woocommerce ul.products li.product .price{
  display:block;font-size:20px!important;font-weight:700!important;color:#1F1F1D!important;
  margin:0 0 8px!important}
html body .woocommerce ul.products li.product .price del,
html body .woocommerce ul.products li.product .pv-card__precio del{
  font-size:14px!important;font-weight:400!important;color:var(--pv-gris-claro)!important;
  margin-left:7px;opacity:1}
html body .woocommerce ul.products li.product .price ins{text-decoration:none;background:none}

.pv-card__convenio{display:inline-block;font-size:12px;color:var(--pv-gris);
  border:1px solid var(--pv-borde);border-radius:6px;padding:3px 9px;margin-bottom:10px}

/* El botón ocupa el ancho completo, pegado al borde inferior */
html body .woocommerce ul.products li.product a.button,
html body .woocommerce ul.products li.product button.button,
html body .woocommerce ul.products li.product .pv-card__boton,
html body .woocommerce ul.products li.product .pv-card__receta{
  margin:12px 14px 14px!important;width:calc(100% - 28px)}


/* =========================================================================
   AJUSTES DE TARJETA — padding, alineación y botones
   ========================================================================= */

/* --- La tarjeta es una columna: todo lo de arriba crece, el botón se ancla abajo --- */
html body .woocommerce ul.products li.product{
  display:flex!important;flex-direction:column;height:100%;padding:0!important}

html body .woocommerce ul.products li.product .pv-card__link,
html body .woocommerce ul.products li.product>a:not(.button):not(.added_to_cart){
  flex:1 1 auto;display:flex;flex-direction:column;
  padding:16px 18px 0!important;text-decoration:none}

/* El precio empuja hacia abajo: los botones quedan a la misma altura */
html body .woocommerce ul.products li.product .pv-card__precio,
html body .woocommerce ul.products li.product .price{margin:auto 0 0!important;padding-top:8px}

/* El chip de convenio no debe romper esa alineación */
html body .woocommerce ul.products li.product .pv-card__convenio{margin:8px 0 0}

/* --- Botón: altura natural, una sola línea, nunca estirado --- */
html body .woocommerce ul.products li.product a.button,
html body .woocommerce ul.products li.product button.button,
html body .woocommerce ul.products li.product .pv-card__boton,
html body .woocommerce ul.products li.product .pv-card__receta{
  flex:0 0 auto!important;height:auto!important;min-height:0!important;
  align-self:stretch;flex-wrap:nowrap!important;white-space:nowrap;
  gap:8px!important;margin:14px 18px 0!important;width:calc(100% - 36px)!important;
  padding:11px 10px!important;font-size:13.5px!important}

html body .woocommerce ul.products li.product .pv-card__boton svg{
  width:16px;height:16px;flex:0 0 auto}
html body .woocommerce ul.products li.product .pv-card__boton span{
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* --- "Ver carrito": mismo tamaño y forma que Agregar, en versión secundaria --- */
html body .woocommerce ul.products li.product a.added_to_cart{
  display:flex!important;align-items:center;justify-content:center;
  align-self:stretch;box-sizing:border-box;
  margin:8px 18px 18px!important;width:calc(100% - 36px)!important;
  padding:10px!important;border-radius:8px!important;
  background:#fff!important;color:var(--pv-verde-osc)!important;
  border:1px solid var(--pv-verde)!important;
  font-size:13.5px!important;font-weight:600!important;
  text-decoration:none!important;white-space:nowrap;transition:background .15s}
html body .woocommerce ul.products li.product a.added_to_cart:hover{
  background:var(--pv-verde-claro)!important}

/* Cuando no hay "Ver carrito", el botón necesita su propio margen inferior */
html body .woocommerce ul.products li.product a.button:last-child,
html body .woocommerce ul.products li.product .pv-card__boton:last-child,
html body .woocommerce ul.products li.product .pv-card__receta:last-child{
  margin-bottom:18px!important}

/* --- Carrusel: tarjetas algo más anchas para que el texto respire --- */
.pv-carrusel ul.products li.product{flex:0 0 232px!important;width:232px!important;max-width:232px}

@media (max-width:600px){
  html body .woocommerce ul.products li.product .pv-card__link{padding:12px 13px 0!important}
  html body .woocommerce ul.products li.product a.button,
  html body .woocommerce ul.products li.product .pv-card__boton,
  html body .woocommerce ul.products li.product .pv-card__receta{
    margin:12px 13px 0!important;width:calc(100% - 26px)!important;
    padding:10px 8px!important;font-size:13px!important;gap:6px!important}
  html body .woocommerce ul.products li.product a.added_to_cart{
    margin:7px 13px 13px!important;width:calc(100% - 26px)!important;font-size:12.5px!important}
  html body .woocommerce ul.products li.product a.button:last-child,
  html body .woocommerce ul.products li.product .pv-card__boton:last-child{margin-bottom:13px!important}
  .pv-carrusel ul.products li.product{flex:0 0 168px!important;width:168px!important;max-width:168px}
}


/* =========================================================================
   BOTÓN EN UNA SOLA LÍNEA
   =========================================================================
   Divi prefija con #page-container (selector de ID) y fuerza display:block
   en los SVG. Se resuelve con dos medidas: subir la especificidad usando
   el mismo ID, y meter icono + texto en un contenedor inline-flex propio
   que no depende de que el botón sea flex. */

html body #page-container .woocommerce ul.products li.product a.button,
html body #page-container .woocommerce ul.products li.product button.button,
html body #page-container .woocommerce ul.products li.product .pv-card__boton,
html body .woocommerce ul.products li.product a.button,
html body .woocommerce ul.products li.product .pv-card__boton{
  display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
  align-items:center!important;justify-content:center!important;
  white-space:nowrap!important;line-height:1.2!important;text-align:center!important}

/* El contenedor interno mantiene el par en línea aunque el botón no sea flex */
html body #page-container .woocommerce ul.products li.product .pv-btn-in,
html body .woocommerce ul.products li.product .pv-btn-in{
  display:inline-flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
  align-items:center!important;justify-content:center!important;gap:8px!important;
  white-space:nowrap!important;width:auto!important;max-width:100%;line-height:1.2!important}

/* Divi pone display:block en los svg: acá vuelve a comportarse como texto */
html body #page-container .woocommerce ul.products li.product .pv-btn-in svg,
html body .woocommerce ul.products li.product .pv-btn-in svg{
  display:inline-block!important;width:16px!important;height:16px!important;
  flex:0 0 16px!important;vertical-align:middle;margin:0!important;float:none!important}

html body #page-container .woocommerce ul.products li.product .pv-btn-txt,
html body .woocommerce ul.products li.product .pv-btn-txt{
  display:inline!important;white-space:nowrap!important;line-height:1.2!important}

/* El botón nativo de WooCommerce, por si en algún loop no pasa por el filtro */
html body #page-container .woocommerce ul.products li.product a.add_to_cart_button{
  white-space:nowrap!important}


/* =========================================================================
   CATÁLOGO — mismos estilos sin depender del envoltorio .woocommerce
   =========================================================================
   En la tienda y en las categorías, WooCommerce pone la clase .woocommerce
   en el <body>, no en un div contenedor. Los selectores que empiezan con
   ".woocommerce ul.products" no encuentran ancestro y no aplican.
   Estas reglas apuntan directo a ul.products. */

html body ul.products{
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(clamp(150px,22%,240px),1fr))!important;
  gap:18px!important;margin:0!important;padding:0!important;list-style:none!important;
  max-width:100%!important;box-sizing:border-box!important}
html body ul.products::before,
html body ul.products::after{display:none!important;content:none!important}

html body ul.products li.product{
  display:flex!important;flex-direction:column!important;height:100%!important;
  min-width:0!important;max-width:100%!important;
  width:auto!important;float:none!important;clear:none!important;
  margin:0!important;padding:0!important;
  background:#fff;border:1px solid var(--pv-borde);border-radius:12px;
  overflow:hidden;box-sizing:border-box;transition:border-color .15s,box-shadow .15s}
html body ul.products li.product:hover{
  border-color:var(--pv-verde);box-shadow:0 4px 14px rgba(0,0,0,.05)}

html body ul.products li.product .pv-card__link,
html body ul.products li.product>a:not(.button):not(.added_to_cart){
  flex:1 1 auto!important;display:flex!important;flex-direction:column!important;
  padding:16px 18px 0!important;text-decoration:none!important}

html body ul.products li.product .pv-card__media,
html body ul.products li.product>a img{background:#fff}
html body ul.products li.product .pv-card__media{
  position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;
  padding:8px;box-sizing:border-box;margin-bottom:12px}
html body ul.products li.product .pv-card__media img{
  max-height:100%;max-width:100%;width:auto;object-fit:contain;margin:0}

html body ul.products li.product .pv-card__lab{
  display:block;font-size:12.5px;color:var(--pv-gris);margin-bottom:5px;
  text-transform:uppercase;letter-spacing:.02em;font-weight:400}

html body ul.products li.product h2,
html body ul.products li.product h3,
html body ul.products li.product .woocommerce-loop-product__title,
html body ul.products li.product .pv-card__titulo{
  font-size:15px!important;font-weight:700!important;line-height:1.32!important;
  color:#1F1F1D!important;margin:0 0 10px!important;padding:0!important;
  min-height:2.6em;text-transform:none!important;letter-spacing:0!important}

/* Clave de la alineación: el precio empuja todo hacia abajo */
html body ul.products li.product .price,
html body ul.products li.product .pv-card__precio{
  display:block!important;font-size:20px!important;font-weight:700!important;
  color:#1F1F1D!important;margin:auto 0 0!important;padding-top:8px!important}
html body ul.products li.product .price del{
  font-size:14px!important;font-weight:400!important;color:var(--pv-gris-claro)!important;
  margin-left:7px;opacity:1}
html body ul.products li.product .price ins{text-decoration:none;background:none}

html body ul.products li.product .pv-card__badge{
  position:absolute;top:0;left:0;z-index:2;background:var(--pv-azul);color:#fff;
  font-size:12px;font-weight:600;padding:4px 11px;border-radius:6px}
html body ul.products li.product .pv-card__convenio{
  display:inline-block;font-size:12px;color:var(--pv-gris);border:1px solid var(--pv-borde);
  border-radius:6px;padding:3px 9px;margin:8px 0 0}

/* Botón: misma altura, misma posición, siempre en una línea */
html body ul.products li.product a.button,
html body ul.products li.product button.button,
html body ul.products li.product .pv-card__boton,
html body ul.products li.product .pv-card__receta{
  display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
  align-items:center!important;justify-content:center!important;
  flex:0 0 auto!important;height:auto!important;min-height:0!important;align-self:stretch;
  box-sizing:border-box!important;white-space:nowrap!important;
  margin:14px 18px 18px!important;width:calc(100% - 36px)!important;
  padding:11px 10px!important;border-radius:8px!important;border:0!important;
  font-size:13.5px!important;font-weight:600!important;line-height:1.2!important;
  text-align:center!important;text-decoration:none!important;text-transform:none!important;
  letter-spacing:0!important;cursor:pointer}
html body ul.products li.product a.button::after,
html body ul.products li.product .pv-card__boton::after{display:none!important;content:none!important}

html body ul.products li.product a.button,
html body ul.products li.product .pv-card__boton{
  background:var(--pv-verde)!important;color:#fff!important}
html body ul.products li.product a.button:hover,
html body ul.products li.product .pv-card__boton:hover{background:var(--pv-verde-osc)!important}
html body ul.products li.product .pv-card__boton--off{
  background:#F0F0EC!important;color:#9A9A94!important;cursor:not-allowed}
html body ul.products li.product .pv-card__boton--ver{
  background:#fff!important;color:var(--pv-verde-osc)!important;
  border:1px solid var(--pv-borde)!important;font-weight:400!important}
html body ul.products li.product .pv-card__receta{
  background:#FAEEDA!important;color:#854F0B!important;cursor:default;font-weight:400!important}

html body ul.products li.product .pv-btn-in{
  display:inline-flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
  align-items:center!important;justify-content:center!important;gap:8px!important;
  white-space:nowrap!important;line-height:1.2!important}
html body ul.products li.product .pv-btn-in svg{
  display:inline-block!important;width:16px!important;height:16px!important;
  flex:0 0 16px!important;vertical-align:middle;margin:0!important;float:none!important}

/* Cuando aparece "Ver carrito", el botón pierde su margen inferior */
html body ul.products li.product a.button:not(:last-child),
html body ul.products li.product .pv-card__boton:not(:last-child){margin-bottom:0!important}
html body ul.products li.product a.added_to_cart{
  display:flex!important;align-items:center;justify-content:center;align-self:stretch;
  box-sizing:border-box!important;margin:8px 18px 18px!important;
  width:calc(100% - 36px)!important;padding:10px!important;border-radius:8px!important;
  background:#fff!important;color:var(--pv-verde-osc)!important;
  border:1px solid var(--pv-verde)!important;font-size:13.5px!important;
  font-weight:600!important;text-decoration:none!important;white-space:nowrap}

/* El carrusel conserva su fila horizontal */
.pv-carrusel ul.products{display:flex!important;grid-template-columns:none!important}

@media (max-width:600px){
  html body ul.products{gap:10px!important}
  html body ul.products li.product .pv-card__link{padding:12px 13px 0!important}
  html body ul.products li.product h2,
  html body ul.products li.product .pv-card__titulo{font-size:13px!important}
  html body ul.products li.product .price,
  html body ul.products li.product .pv-card__precio{font-size:16px!important}
  html body ul.products li.product a.button,
  html body ul.products li.product .pv-card__boton,
  html body ul.products li.product .pv-card__receta{
    margin:12px 13px 13px!important;width:calc(100% - 26px)!important;
    padding:10px 8px!important;font-size:13px!important}
  html body ul.products li.product a.added_to_cart{
    margin:7px 13px 13px!important;width:calc(100% - 26px)!important}
}

/* =========================================================================
   RESPIRO INFERIOR DE LA TARJETA
   ========================================================================= */

html body ul.products li.product a.button,
html body ul.products li.product button.button,
html body ul.products li.product .pv-card__boton,
html body ul.products li.product .pv-card__receta,
html body .woocommerce ul.products li.product a.button,
html body .woocommerce ul.products li.product .pv-card__boton,
html body .woocommerce ul.products li.product .pv-card__receta,
html body #page-container ul.products li.product a.button,
html body #page-container ul.products li.product .pv-card__boton{
  margin-bottom:18px!important}

/* Si aparece "Ver carrito", el margen inferior pasa a ese enlace */
html body ul.products li.product a.button:not(:last-child),
html body ul.products li.product .pv-card__boton:not(:last-child),
html body .woocommerce ul.products li.product a.button:not(:last-child),
html body #page-container ul.products li.product a.button:not(:last-child){
  margin-bottom:0!important}

html body ul.products li.product a.added_to_cart,
html body .woocommerce ul.products li.product a.added_to_cart{
  margin-bottom:18px!important}

@media (max-width:600px){
  html body ul.products li.product a.button,
  html body ul.products li.product .pv-card__boton,
  html body ul.products li.product .pv-card__receta,
  html body .woocommerce ul.products li.product a.button,
  html body .woocommerce ul.products li.product .pv-card__boton,
  html body ul.products li.product a.added_to_cart{
    margin-bottom:13px!important}
}


/* Orden del resumen en la ficha: laboratorio arriba del título */
html body .pv-ficha .pv-ficha__lab{order:-1}
html body .pv-ficha div.summary{display:flex;flex-direction:column}
html body .pv-ficha div.summary>*{order:5}
html body .pv-ficha div.summary .pv-ficha__lab{order:1}
html body .pv-ficha div.summary .product_title{order:2}
html body .pv-ficha div.summary .pv-ficha__sellos{order:3}
html body .pv-ficha div.summary p.price{order:4}
html body .pv-ficha div.summary .pv-ficha__datos{order:6}
html body .pv-ficha div.summary form.cart,
html body .pv-ficha div.summary .pv-ficha__nodisp{order:7}
html body .pv-ficha div.summary .pv-ficha__despacho{order:8}
html body .pv-ficha div.summary .woocommerce-product-details__short-description{display:none}


/* =========================================================================
   FICHA — respaldo sin depender de la clase pv-ficha
   ========================================================================= */

html body.pv-producto div.product.pv-ficha{
  display:grid;grid-template-columns:minmax(0,420px) minmax(0,1fr);
  gap:38px;align-items:start;max-width:1100px;margin:0 auto}
html body.pv-producto div.product.pv-ficha .pv-ficha__galeria{margin:0}
html body.pv-producto div.product.pv-ficha div.summary{
  width:auto!important;float:none!important;margin:0!important;
  display:flex;flex-direction:column}
html body.pv-producto div.product.pv-ficha .woocommerce-tabs,
html body.pv-producto div.product.pv-ficha .related,
html body.pv-producto div.product.pv-ficha .upsells{grid-column:1 / -1}

/* Orden del resumen */
html body.pv-producto div.summary>*{order:5}
html body.pv-producto div.summary .pv-ficha__lab{order:1}
html body.pv-producto div.summary .product_title{order:2}
html body.pv-producto div.summary .pv-ficha__sellos{order:3}
html body.pv-producto div.summary p.price{order:4}
html body.pv-producto div.summary .pv-ficha__datos{order:6}
html body.pv-producto div.summary form.cart,
html body.pv-producto div.summary .pv-ficha__nodisp{order:7}
html body.pv-producto div.summary .pv-ficha__despacho{order:8}
html body.pv-producto div.summary .woocommerce-product-details__short-description{display:none}

/* Título y precio */
html body.pv-producto div.product.pv-ficha .product_title{
  font-size:27px!important;line-height:1.25!important;color:#1F1F1D!important;
  margin:0 0 10px!important;padding:0!important;text-align:left!important;
  text-transform:none!important}
html body.pv-producto div.product.pv-ficha p.price,
html body.pv-producto div.product.pv-ficha p.price span.woocommerce-Price-amount{
  color:var(--pv-verde-osc)!important;font-size:30px!important;font-weight:700!important;
  margin:0 0 16px!important}
html body.pv-producto div.product.pv-ficha p.price del{
  color:var(--pv-gris-claro)!important;font-size:18px!important;font-weight:400!important}
html body.pv-producto div.product.pv-ficha p.price ins{text-decoration:none}

/* Formulario de compra */
html body.pv-producto div.product.pv-ficha form.cart{
  display:flex;align-items:center;gap:12px;margin:0 0 18px}
html body.pv-producto div.product.pv-ficha form.cart .quantity input.qty{
  width:72px;height:50px;border:1px solid var(--pv-borde)!important;
  border-radius:8px!important;text-align:center;background:#fff!important}
html body #page-container.pv-x div.product form.cart button.button,
html body.pv-producto div.product.pv-ficha form.cart button.button,
html body.pv-producto div.product.pv-ficha form.cart .single_add_to_cart_button{
  background:var(--pv-verde)!important;color:#fff!important;
  border:0!important;border-radius:8px!important;
  padding:15px 34px!important;font-size:15px!important;font-weight:600!important;
  text-transform:none!important;letter-spacing:0!important}
html body.pv-producto div.product.pv-ficha form.cart button.button:hover{
  background:var(--pv-verde-osc)!important}
html body.pv-producto div.product.pv-ficha form.cart button.button::after{display:none!important;content:none!important}

/* Galería */
html body.pv-producto .pv-galeria__marco{background:#FAFAF7;max-width:330px}

/* Respiro antes del footer */
html body.pv-producto #main-content,
html body.woocommerce-page #main-content{padding-bottom:56px}
html body.pv-producto .related.products,
html body.woocommerce-page .related.products{margin-bottom:0!important}

@media (max-width:980px){
  html body.pv-producto div.product.pv-ficha{grid-template-columns:1fr;gap:24px}
  html body.pv-producto div.product.pv-ficha .product_title{font-size:22px!important}
  html body.pv-producto div.product.pv-ficha p.price,
  html body.pv-producto div.product.pv-ficha p.price span.woocommerce-Price-amount{font-size:25px!important}
}


/* =========================================================================
   SIN DESBORDE HORIZONTAL
   =========================================================================
   Un solo elemento más ancho que el viewport ensancha el lienzo y deja el
   resto de la página angosto a la izquierda. */

html body.pv-producto div.product.pv-ficha,
html body.pv-producto div.product.pv-ficha>*,
html body.woocommerce-page ul.products,
html body.pv-producto .related.products,
html body.pv-producto .upsells.products{
  max-width:100%!important;box-sizing:border-box!important;min-width:0!important}

html body.pv-producto div.product.pv-ficha{overflow-x:clip}
html body ul.products li.product img{max-width:100%;height:auto}

/* La ficha se adapta cuando no hay espacio para dos columnas */
@media (max-width:1100px){
  html body.pv-producto div.product.pv-ficha{grid-template-columns:minmax(0,340px) minmax(0,1fr);gap:26px}
}
@media (max-width:860px){
  html body.pv-producto div.product.pv-ficha{grid-template-columns:1fr!important;gap:22px}
  html body.pv-producto .pv-galeria{max-width:320px;margin:0 auto}
}




/* =========================================================================
   SALVAGUARDA: la grilla de la ficha nunca debe alcanzar al header
   =========================================================================
   Hay un contenedor con clase "product" más arriba en el árbol; si el
   selector no se acota, el header del Theme Builder termina como celda
   de la primera columna. */

html body .et-l--header,
html body .et-l--footer,
html body #main-header,
html body #main-footer{
  grid-column:1 / -1!important;width:100%!important;max-width:100%!important}

html body .et-l--header .et_pb_section,
html body .et-l--header .et_pb_row{max-width:100%!important}

/* =========================================================================
   FICHA: COLOCACIÓN EXPLÍCITA EN LA GRILLA
   =========================================================================
   WooCommerce y Divi insertan hijos extra dentro de div.product (avisos,
   contenedores vacíos, scripts). Con colocación automática esos hijos
   consumen celdas y descolocan galería, resumen y relacionados.
   Acá cada bloque tiene fila y columna asignadas. */

html body.pv-producto div.product.pv-ficha{
  display:grid!important;
  grid-template-columns:minmax(0,420px) minmax(0,1fr)!important;
  grid-auto-flow:row!important;
  align-items:start!important;
  column-gap:38px!important;row-gap:0!important}

html body.pv-producto div.product.pv-ficha>.pv-ficha__galeria{
  grid-column:1!important;grid-row:1!important}

html body.pv-producto div.product.pv-ficha>div.summary,
html body.pv-producto div.product.pv-ficha>.entry-summary{
  grid-column:2!important;grid-row:1!important}

/* Todo lo demás ocupa el ancho completo, bajo las dos columnas */
html body.pv-producto div.product.pv-ficha>.woocommerce-tabs,
html body.pv-producto div.product.pv-ficha>.related,
html body.pv-producto div.product.pv-ficha>.upsells,
html body.pv-producto div.product.pv-ficha>.woocommerce-product-gallery,
html body.pv-producto div.product.pv-ficha>.woocommerce-notices-wrapper{
  grid-column:1 / -1!important;width:100%!important}

html body.pv-producto div.product.pv-ficha>.related,
html body.pv-producto div.product.pv-ficha>.upsells{
  grid-row:auto!important;margin-top:44px!important}

/* Hijos sueltos que no reconocemos: nunca deben robar una celda */
html body.pv-producto div.product.pv-ficha>.woocommerce-notices-wrapper:empty,
html body.pv-producto div.product.pv-ficha>div:empty{display:none!important}

@media (max-width:900px){
  html body.pv-producto div.product.pv-ficha{
    grid-template-columns:1fr!important;row-gap:22px!important}
  html body.pv-producto div.product.pv-ficha>.pv-ficha__galeria,
  html body.pv-producto div.product.pv-ficha>div.summary{
    grid-column:1!important;grid-row:auto!important}
  html body.pv-producto .pv-galeria{max-width:320px;margin:0 auto}
}

/* =========================================================================
   FICHA: LA GRILLA VA EN EL ENVOLTORIO DE DIVI
   =========================================================================
   Divi mete la galería y el resumen dentro de un div.clearfix, así que
   div.product solo tiene dos hijos: ese envoltorio y los relacionados.
   La grilla de dos columnas tiene que aplicarse al envoltorio. */

html body.pv-producto div.product.pv-ficha{
  display:block!important;max-width:1100px;margin:0 auto}

html body.pv-producto div.product.pv-ficha>.clearfix,
html body.pv-producto div.product.pv-ficha>div:has(>div.summary),
html body.pv-producto div.product.pv-ficha>div:has(>.pv-ficha__galeria){
  display:grid!important;
  grid-template-columns:minmax(0,420px) minmax(0,1fr)!important;
  column-gap:38px!important;align-items:start!important;width:100%!important}

html body.pv-producto div.product.pv-ficha .pv-ficha__galeria{
  grid-column:1!important;grid-row:1!important;margin:0!important}

html body.pv-producto div.product.pv-ficha div.summary{
  grid-column:2!important;grid-row:1!important;
  width:auto!important;float:none!important;margin:0!important;
  display:flex!important;flex-direction:column!important}

/* Los relacionados van fuera del envoltorio, a ancho completo */
html body.pv-producto div.product.pv-ficha>.related,
html body.pv-producto div.product.pv-ficha>.upsells,
html body.pv-producto div.product.pv-ficha>.woocommerce-tabs{
  width:100%!important;max-width:100%!important;margin-top:44px!important;clear:both}

@media (max-width:900px){
  html body.pv-producto div.product.pv-ficha>.clearfix,
  html body.pv-producto div.product.pv-ficha>div:has(>div.summary),
  html body.pv-producto div.product.pv-ficha>div:has(>.pv-ficha__galeria){
    grid-template-columns:1fr!important;row-gap:22px!important}
  html body.pv-producto div.product.pv-ficha .pv-ficha__galeria,
  html body.pv-producto div.product.pv-ficha div.summary{
    grid-column:1!important;grid-row:auto!important}
}

/* =========================================================================
   IMAGEN MÁS GRANDE Y PESTAÑAS VISIBLES
   ========================================================================= */

/* Columna de galería más ancha y marco mayor */
html body.pv-producto div.product.pv-ficha>.clearfix,
html body.pv-producto div.product.pv-ficha>div:has(>div.summary),
html body.pv-producto div.product.pv-ficha>div:has(>.pv-ficha__galeria){
  grid-template-columns:minmax(0,520px) minmax(0,1fr)!important;column-gap:44px!important}

html body.pv-producto .pv-galeria{max-width:520px}
html body.pv-producto .pv-galeria__marco{max-width:460px;width:100%}
html body.pv-producto .pv-galeria__slide{padding:22px}

/* Pestañas: se muestran aunque haya una sola */
html body.pv-producto .woocommerce-tabs ul.tabs li:only-child{display:block!important}
html body.pv-producto .woocommerce-tabs{margin-top:44px}
html body.pv-producto .woocommerce-tabs ul.tabs{
  list-style:none;margin:0 0 0;padding:0;display:flex;gap:0;
  border-bottom:1px solid var(--pv-borde)}
html body.pv-producto .woocommerce-tabs ul.tabs::before,
html body.pv-producto .woocommerce-tabs ul.tabs::after{display:none!important}
html body.pv-producto .woocommerce-tabs ul.tabs li{
  background:none!important;border:0!important;border-radius:0!important;
  margin:0!important;padding:0!important;box-shadow:none!important}
html body.pv-producto .woocommerce-tabs ul.tabs li::before,
html body.pv-producto .woocommerce-tabs ul.tabs li::after{display:none!important}
html body.pv-producto .woocommerce-tabs ul.tabs li a{
  display:block;padding:12px 4px!important;margin-right:26px;
  font-size:15px!important;font-weight:600!important;color:var(--pv-gris)!important;
  text-decoration:none!important;border-bottom:2px solid transparent}
html body.pv-producto .woocommerce-tabs ul.tabs li.active a{
  color:var(--pv-verde-osc)!important;border-bottom-color:var(--pv-verde)}
html body.pv-producto .woocommerce-tabs .panel{
  border:0!important;padding:18px 0 0!important;margin:0!important;
  font-size:15px;line-height:1.65;color:var(--pv-gris);max-width:820px}
html body.pv-producto .woocommerce-tabs .panel>h2:first-child{display:none}
html body.pv-producto .pv-sin-desc{color:var(--pv-gris-claro)}
html body.pv-producto .pv-sin-desc a{color:var(--pv-azul);text-decoration:underline}

@media (max-width:900px){
  html body.pv-producto .pv-galeria,
  html body.pv-producto .pv-galeria__marco{max-width:360px;margin:0 auto}
}

/* =========================================================================
   "VER CARRITO" EN LA FICHA
   =========================================================================
   Al agregar se abre el panel lateral, así que el enlace sobra y además
   desalinea la fila del botón. En las tarjetas del catálogo sí se conserva. */

html body.pv-producto .pv-ficha form.cart .added_to_cart,
html body.pv-producto .pv-ficha div.summary .added_to_cart,
html body.pv-producto div.summary>.added_to_cart{display:none!important}

/* La fila del botón queda alineada arriba, sin estirarse */
html body.pv-producto div.product.pv-ficha form.cart{
  display:flex!important;align-items:center!important;gap:14px!important;
  flex-wrap:wrap;margin:0 0 18px!important}
html body.pv-producto div.product.pv-ficha form.cart .quantity{margin:0!important}
html body.pv-producto div.product.pv-ficha form.cart button.button{
  flex:0 0 auto!important;margin:0!important}

/* Confirmación breve tras agregar */
html body.pv-producto div.product.pv-ficha form.cart button.button.added::after{
  content:'  ✓';font-weight:700}

/* =========================================================================
   TARJETA UNIFICADA — misma altura en todos los contextos
   =========================================================================
   Carrusel, tienda, categoría y relacionados comparten estas medidas.
   Cada bloque tiene altura reservada, así las filas quedan alineadas
   aunque falte la imagen, el laboratorio o el precio rebajado. */

html body ul.products li.product,
html body .woocommerce ul.products li.product{
  display:flex!important;flex-direction:column!important;
  height:100%!important;min-height:0!important}

html body ul.products li.product .pv-card__link,
html body .woocommerce ul.products li.product .pv-card__link,
html body ul.products li.product>a:not(.button):not(.added_to_cart){
  flex:1 1 auto!important;display:flex!important;flex-direction:column!important;
  padding:16px 18px 0!important}

/* 1 · Imagen: cuadrada y de altura fija */
html body ul.products li.product .pv-card__media,
html body .woocommerce ul.products li.product .pv-card__media{
  aspect-ratio:1!important;height:auto!important;flex:0 0 auto!important;
  margin-bottom:12px!important}

/* 2 · Laboratorio: una línea reservada aunque venga vacío */
html body ul.products li.product .pv-card__lab,
html body .woocommerce ul.products li.product .pv-card__lab{
  display:block!important;min-height:1.35em!important;line-height:1.35!important;
  margin:0 0 5px!important;font-size:12.5px!important}
html body ul.products li.product .pv-card__lab--vacio{visibility:hidden}

/* 3 · Título: dos líneas siempre */
html body ul.products li.product h2,
html body ul.products li.product .pv-card__titulo,
html body ul.products li.product .woocommerce-loop-product__title,
html body .woocommerce ul.products li.product .pv-card__titulo{
  display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden!important;
  height:2.64em!important;min-height:2.64em!important;max-height:2.64em!important;
  line-height:1.32!important;font-size:15px!important;font-weight:700!important;
  margin:0 0 10px!important}

/* 4 · Convenio: espacio reservado */
html body ul.products li.product .pv-card__convenio{
  display:inline-block;margin:0 0 8px!important}

/* 5 · Precio: pegado al fondo del bloque de texto */
html body ul.products li.product .price,
html body ul.products li.product .pv-card__precio,
html body .woocommerce ul.products li.product .pv-card__precio{
  display:block!important;margin:auto 0 0!important;padding-top:8px!important;
  min-height:1.6em!important;line-height:1.6!important;font-size:20px!important}

/* 6 · Botón: altura fija idéntica en todas */
html body ul.products li.product a.button,
html body ul.products li.product button.button,
html body ul.products li.product .pv-card__boton,
html body ul.products li.product .pv-card__receta,
html body .woocommerce ul.products li.product a.button,
html body .woocommerce ul.products li.product .pv-card__boton,
html body .woocommerce ul.products li.product .pv-card__receta{
  flex:0 0 auto!important;height:42px!important;min-height:42px!important;
  padding:0 12px!important;margin:14px 18px 18px!important;
  width:calc(100% - 36px)!important;
  display:flex!important;align-items:center!important;justify-content:center!important}

/* En el carrusel, todas las tarjetas estiran a la altura de la más alta */
.pv-carrusel ul.products{align-items:stretch!important}
.pv-carrusel ul.products li.product{height:auto!important;align-self:stretch!important}

@media (max-width:600px){
  html body ul.products li.product .pv-card__link{padding:12px 13px 0!important}
  html body ul.products li.product h2,
  html body ul.products li.product .pv-card__titulo{
    font-size:13px!important;height:2.64em!important;
    min-height:2.64em!important;max-height:2.64em!important}
  html body ul.products li.product .price,
  html body ul.products li.product .pv-card__precio{font-size:16px!important}
  html body ul.products li.product a.button,
  html body ul.products li.product .pv-card__boton,
  html body ul.products li.product .pv-card__receta{
    height:38px!important;min-height:38px!important;
    margin:12px 13px 13px!important;width:calc(100% - 26px)!important}
}
