/* ============================================================================
   ARCHIVO: app/Modules/Shop/Frontend/Assets/css/01-catalogo.css
   PUBLICADO COMO: /assets/css/x/h2.css
   DEPENDE DE: 00-base.css
   VERSION: 2026.07.21.01

   CORRECCIONES:
   - Badges dentro de la zona de imagen y siempre visibles.
   - Dos columnas en teléfonos móviles.
   - Tres y cuatro columnas en pantallas mayores.
   - Tarjetas de altura consistente.
   - Fallback de imagen sin texto alternativo invadiendo la tarjeta.
   ============================================================================ */

.f-catalog-wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 0.75rem 6rem;
  box-sizing: border-box;
}

.f-catalog-wrap .f-page-title {
  margin: 0 0 1rem;
}

.f-catalog-wrap .f-filters {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0 0 0.75rem;
  margin-bottom: 0.5rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.f-catalog-wrap .f-filter-btn {
  flex: 0 0 auto;
}

/* ============================================================================
   GRILLA
   ============================================================================ */

.f-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

@media (min-width: 820px) {
  .f-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .f-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ============================================================================
   PRODUCT CARD
   ============================================================================ */

.f-card {
  position: relative;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: var(--f-white);
  border: 1px solid var(--f-gray-200);
  border-radius: var(--f-radius-xl);
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition:
    box-shadow var(--f-transition),
    transform var(--f-transition);
}

.f-card:hover {
  box-shadow: var(--f-shadow-lg);
  transform: translateY(-2px);
}

.f-card-link {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.f-card-img-link {
  position: relative;
}

/* ============================================================================
   IMAGEN Y BADGES
   ============================================================================ */

.f-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(
      135deg,
      var(--f-gray-50),
      var(--f-gray-100)
    );
  border-radius:
    var(--f-radius-xl)
    var(--f-radius-xl)
    0
    0;
}

.f-card-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: var(--f-gray-50);
  transition: transform 300ms ease;
}

.f-card:hover .f-card-img {
  transform: scale(1.035);
}

.f-card-img.f-card-img-fallback {
  object-fit: contain;
  padding: 1.25rem;
  box-sizing: border-box;
  transform: none;
}

.f-card-badges {
  position: absolute;
  z-index: 20;
  top: 0.55rem;
  left: 0.55rem;
  right: 0.55rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  pointer-events: none;
}

.f-card-badges-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  min-width: 0;
}

.f-card-badges-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  flex: 0 0 auto;
}

.f-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 1.35rem;
  padding: 0.18rem 0.5rem;
  border-radius: var(--f-radius-full);
  box-sizing: border-box;
  font-size: 0.63rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 8px rgb(15 23 42 / 22%);
}

.f-badge-red {
  background: var(--f-red);
  color: #fff;
}

.f-badge-orange {
  background: #f97316;
  color: #fff;
}

.f-badge-green {
  background: #16a34a;
  color: #fff;
}

.f-badge-yellow {
  background: #d97706;
  color: #fff;
}

/* ============================================================================
   CUERPO
   ============================================================================ */

.f-card-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem;
}

