/* Catálogo y navegación móvil */
.tienda-page {
  padding-bottom: 5.5rem;
}

.tienda-card-img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
  width: 100%;
  border-radius: 0.5rem 0.5rem 0 0;
}

.tienda-card-img.tienda-card-img--zoom {
  cursor: zoom-in;
}

.tienda-zoom-modal .modal-content {
  background: rgba(15, 15, 18, 0.96);
  border: none;
}

.tienda-zoom-modal .modal-body {
  min-height: 40vh;
}

.tienda-zoom-modal #zoomCatalogoImg {
  max-height: min(78vh, 900px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Zoom en móvil: imagen a todo el ancho de la pantalla (modal fullscreen-sm) */
@media (max-width: 575.98px) {
  .tienda-zoom-modal .tienda-zoom-modal-body {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .tienda-zoom-modal .tienda-zoom-body-wrap {
    width: 100%;
    max-width: 100vw;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    box-sizing: border-box;
  }

  .tienda-zoom-modal #zoomCatalogoImg {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 9.5rem);
    max-height: calc(100dvh - 9.5rem);
    object-fit: contain;
    object-position: center top;
    border-radius: 0;
  }

  .tienda-zoom-modal .tienda-zoom-footer {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Botón cerrar siempre visible (móvil): fijo sobre el modal */
.tienda-zoom-btn-cerrar {
  position: fixed;
  top: calc(0.5rem + env(safe-area-inset-top, 0px));
  right: calc(0.5rem + env(safe-area-inset-right, 0px));
  z-index: 1085;
  min-height: 3rem;
  min-width: 5.75rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: #e55353;
  color: #fff !important;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  line-height: 1.2;
}
.tienda-zoom-btn-cerrar .bx {
  font-size: 1.35rem;
}
.tienda-zoom-btn-cerrar:active {
  filter: brightness(0.9);
  transform: scale(0.98);
}

.tienda-zoom-body-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42vh;
  padding: 0 2.75rem 2.5rem;
}

.tienda-zoom-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.85rem;
  height: 2.85rem;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  font-size: 1.85rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.tienda-zoom-nav:disabled {
  opacity: 0.25;
  pointer-events: none;
}
.tienda-zoom-nav--prev {
  left: 0.25rem;
}
.tienda-zoom-nav--next {
  right: 0.25rem;
}

.tienda-zoom-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

.tienda-zoom-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  max-width: 100%;
}

.tienda-zoom-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.tienda-zoom-dot.is-active {
  background: #fff;
  transform: scale(1.35);
}

#zoomCatalogoCounter {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.tienda-card-precio {
  font-weight: 700;
  color: #6b4e9e;
}

.tienda-header-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 2.5rem;
}

.tienda-header-brand h1 {
  line-height: 1.2;
}

.tienda-header-brand small {
  line-height: 1.25;
  max-width: 100%;
}

.tienda-header-brand-linea {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  white-space: nowrap;
  text-align: left;
  margin-right: auto;
}

.tienda-header-empresa {
  font-weight: 700;
  font-size: 1.1rem;
  color: #2f3349;
  line-height: 1.2;
}

.tienda-header-separador {
  color: #8a8fa3;
  font-weight: 600;
}

.tienda-header-subtitulo {
  font-size: 0.95rem;
  color: #8a8fa3;
  line-height: 1.2;
}

.tienda-btn-cart {
  min-height: 2.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.15;
}

.tienda-btn-finalizar {
  min-height: 2.45rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.15;
}

.tienda-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
}

.tienda-bottom-nav .nav-link {
  color: #566a7f;
  font-size: 0.72rem;
  padding: 0.35rem 0.25rem;
  border-radius: 0.5rem;
}

.tienda-bottom-nav .nav-link.active {
  color: #6b4e9e;
  background: rgba(107, 78, 158, 0.1);
}

.tienda-bottom-nav .bx {
  font-size: 1.35rem;
  display: block;
  margin: 0 auto 0.1rem;
}

.tienda-bottom-nav--5 .nav-link {
  font-size: 0.65rem;
  padding-left: 0.15rem;
  padding-right: 0.15rem;
}

.tienda-bottom-nav--5 .bx {
  font-size: 1.2rem;
}

.badge-carrito-flot {
  font-size: 0.65rem;
  min-width: 1.1rem;
}

.preview-img-producto {
  max-height: 200px;
  object-fit: contain;
  border-radius: 0.5rem;
  border: 1px dashed #d9dee3;
}

@media (min-width: 992px) {
  .tienda-bottom-nav {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 1rem 1rem 0 0;
  }
}

@media (max-width: 575.98px) {
  .tienda-header-brand-linea {
    gap: 0.3rem;
  }

  .tienda-header-empresa {
    font-size: 1.02rem;
  }

  .tienda-header-subtitulo {
    font-size: 0.9rem;
  }

  .tienda-btn-cart {
    min-height: 2.85rem;
    font-size: 1rem;
  }

  .tienda-btn-finalizar {
    min-height: 2.85rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    font-size: 1rem;
  }
}
