/* ===== Hero Slider ===== */
/* tamaño del área de imagen (ajústalo si quieres más/menos alto) */
:root{
  --card-media-h: clamp(180px, 24vw, 240px);
  --card-radius: 10px;
  --title-lh: 1.3;
  --title-lines: 3;
  --card-gap: 12px;            /* ← pequeño espacio entre imagen y nombre */
}
/* Evita que el navegador “infle” fuentes en móvil (portrait/landscape) */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 100%; /* asegura 16px base */
}
.hero-swiper{
  width: 100%;
  aspect-ratio: 21/9;     /* altura proporcional en vez de fija */
  height: auto;
  max-height: 560px;
  padding-bottom: 32px;
  overflow: hidden;
}
.hero-swiper .swiper-slide{
  display: flex;             /* centra el contenido */
  align-items: center;
  justify-content: center;
}
.hero-slide{
  display: block;
  width: 100%;
  height: 100%;
}
.hero-slide img{
  width: 100%;
  height: 100%;
  object-fit: contain !important; /* <- antes era cover */
  object-position: center center;
  display: block;
  background: transparent;        /* no recuadre extra */
  transition: transform .5s ease; /* mantiene tu hover si lo usas */
}

/* Flechas del hero (mismo look que productos) */
.hero-prev, .hero-next{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  transition: all .2s ease;
}
.hero-prev:hover, .hero-next:hover{ background: #aaa; color: #fff; }
.hero-prev::after, .hero-next::after{ font-size: 16px; font-weight: bold; }

/* Bullets hero */
.hero-pagination .swiper-pagination-bullet{
  width: 12px; height: 12px;
  background: #fff; opacity: .8; border: 1px solid #bbb;
}
.hero-pagination .swiper-pagination-bullet-active{
  background: #888; opacity: 1; transform: scale(1.2);
}

/* ===== Swiper genérico (productos) ===== */
.swiper{ width: 100%; overflow: hidden; padding-top: 4px; }
.swiper-wrapper{ overflow: visible; }

/* Botones productos */
.product-swiper .swiper-button-prev,
.product-swiper .swiper-button-next{
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  display: flex; align-items: center; justify-content: center;
  color: #aaa; font-size: 18px; transition: all .2s ease;
}
.product-swiper .swiper-button-prev:hover,
.product-swiper .swiper-button-next:hover{ background: #aaa; color: #fff; }
.product-swiper .swiper-button-prev::after,
.product-swiper .swiper-button-next::after{ font-size: 16px; font-weight: bold; }

/* Paginación productos */
.product-swiper .swiper-pagination{ bottom: -5px !important; }
.product-swiper .swiper-pagination-bullet{
  width: 12px; height: 12px;
  background: #ddd; border: 1px solid #bbb; opacity: 1;
  margin: 0 4px !important; transition: all .3s ease; border-radius: 50%;
}
.product-swiper .swiper-pagination-bullet-active{
  background: #888; border-color: #888; transform: scale(1.2);
}
.swiper-button-disabled{ display: none !important; }

/* Asegura que las slides no fuercen alturas raras */
.product-swiper .swiper-slide{ height: auto; }

.product-swiper{
  /* espacio extra debajo para alojar los bullets sin chocar con las cards de abajo */
  padding-bottom: 30px;
}

.product-swiper .swiper-pagination{
  /* colócalos dentro del padding inferior (en vez de “pegados” al borde) */
  bottom: 6px !important;   /* ajusta entre 0–10px a tu gusto */
}

/* ===== Cards de productos (uniformes y sencillas) ===== */
.producto-card{
  background: #fff;
  border-radius: var(--card-radius);
  border: 1px solid #e7e7e7;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
  padding-top: 10px;
  padding-left: 5px;
  padding-right: 5px;
  text-decoration: none; color: inherit;
  display: grid;
  grid-template-rows: var(--card-media-h) 2.6em 1.6em; /* imagen | título | precio */
  row-gap: 8px;
  height: calc(var(--card-media-h) + 2.6em + 1.6em + 30px); /* alto EXACTO e igual */
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: grid;
  grid-template-rows:
    var(--card-media-h)                          /* área de imagen fija  */
    calc(var(--title-lines) * var(--title-lh) * 1em) /* título (hasta 3 líneas) */
    1.6em;                                       /* precio */
  row-gap: var(--card-gap);
  height: calc(
    var(--card-media-h)
    + calc(var(--title-lines) * var(--title-lh) * 1em)
    + 1.6em + 30px
  );
}
.producto-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
  border-color: #bbb;
}

.producto-card img{
  max-width: 100%;
  max-height: 100%;
  width: auto;            /* no estires: mantiene proporción */
  height: auto;
  margin: auto;           /* centra H/V dentro de la celda de grid */
  display: block;
  object-fit: contain;    /* completa dentro del marco sin recortar */
  object-position: center;
  background: #f7f7f8;
  border-radius: 8px;
}

/* Título: máximo 2 líneas (sin prefijos), misma altura en todas */
.producto-card h2,
.featured-card h2 {
  font-size: 0.95rem !important;
  line-height: var(--title-lh);
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  text-align: center;
  overflow-wrap: anywhere;
}

.producto-card p.precio,
.featured-card p.precio {
  font-size: 0.95rem !important;
  font-weight: 600;
  color: #666;
  margin: 0;
  text-align: center;
  line-height: 1.6;
}

/* ===== Featured grid ===== */
.subcategoria-title{ padding-top: 10px; text-align: center; color: #555; }

.featured-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
  padding: 0 50px;
}
.featured-card{
  background: #fff; border-radius: 10px;
  border: 1px solid #f1c40fde; box-shadow: 0 4px 10px #f1c40fde;
  padding: 10px 10px 0; text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: grid;
  grid-template-rows: var(--card-media-h) 2.6em 1.6em; /* imagen | título | precio */
  row-gap: 8px;
  height: calc(var(--card-media-h) + 2.6em + 1.6em + 30px); /* alto EXACTO e igual */
  display: grid;
  grid-template-rows:
    var(--card-media-h)                          /* área de imagen fija  */
    calc(var(--title-lines) * var(--title-lh) * 1em) /* título (hasta 3 líneas) */
    1.6em;                                       /* precio */
  row-gap: var(--card-gap);
  height: calc(
    var(--card-media-h)
    + calc(var(--title-lines) * var(--title-lh) * 1em)
    + 1.6em + 30px
  );
}
.featured-card:hover{ transform: translateY(-5px); box-shadow: 0 6px 14px #f1c40f; border-color: #f1c40f; }
.featured-card img{
  max-width: 100%;
  max-height: 100%;
  width: auto;            /* no estires: mantiene proporción */
  height: auto;
  margin: auto;           /* centra H/V dentro de la celda de grid */
  display: block;
  object-fit: contain;    /* completa dentro del marco sin recortar */
  object-position: center;
  background: #f7f7f8;
  border-radius: 8px;
}

/* ===== Colors of the Month ===== */
.colors-month{ margin: 35px auto; text-align: center; }
.colors-title{ color: #555; margin-bottom: 20px; }
.colors-banner img{
  display: block; margin: 0 auto; height: auto; width: 100%; max-width: 900px;
  border: none; box-shadow: none;
}

/* ===== Responsive ===== */
@media (max-width: 1024px){
  .featured-grid{ grid-template-columns: repeat(3, 1fr); padding: 0 24px; }
  .hero-swiper{ aspect-ratio: 20/9; max-height: 460px; }
  :root{ --card-media-h: clamp(170px, 30vw, 220px); }
}

@media (max-width: 768px){
  .hero-swiper{ aspect-ratio: 16/9; max-height: 320px; }
  .featured-grid{ grid-template-columns: repeat(2, 1fr); padding: 0 24px; }
  .product-swiper{ padding-bottom: 36px; }
  .product-swiper .swiper-pagination{ bottom: 8px !important; }
}

@media (max-width: 640px){
  :root{ --card-media-h: clamp(150px, 42vw, 200px); }
}

@media (max-width: 420px){
  .hero-swiper{ aspect-ratio: 16/9; max-height: 240px; }
  .producto-card h2{ font-size: .94rem; }
  .producto-card p.precio{ font-size: .94rem; }
}
