/* Tienda y ficha de producto sin Elementor — vista previa. Ver tme-woo.php
   Paleta y proporciones tomadas de haakaa.co.nz. */

:root{
  --w-verde:#5a8f4f;
  --w-boton:#62af32;
  --w-verde-osc:#004813;
  --w-card:#d9ebc5;
  --w-card-hover:#cfe6b6;
  --w-tinta:#231f20;
  --w-crema:#faf6ef;
  --w-linea:#e4ded2;
}

.tme-previa-aviso{background:#231f20;color:#fff;text-align:center;font-size:.82rem;
  padding:7px 16px;position:relative;z-index:99}
.tme-previa-aviso a{color:#d9ebc5;margin-left:12px;text-decoration:underline}

.woocommerce-page .site-content,
.single-product .site-content{background:var(--w-crema)}
.woocommerce-page .ast-container,
.single-product .ast-container{max-width:1240px;margin-inline:auto;padding-inline:24px}

/* ── Cabecera del archivo ────────────────────────────────────────────────── */
.woocommerce-products-header{padding:38px 0 6px}
.woocommerce-products-header__title,
.woocommerce-page h1.entry-title{font-size:clamp(1.9rem,3.4vw,2.7rem);color:var(--w-verde);margin:0 0 8px}
.woocommerce-page .term-description p{max-width:70ch;color:#5d574c}
.woocommerce-result-count{color:#6f6a60;font-size:.9rem;margin:0}
.woocommerce-ordering select{border:1px solid var(--w-linea);background:#fff;padding:9px 12px;
  font-size:.9rem;border-radius:3px;color:var(--w-tinta)}

/* ── Grilla de productos ─────────────────────────────────────────────────── */
.woocommerce ul.products{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
  gap:16px;margin:26px 0 0;padding:0;list-style:none}
.woocommerce ul.products::before,.woocommerce ul.products::after{display:none}
.woocommerce ul.products li.product{width:auto!important;margin:0!important;float:none!important;
  background:var(--w-card);padding:14px 14px 16px;display:flex;flex-direction:column;
  text-align:left;transition:background .18s;position:relative}
.woocommerce ul.products li.product:hover{background:var(--w-card-hover)}

.woocommerce ul.products li.product a.woocommerce-LoopProduct-link{display:block;
  text-decoration:none;color:var(--w-tinta)}
.woocommerce ul.products li.product img{width:100%;height:auto;aspect-ratio:1;object-fit:contain;
  margin:0 0 12px;display:block;border-radius:0;box-shadow:none}
.woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:.86rem;
  font-weight:600;line-height:1.32;color:var(--w-tinta);padding:0;margin:0 0 6px;min-height:2.6em}
.woocommerce ul.products li.product .price{color:var(--w-tinta);font-weight:700;font-size:.92rem;
  margin:0 0 4px;display:block}
.woocommerce ul.products li.product .price del{opacity:.5;font-weight:400;margin-right:6px}
.woocommerce ul.products li.product .price ins{text-decoration:none}
.woocommerce ul.products li.product .star-rating{font-size:.74rem;margin:2px 0 6px;color:var(--w-verde)}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart{margin-top:auto;display:block;text-align:center;
  background:var(--w-boton);color:#fff;font-weight:700;font-size:.82rem;padding:11px 10px;
  border-radius:4px;text-decoration:none;line-height:1.3;transition:background .18s}
.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .added_to_cart:hover{background:var(--w-verde-osc);color:#fff}
.woocommerce ul.products li.product .added_to_cart{margin-top:8px;background:0;color:var(--w-verde-osc);
  border:1px solid var(--w-verde-osc);padding:7px 10px}

.woocommerce span.onsale,.woocommerce ul.products li.product .onsale{position:absolute;top:12px;
  left:12px;right:auto;background:var(--w-verde);color:#fff;font-size:.72rem;font-weight:600;
  padding:4px 12px;border-radius:20px;margin:0;min-height:0;min-width:0;line-height:1.5}
.woocommerce ul.products li.product.outofstock::after{content:"Agotado";position:absolute;top:12px;
  left:12px;background:#6f6a60;color:#fff;font-size:.72rem;font-weight:600;padding:4px 12px;
  border-radius:20px}

.woocommerce nav.woocommerce-pagination{margin:38px 0 8px}
.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:1px solid var(--w-linea);background:#fff;
  padding:9px 15px;border-radius:3px;color:var(--w-tinta)}
.woocommerce nav.woocommerce-pagination ul li span.current{background:var(--w-verde);color:#fff;
  border-color:var(--w-verde)}

/* ── Ficha de producto ───────────────────────────────────────────────────── */
.single-product div.product{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);
  gap:52px;align-items:start;padding-top:34px}
@media(max-width:900px){.single-product div.product{grid-template-columns:1fr;gap:26px}}

.single-product div.product .woocommerce-product-gallery{width:auto!important;float:none!important;
  margin:0;background:var(--w-card)}
.single-product div.product .woocommerce-product-gallery__image img{width:100%;height:auto;display:block}
.single-product .flex-control-thumbs{display:flex;gap:8px;margin:10px 0 0;padding:0;list-style:none}
.single-product .flex-control-thumbs li{width:76px}
.single-product .flex-control-thumbs img{border:1px solid transparent;background:var(--w-card)}
.single-product .flex-control-thumbs img.flex-active{border-color:var(--w-verde)}

.single-product div.product .summary{width:auto!important;float:none!important;margin:0}
.single-product div.product .summary .product_title{font-size:clamp(1.5rem,2.8vw,2.15rem);
  line-height:1.18;margin:0 0 14px;color:var(--w-tinta)}
.single-product div.product .summary p.price,
.single-product div.product .summary span.price{font-size:1.5rem;font-weight:700;
  color:var(--w-tinta);margin:0 0 18px;display:block}
.single-product div.product .summary p.price del{opacity:.5;font-weight:400;font-size:1.1rem}
.single-product .woocommerce-product-details__short-description{color:#4a453d;line-height:1.68;
  margin-bottom:22px;font-size:.97rem}
.single-product .woocommerce-product-details__short-description p{max-width:64ch}

.single-product form.cart{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:0 0 22px}
.single-product form.cart .quantity input[type=number]{border:1px solid var(--w-linea);background:#fff;
  padding:12px 10px;width:84px;font-size:1rem;border-radius:4px;color:var(--w-tinta)}
.single-product form.cart button.single_add_to_cart_button{background:var(--w-tinta);color:#fff;
  border:0;font-weight:700;font-size:.98rem;padding:14px 34px;border-radius:4px;cursor:pointer;
  transition:background .18s;flex:1 1 auto;min-width:200px}
.single-product form.cart button.single_add_to_cart_button:hover{background:var(--w-verde-osc)}
.single-product form.cart button.single_add_to_cart_button.disabled{opacity:.45;cursor:not-allowed}

.single-product form.variations_form table.variations{width:100%;margin:0 0 18px}
.single-product table.variations td,.single-product table.variations th{padding:6px 0;border:0}
.single-product table.variations label{font-weight:600;font-size:.92rem}
.single-product table.variations select{border:1px solid var(--w-linea);background:#fff;padding:11px 12px;
  width:100%;border-radius:4px;font-size:.95rem;color:var(--w-tinta)}
.single-product .woocommerce-variation-price{margin-bottom:14px}

.single-product .product_meta{border-top:1px solid var(--w-linea);padding-top:18px;font-size:.86rem;
  color:#6f6a60}
.single-product .product_meta a{color:var(--w-verde)}
.single-product .stock.in-stock{color:var(--w-verde);font-weight:600}
.single-product .stock.out-of-stock{color:#a33}

/* Pestañas de descripción */
.single-product .woocommerce-tabs{grid-column:1/-1;margin-top:56px;border-top:1px solid var(--w-linea);
  padding-top:34px}
.single-product .woocommerce-tabs ul.tabs{padding:0;margin:0 0 24px;display:flex;gap:8px;
  flex-wrap:wrap;border:0}
.single-product .woocommerce-tabs ul.tabs::before{display:none}
.single-product .woocommerce-tabs ul.tabs li{background:0;border:0;border-radius:0;margin:0;padding:0}
.single-product .woocommerce-tabs ul.tabs li::before,
.single-product .woocommerce-tabs ul.tabs li::after{display:none}
.single-product .woocommerce-tabs ul.tabs li a{padding:11px 20px;border:1px solid var(--w-linea);
  border-radius:4px;background:#fff;color:var(--w-tinta);font-weight:600;font-size:.92rem}
.single-product .woocommerce-tabs ul.tabs li.active a{background:var(--w-verde);color:#fff;
  border-color:var(--w-verde)}
.single-product .woocommerce-Tabs-panel h2{font-size:1.3rem;color:var(--w-verde);margin:0 0 14px}
.single-product .woocommerce-Tabs-panel p,
.single-product .woocommerce-Tabs-panel li{line-height:1.7;max-width:74ch}

.single-product .related.products,
.single-product .upsells.products{grid-column:1/-1;margin-top:56px;border-top:1px solid var(--w-linea);
  padding-top:38px}
.single-product .related.products>h2,
.single-product .upsells.products>h2{font-size:1.55rem;color:var(--w-verde);margin:0 0 4px}

/* Avisos de WooCommerce con la paleta de la marca */
.woocommerce-message,.woocommerce-info{border-top-color:var(--w-verde);background:#fff}
.woocommerce-message::before,.woocommerce-info::before{color:var(--w-verde)}
.woocommerce-message .button,.woocommerce-info .button{background:var(--w-tinta);color:#fff;
  border-radius:4px;font-weight:600}
.woocommerce-error{border-top-color:#a33;background:#fff}

@media(max-width:560px){
  .woocommerce ul.products{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
  .woocommerce ul.products li.product{padding:10px 10px 12px}
}

/* ── Acordeones de la ficha, como en haakaa.co.nz ────────────────────────── */
.tme-acordeones{margin-top:26px;border-top:1px solid var(--w-linea)}
.tme-ac{border-bottom:1px solid var(--w-linea)}
.tme-ac>summary{cursor:pointer;list-style:none;padding:17px 2px;font-weight:600;font-size:.98rem;
  color:var(--w-tinta);display:flex;justify-content:space-between;align-items:center;gap:14px}
.tme-ac>summary::-webkit-details-marker{display:none}
.tme-ac>summary::after{content:"";width:9px;height:9px;border-right:2px solid #8a8377;
  border-bottom:2px solid #8a8377;transform:rotate(45deg) translateY(-2px);flex:0 0 auto;
  transition:transform .2s}
.tme-ac[open]>summary::after{transform:rotate(-135deg) translateY(-2px)}
.tme-ac>summary:hover{color:var(--w-verde)}
.tme-ac-cnt{padding:0 2px 20px;font-size:.94rem;line-height:1.68;color:#4a453d}
.tme-ac-cnt>*:first-child{margin-top:0}
.tme-ac-cnt h2,.tme-ac-cnt h3{font-size:1rem;color:var(--w-tinta);margin:18px 0 8px}
.tme-ac-cnt ul,.tme-ac-cnt ol{padding-left:20px;margin:10px 0}
.tme-ac-cnt li{margin-bottom:6px}
.tme-ac-cnt table{width:100%;border-collapse:collapse;font-size:.9rem}
.tme-ac-cnt th,.tme-ac-cnt td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--w-linea)}
/* los enlaces de anclaje que encabezaban las descripciones ya no llevan a ningún sitio */
.tme-ac-cnt p>a[href^="#"]{display:none}

/* ── Fila de categorías en horizontal ────────────────────────────────────── */
.tme-cats{display:flex;flex-wrap:wrap;gap:8px;margin:22px 0 4px}
.tme-cats a{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--w-linea);
  background:#fff;color:var(--w-tinta);text-decoration:none;font-size:.87rem;font-weight:600;
  padding:8px 15px;border-radius:22px;transition:background .16s,border-color .16s}
.tme-cats a:hover{border-color:var(--w-verde);color:var(--w-verde)}
.tme-cats a.on{background:var(--w-verde);border-color:var(--w-verde);color:#fff}
.tme-cats a span{font-weight:400;opacity:.65;font-size:.8rem}
.tme-cats a.on span{opacity:.85}

/* la barra lateral se retiró: el contenido ocupa todo el ancho */
.woocommerce-page .ast-container>#primary,
.single-product .ast-container>#primary{width:100%;max-width:none;padding:0}
.woocommerce-page #secondary,.single-product #secondary{display:none}

/* Cuatro por fila en escritorio, como la matriz */
@media(min-width:1000px){
  .woocommerce ul.products{grid-template-columns:repeat(4,1fr)}
}
/* El botón de filtro de Astra abría la barra lateral, que ya no existe */
.astra-shop-filter-button,.astra-off-canvas-sidebar-wrapper{display:none!important}
/* Vista rápida de ProductX: la matriz no la usa y aquí queda huérfana */
.woocommerce ul.products .wopb-quick-view-wrapper,
.woocommerce ul.products .wopb-quickview-btn{display:none}


/* ── Ajustes finos de la ficha en grilla, comparando con la matriz ──────── */
/* La categoría encima del nombre es ruido: la matriz no la muestra */
.woocommerce ul.products li.product .ast-woo-product-category,
.woocommerce ul.products li.product .ast-shop-product-out-of-stock{display:none}
/* Nombre a dos líneas fijas para que los botones queden alineados en la fila */
.woocommerce ul.products li.product .woocommerce-loop-product__title{min-height:2.7em}
.woocommerce ul.products li.product .price{min-height:1.5em}
.single-product form.cart button.single_add_to_cart_button{background:var(--w-boton)}
.single-product form.cart button.single_add_to_cart_button:hover{background:var(--w-verde-osc)}

/* Bloque de premios de la ficha */
.tme-premios{margin:26px 0 6px}
.tme-premios h3{font-size:.82rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;
  color:var(--w-verde);margin:0 0 12px}
.tme-premios-fila{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
/* El tema fuerza width:100% a las imágenes dentro de la ficha; hay que ganarle */
.woocommerce div.product .tme-premios-fila img,
.tme-premios-fila img{height:58px!important;width:auto!important;max-width:none!important;
  display:block;margin:0;border-radius:0;box-shadow:none;object-fit:contain}
@media(max-width:600px){
  .woocommerce div.product .tme-premios-fila img,
  .tme-premios-fila img{height:48px!important}
  .tme-premios-fila{gap:10px}
}
