/*
Theme Name: Astra Child (Anmile)
Theme URI: https://anmile.cl
Author: Anmile
Author URI: https://anmile.cl
Description: Child theme mínimo para Astra con identidad Anmile.
Template: astra
Text Domain: astra-child-anmile
Version: 1.1.0
*/

/* =========================
   PALETA + TIPOGRAFÍAS
   ========================= */
@import url('https://fonts.googleapis.com/css2?family=Petrona:wght@600;700&family=Rubik:wght@400;500;600&display=swap');

:root{
  --forest: #213F32;          /* títulos/acentos */
  --moss: #6B8B6E;            /* hover/acento suave */
  --sand: #D8C4A0;            /* bordes/divisores */
  --warm: #F8F7F4;            /* fondo cálido */
  --walnut: #3A2E25;          /* texto principal */
  --ink: #111827;             /* texto oscuro complementario */
  --terracotta: #C07A45;      /* CTA y estrellas */
  --terracotta-hover:#A96539;

  --card-radius: 14px;
  --shadow-sm: 0 4px 12px rgba(0,0,0,.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,.10);

  --title: 'Petrona', Georgia, serif;
  --body: 'Rubik', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Tipografía base del PDP */
.single-product{
  color: var(--walnut);
  font-family: var(--body);
}
.single-product h1,
.single-product h2,
.single-product h3{
  font-family: var(--title);
  color: var(--forest);
}

/* Precio y título del producto */
span.woocommerce-Price-amount.amount{ font-size:40px; font-weight:600; }
h1.product_title.entry-title{ font-size:40px; margin:0px !important; font-weight:700; }
p.price{ margin-bottom:0; }

/* Estrella Woo a terracota */
.woocommerce .star-rating,
.woocommerce .comment-form-rating .stars a,
.woocommerce .star-rating::before{ color: var(--terracotta); }

/* Ocultos menores */
a.woocommerce-review-link{ display:none; }
.single-product .single-product-category,
.single-product .product_meta .posted_in{ display:none; }

/* =========================
   GALERÍA PRODUCTO – MAQUETA
   ========================= */

/* 2 columnas: principal (izq) + thumbs (der) */
.single-product .woocommerce-product-gallery{
  display:grid;
  grid-template-columns: 1fr 144px;
  gap:16px;
  position:relative;
  max-width:1080px;
}

/* Viewport principal 1:1 */
.single-product .woocommerce-product-gallery .flex-viewport{
  grid-column:1/2;
  aspect-ratio:1/1;
  border-radius:18px;
  overflow:hidden;
  background: var(--warm);
  box-shadow: var(--shadow-md);
  height:auto !important;
}

/* Imagen principal */
.single-product .woocommerce-product-gallery__wrapper,
.single-product .woocommerce-product-gallery__image{ height:100%; }
.single-product .woocommerce-product-gallery__image a,
.single-product .woocommerce-product-gallery__image img{
  display:block; width:100%; height:100%;
  object-fit:cover; object-position:center;
  border-radius:0 !important;
}

/* Columna de miniaturas (derecha) – scroll vertical */
.single-product .woocommerce-product-gallery .flex-control-thumbs{
  grid-column:2/3;
  align-self:stretch;
  display:grid !important;
  grid-auto-rows:128px;
  row-gap:12px;
  padding:2px 15px 2px 2px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  height:435px !important;
  margin-top:5px !important;
  width:150px;
  margin-left:0 !important;
  padding-right:0 !important;
}

/* Oculta lupa de Woo */
a.woocommerce-product-gallery__trigger{ display:none; }

/* Cada item ocupa su cuadro */
.single-product .woocommerce-product-gallery .flex-control-thumbs li{
  list-style:none;
  width:128px !important;
  height:128px !important;
}

/* Miniaturas cuadradas grandes */
.single-product .woocommerce-product-gallery .flex-control-thumbs img{
  width:100% !important;
  height:100% !important;
  aspect-ratio:1/1;
  object-fit:cover; object-position:center;
  border-radius:12px !important;
  border:1px solid var(--sand);
  background:#fff;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs img:hover{
  transform: translateY(-2px);
}
.single-product .woocommerce-product-gallery .flex-control-thumbs img.flex-active{
  border-color: var(--forest);
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

/* Ganar especificidad contra reglas del tema que bloquean el scroll */
.woocommerce-js div.product div.images .woocommerce-product-gallery .flex-control-thumbs{
  overflow-y:auto !important;
  overflow-x:hidden !important;
  height:auto !important;
}

/* Woo a veces fija 25% por columna */
.woocommerce-js div.product div.woocommerce-product-gallery--columns-4 .flex-control-thumbs li{
  width:100% !important;
  padding-right: 10px;
}

/* Scrollbar sutil */
.single-product .woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar{ width:8px; }
.single-product .woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar-thumb{
  background:#cfd4da; border-radius:8px;
}

/* ===== Precio + estrellas justo debajo del título ===== */
.anmile-price-rating{
  display:flex;
  align-items:baseline;
  gap:12px;
  margin:8px 0px;
}

.anmile-price-rating .price{
  font-family: var(--body);
  font-weight:700;
  font-size:40px;
  color: var(--walnut);
  line-height:1;
}

/* ===== Estrellas promedio junto al precio (fix definitivo) ===== */
.anmile-rating{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-left:8px;
}

/* Contenedor de estrellas: igual que Woo (necesita ancho fijo) */
.anmile-rating .star-rating{
  display:inline-block !important;
  position:relative;
  width:5.4em;         /* clave para que el % de relleno funcione */
  height:1em;
  line-height:1;
  margin:0 !important;
  float:none !important;
  font-size:18px;      /* tamaño de las estrellas */
}

/* Base gris (5 estrellas) */
.anmile-rating .star-rating::before{
  content: "★★★★★";   /* eran 4 ★ en tu CSS: corrige a 5 */
  position:absolute; left:0; top:0;
  color: var(--sand);
  letter-spacing:2px;
}

/* Capa de relleno (ancho lo da Woo con style="width:%") */
.anmile-rating .star-rating > span{
  position:absolute; left:0; top:0; height:100%;
  display:block; overflow:hidden; white-space:nowrap;
  /* Oculta el texto "Valorado 4.67..." dentro del span */
  color: transparent; text-indent:-9999px;
}
.anmile-rating .star-rating > span::before{
  content: "★★★★★";
  position:absolute; left:0; top:0;
  color: var(--terracotta);
  letter-spacing:2px;
}

/* Nota y contador */
.anmile-rating__avg{
  display:inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--warm);
  border: 1px solid var(--sand);
  font-weight:700; color:var(--walnut);
}
.anmile-rating__count{ color:#6b7280; font-size:.95rem; }

.anmile-rating__no{
  color:#6b7280;
  font-size:.95rem;
}

/* Fallback: oculta precio/rating nativos si algún hook los reinyecta */
.single-product .summary .woocommerce-product-rating,
.single-product .summary > p.price { display: none !important; }


/* ====== Mobile ====== */
@media (max-width:991px){
  .single-product .woocommerce-product-gallery{ grid-template-columns:1fr; }

  /* Thumbs en fila con scroll horizontal real */
  .single-product .woocommerce-product-gallery .flex-control-thumbs{
    grid-column:1/-1;
    display:flex !important;
    flex-direction:row;
    gap:12px;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-x !important;
    pointer-events:auto !important;
    position:relative; z-index:2;
    height:150px !important;
    width:100% !important;
    margin-top:-25px !important;
    padding:2px 0 8px 2px !important;
  }

  .single-product .woocommerce-product-gallery .flex-control-thumbs li{
    flex:0 0 120px !important;
    width:120px !important;
    min-width:120px !important;
    height:120px !important;
    list-style:none;
    margin-right:0 !important;
  }

  .single-product .woocommerce-product-gallery .flex-control-thumbs img{
    width:100% !important;
    height:100% !important;
    aspect-ratio:1/1;
    object-fit:cover;
    border-radius:12px !important;
    border:1px solid var(--sand);
    box-shadow: var(--shadow-sm) !important;
    transition: transform .2s, border-color .2s, box-shadow .2s;
    margin-top:10px !important;
  }

  /* Si algún ancestro trae overflow hidden, lo anulamos en móvil */
  .single-product .woocommerce-product-gallery,
  .single-product .woocommerce-product-gallery .images{
    overflow:visible !important;
  }
}

/* =========================
   PDP LIMPIEZA Y BOTONES
   ========================= */
.single-product .summary .cart .quantity{ display:none !important; }

/* Botón principal Reservar coherente con plugins */
.single-product .summary form.cart .single_add_to_cart_button{
  width:100%; display:block;
  background: var(--terracotta) !important;
  border: 1px solid var(--terracotta) !important;
  color:#fff !important;
  border-radius:12px !important;
  font-weight:600 !important;
  letter-spacing:.2px;
  padding:12px 14px !important;
  font-family: var(--body);
  transition: background .15s ease, border-color .15s ease, transform .06s ease;
}
.single-product .summary form.cart .single_add_to_cart_button:hover{
  background: var(--terracotta-hover) !important;
  border-color: var(--terracotta-hover) !important;
}
.single-product .summary form.cart .single_add_to_cart_button:active{
  transform: translateY(1px);
}
.single-product .summary form.cart .single_add_to_cart_button:focus-visible{
  outline:2px solid var(--moss);
  outline-offset:2px;
}

/* =========================
   CONTENEDOR DE RESEÑAS
   ========================= */
.anmile-reviews{
  --col: 340px;
  --gap: 16px;
  clear:both;
  width:100%;
  margin-top:28px;
  display:grid;
  gap:24px;
}
@media (min-width:992px){
  .anmile-reviews{ grid-template-columns: var(--col) 1fr; }
}
.anmile-reviews .form-card{
  background:#fff; border:1px solid var(--sand); border-radius:var(--card-radius);
  box-shadow:var(--shadow-md); padding:16px; width:100%;
  max-width:var(--col); min-height:235px; height:auto; overflow:visible;
}
.anmile-reviews .form-card h3{
  margin:0 0 8px; font-weight:700; font-size:22px;
  font-family:var(--title); color:var(--forest); letter-spacing:.2px;
}
.anmile-reviews .rail{
  display:flex; gap:var(--gap); padding-bottom:8px;
  overflow-x:auto; overscroll-behavior-x:contain;
  scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch;
  width:100%; max-width:100%;
}

/* Stars SVG (no usan .star-rating) */
.anmile-svg-stars .anmile-svg-star svg { display:block }
.anmile-rating { display:inline-flex; align-items:center; gap:8px; margin-left:8px; }
.anmile-rating__avg{
  display:inline-block; padding:2px 8px; border-radius:999px;
  background: var(--warm); border:1px solid var(--sand);
  font-weight:700; color:var(--walnut);
}
.anmile-rating__count{ color:#6b7280; font-size:.95rem; }

span.woocommerce-Price-amount.amount{ font-size:30px; font-weight:600; }

.entry-content.clear {
    display: flex;
    justify-content: center;
}

/* ===== ANMILE – CART (Woo Blocks) ===== */
:root{
  --anmile-verde:#213F32;
  --anmile-nogal:#3A2E25;
  --anmile-terracota:#C07A45;
  --anmile-terracota-hover:#A96539;
  --anmile-arena:#D8C4A0;
  --anmile-blanco-calido:#F8F7F4;
}

/* ========== BASE (común a todo) ========== */
body.woocommerce-cart{
  background: var(--anmile-blanco-calido);
  color: var(--anmile-nogal);
  font-family:"Rubik",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
.woocommerce-cart h1,
.woocommerce-cart h2,
.wp-block-woocommerce-cart h2,
.wp-block-woocommerce-cart .wc-block-cart__totals-title{
  font-family:"Petrona", Georgia, serif;
  color: var(--anmile-verde);
  font-weight: 600;
  letter-spacing:.3px;
}

/* Contenedor principal SIEMPRE centrado */
.wp-block-woocommerce-cart .wc-block-components-sidebar-layout{
  max-width: 1160px;          /* ancho de contenido */
  margin: 32px auto;          /* centra */
  padding: 0 20px;            /* respiro lateral */
  gap: 40px;
  align-items: start;
}

/* Tarjeta de ítem */
.wp-block-woocommerce-cart .wc-block-cart-items{
  border-collapse: separate;
  border-spacing: 0 16px;
  width: 100%;
}
.wp-block-woocommerce-cart .wc-block-cart-items__row{
  background:#fff;
  border-radius:14px;
  box-shadow:0 6px 16px rgba(0,0,0,.06);
  overflow:hidden;
  padding: 14px;
}
.wp-block-woocommerce-cart .wc-block-cart-item__image img{
  width:140px;height:140px;object-fit:cover;border-radius:12px;
}

/* Encabezado de columnas */
.wp-block-woocommerce-cart .wc-block-cart-items__header th span{
  color: var(--anmile-verde);
  font-weight:600;
}

/* Ajuste de mrgenes de tabla (evita saltos raros) */
.wc-block-cart table.wc-block-cart-items,
.wc-block-cart table.wc-block-cart-items td,
.wc-block-cart table.wc-block-cart-items th{
  margin: 0;
}

/* Metadata */
.wp-block-woocommerce-cart .wc-block-components-product-metadata__description p{
  margin:.25rem 0 .5rem; line-height:1.5;
}
.wp-block-woocommerce-cart .wc-block-components-product-details__name{
  color: var(--anmile-verde); font-weight:600;
}
.wp-block-woocommerce-cart .wc-block-components-product-details__value{
  color: var(--anmile-nogal);
}

/* Título + montos */
.wp-block-woocommerce-cart a.wc-block-components-product-name{
  font-family:"Petrona", serif;
  color: var(--anmile-verde);
  font-weight:600;
  text-decoration:none;
}
.wp-block-woocommerce-cart a.wc-block-components-product-name:hover{ color: var(--anmile-terracota); }
.wp-block-woocommerce-cart .wc-block-formatted-money-amount{ color: var(--anmile-verde); font-weight:700; }

/* Botn eliminar */
.wp-block-woocommerce-cart .wc-block-cart-item__remove-link{
  background:transparent; border:none;
  color: var(--anmile-terracota); font-weight:600; cursor:pointer;
}
.wp-block-woocommerce-cart .wc-block-cart-item__remove-link:hover{ color: var(--anmile-terracota-hover); }

/* Sidebar (totales/cupones) */
.wp-block-woocommerce-cart .wc-block-cart__sidebar{
  background:#fff;
  border-radius:14px;
  box-shadow:0 6px 16px rgba(0,0,0,.06);
  padding:24px;
  height:fit-content;
  width:100%;
}
.wp-block-woocommerce-cart .wc-block-components-totals-item__label{ color: var(--anmile-nogal); }
.wp-block-woocommerce-cart .wc-block-components-totals-item__value{ font-weight:700; color: var(--anmile-verde); }

/* Acordeón cupones */
.wp-block-woocommerce-cart .wc-block-components-panel__button{
  color: var(--anmile-verde);
  border-bottom:1px solid var(--anmile-arena);
  padding:10px 0; font-weight:600;
}

/* CTA principal */
.wp-block-woocommerce-cart .wc-block-cart__submit-button.contained,
.wp-block-woocommerce-cart .wc-block-components-button.is-primary,
.wp-block-woocommerce-cart .wc-block-components-button.contained{
  background: var(--anmile-terracota) !important;
  color:#fff !important;
  border-radius:10px !important;
  font-family:"Rubik", sans-serif;
  font-weight:600;
  padding:14px 18px;
  width:100%;
  box-shadow: 0 6px 14px rgba(192,122,69,.25);
  transition: transform .15s ease, background .25s ease;
}
.wp-block-woocommerce-cart .wc-block-cart__submit-button.contained:hover{
  background: var(--anmile-terracota-hover) !important;
  transform: translateY(-2px);
}

/* Links generales */
.wp-block-woocommerce-cart a{ color: var(--anmile-verde); }
.wp-block-woocommerce-cart a:hover{ color: var(--anmile-terracota); }

/* Línea del título “Total del carrito” */
.wc-block-cart .wp-block-woocommerce-cart-order-summary-block{
  border-bottom: 1px solid hsla(0,0%,7%,.11);
  margin-bottom: 16px;
  padding-bottom: 10px;
}

/* ========== DESKTOP ONLY ========== */
@media (min-width: 1024px){
  /* 2 columnas y orden explícito */
  .wp-block-woocommerce-cart .wc-block-components-sidebar-layout{
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
    padding: 0px;
        margin: 0px;
  }
  .wp-block-woocommerce-cart .wc-block-cart__main{ order:1; min-width:0; }
  .wp-block-woocommerce-cart .wc-block-cart__sidebar{ 
    order:2; 
    position: sticky; 
    top: 24px; 
    margin-top: 0 !important; 
  }

  /* Evita padding raro heredado en el main */
  .wc-block-components-sidebar-layout .wc-block-components-main{
    padding-right: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
    width: 100% !important;
  }
}

/* ========== MOBILE ONLY ========== */
@media (max-width: 1023.98px){
  /* Apila y mantiene centrado el contenedor */
  .wp-block-woocommerce-cart .wc-block-components-sidebar-layout{
    display: block;
    margin:0px;
    padding:0px;
  }
  /* Tarjeta a ancho completo y media centrada */
  .wp-block-woocommerce-cart .wc-block-cart-items__row{
    display:block;
    padding:20px !important;
            height: 345px;
        margin-bottom: 20px;
  }
  .wp-block-woocommerce-cart .wc-block-cart-items {
    margin-bottom: 0px !important;
}
  .wp-block-woocommerce-cart .wc-block-cart-item__image{
    display:block; margin:0 auto 10px;
  }
  /* Sidebar sin sticky y con separación */
  .wp-block-woocommerce-cart .wc-block-cart__sidebar{
    position: static;
    margin-top: 20px !important;
  }
}

/* ====== RELACIONADOS – CARRUSEL ANMILE (forzado) ====== */

/* Título */
.single-product section.related.products > h2 {
  font-family: "Petrona", serif;
  color: var(--anmile-verde, #213F32);
  font-weight: 600;
  letter-spacing: .2px;
  margin: 8px 16px 18px;
}

/* UL como carrusel horizontal, sobreescribiendo Astra */
.single-product section.related.products ul.products {
  display: flex !important;            /* Astra suele poner grid */
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 18px !important;
  scroll-snap-type: x mandatory;
  padding: 0 16px 12px !important;
  margin: 0 !important;
  -webkit-overflow-scrolling: touch;
}

/* Tarjetas */
.single-product section.related.products ul.products li.product {
  flex: 0 0 260px !important;
  max-width: 260px !important;
  min-width: 240px !important;
  background: #fff;
  border: 1px solid var(--anmile-arena, #D8C4A0);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  padding: 14px;
  scroll-snap-align: start;
  transition: transform .25s ease, box-shadow .25s ease;
}

.single-product section.related.products ul.products li.product:hover{
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

/* Imagen */
.single-product section.related.products li.product .astra-shop-thumbnail-wrap img,
.single-product section.related.products li.product img {
  border-radius: 10px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 10px 0;
}

/* Categoría y título */
.single-product section.related.products li.product .ast-woo-product-category{
  color: var(--anmile-verde, #213F32);
  opacity: .7;
  font-size: 12px;
}

.single-product section.related.products li.product .woocommerce-loop-product__title{
  font-family: "Rubik", sans-serif;
  color: var(--anmile-nogal, #3A2E25);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  margin: 6px 0 4px;
}

/* Precio y estrellas */
.single-product section.related.products li.product .price{
  color: var(--anmile-terracota, #C07A45);
  font-weight: 600;
  margin-bottom: 8px;
}
.single-product section.related.products .star-rating,
.single-product section.related.products .star-rating::before{
  color: var(--anmile-verde, #213F32);
}

/* Botón */
.single-product section.related.products li.product .button,
.single-product section.related.products li.product a.button.add_to_cart_button {
  background: var(--anmile-terracota, #C07A45) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-family: "Rubik", sans-serif;
  font-weight: 500;
  padding: 8px 12px !important;
  line-height: 1.1;
  box-shadow: 0 2px 0 rgba(0,0,0,.06);
}
.single-product section.related.products li.product .button:hover{
  background: var(--anmile-terracota-hover, #A96539) !important;
}

/* Ocupa todo el ancho disponible y quita columnas fijas de Astra */
.single-product section.related.products .columns-4 {
  grid-template-columns: none !important;
}

/* ====== TIENDA – CARRUSELES IGUALES A “RELACIONADOS” ====== */
/* (aplican sólo en archivo de tienda y categorías) */
.post-type-archive-product .anmile-categoria-titulo,
.tax-product_cat .anmile-categoria-titulo{
  font-family:"Petrona", serif; font-weight:600; color:#213F32;
}

/* Coloca las flechas a la derecha, como en tu carrusel */
.anmile-categoria-head{ display:flex; align-items:center; gap:12px; padding:0 4%; }
.anmile-categoria-head .anmile-nav{ margin-left:auto; display:flex; gap:10px; }
.anmile-nav .anmile-prev,.anmile-nav .anmile-next{
  border:0; border-radius:12px; padding:10px 14px; cursor:pointer;
  background:#fff; color:#3A2E25; box-shadow:0 8px 24px rgba(0,0,0,.08);
}
.anmile-nav .anmile-prev:hover,.anmile-nav .anmile-next:hover{ background:#D8C4A0; }

/* Fuerza el UL de Woo a carrusel horizontal (Astra mete grid/columns) */
.post-type-archive-product .anmile-carrusel .woocommerce ul.products,
.post-type-archive-product .anmile-carrusel ul.products,
.tax-product_cat .anmile-carrusel .woocommerce ul.products,
.tax-product_cat .anmile-carrusel ul.products{
  display:flex !important;
  flex-wrap:nowrap !important;
  overflow-x:auto !important;
  gap:18px !important;
  scroll-snap-type:x mandatory;
  padding:0 4% 12px !important;
  margin:0 !important;
  -webkit-overflow-scrolling:touch;
}

/* Mata las columnas fijas de Astra (.columns-*) en este contexto */
.post-type-archive-product .anmile-carrusel .columns-4,
.tax-product_cat .anmile-carrusel .columns-4{
  grid-template-columns:none !important;
  display:block !important; /* prevenimos grid del tema */
}

/* Tarjetas: exactamente como “Productos relacionados” */
.post-type-archive-product .anmile-carrusel ul.products li.product,
.tax-product_cat .anmile-carrusel ul.products li.product{
  flex:0 0 260px !important;
  max-width:260px !important;
  min-width:240px !important;
  background:#fff;
  border:1px solid var(--anmile-arena, #D8C4A0);
  border-radius:14px;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  padding:14px;
  scroll-snap-align:start;
  transition:transform .25s ease, box-shadow .25s ease;
}
.post-type-archive-product .anmile-carrusel ul.products li.product:hover,
.tax-product_cat .anmile-carrusel ul.products li.product:hover{
  transform:translateY(-4px);
  box-shadow:0 10px 24px rgba(0,0,0,.08);
}

/* Imagen dentro de la tarjeta */
.post-type-archive-product .anmile-carrusel li.product img,
.tax-product_cat .anmile-carrusel li.product img{
  border-radius:10px; width:100%; height:auto; display:block; margin:0 0 10px 0;
}

/* Categoría, título, precio y estrellas */
.post-type-archive-product .anmile-carrusel li.product .ast-woo-product-category,
.tax-product_cat .anmile-carrusel li.product .ast-woo-product-category{
  color:#213F32; opacity:.7; font-size:12px;
}
.post-type-archive-product .anmile-carrusel li.product .woocommerce-loop-product__title,
.tax-product_cat .anmile-carrusel li.product .woocommerce-loop-product__title{
  font-family:"Rubik",sans-serif; color:#3A2E25; font-size:16px; font-weight:500; line-height:1.25; margin:6px 0 4px;
}
.post-type-archive-product .anmile-carrusel li.product .price,
.tax-product_cat .anmile-carrusel li.product .price{
  color:#C07A45; font-weight:600; margin-bottom:8px;
}
.post-type-archive-product .anmile-carrusel .star-rating,
.post-type-archive-product .anmile-carrusel .star-rating::before,
.tax-product_cat .anmile-carrusel .star-rating,
.tax-product_cat .anmile-carrusel .star-rating::before{
  color:#213F32;
}

/* Botón igual al de relacionados */
.post-type-archive-product .anmile-carrusel li.product .button,
.post-type-archive-product .anmile-carrusel li.product a.button.add_to_cart_button,
.tax-product_cat .anmile-carrusel li.product .button,
.tax-product_cat .anmile-carrusel li.product a.button.add_to_cart_button{
  background:#C07A45 !important; color:#fff !important;
  border-radius:8px !important; font-family:"Rubik",sans-serif; font-weight:500;
  padding:8px 12px !important; line-height:1.1; box-shadow:0 2px 0 rgba(0,0,0,.06);
}
.post-type-archive-product .anmile-carrusel li.product .button:hover,
.tax-product_cat .anmile-carrusel li.product .button:hover{
  background:#A96539 !important;
}

/* Scrollbar sutil del carrusel */
.post-type-archive-product .anmile-carrusel ul.products::-webkit-scrollbar,
.tax-product_cat .anmile-carrusel ul.products::-webkit-scrollbar{ height:8px; }
.post-type-archive-product .anmile-carrusel ul.products::-webkit-scrollbar-thumb,
.tax-product_cat .anmile-carrusel ul.products::-webkit-scrollbar-thumb{
  background:#D8C4A0; border-radius:4px;
}

/* Oculta paginación global de archivo */
.post-type-archive-product .woocommerce-pagination,
.tax-product_cat .woocommerce-pagination{ display:none !important; }

/* ===== Controles de carrusel – Desktop ===== */
.anmile-categoria-head{
  display:flex; align-items:center; gap:12px; padding:0 4%; margin-bottom:12px;
}
.anmile-rel-controls{
  margin-left:auto; display:flex; gap:10px;
}
.anmile-rel-btn{
  border:0; border-radius:12px; padding:10px 14px;
  background:#fff; color:#3A2E25; cursor:pointer;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
  transition: background .2s ease, transform .06s ease;
}
.anmile-rel-btn:hover{ background:#D8C4A0; }
.anmile-rel-btn:active{ transform: translateY(1px); }

/* ===== Ocultar flechas en mobile ===== */
@media (max-width: 991.98px){
  .anmile-rel-controls{ display:none !important; }
}

/* ===== Placeholders “Próximamente” ===== */
.post-type-archive-product .anmile-carrusel li.product.anmile-placeholder,
.tax-product_cat .anmile-carrusel li.product.anmile-placeholder{
  flex:0 0 260px !important;
  max-width:260px !important;
  min-width:240px !important;
  background:#fff;
  border:1px solid var(--anmile-arena, #D8C4A0);
  border-radius:14px;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  padding:14px;
  scroll-snap-align:start;
  position:relative;
  pointer-events:none;            /* no clickeable */
  opacity:.82;
  filter: grayscale(.15) contrast(.98);
}

.post-type-archive-product .anmile-carrusel li.product.anmile-placeholder .anmile-card img,
.tax-product_cat .anmile-carrusel li.product.anmile-placeholder .anmile-card img{
  border-radius:10px; width:100%; height:auto; display:block; margin:0 0 10px 0;
  filter: blur(0.5px);
}

.post-type-archive-product .anmile-carrusel li.product.anmile-placeholder .woocommerce-loop-product__title,
.tax-product_cat .anmile-carrusel li.product.anmile-placeholder .woocommerce-loop-product__title{
  font-family:"Rubik",sans-serif; color:#6b7280; font-weight:500; font-size:16px; margin:6px 0 4px;
}

.post-type-archive-product .anmile-carrusel li.product.anmile-placeholder .price,
.tax-product_cat .anmile-carrusel li.product.anmile-placeholder .price{
  color:#9aa1a9; font-weight:600; margin-bottom:8px;
}

/* Estrellas vacías” */
.post-type-archive-product .anmile-carrusel li.product.anmile-placeholder .star-rating,
.tax-product_cat .anmile-carrusel li.product.anmile-placeholder .star-rating{
  width:5.4em; height:1em; position:relative; line-height:1; font-size:16px; margin:0 0 6px;
}
.post-type-archive-product .anmile-carrusel li.product.anmile-placeholder .star-rating::before,
.tax-product_cat .anmile-carrusel li.product.anmile-placeholder .star-rating::before{
  content:"★★"; color:#d7dadd; position:absolute; left:0; top:0; letter-spacing:2px;
}
.post-type-archive-product .anmile-carrusel li.product.anmile-placeholder .star-rating > span::before,
.tax-product_cat .anmile-carrusel li.product.anmile-placeholder .star-rating > span::before{
  content:"★★"; color:#d7dadd; position:absolute; left:0; top:0; letter-spacing:2px;
}

/* Botón deshabilitado */
.post-type-archive-product .anmile-carrusel li.product.anmile-placeholder .button,
.tax-product_cat .anmile-carrusel li.product.anmile-placeholder .button{
  background:#e9e2d6 !important; color:#9a8f83 !important; border-radius:8px !important;
  cursor:not-allowed; box-shadow:none;
}

/* Evitar hover salto” en placeholders */
.post-type-archive-product .anmile-carrusel li.product.anmile-placeholder:hover,
.tax-product_cat .anmile-carrusel li.product.anmile-placeholder:hover{
  transform:none; box-shadow:0 6px 18px rgba(0,0,0,.06);
}

/* ===== Mobile: swipe suave y sin scrollbar ===== */
@media (max-width: 991.98px){
  /* Mobile: swipe suave sin atrapar el scroll vertical */
.anmile-carrusel ul.products{
  scroll-snap-type: none !important;      /* adis tironeo */
  touch-action: auto !important;          /* permite gestos verticales y horizontales */
  overscroll-behavior-x: contain;         /* no rebota a los costados */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;                   /* oculta barra en Firefox */
}
.anmile-carrusel ul.products::-webkit-scrollbar{ display:none; } /* oculta en WebKit */

  .anmile-carrusel ul.products::-webkit-scrollbar{ display: none; } /* WebKit */

  /* botones ocultos: ya lo tenas, lo dejamos explícito */
  .anmile-rel-controls{ display: none !important; }
}

/* ===== Tarjetas "Próximamente": borde verde en la imagen ===== */
.post-type-archive-product .anmile-carrusel li.product.anmile-placeholder .anmile-card img,
.tax-product_cat .anmile-carrusel li.product.anmile-placeholder .anmile-card img{
  border: 1px solid var(--anmile-verde, #213F32);
  border-radius: 10px;
  /* puedes mantener un leve blur si quieres, o quitarlo */
  filter: blur(0.4px);
}


/* ===== Tarjeta fantasma: efecto OFF en TODA la card ===== */
.post-type-archive-product .anmile-carrusel li.product.anmile-placeholder,
.tax-product_cat .anmile-carrusel li.product.anmile-placeholder{
  position: relative;            /* habilita overlay */
  pointer-events: none;          /* no clickeable */
  transform: none !important;    /* sin hover lift */
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

/* Quitamos blur directo en la imagen para no duplicar el efecto */
.post-type-archive-product .anmile-carrusel li.product.anmile-placeholder .anmile-card img,
.tax-product_cat .anmile-carrusel li.product.anmile-placeholder .anmile-card img{
  border: 2px solid var(--anmile-verde, #213F32);
  border-radius: 10px;
  filter: none !important;       /* < antes tenía blur */
}

/* Overlay “OFF más sutil */
.post-type-archive-product .anmile-carrusel li.product.anmile-placeholder::after,
.tax-product_cat .anmile-carrusel li.product.anmile-placeholder::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:14px;
  background: rgba(255,255,255,.42);         /* un poco ms transparente */
  backdrop-filter: blur(0.3px) saturate(96%); /* blur MUY leve */
  -webkit-backdrop-filter: blur(0.3px) saturate(70%);
}


/* Fallback extra: si el navegador no soporta backdrop-filter,
   al menos baja contraste/opacity de todo el contenido */
@supports not ((backdrop-filter: blur(1px))) {
  .post-type-archive-product .anmile-carrusel li.product.anmile-placeholder,
  .tax-product_cat .anmile-carrusel li.product.anmile-placeholder{
    opacity: .82;
    filter: grayscale(.12) contrast(.96) saturate(.95);
  }
}

/* ===== Ocultar barra de scroll en desktop ===== */
.anmile-carrusel ul.products {
  /* sigue siendo desplazable con flechas, pero sin mostrar la barra */
  scrollbar-width: none !important;       /* Firefox */
  -ms-overflow-style: none !important;    /* IE/Edge */
}
.anmile-carrusel ul.products::-webkit-scrollbar {
  display: none !important;               /* Chrome/Safari */
}

