/* =========================================================
   CARDS DE TIENDAS DESTACADAS
   Imagen 70% / contenido 30%
   ========================================================= */

#destacadas {
  /*
   * AQUÍ CAMBIAS EL TAMAÑO DE LA CARD EN COMPUTADOR
   */
  --featured-card-width: 320px;
  --featured-card-height: 440px;

  /*
   * DISTRIBUCIÓN INTERNA
   * Cambia estos valores si después quieres otra proporción.
   */
  --featured-image-size: 75%;
  --featured-body-size: 25%;
}

/* =========================================================
   ESTRUCTURA PRINCIPAL
   ========================================================= */

#destacadas #featuredTrackPhp .featuredTile {
  position: relative;

  /*
   * Ancho de la tarjeta
   */
  flex: 0 0 var(--featured-card-width) !important;
  width: var(--featured-card-width) !important;
  min-width: var(--featured-card-width) !important;
  max-width: var(--featured-card-width) !important;

  /*
   * Alto de la tarjeta
   */
  height: var(--featured-card-height) !important;
  min-height: var(--featured-card-height) !important;
  max-height: var(--featured-card-height) !important;

  /*
   * Primera fila: imagen 70%
   * Segunda fila: contenido 30%
   */
  display: grid !important;
  grid-template-rows:
    var(--featured-image-size)
    var(--featured-body-size) !important;

  overflow: hidden !important;
  isolation: isolate;
  scroll-snap-align: start;

  background: #ffffff !important;
  background-image: none !important;

  border: 2px solid rgba(215, 167, 104, 0.7) !important;
  border-radius: 24px !important;

  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.32) !important;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

/* Efecto al pasar el mouse */
#destacadas #featuredTrackPhp .featuredTile:hover {
  transform: translateY(-6px);

  box-shadow:
    0 22px 45px rgba(0, 0, 0, 0.4) !important;
}

/* Elimina capas y degradados del diseño anterior */
#destacadas #featuredTrackPhp .featuredTile::before,
#destacadas #featuredTrackPhp .featuredTile::after {
  display: none !important;
  content: none !important;
  background: none !important;
  box-shadow: none !important;
}

/* =========================================================
   IMAGEN — 70% DE LA TARJETA
   ========================================================= */

#destacadas #featuredTrackPhp .featuredTile__imageLink {
  position: relative;

  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;

  overflow: hidden;
  background: #f2ede7;
}

/* Imagen propiamente tal */
#destacadas #featuredTrackPhp .featuredTile__image {
  display: block;

  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;

  object-fit: cover;
  object-position: center;

  transition: transform 0.4s ease;
}

/* Acercamiento suave al pasar el mouse */
#destacadas
  #featuredTrackPhp
  .featuredTile:hover
  .featuredTile__image {
  transform: scale(1.04);
}

/* Cuando la tienda no tiene imagen */
#destacadas
  #featuredTrackPhp
  .featuredTile__image--empty {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100% !important;
  height: 100% !important;
  padding: 20px;

  color: #8a6b31;
  font-family: "Libre Baskerville", serif;
  font-size: 18px;
  line-height: 1.4;
  text-align: center;

  background: linear-gradient(
    135deg,
    #f8f3eb,
    #ead9bb
  );
}

/* =========================================================
   CUERPO — 30% DE LA TARJETA
   ========================================================= */

#destacadas #featuredTrackPhp .featuredTile__body {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;
  min-height: 0;

  /*
   * Padding reducido para que todo quepa dentro del 30%.
   */
  padding: 8px 14px 10px;
  gap: 5px;

  color: #ffffff;
  text-align: center;
  background: #5b1028;
}

/* =========================================================
   CATEGORÍA
   ========================================================= */

#destacadas #featuredTrackPhp .featuredTile__badge {
  position: static;

  display: block;
  margin: 0;
  padding: 0;

  color: #c9a14a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.3px;
  line-height: 1.2;
  text-transform: uppercase;

  background: transparent;
  border: 0;
}

/* =========================================================
   NOMBRE DE LA TIENDA
   ========================================================= */

#destacadas #featuredTrackPhp .featuredTile__title {
  margin: 0 0 3px;

  color: #ffffff;
  font-family: "Libre Baskerville", serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

#destacadas #featuredTrackPhp .featuredTile__title a {
  color: inherit;
  text-decoration: none;
}

#destacadas #featuredTrackPhp .featuredTile__title a:hover {
  color: #e2bd69;
}

/* =========================================================
   BOTONES SOCIALES
   ========================================================= */

#destacadas #featuredTrackPhp .featuredTile__social {
  position: static;
  z-index: auto;

  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 7px;

  width: 100%;
  margin: 0 0 3px;
}

/* Botón social circular */
#destacadas
  #featuredTrackPhp
  .featuredTile__social
  .socialIcon {
  position: static;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 7px;

  border-radius: 50%;
  text-decoration: none;

  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

#destacadas
  #featuredTrackPhp
  .featuredTile__social
  .socialIcon:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

/* Ícono SVG */
#destacadas
  #featuredTrackPhp
  .featuredTile__social
  .socialIcon
  svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: currentColor;
}

/* =========================================================
   BOTÓN VER TIENDA
   ========================================================= */

#destacadas #featuredTrackPhp .featuredTile__storeBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 132px;
  min-height: 32px;
  margin: 0;
  padding: 7px 17px;

  color: #2f261b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;

  background: #d2ad5b;
  border: 1px solid #d2ad5b;
  border-radius: 999px;

  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

#destacadas #featuredTrackPhp .featuredTile__storeBtn:hover {
  color: #ffffff;
  background: #a47b2d;
  border-color: #a47b2d;
  transform: translateY(-2px);
}

/* =========================================================
   BOTÓN GENERAL: VER TODAS LAS TIENDAS
   ========================================================= */

#destacadas .section__storesAction {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}
#productos-aleatorios .section__storesAction {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 25px;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {
  #destacadas {
    /*
     * AQUÍ CAMBIAS EL TAMAÑO DE LA CARD EN TABLET
     */
    --featured-card-width: 300px;
    --featured-card-height: 420px;
  }
}

/* =========================================================
   CELULAR
   ========================================================= */

@media (max-width: 520px) {
  #destacadas {
    /*
     * AQUÍ CAMBIAS EL TAMAÑO DE LA CARD EN CELULAR
     */
    --featured-card-width: 86vw;
    --featured-card-height: 450px;
  }

  #destacadas #featuredTrackPhp .featuredTile {
    max-width: 340px !important;
    border-radius: 22px !important;
  }

  #destacadas #featuredTrackPhp .featuredTile__body {
    padding: 7px 11px 9px;
    gap: 4px;
  }

  #destacadas #featuredTrackPhp .featuredTile__title {
    font-size: 16px;
  }

  #destacadas
    #featuredTrackPhp
    .featuredTile__social
    .socialIcon {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
    padding: 6px;
  }

  #destacadas #featuredTrackPhp .featuredTile__storeBtn {
    min-width: 125px;
    min-height: 30px;
    padding: 6px 15px;
    font-size: 12px;
  }
}
