/* =========================
   products-grid.css — Mascotas Ayacucho (producción)
   Woo archive (Tienda / Categorías / Tags) — Blocksy + WooCommerce
   Grid: 2 (móvil) / 3 (tablet) / 4 (desktop) / 5 (pantalla grande)
   Notas:
   - SOLO afecta: Tienda + categorías + tags (NO carrito/checkout)
   - Mantiene el estilo “agencia” (MA_SHOP_BRIDGE_V1) + reduce espacios (DENSITY)
   ========================= */


/* =========================
   MA_SHOP_BRIDGE_V1
   Tarjetas “agencia” para el loop real de Woo/Blocksy
   Estructura real: ul.products > li.product > figure + h2 + .price + .entry-meta + .ct-woo-card-actions
   ========================= */

body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product{
  position: relative;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  overflow: hidden;
  padding: 12px 12px 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column; /* botón al fondo */
  min-height: 100%;
}

body.post-type-archive-product ul.products li.product:hover,
body.tax-product_cat ul.products li.product:hover,
body.tax-product_tag ul.products li.product:hover{
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0,0,0,.10);
}

/* Media (imagen) */
body.post-type-archive-product ul.products li.product figure,
body.tax-product_cat ul.products li.product figure,
body.tax-product_tag ul.products li.product figure{
  margin: 0 0 10px;
}

body.post-type-archive-product ul.products li.product .ct-media-container,
body.tax-product_cat ul.products li.product .ct-media-container,
body.tax-product_tag ul.products li.product .ct-media-container{
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
}

body.post-type-archive-product ul.products li.product .ct-media-container img,
body.tax-product_cat ul.products li.product .ct-media-container img,
body.tax-product_tag ul.products li.product .ct-media-container img{
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3; /* estable (tu HTML trae aspect-ratio inline, esto refuerza) */
  object-fit: cover;
}

