/* Inicio: una sola fila adaptable; si sobran productos, se navegan como carrusel. */
.home-product-carousel {
  --home-visible-products: 4;
  --home-product-width: 260px;
}

.home-product-carousel .home-carousel-stage,
.home-product-carousel.is-product-carousel .home-carousel-stage {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  -webkit-mask-image: none;
  mask-image: none;
}

.home-product-carousel .home-carousel-stage::-webkit-scrollbar {
  display: none;
}

.home-product-carousel .home-product-grid,
.home-product-carousel.is-product-carousel .home-product-grid {
  position: relative;
  display: flex !important;
  grid-template-columns: none !important;
  grid-auto-flow: initial !important;
  gap: 20px;
  width: 100%;
  height: auto;
  transform: none;
}

.home-product-carousel .home-product-card,
.home-product-carousel.is-product-carousel .home-product-card {
  position: relative;
  top: auto;
  left: auto;
  flex: 0 0 var(--home-product-width);
  width: auto;
  height: clamp(350px, 44svh, 430px);
  visibility: visible;
  scroll-snap-align: start;
  transform: none !important;
  filter: none !important;
  opacity: 1 !important;
  pointer-events: auto;
}

.home-product-carousel .home-carousel-controls,
.home-product-carousel.is-product-carousel .home-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 48px;
  margin: 10px auto 0;
}

.home-product-carousel .home-carousel-controls[hidden] {
  display: none !important;
}

.home-product-carousel .home-carousel-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #ee2027;
  border-radius: 50%;
  background: #000;
  color: #fff;
  cursor: pointer;
}

.home-product-carousel .home-carousel-arrow:disabled {
  opacity: 1;
  color: #ee2027;
  cursor: default;
}

.home-product-carousel .home-carousel-arrow svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-carousel-position {
  min-width: 82px;
  color: #fff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* Tienda: cada colección mantiene su propio bloque. */
.shop-collections {
  display: grid;
  gap: 64px;
  width: 100%;
  min-width: 0;
}

.shop-collection-group,
.shop-product-carousel {
  width: 100%;
  min-width: 0;
}

.shop-collection-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 13px;
  border-bottom: 1px solid #fff;
}

.shop-collection-group > header > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.shop-collection-group > header h2,
.shop-collection-group > header h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(23px, 2.8vw, 32px);
  line-height: 1.1;
}

.shop-collection-group > header > div > span {
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
}

.shop-open-collection {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #ee2027;
  border-radius: 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  background: transparent;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}

.catalog-filter-strip {
  position: relative;
}

/* Live collection changes retain the existing fixed storefront background. */
body.home-page main > .home-catalog {
  background-color: transparent;
}

.home-page .catalog-category-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin: 14px 0 0;
  padding: 0;
}

.home-page .catalog-category-filters a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 650px) {
  .home-page .catalog-category-filters a {
    padding: 8px 12px;
    font-size: 11px;
  }
}

.catalog-filters-more {
  display: none;
}

.catalog-search-scope-notice {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 28px;
  padding: 13px 16px;
  border: 1px solid #fff;
  border-radius: 10px;
  background: #000;
  color: #fff;
  font-size: 13px;
}

.catalog-search-scope-notice strong {
  flex: 0 0 auto;
  color: #fff;
}

@media (max-width: 650px) {
  .catalog-search-scope-notice {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 22px;
    font-size: 12px;
  }
}

/* El primer plano de escritorio conserva el encabezado del catálogo dentro
   del hero aunque ya no exista la antigua transición ligada al scroll. */
@media (min-width: 981px) {
  .hero-immersive.has-catalog-intro .hero-stage {
    min-height: 0;
  }

  .hero-catalog-intro {
    display: block;
  }

  .hero-catalog-intro .section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
  }

  .hero-catalog-intro .section-heading h2 {
    margin: 6px 0 0;
    font-size: clamp(30px, 3.2vw, 44px);
    line-height: 1;
  }

  .hero-catalog-intro .catalog-filters {
    margin: 14px 0 0;
  }

  .hero-catalog-intro .catalog-filters a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 16px;
    border: 1px solid #fff;
    border-radius: 999px;
    background: #000;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
  }

  .hero-catalog-intro .catalog-filters a:hover,
  .hero-catalog-intro .catalog-filters a.active {
    border-color: #fff;
    background: #fff;
    color: #000;
  }

  .home-catalog-controls-source {
    display: none;
  }

  .home-catalog:not(.collection-catalog-view) {
    padding-top: 36px;
  }
}

@media (max-width: 980px) {
  .hero-catalog-intro {
    display: none;
  }

  .home-catalog:not(.collection-catalog-view) {
    padding-top: 48px;
  }
}