.f-card-title {
  min-width: 0;
  min-height: 2.45em;
  margin: 0;
  color: var(--f-gray-900);
  font-size: 0.9rem;
  line-height: 1.25;
  font-weight: 700;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.f-card-comercio {
  min-width: 0;
  margin: 0;
  color: var(--f-gray-400);
  font-size: 0.73rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.f-card-desc {
  min-width: 0;
  min-height: 2.8em;
  margin: 0;
  color: var(--f-gray-500);
  font-size: 0.76rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.f-card-pricing {
  margin-top: auto;
  padding-top: 0.4rem;
}

.f-card-price {
  margin: 0;
  color: var(--f-red);
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 800;
}

.f-card-price-original {
  min-height: 1.1rem;
  margin: 0.2rem 0 0;
  color: var(--f-gray-400);
  font-size: 0.75rem;
  text-decoration: line-through;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.f-card-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.6rem;
  margin-top: 0.55rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--f-gray-100);
}

.f-card-stock {
  min-height: 1.1rem;
  display: flex;
  align-items: center;
}

.f-stock-ok,
.f-stock-low,
.f-stock-out {
  font-size: 0.73rem;
  line-height: 1.2;
  font-weight: 700;
}

.f-stock-ok {
  color: var(--f-green);
}

.f-stock-low {
  color: #f97316;
}

.f-stock-out {
  color: var(--f-red);
}

.f-btn-sm {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.55rem 0.8rem;
  border: 0;
  border-radius: var(--f-radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  cursor: pointer;
  font-size: 0.76rem;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
  transition:
    background var(--f-transition),
    opacity var(--f-transition),
    transform var(--f-transition);
}

.f-btn-sm:active {
  transform: scale(0.98);
}

.f-btn-sm-red {
  background: var(--f-red);
  color: #fff;
}

.f-btn-sm-red:hover {
  background: var(--f-red-dark);
}

.f-btn-sm-red:disabled {
  background: var(--f-gray-300);
  cursor: not-allowed;
  opacity: 0.72;
}

.f-btn-sm-red.f-btn-loading {
  opacity: 0.72;
  pointer-events: none;
}

/* ============================================================================
   AJUSTES POR ANCHO
   ============================================================================ */

@media (max-width: 559px) {
  .f-catalog-wrap {
    padding-right: 0.45rem;
    padding-left: 0.45rem;
  }

  .f-product-grid {
    gap: 0.55rem;
  }

  .f-card-img-wrap {
    aspect-ratio: 1 / 1;
  }

  .f-card-body {
    gap: 0.28rem;
    padding: 0.65rem;
  }

  .f-card-title {
    min-height: 2.5em;
    font-size: 0.79rem;
    line-height: 1.25;
  }

  .f-card-comercio {
    font-size: 0.66rem;
  }

  .f-card-desc {
    min-height: 2.7em;
    font-size: 0.68rem;
    line-height: 1.35;
  }

  .f-card-price {
    font-size: 0.9rem;
  }

  .f-card-price-original {
    font-size: 0.68rem;
  }

  .f-card-badges {
    top: 0.35rem;
    left: 0.35rem;
    right: 0.35rem;
    gap: 0.3rem;
  }

  .f-card-badges-left,
  .f-card-badges-right {
    gap: 0.2rem;
  }

  .f-badge {
    min-height: 1.15rem;
    max-width: 8.5rem;
    padding: 0.14rem 0.38rem;
    font-size: 0.52rem;
  }

  .f-card-footer {
    gap: 0.45rem;
    margin-top: 0.4rem;
    padding-top: 0.5rem;
  }

  .f-stock-ok,
  .f-stock-low,
  .f-stock-out {
    font-size: 0.66rem;
  }

  .f-btn-sm {
    min-height: 2.15rem;
    padding: 0.48rem 0.55rem;
    font-size: 0.7rem;
  }
}

@media (min-width: 700px) {
  .f-card-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .f-btn-sm {
    width: auto;
    min-width: 6.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .f-card,
  .f-card-img,
  .f-btn-sm {
    transition: none;
  }

  .f-card:hover {
    transform: none;
  }

  .f-card:hover .f-card-img {
    transform: none;
  }
}


/* ============================================================================
   ENCARNA:SHOP_VISUAL_TEMPLATES_V1
   Plantillas de presentacion: marketplace | promocion | evento
   Owner de datos: sin cambios. PUBLICIDAD conserva header_top.
   ============================================================================ */

body[data-shop-home="true"] {
  --ey-shop-surface:
    color-mix(
      in srgb,
      var(--ey-brand-background, #ffffff) 96%,
      var(--ey-brand-primary, #dc2626)
    );
  --ey-shop-soft-primary:
    color-mix(
      in srgb,
      var(--ey-brand-primary, #dc2626) 8%,
      #ffffff
    );
  --ey-shop-soft-secondary:
    color-mix(
      in srgb,
      var(--ey-brand-secondary, #374151) 8%,
      #ffffff
    );
  --ey-shop-soft-accent:
    color-mix(
      in srgb,
      var(--ey-brand-accent, #dc2626) 10%,
      #ffffff
    );
}

body[data-shop-home="true"] .f-content {
  background:
    linear-gradient(
      180deg,
      var(--ey-shop-surface) 0,
      var(--ey-brand-background, #ffffff) 24rem
    );
}

body[data-shop-home="true"] [data-publicidad-slot="shop-home-hero"] {
  width: min(100%, 1280px);
  margin-left: auto;
  margin-right: auto;
}

body[data-shop-home="true"]
[data-banner-source="publicidad"] {
  padding: 0.75rem 0.75rem 0;
}

body[data-shop-home="true"]
[data-banner-source="publicidad"]
.ey-house-ad-slot {
  width: 100%;
  margin: 0;
  contain: layout paint;
}

body[data-shop-home="true"]
[data-banner-source="publicidad"]
.ey-house-ad-slot__label {
  margin: 0 0 0.35rem;
  text-align: left;
}

body[data-shop-home="true"]
[data-banner-source="publicidad"]
.ey-house-ad-slot__link {
  width: 100%;
}

body[data-shop-home="true"]
[data-banner-source="publicidad"]
.ey-house-ad-slot__image {
  width: 100%;
  max-width: none;
  max-height: 360px;
  border-radius: 18px;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 10px 28px rgb(15 23 42 / 10%);
}

body[data-shop-home="true"]
[data-banner-source="inmuebles"] {
  width: min(calc(100% - 1.5rem), 1256px);
  margin: 0.75rem auto 0;
  border-radius: 18px;
  border-color:
    color-mix(
      in srgb,
      var(--ey-brand-primary, #dc2626) 22%,
      #e2e8f0
    );
  box-shadow: 0 10px 28px rgb(15 23 42 / 8%);
}

.ey-shop-home {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 0.8rem;
}

.ey-shop-home-intro {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  margin: 0 0 0.8rem;
  padding: 1rem 1.05rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 3px 14px rgb(15 23 42 / 5%);
}

.ey-shop-home-intro__copy {
  min-width: 0;
}

.ey-shop-home-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--ey-shop-soft-primary);
  color: var(--ey-brand-primary, #dc2626);
  font-size: 0.69rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ey-shop-home .ey-shop-home-title {
  margin: 0;
  color: var(--ey-brand-text, #111827);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.15;
}

.ey-shop-home-subtitle {
  max-width: 720px;
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.45;
}

.ey-shop-home-template-mark {
  width: 74px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      var(--ey-brand-primary, #dc2626),
      var(--ey-brand-accent, #dc2626)
    );
}

.ey-shop-home .ey-verticals {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0 0 0.8rem;
  padding: 0;
}

.ey-shop-home .ey-verticals a {
  min-width: 0;
  min-height: 82px;
  padding: 0.8rem 0.55rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  color: var(--ey-brand-text, #111827);
  box-shadow: 0 3px 12px rgb(15 23 42 / 5%);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.ey-shop-home .ey-verticals a:hover,
.ey-shop-home .ey-verticals a:focus-visible {
  transform: translateY(-2px);
  border-color:
    color-mix(
      in srgb,
      var(--ey-brand-primary, #dc2626) 45%,
      #cbd5e1
    );
  box-shadow: 0 8px 20px rgb(15 23 42 / 9%);
  outline: none;
}

.ey-shop-home .ey-verticals b {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 0.78rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ey-vertical-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ey-shop-soft-primary);
  color: var(--ey-brand-primary, #dc2626);
}

.ey-vertical-icon svg {
  width: 23px;
  height: 23px;
}

.ey-shop-home .ey-verticals a:nth-child(2) .ey-vertical-icon {
  background: var(--ey-shop-soft-secondary);
  color: var(--ey-brand-secondary, #374151);
}

.ey-shop-home .ey-verticals a:nth-child(3) .ey-vertical-icon {
  background: var(--ey-shop-soft-accent);
  color: var(--ey-brand-accent, #dc2626);
}

.ey-shop-home .ey-verticals a:nth-child(4) .ey-vertical-icon {
  background:
    color-mix(
      in srgb,
      var(--ey-brand-secondary, #374151) 7%,
      #ffffff
    );
  color: var(--ey-brand-secondary, #374151);
}

.ey-shop-home .ey-verticals a:nth-child(5) .ey-vertical-icon {
  background:
    color-mix(
      in srgb,
      var(--ey-brand-accent, #dc2626) 8%,
      #ffffff
    );
  color: var(--ey-brand-accent, #dc2626);
}

.ey-shop-home-filters {
  margin: 0 0 0.9rem;
  padding: 0 0 0.15rem;
}

.ey-shop-home-filters .f-filter-btn {
  min-height: 44px;
  padding: 0.55rem 1rem;
}

.ey-shop-home .f-product-grid {
  scroll-margin-top: 110px;
}

.ey-shop-home .f-card {
  border-color:
    color-mix(
      in srgb,
      var(--ey-brand-secondary, #374151) 10%,
      #e5e7eb
    );
}

.ey-shop-home .f-card-price {
  color: var(--ey-brand-primary, #dc2626);
}

.ey-shop-home .f-btn-sm-red {
  min-height: 44px;
  background: var(--ey-brand-primary, #dc2626);
}

/* MARKETPLACE: equilibrio entre hero, accesos y catálogo. */
body[data-shop-template="marketplace"] .ey-shop-home-intro {
  background:
    linear-gradient(
      120deg,
      #ffffff,
      var(--ey-shop-soft-primary)
    );
}

/* PROMOCION: el banner comercial gana jerarquía, sin fabricar contenido. */
body[data-shop-template="promocion"]
[data-banner-source="publicidad"]
.ey-house-ad-slot__image {
  max-height: 430px;
  border-radius: 20px;
  box-shadow: 0 14px 34px rgb(15 23 42 / 14%);
}

body[data-shop-template="promocion"]
[data-banner-source="inmuebles"] {
  border-color:
    color-mix(
      in srgb,
      var(--ey-brand-accent, #dc2626) 42%,
      #e2e8f0
    );
}

body[data-shop-template="promocion"] .ey-shop-home-intro {
  border-color:
    color-mix(
      in srgb,
      var(--ey-brand-accent, #dc2626) 30%,
      #e2e8f0
    );
  background:
    linear-gradient(
      120deg,
      var(--ey-shop-soft-primary),
      #ffffff 48%,
      var(--ey-shop-soft-accent)
    );
}

body[data-shop-template="promocion"]
.ey-shop-home-template-mark {
  width: 104px;
  height: 10px;
}

body[data-shop-template="promocion"]
.ey-shop-home .f-card {
  box-shadow: 0 5px 16px rgb(15 23 42 / 6%);
}

/* EVENTO: mayor contraste visual y accesos rápidos destacados. */
body[data-shop-template="evento"] .ey-shop-home-intro {
  border-width: 2px;
  border-color: var(--ey-brand-accent, #dc2626);
  background:
    linear-gradient(
      135deg,
      var(--ey-shop-soft-accent),
      #ffffff 62%
    );
}

body[data-shop-template="evento"]
[data-publicidad-slot="shop-home-hero"] {
  position: relative;
}

body[data-shop-template="evento"]
[data-publicidad-slot="shop-home-hero"]::after {
  content: "";
  display: block;
  width: min(34%, 320px);
  height: 5px;
  margin: 0.45rem auto 0;
  border-radius: 999px;
  background: var(--ey-brand-accent, #dc2626);
}

body[data-shop-template="evento"]
.ey-shop-home .ey-verticals a {
  border-bottom: 3px solid
    color-mix(
      in srgb,
      var(--ey-brand-accent, #dc2626) 70%,
      #ffffff
    );
}

/* Mobile first real: 320/375 px. */
@media (max-width: 767px) {
  body[data-shop-home="true"]
  [data-banner-source="publicidad"] {
    padding: 0.5rem 0.45rem 0;
  }

  body[data-shop-home="true"]
  [data-banner-source="publicidad"]
  .ey-house-ad-slot__image {
    max-height: 250px;
    border-radius: 14px;
  }

  body[data-shop-home="true"]
  [data-banner-source="inmuebles"] {
    width: calc(100% - 0.9rem);
    margin-top: 0.5rem;
    border-radius: 14px;
  }

  .ey-shop-home {
    padding: 0.55rem 0.45rem 6rem;
  }

  .ey-shop-home-intro {
    align-items: center;
    margin-bottom: 0.55rem;
    padding: 0.8rem 0.85rem;
    border-radius: 14px;
  }

  .ey-shop-home-subtitle {
    max-width: 100%;
    font-size: 0.76rem;
  }

  .ey-shop-home-template-mark {
    width: 42px;
    height: 7px;
  }

  .ey-shop-home .ey-verticals {
    display: flex;
    gap: 0.55rem;
    width: auto;
    max-width: none;
    margin: 0 -0.45rem 0.55rem;
    padding: 0 0.45rem 0.25rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .ey-shop-home .ey-verticals::-webkit-scrollbar {
    display: none;
  }

  .ey-shop-home .ey-verticals a {
    flex: 0 0 86px;
    min-height: 78px;
    padding: 0.55rem 0.35rem;
    border-radius: 14px;
    scroll-snap-align: start;
  }

  .ey-shop-home .ey-verticals b {
    font-size: 0.7rem;
  }

  .ey-vertical-icon {
    width: 40px;
    height: 40px;
  }

  .ey-shop-home-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    margin: 0 -0.45rem 0.55rem;
    padding: 0 0.45rem 0.3rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .ey-shop-home-filters::-webkit-scrollbar {
    display: none;
  }

  .ey-shop-home-filters .f-filter-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0.55rem 0.9rem;
  }

  .ey-shop-home .f-loading {
    padding-top: 1.5rem;
  }

  .ey-shop-home .f-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .ey-shop-home .f-card {
    border-radius: 14px;
  }

  .ey-shop-home .f-btn-sm {
    min-height: 44px;
  }

  body[data-shop-template="promocion"]
  .ey-shop-home-intro {
    padding-block: 0.9rem;
  }

  body[data-shop-template="evento"]
  .ey-shop-home .ey-verticals a {
    border-bottom-width: 3px;
  }
}

@media (max-width: 359px) {
  .ey-shop-home {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .ey-shop-home-intro {
    padding: 0.7rem;
  }

  .ey-shop-home-subtitle {
    font-size: 0.72rem;
  }

  .ey-shop-home .ey-verticals {
    margin-left: -0.35rem;
    margin-right: -0.35rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .ey-shop-home .ey-verticals a {
    flex-basis: 80px;
  }

  .ey-shop-home-filters {
    margin-left: -0.35rem;
    margin-right: -0.35rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
}

@media (min-width: 768px) {
  .ey-shop-home {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .ey-shop-home .f-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .ey-shop-home .f-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body[data-shop-template="marketplace"]
  .ey-shop-home .f-product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ey-shop-home .ey-verticals a {
    transition: none;
  }

  .ey-shop-home .ey-verticals a:hover {
    transform: none;
  }
}


/* ============================================================================
   ENCARNA:SHOP_MARKETPLACE_TEMPLATE_V2
   Ajuste visual final según validación real desktop/mobile.
   ============================================================================ */

body[data-shop-home="true"] .f-content {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--ey-brand-background, #ffffff) 97%, var(--ey-brand-primary, #dc2626))
      0,
      var(--ey-brand-background, #ffffff) 28rem
    );
}

/* PUBLICIDAD real: conserva contenido owner y sólo controla presentación. */
body[data-shop-home="true"] [data-banner-source="publicidad"] {
  padding: 0.65rem 0.75rem 0;
}

body[data-shop-home="true"] [data-banner-source="publicidad"] .ey-house-ad-slot__link {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--ey-brand-primary, #dc2626) 10%, #ffffff),
      color-mix(in srgb, var(--ey-brand-accent, #dc2626) 12%, #ffffff)
    );
}

body[data-shop-home="true"] [data-banner-source="publicidad"] .ey-house-ad-slot__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  margin: 0 auto;
  border-radius: 18px;
  object-fit: contain;
}

/* Fallback Inmuebles vacío: presencia compacta, no hero gigante. */
body[data-shop-home="true"] [data-banner-source="inmuebles"].ey-re-home--empty {
  width: min(calc(100% - 1.5rem), 1256px);
  margin: 0.65rem auto 0 !important;
  padding: 0.85rem 1rem !important;
  border-radius: 16px !important;
  background:
    linear-gradient(
      110deg,
      #ffffff,
      color-mix(in srgb, var(--ey-brand-primary, #dc2626) 6%, #ffffff)
    ) !important;
  box-shadow: 0 5px 18px rgb(15 23 42 / 6%) !important;
}

body[data-shop-home="true"] [data-banner-source="inmuebles"].ey-re-home--empty .ey-re-home__head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center !important;
  gap: 0.8rem !important;
}

body[data-shop-home="true"] [data-banner-source="inmuebles"].ey-re-home--empty .ey-re-home__head > div {
  min-width: 0;
}

body[data-shop-home="true"] [data-banner-source="inmuebles"].ey-re-home--empty .ey-re-kicker {
  margin-bottom: 0.18rem !important;
}

body[data-shop-home="true"] [data-banner-source="inmuebles"].ey-re-home--empty h2 {
  margin: 0 !important;
  font-size: clamp(1rem, 2.5vw, 1.28rem) !important;
  line-height: 1.15 !important;
}

body[data-shop-home="true"] [data-banner-source="inmuebles"].ey-re-home--empty .ey-re-home__head p:not(.ey-re-kicker) {
  margin: 0.22rem 0 0 !important;
  font-size: 0.76rem !important;
  line-height: 1.35 !important;
}

body[data-shop-home="true"] [data-banner-source="inmuebles"].ey-re-home--empty .ey-re-btn {
  min-height: 44px;
  padding: 0.62rem 0.9rem !important;
  border-radius: 12px !important;
  white-space: nowrap;
}

body[data-shop-home="true"] [data-banner-source="inmuebles"].ey-re-home--empty .ey-re-home__empty {
  margin: 0.55rem 0 0 !important;
  padding: 0.55rem 0.65rem !important;
  border-radius: 10px !important;
  font-size: 0.7rem !important;
  line-height: 1.35 !important;
}

/* Cuando hay inmuebles reales destacados conserva la experiencia rica. */
body[data-shop-home="true"] [data-banner-source="inmuebles"].ey-re-home--featured {
  width: min(calc(100% - 1.5rem), 1256px);
  margin-left: auto;
  margin-right: auto;
}

/* Intro Catálogo: encabezado, no una segunda hero-card. */
.ey-shop-home {
  padding-top: 0.55rem;
}

.ey-shop-home-intro {
  min-height: 0;
  margin: 0 0 0.45rem;
  padding: 0.35rem 0.2rem 0.45rem;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
}

.ey-shop-home-kicker {
  min-height: 20px;
  margin-bottom: 0.15rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.62rem;
}

.ey-shop-home .ey-shop-home-title {
  font-size: clamp(1.2rem, 3vw, 1.55rem);
}

.ey-shop-home-subtitle {
  margin-top: 0.2rem;
  font-size: 0.76rem;
}

.ey-shop-home-template-mark {
  width: 58px;
  height: 6px;
}

/* Accesos rápidos compactos. */
.ey-shop-home .ey-verticals {
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.ey-shop-home .ey-verticals a {
  min-height: 72px;
  padding: 0.55rem 0.4rem;
  border-radius: 14px;
}

.ey-vertical-icon {
  width: 38px;
  height: 38px;
}

.ey-vertical-icon svg {
  width: 21px;
  height: 21px;
}

.ey-shop-home .ey-verticals b {
  font-size: 0.72rem;
}

/* Filtros más cercanos al contenido. */
.ey-shop-home-filters {
  margin-bottom: 0.6rem;
}

.ey-shop-home-filters .f-filter-btn {
  min-height: 42px;
  padding: 0.48rem 0.9rem;
}

/* Cards de marketplace. */
.ey-shop-home .f-product-grid {
  gap: 0.65rem;
}

.ey-shop-home .f-card {
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgb(15 23 42 / 5%);
}

.ey-shop-home .f-card-img-wrap {
  background:
    linear-gradient(
      180deg,
      #f8fafc,
      color-mix(in srgb, var(--ey-brand-background, #ffffff) 92%, #e2e8f0)
    );
}

.ey-shop-home .f-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ey-shop-home .f-card-img.f-card-img-fallback {
  padding: 14%;
  object-fit: contain;
  opacity: 0.78;
  background: #f8fafc;
}

.ey-shop-home .f-card-body {
  background: #fff;
}

.ey-shop-home .f-card-price {
  color: var(--ey-brand-text, #111827);
  font-weight: 850;
}

.ey-shop-home .f-card-badge,
.ey-shop-home .f-badge {
  border-radius: 999px;
}

/* Promoción: manda el banner real, el resto se compacta. */
body[data-shop-template="promocion"] [data-banner-source="publicidad"] .ey-house-ad-slot__image {
  max-height: 430px;
}

body[data-shop-template="promocion"] .ey-shop-home-intro {
  padding-top: 0.2rem;
}

body[data-shop-template="promocion"] .ey-shop-home-template-mark {
  width: 86px;
  background: var(--ey-brand-accent, #dc2626);
}

/* Evento: jerarquía visual sin inventar contenido. */
body[data-shop-template="evento"] .ey-shop-home-intro {
  padding-left: 0.65rem;
  border-left: 4px solid var(--ey-brand-accent, #dc2626);
}

body[data-shop-template="evento"] .ey-shop-home .ey-verticals a {
  border-bottom: 3px solid
    color-mix(in srgb, var(--ey-brand-accent, #dc2626) 72%, #ffffff);
}

/* MOBILE FIRST */
@media (max-width: 767px) {
  body[data-shop-home="true"] [data-banner-source="publicidad"] {
    padding: 0.45rem 0.45rem 0;
  }

  body[data-shop-home="true"] [data-banner-source="publicidad"] .ey-house-ad-slot__link,
  body[data-shop-home="true"] [data-banner-source="publicidad"] .ey-house-ad-slot__image {
    border-radius: 13px;
  }

  body[data-shop-home="true"] [data-banner-source="publicidad"] .ey-house-ad-slot__image {
    max-height: 210px;
  }

  body[data-shop-home="true"] [data-banner-source="inmuebles"].ey-re-home--empty {
    width: calc(100% - 0.9rem);
    margin-top: 0.45rem !important;
    padding: 0.7rem 0.75rem !important;
    border-radius: 13px !important;
  }

  body[data-shop-home="true"] [data-banner-source="inmuebles"].ey-re-home--empty .ey-re-home__head {
    grid-template-columns: 1fr auto;
    gap: 0.55rem !important;
  }

  body[data-shop-home="true"] [data-banner-source="inmuebles"].ey-re-home--empty h2 {
    font-size: 0.98rem !important;
  }

  body[data-shop-home="true"] [data-banner-source="inmuebles"].ey-re-home--empty .ey-re-home__head p:not(.ey-re-kicker) {
    display: none;
  }

  body[data-shop-home="true"] [data-banner-source="inmuebles"].ey-re-home--empty .ey-re-btn {
    min-height: 42px;
    padding: 0.5rem 0.72rem !important;
    font-size: 0.72rem !important;
  }

  body[data-shop-home="true"] [data-banner-source="inmuebles"].ey-re-home--empty .ey-re-home__empty {
    display: none;
  }

  .ey-shop-home {
    padding: 0.45rem 0.4rem 5.4rem;
  }

  .ey-shop-home-intro {
    align-items: center;
    margin-bottom: 0.35rem;
    padding: 0.12rem 0.1rem 0.35rem;
  }

  .ey-shop-home-kicker {
    min-height: 18px;
    padding: 0.1rem 0.4rem;
    font-size: 0.58rem;
  }

  .ey-shop-home .ey-shop-home-title {
    font-size: 1.06rem;
  }

  .ey-shop-home-subtitle {
    max-width: 28rem;
    margin-top: 0.12rem;
    font-size: 0.66rem;
    line-height: 1.35;
  }

  .ey-shop-home-template-mark {
    width: 34px;
    height: 5px;
  }

  .ey-shop-home .ey-verticals {
    gap: 0.35rem;
    margin: 0 -0.4rem 0.4rem;
    padding: 0 0.4rem 0.15rem;
  }

  .ey-shop-home .ey-verticals a {
    flex: 1 0 68px;
    min-width: 68px;
    min-height: 64px;
    padding: 0.4rem 0.25rem;
    gap: 0.2rem;
    border-radius: 12px;
  }

  .ey-vertical-icon {
    width: 34px;
    height: 34px;
  }

  .ey-vertical-icon svg {
    width: 19px;
    height: 19px;
  }

  .ey-shop-home .ey-verticals b {
    font-size: 0.62rem;
  }

  .ey-shop-home-filters {
    gap: 0.35rem;
    margin: 0 -0.4rem 0.45rem;
    padding: 0 0.4rem 0.15rem;
  }

  .ey-shop-home-filters .f-filter-btn {
    min-height: 40px;
    padding: 0.45rem 0.75rem;
    font-size: 0.72rem;
  }

  .ey-shop-home .f-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .ey-shop-home .f-card {
    border-radius: 12px;
  }

  .ey-shop-home .f-card-body {
    gap: 0.22rem;
    padding: 0.55rem;
  }

  .ey-shop-home .f-card-title {
    min-height: 2.4em;
    font-size: 0.74rem;
  }

  .ey-shop-home .f-card-comercio {
    font-size: 0.61rem;
  }

  .ey-shop-home .f-card-desc {
    display: none;
  }

  .ey-shop-home .f-card-price {
    font-size: 0.88rem;
  }

  .ey-shop-home .f-card-footer {
    margin-top: 0.28rem;
    padding-top: 0.35rem;
  }

  .ey-shop-home .f-btn-sm {
    min-height: 40px;
  }
}

@media (max-width: 359px) {
  .ey-shop-home .ey-verticals a {
    flex: 0 0 66px;
    min-width: 66px;
  }

  .ey-shop-home .ey-verticals b {
    font-size: 0.59rem;
  }

  .ey-shop-home-subtitle {
    font-size: 0.62rem;
  }

  body[data-shop-home="true"] [data-banner-source="inmuebles"].ey-re-home--empty h2 {
    font-size: 0.9rem !important;
  }
}

@media (min-width: 768px) {
  .ey-shop-home {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .ey-shop-home-intro {
    padding-left: 0.1rem;
    padding-right: 0.1rem;
  }
}

@media (min-width: 1120px) {
  .ey-shop-home .f-product-grid {
    gap: 0.75rem;
  }
}