/* Título centrado y estable */
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
body.tax-product_tag ul.products li.product .woocommerce-loop-product__title{
  margin: 6px 4px 6px;
  text-align: center;
  font-weight: 800;
  line-height: 1.25;
  font-size: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title a,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title a,
body.tax-product_tag ul.products li.product .woocommerce-loop-product__title a{
  color: inherit;
  text-decoration: none;
}

/* Precio centrado y protagonista */
body.post-type-archive-product ul.products li.product .price,
body.tax-product_cat ul.products li.product .price,
body.tax-product_tag ul.products li.product .price{
  margin: 0 0 8px;
  text-align: center;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

body.post-type-archive-product ul.products li.product .price ins,
body.tax-product_cat ul.products li.product .price ins,
body.tax-product_tag ul.products li.product .price ins{
  text-decoration: none;
}

body.post-type-archive-product ul.products li.product .price,
body.post-type-archive-product ul.products li.product .price ins,
body.tax-product_cat ul.products li.product .price,
body.tax-product_cat ul.products li.product .price ins,
body.tax-product_tag ul.products li.product .price,
body.tax-product_tag ul.products li.product .price ins{
  color: #ff0000;
}

/* Categoría (entry-meta) centrada, compacta */
body.post-type-archive-product ul.products li.product .entry-meta,
body.tax-product_cat ul.products li.product .entry-meta,
body.tax-product_tag ul.products li.product .entry-meta{
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  text-align: center;
  font-size: .85rem;
  line-height: 1.2;
  opacity: .85;
}

body.post-type-archive-product ul.products li.product .entry-meta a,
body.tax-product_cat ul.products li.product .entry-meta a,
body.tax-product_tag ul.products li.product .entry-meta a{
  text-decoration: none;
}

/* Badge OFERTA (Woo) */
body.post-type-archive-product ul.products li.product .onsale,
body.tax-product_cat ul.products li.product .onsale,
body.tax-product_tag ul.products li.product .onsale{
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ff0000;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  z-index: 2;
}

/* Botón full-width al fondo */
body.post-type-archive-product ul.products li.product .ct-woo-card-actions,
body.tax-product_cat ul.products li.product .ct-woo-card-actions,
body.tax-product_tag ul.products li.product .ct-woo-card-actions{
  margin-top: auto;
}

body.post-type-archive-product ul.products li.product .ct-woo-card-actions .button,
body.tax-product_cat ul.products li.product .ct-woo-card-actions .button,
body.tax-product_tag ul.products li.product .ct-woo-card-actions .button{
  display: inline-block;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #0AC5CA, #067c80);
  box-shadow: 0 6px 12px rgba(0,0,0,.12);
  transition: filter .2s ease, transform .2s ease;
}

body.post-type-archive-product ul.products li.product .ct-woo-card-actions .button:hover,
body.tax-product_cat ul.products li.product .ct-woo-card-actions .button:hover,
body.tax-product_tag ul.products li.product .ct-woo-card-actions .button:hover{
  filter: brightness(1.06);
  transform: translateY(-1px);
}


/* =========================
   MA_GRID_COLUMNS_V1
   Control de columnas (solo tienda/categorías/tags)
   2 móvil / 3 tablet / 4 desktop / 5 grande
   ========================= */

body.post-type-archive-product ul.products,
body.tax-product_cat ul.products,
body.tax-product_tag ul.products{
  display: grid !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Móvil: 2 */
@media (max-width: 640px){
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products,
  body.tax-product_tag ul.products{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.post-type-archive-product ul.products li.product,
  body.tax-product_cat ul.products li.product,
  body.tax-product_tag ul.products li.product{
    width: auto !important;
    margin: 0 !important;
  }

  body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
  body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
  body.tax-product_tag ul.products li.product .woocommerce-loop-product__title{
    line-height: 1.2 !important;
  }
}

/* Tablet: 3 */
@media (min-width: 641px) and (max-width: 991px){
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products,
  body.tax-product_tag ul.products{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Desktop normal: 4 */
@media (min-width: 992px) and (max-width: 1399px){
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products,
  body.tax-product_tag ul.products{
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* Pantalla grande: 5 */
@media (min-width: 1400px){
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products,
  body.tax-product_tag ul.products{
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}


/* =========================
   MA_SHOP_DENSITY_V1
   Menos espacios / más producto visible
   ========================= */

/* 1) Contenedor más ancho (Blocksy) */
@media (min-width: 1024px){
  body.post-type-archive-product .ct-container,
  body.tax-product_cat .ct-container,
  body.tax-product_tag .ct-container{
    max-width: 1480px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}
@media (min-width: 1440px){
  body.post-type-archive-product .ct-container,
  body.tax-product_cat .ct-container,
  body.tax-product_tag .ct-container{
    max-width: 1680px !important;
  }
}

/* 2) Menos “aire” arriba del grid */
body.post-type-archive-product .woocommerce-result-count,
body.tax-product_cat .woocommerce-result-count,
body.tax-product_tag .woocommerce-result-count{
  margin: 0 0 8px !important;
}

body.post-type-archive-product .woocommerce-ordering,
body.tax-product_cat .woocommerce-ordering,
body.tax-product_tag .woocommerce-ordering{
  margin: 0 0 10px !important;
}

/* 3) Si Blocksy mete padding vertical grande en el área de contenido, lo reducimos un poco */
@media (min-width: 992px){
  body.post-type-archive-product .ct-container[ data-vertical-spacing ],
  body.tax-product_cat .ct-container[ data-vertical-spacing ],
  body.tax-product_tag .ct-container[ data-vertical-spacing ]{
    padding-top: 24px !important;
    padding-bottom: 24px !important;
  }
}

/* Accesibilidad: reduce motion */
@media (prefers-reduced-motion: reduce){
  body.post-type-archive-product ul.products li.product,
  body.tax-product_cat ul.products li.product,
  body.tax-product_tag ul.products li.product{
    transition: none !important;
  }
  body.post-type-archive-product ul.products li.product:hover,
  body.tax-product_cat ul.products li.product:hover,
  body.tax-product_tag ul.products li.product:hover{
    transform: none !important;
    box-shadow: 0 8px 20px rgba(0,0,0,.06) !important;
  }
}
/* =========================
   MA_SHOP_DENSITY_V2
   Menos “aire” dentro de cada tarjeta (más producto visible)
   ========================= */

/* 1) Compactar tarjeta (padding / márgenes internos) */
body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product{
  padding: 10px !important;              /* antes más grande */
  border-radius: 14px !important;
}

/* 2) Compactar imagen (reduce separación inferior) */
body.post-type-archive-product ul.products li.product figure,
body.tax-product_cat ul.products li.product figure,
body.tax-product_tag ul.products li.product figure{
  margin: 0 0 8px !important;
}

/* 3) Título más compacto (menos alto / menos aire) */
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
body.tax-product_tag ul.products li.product .woocommerce-loop-product__title{
  margin: 0 0 6px !important;
  font-size: 0.98rem !important;
  line-height: 1.15 !important;
}

/* 4) Precio pegado al título */
body.post-type-archive-product ul.products li.product .price,
body.tax-product_cat ul.products li.product .price,
body.tax-product_tag ul.products li.product .price{
  margin: 0 0 6px !important;
  line-height: 1.1 !important;
}

/* 5) Categoría (meta) más compacta */
body.post-type-archive-product ul.products li.product .entry-meta,
body.tax-product_cat ul.products li.product .entry-meta,
body.tax-product_tag ul.products li.product .entry-meta{
  margin: 0 0 8px !important;
  font-size: 11px !important;
}

/* 6) Botón más compacto y sin “aire” extra */
body.post-type-archive-product ul.products li.product .ct-woo-card-actions,
body.tax-product_cat ul.products li.product .ct-woo-card-actions,
body.tax-product_tag ul.products li.product .ct-woo-card-actions{
  margin-top: 0 !important;
}

body.post-type-archive-product ul.products li.product .button,
body.tax-product_cat ul.products li.product .button,
body.tax-product_tag ul.products li.product .button{
  padding: 10px 12px !important;
  border-radius: 12px !important;
}

/* 7) Móvil: todavía más compacto */
@media (max-width: 640px){
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products,
  body.tax-product_tag ul.products{
    gap: 10px !important;               /* antes 12/14 */
  }

  body.post-type-archive-product ul.products li.product,
  body.tax-product_cat ul.products li.product,
  body.tax-product_tag ul.products li.product{
    padding: 9px !important;
  }

  body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
  body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
  body.tax-product_tag ul.products li.product .woocommerce-loop-product__title{
    font-size: 0.95rem !important;
    margin-bottom: 5px !important;
  }

  body.post-type-archive-product ul.products li.product .entry-meta,
  body.tax-product_cat ul.products li.product .entry-meta,
  body.tax-product_tag ul.products li.product .entry-meta{
    margin-bottom: 7px !important;
  }
}

/* =========================================================
   MA_PRODUCTOS_NUEVOS_CARD_POLISH_V1 (2026-01-07)
   Limpieza visual SOLO en HOME (.productos-nuevos)
   ========================================================= */

/* 1) Título como texto (evita naranja/subrayado del link) */
.productos-nuevos .woocommerce-loop-product__title a{
  color: #111827 !important;
  text-decoration: none !important;
}
@media (hover:hover){
  .productos-nuevos .woocommerce-loop-product__title a:hover{
    text-decoration: underline !important;
  }
}

/* 2) Ocultar meta/categorías que ensucian */
.productos-nuevos .entry-meta{
  display: none !important;
}

/* 3) Imagen más “catálogo”: no recorta empaques */
.productos-nuevos a.woocommerce-LoopProduct-link img,
.productos-nuevos .ct-media-container img{
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  background: #fff !important;
}

/* 4) Precio limpio */
.productos-nuevos .price{
  color: #111827 !important;
  font-weight: 900 !important;
}

/* 5) Botón visible y full-width (si existe) */
.productos-nuevos .ct-woo-card-actions .button,
.productos-nuevos .button{
  width: calc(100% - 20px) !important;
  margin: 0 10px 12px !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

/* =========================================================
   MA_PRODUCTOS_NUEVOS_CARD_POLISH_V2 (2026-01-07)
   Micro-ajustes finales: imagen + título + CTA
   ========================================================= */

/* 1) Imagen un poco más protagonista */
.productos-nuevos a.woocommerce-LoopProduct-link img{
  max-height: 160px;          /* aumenta presencia */
}

/* 2) Título un poco más legible en móvil */
@media (max-width: 480px){
  .productos-nuevos .woocommerce-loop-product__title{
    font-size: 0.98rem !important;
    line-height: 1.2 !important;
  }
}

/* 3) Asegurar que el botón siempre “respire” */
.productos-nuevos li.product{
  padding-bottom: 14px !important;
}

/* 4) Botón más visible (consistente) */
.productos-nuevos .ct-woo-card-actions .button{
  background: linear-gradient(135deg, #e11d48, #be123c) !important;
}

/* =========================================================
   MA_PRODUCTOS_NUEVOS_GRID_FORCE_V3 (2026-01-08)
   Hard force final: 2/3/4 columnas en HOME (type-1)
   ========================================================= */
.productos-nuevos ul.products[data-products="type-1"]{
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

@media (min-width: 768px){
  .productos-nuevos ul.products[data-products="type-1"]{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (min-width: 1024px){
  .productos-nuevos ul.products[data-products="type-1"]{
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
}

.productos-nuevos ul.products[data-products="type-1"] > li.product{
  float: none !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

/* =========================================================
   MA_PRODUCTOS_NUEVOS_POLISH_V3 (2026-01-08)
   Limpieza visual HOME: título, meta, imágenes
   Alcance: SOLO .productos-nuevos
   ========================================================= */

/* 1) Títulos: sin subrayado / sin color raro */
.productos-nuevos .woocommerce-loop-product__title a,
.productos-nuevos a.woocommerce-LoopProduct-link{
  text-decoration: none !important;
  color: inherit !important;
}
.productos-nuevos .woocommerce-loop-product__title a:hover{
  text-decoration: none !important;
  opacity: .9;
}

/* 2) Quitar metadata/categorías debajo (ensucia) */
.productos-nuevos ul.entry-meta{
  display: none !important;
}

/* 3) Imágenes: que no se deformen (cuadradas pro) */
.productos-nuevos .ct-media-container{
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
}
.productos-nuevos .ct-media-container img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* =========================================================
   MA_HOME_PRODUCTS_CLEAN_V1 (2026-01-08)
   HOME > .productos-nuevos: más limpio, moderno, más ventas
   Alcance: SOLO Home sección productos nuevos
   ========================================================= */

.productos-nuevos ul.products li.product{
  overflow: hidden;
}

/* 1) Quitar “categorías” (entry-meta) que ensucian */
.productos-nuevos ul.products li.product .entry-meta{
  display: none !important;
}

/* 2) Título: sin subrayado, color texto (no color link azul/naranja) */
.productos-nuevos ul.products li.product .woocommerce-loop-product__title,
.productos-nuevos ul.products li.product .woocommerce-loop-product__title a{
  text-decoration: none !important;
  color: var(--theme-headings-color, #111827) !important;
}

.productos-nuevos ul.products li.product .woocommerce-loop-product__title a:hover{
  text-decoration: none !important;
  opacity: .92;
}

/* 3) Imagen: recorte premium + sin deformar */
.productos-nuevos ul.products li.product figure,
.productos-nuevos ul.products li.product .ct-media-container{
  border-radius: 14px;
  overflow: hidden;
}

.productos-nuevos ul.products li.product .ct-media-container img{
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
}

/* 4) Precio un poco más protagonista */
.productos-nuevos ul.products li.product .price{
  font-weight: 800 !important;
  font-size: 1.05rem;
  line-height: 1.15;
}

/* 5) Botón: full width (hereda tu estilo de tienda) */
.productos-nuevos ul.products li.product .ct-woo-card-actions .button{
  width: 100%;
}


/* =========================================================
   MA_HOME_PRODUCTS_IMG_FIX_V1 (2026-01-08)
   Forzar recorte cuadrado real en HOME > productos-nuevos
   ========================================================= */
.productos-nuevos ul.products li.product .ct-media-container{
  aspect-ratio: 1 / 1;
}
.productos-nuevos ul.products li.product .ct-media-container img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}


/* =========================================================
   MA_HOME_PRODUCTS_TITLE_CLAMP_V1 (2026-01-08)
   Título en 2 líneas (home > productos-nuevos)
   ========================================================= */
.productos-nuevos ul.products li.product .woocommerce-loop-product__title a{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