/* Catálogo completo dentro del inicio. */
.home-catalog .catalog-filters a {
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.home-catalog .catalog-filters::before,
.home-catalog .catalog-filters::after {
  display: none;
  content: none;
}

.home-catalog .catalog-filters a:hover,
.home-catalog .catalog-filters a.active {
  border-color: #ee2027;
  background: #ee2027;
  color: #fff;
}

.home-shop-collections {
  gap: 50px;
}

/* En dispositivos con movimiento reducido, los capítulos vuelven al flujo
   normal y necesitan conservar su propio ancho seguro. */
.home-experience:not(.is-immersive) .home-panel-content > .shop-collection-group {
  width: 88%;
  max-width: 1240px;
  margin: 64px auto 0;
}

.home-catalog .catalog-empty {
  margin: 24px 0 0;
}

.collection-catalog-view .section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin: 0 0 34px;
}

.collection-catalog-view .shop-collections {
  gap: 0;
}

.collection-catalog-view .shop-collection-group {
  width: 100%;
}

.collection-catalog-view .shop-expanded-grid {
  grid-template-columns: repeat(auto-fit, minmax(290px, 360px));
  justify-content: start;
  align-items: stretch;
  gap: 26px;
}

/* La colección abierta es una vista completa, no una columna angosta dentro
   del inicio. El fondo queda continuo y las tarjetas conservan un tamaño útil
   incluso en monitores muy anchos. */
html.catalog-entry body.home-page main > .collection-catalog-view {
  display: block;
  min-height: calc(100dvh - 84px - 166px);
  width: min(calc(100% - 64px), 1240px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 0 64px;
  isolation: isolate;
  background: transparent;
}

html.catalog-entry body.home-page main > .collection-catalog-view::before {
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 50%;
  width: 100vw;
  background:
    linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)),
    #000 url('../images/sonido.png') center top / cover no-repeat;
  content: '';
  transform: translateX(-50%);
}

.collection-catalog-view .section-heading,
.collection-catalog-view .shop-collections {
  width: 100%;
}

.collection-catalog-view .home-product-card {
  width: 100%;
  height: clamp(400px, 32vw, 460px);
}

.collection-catalog-view .shop-expanded-grid:has(.home-product-card:only-child) {
  grid-template-columns: minmax(280px, 420px);
}

.catalog-continue {
  display: none;
}

@media (min-width: 981px) {
  .is-immersive .catalog-continue {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 12px;
    width: max-content;
    margin: 68px auto 0;
    padding: 10px 18px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: color .18s ease, transform .18s ease;
  }

  .is-immersive .catalog-continue:hover,
  .is-immersive .catalog-continue:focus-visible {
    color: #fff;
    transform: translateY(3px);
  }

  .is-immersive .catalog-continue:focus-visible {
    outline: 2px solid #ee2027;
    outline-offset: 5px;
    border-radius: 8px;
  }

  .catalog-continue svg {
    width: 22px;
    height: 30px;
    fill: none;
    stroke: #ee2027;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: catalog-continue-pulse 1.8s ease-in-out infinite;
  }

  @keyframes catalog-continue-pulse {
    0%, 100% { transform: translateY(0); opacity: .65; }
    50% { transform: translateY(6px); opacity: 1; }
  }
}

.catalog-filter-hidden {
  display: none !important;
}

.home-catalog .shop-collection-group.is-active-collection .home-carousel-stage {
  overflow: visible;
  padding-bottom: 0;
}

.home-catalog .shop-collection-group.is-active-collection .home-product-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px;
}

.home-catalog .shop-collection-group.is-active-collection .home-product-card {
  width: auto;
  height: clamp(350px, 44svh, 430px);
  flex: none;
}

.home-catalog .shop-collection-group.is-active-collection .home-carousel-controls {
  display: none !important;
}

.home-catalog .shop-open-collection.is-back [data-collection-open-icon] {
  order: -1;
}

@media (max-width: 980px) {
  .home-catalog .shop-collection-group.is-active-collection .home-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

.shop-open-collection:hover {
  border-color: #ee2027;
  background: #ee2027;
}

.shop-open-collection span {
  color: #ee2027;
  font-size: 16px;
}

.shop-product-carousel .home-carousel-controls {
  margin-top: 14px;
}

.shop-collections.is-expanded {
  gap: 0;
}

.shop-expanded-grid {
  align-items: stretch;
}

.shop-back-link {
  display: block;
  width: max-content;
  margin: 0 0 14px;
  color: #ee2027;
  font-size: 12px;
  font-weight: 700;
}

.collection-catalog-view .shop-back-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #ee2027;
  border-radius: 9px;
  background: #000;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.collection-catalog-view .shop-back-link:hover {
  border-color: #ee2027;
  background: #ee2027;
}

.shop-back-link:hover {
  color: #fff;
}

@media (max-width: 980px) {
  html.catalog-entry body.home-page main > .collection-catalog-view {
    display: block;
    min-height: 0;
    width: min(calc(100% - 44px), 760px);
    padding: 48px 0 80px;
  }

  .collection-catalog-view .section-heading {
    margin-bottom: 32px;
  }

  .collection-catalog-view .shop-expanded-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 20px;
  }

  .home-product-carousel .home-carousel-stage,
  .home-product-carousel.is-product-carousel .home-carousel-stage {
    padding: 0 0 8px;
  }

  .home-product-carousel .home-product-card,
  .home-product-carousel.is-product-carousel .home-product-card {
    height: clamp(330px, 52svh, 420px);
  }
}

@media (max-width: 650px) {
  html.catalog-entry body.home-page main > .collection-catalog-view {
    width: calc(100% - 32px);
    padding: 34px 0 64px;
  }

  .collection-catalog-view .section-heading {
    margin-bottom: 28px;
  }

  .collection-catalog-view .shop-expanded-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .collection-catalog-view .home-product-card {
    height: clamp(260px, 72vw, 330px);
  }

  .home-catalog .section-heading h2 {
    max-width: 100%;
    margin: 10px 0 0;
    font-size: clamp(36px, 10.5vw, 44px);
    line-height: .98;
    letter-spacing: -.7px;
  }

  .home-catalog .section-heading .eyebrow {
    font-size: 8px;
    letter-spacing: 2.2px;
  }

  .home-catalog .search {
    min-height: 48px;
    margin-top: 16px;
    border-radius: 10px;
  }

  .home-catalog .search input {
    min-width: 0;
    padding: 12px 13px;
    font-size: 13px;
  }

  .home-catalog .search button {
    flex: 0 0 auto;
    min-width: 74px;
    padding: 0 15px;
    font-size: 13px;
  }

  .home-product-carousel .home-product-grid,
  .home-product-carousel.is-product-carousel .home-product-grid {
    gap: 14px;
  }

  .home-product-carousel .home-product-card,
  .home-product-carousel.is-product-carousel .home-product-card {
    flex-basis: var(--home-product-width);
    width: auto;
    height: clamp(260px, 72vw, 330px);
  }

  .shop-collections {
    gap: 48px;
  }

  .shop-collection-group > header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-end;
    gap: 10px;
  }

  .shop-collection-group > header > div {
    display: block;
  }

  .shop-collection-group > header > div > span {
    display: block;
    margin-top: 5px;
  }

  .shop-open-collection {
    min-height: 36px;
    padding: 0 10px;
    font-size: 11px;
  }

  .home-experience:not(.is-immersive) .home-panel-content > .shop-collection-group {
    width: auto;
    max-width: none;
    margin: 42px max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left));
  }

  .home-shop-collections {
    gap: 42px;
  }

  .home-catalog .catalog-filter-strip {
    margin-top: 14px;
  }

  .home-catalog .catalog-filters {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin: 0;
    padding: 0 34px 6px 0;
    gap: 8px;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 0;
    -webkit-overflow-scrolling: touch;
  }

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

  .home-catalog .catalog-filters a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    min-height: 36px;
    padding: 7px 14px;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .home-catalog .catalog-filters-more {
    position: absolute;
    z-index: 3;
    top: 0;
    right: 0;
    display: grid;
    place-items: center;
    width: 38px;
    height: 36px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.82) 42%, #000 72%);
    color: #fff;
    pointer-events: none;
  }

  .home-catalog .catalog-filters-more svg {
    width: 17px;
    height: 17px;
    margin-left: 8px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .home-catalog .shop-collection-group.is-active-collection .home-product-grid {
    grid-template-columns: 1fr !important;
  }

  .home-catalog .shop-collection-group.is-active-collection .home-product-card {
    height: clamp(330px, 60svh, 420px);
  }
}
/* El acceso directo a Productos sigue siendo el inicio, pero abre el catálogo
   como contenido normal para evitar que la escena inmersiva lo deje fuera de vista. */
.catalog-entry {
  min-height: 100%;
  background: #000;
}

.catalog-entry body.home-page {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  background: #000;
}

.catalog-entry body.home-page > .home-experience {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  width: 100%;
  height: auto;
  min-height: 0;
}

.catalog-entry body.home-page > .home-experience > .home-scene {
  position: static;
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  width: 100%;
  height: auto;
  min-height: 0;
  overflow: visible;
}

.catalog-entry body.home-page > .home-experience > .home-scene > main {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  width: 100%;
  background: #000;
}

.catalog-entry body.home-page main > .collection-catalog-view {
  flex: 1 0 auto;
  align-content: center;
}

.catalog-entry body.home-page > .site-footer {
  position: relative;
  z-index: 10;
  display: grid;
  flex: 0 0 auto;
  width: 100%;
  align-content: normal;
  visibility: visible;
  opacity: 1;
}

@media (min-width: 981px) {
  .catalog-entry body.home-page > .site-footer {
    grid-template-columns: minmax(170px, 1fr) auto auto;
    column-gap: clamp(56px, 8vw, 140px);
    row-gap: 16px;
    padding: 26px 7vw 16px;
  }

  .catalog-entry body.home-page > .site-footer .footer-brand .brand-logo {
    width: 112px;
  }

  .catalog-entry body.home-page > .site-footer .footer-column > strong {
    margin-bottom: 9px;
  }

  .catalog-entry body.home-page > .site-footer .footer-column p {
    margin: 5px 0;
    font-size: 13px;
  }

  .catalog-entry body.home-page > .site-footer .footer-bottom {
    margin-top: 0;
    padding-top: 12px;
  }
}

.catalog-entry body.home-page > .hero-fixed-background {
  display: none;
}

.catalog-entry .hero-immersive{display:none}
.catalog-entry .home-catalog{padding-top:64px}
