/* =========================================================
   D NEW URBAN - ESTILOS PRINCIPALES
   ========================================================= */

/* ===== RESET GENERAL ===== */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  background-color: #f8f9fa;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* asegura que el body sea al menos altura de ventana */
}

main {
  flex: 1 0 auto; /* hace que el contenido crezca y empuje el footer */
}

footer {
  flex-shrink: 0; /* evita que se encoja */
  width: 100%;
  background-color: #212529;
  color: #f8f9fa;
  padding: 1rem 0;
  text-align: center;
}
/* =========================================================
   HEADER / NAVBAR
   ========================================================= */
.navbar {
  background-color: #fff !important;
  transition: all 0.3s ease-in-out;
  z-index: 1030;
}

.navbar-brand {
  font-size: 1.4rem;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.nav-link {
  font-size: 1rem;
  transition: color 0.3s ease-in-out, transform 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: #e63946 !important;
  transform: scale(1.05);
}

/* Íconos sociales */
.social-icon {
  font-size: 1.2rem;
  transition: color 0.3s, transform 0.3s;
}

.social-icon:hover {
  color: #e63946 !important;
  transform: scale(1.2);
}

/* Carrito */
#cart-btn {
  text-decoration: none;
  position: relative;
}

#cart-btn i {
  transition: transform 0.2s ease, color 0.3s ease;
}

#cart-btn:hover i {
  color: #e63946;
  transform: scale(1.15);
}

#cart-count {
  font-size: 0.7rem;
  padding: 4px 6px;
}

/* =========================================================
   SECCIÓN DE PRODUCTOS
   ========================================================= */
   /* === CENTRAR CONTENIDO PRINCIPAL === */
.container-xl {
  max-width: 1250px;
  margin: 0 auto;
}

/* === CATEGORÍAS === */
#productos aside {
  position: sticky;
  top: 80px;
}

/* === CHECKBOX PERSONALIZADOS === */
.form-check-input {
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
}

.form-check-label {
  cursor: pointer;
  font-weight: 500;
}



#productos {
  background: #fff;
}

#productos h2 {
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 3px solid #ffc107;
  display: inline-block;
  padding-bottom: 5px;
}

.product-card {
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 10px;
  position: relative;
  background-color: #ffffff;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Imagen de producto adaptativa */
.product-card img {
  width: 100%;
  height: 250px; /* Tamaño fijo por defecto */
  object-fit: cover;
  object-position: center;
  border-radius: 10px 10px 0 0;
  display: block;
  transition: transform 0.3s ease;
}

.product-card:hover img {
  transform: scale(1.05);
}

/* Overlay de botones al hacer hover */
.overlay-icons {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.product-card:hover .overlay-icons {
  opacity: 1;
}

.overlay-icons .btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  border: none;
}

/* Contenido de la card */
.card-body h5 {
  font-weight: 600;
}

.card-body p {
  margin: 0;
}


.section-title {
  font-size: 2rem;
  color: #222;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 3px;
  background-color: #ffc107;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* =========================================================
   RESPONSIVE DESIGN
   ========================================================= */
@media (max-width: 992px) {
  .product-card img {
    height: 220px;
  }
}

@media (max-width: 768px) {
  .product-card img {
    height: 200px;
  }
  .section-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 576px) {
  .product-card img {
    height: 180px;
  }
  .section-title {
    font-size: 1.3rem;
  }
}


/* =========================================================
   SLIDER PRINCIPAL
   ========================================================= */
#sliderPrincipal .carousel-item img {
  width: 100%;
  height: 600px; /* ✅ Ajusta aquí la altura del slider */
  object-fit: cover;
  object-position: center;
  filter: brightness(85%);
  transition: height 0.3s ease-in-out;
}

/* Cuadro negro con textos y botón */
#sliderPrincipal .carousel-caption {
  bottom: 15%;
  background: rgba(0, 0, 0, 0.55);
  padding: 25px 35px;
  border-radius: 10px;
  max-width: 600px;
  margin: auto;
}

#sliderPrincipal .carousel-caption h3 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
}

#sliderPrincipal .carousel-caption p {
  font-size: 1.2rem;
  color: #f1f1f1;
  margin-bottom: 15px;
}

#sliderPrincipal .carousel-caption .btn {
  font-size: 1.1rem;
  padding: 10px 22px;
  border-radius: 8px;
}

/* Controles (flechas) */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: invert(1);
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 992px) {
  #sliderPrincipal .carousel-item img {
    height: 500px; /* Laptop/Tablet grande */
  }

  #sliderPrincipal .carousel-caption h3 {
    font-size: 1.8rem;
  }

  #sliderPrincipal .carousel-caption p {
    font-size: 1rem;
  }

  #sliderPrincipal .carousel-caption .btn {
    font-size: 1rem;
    padding: 8px 18px;
  }
}

@media (max-width: 768px) {
  #sliderPrincipal .carousel-caption {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 15px 20px;
    bottom: 10%;
  }

  #sliderPrincipal .carousel-item img {
    height: 420px; /* Tablet */
  }

  #sliderPrincipal .carousel-caption h3 {
    font-size: 1.4rem;
  }

  #sliderPrincipal .carousel-caption p {
    font-size: 0.95rem;
  }

  #sliderPrincipal .carousel-caption .btn {
    font-size: 0.9rem;
    padding: 6px 15px;
  }
}

@media (max-width: 576px) {
  #sliderPrincipal .carousel-item img {
    height: 360px; /* Celulares */
  }

  #sliderPrincipal .carousel-caption {
    padding: 10px 15px;
    bottom: 8%;
  }

  #sliderPrincipal .carousel-caption h3 {
    font-size: 1.1rem;
  }

  #sliderPrincipal .carousel-caption p {
    font-size: 0.85rem;
  }

  #sliderPrincipal .carousel-caption .btn {
    font-size: 0.8rem;
    padding: 5px 12px;
  }
}


/*PAGINA DE DETALLE DE PRODUCTOS

*/


/* === Banner superior === */
.banner-producto {
  display: flex;              /* activa flexbox */
  align-items: center;        /* centra vertical */
  justify-content: center;    /* centra horizontal */
  text-align: center;
  height: 220px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* El div oscuro interno centrado */
.banner-producto .bg-dark {
  display: flex;             /* flex para centrar contenido interno */
  flex-direction: column;    /* vertical */
  align-items: center;       /* centra horizontal */
  justify-content: center;   /* centra vertical */
  padding: 1rem 2rem;
  max-width: 90%;            /* evita que ocupe todo el ancho y produzca scroll */
  margin: 0 auto;
}


.banner-producto h2 {
    margin-top: 60px;
  font-size: 2rem;
}
.banner-producto p {

  font-size: 1rem;
  opacity: 0.9;
}

/* === Imagen principal === */
.main-image {
  max-height: 480px;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.main-image:hover {
  transform: scale(1.02);
}

/* === Miniaturas === */
.miniatura {
  width: 90px;
  height: 90px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.miniatura:hover {
  transform: scale(1.05);
  border-color: #dc3545;
}

/* === Responsividad === */
@media (max-width: 992px) {
  .main-image {
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  .banner-producto {
    height: 160px;
  }
  .banner-producto h2 {
    font-size: 1.5rem;
  }
  .banner-producto p {
    font-size: 0.9rem;
  }
  .main-image {
    max-height: 320px;
  }
  .miniatura {
    width: 70px;
    height: 70px;
  }
  h2.fw-bold {
    font-size: 1.4rem;
  }
  h3.text-danger {
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .main-image {
    max-height: 260px;
  }
  .miniatura {
    width: 60px;
    height: 60px;
  }
  .d-flex.gap-3 {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    width: 100%;
  }
}




/*ANIMACIAON DE CARRITO*/

#toastCarrito {
    min-width: 200px;     /* ancho mínimo */
    max-width: 250px;     /* ancho máximo */
    font-size: 0.85rem;   /* tamaño de texto más pequeño */
    padding: 0.5rem;      /* menos padding */
}

#toastCarrito .toast-body {
    padding: 0.25rem 0.5rem; /* reducir padding interno */
}


@media (max-width: 768px) {
  #toast-container {
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
  }

  
}

@media (max-width: 576px) {
    #toast-container {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }

    #toastCarrito {
        min-width: 180px;
        max-width: 220px;
        font-size: 0.8rem;
    }
}



/* Animación de botón al añadir al carrito */
@keyframes agregarCarritoAnim {
  0% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.2) rotate(-10deg); }
  50% { transform: scale(1.3) rotate(10deg); }
  75% { transform: scale(1.2) rotate(-5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.add-cart.animado {
  animation: agregarCarritoAnim 0.5s ease;
}

.add-cart i.fa-check {
  color: #fff;
}



/*footer*/



/*Boton flotante de watsapp*/

/* Botón flotante de WhatsApp */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366; /* color oficial WhatsApp */
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    font-size: 28px;
    z-index: 9999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 14px rgba(0,0,0,0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 15px;
        right: 15px;
    }
}

@media (max-width: 576px) {
    .whatsapp-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
        bottom: 12px;
        right: 12px;
    }
}



/*actualizacion en carrito tabla*/

.quantity-input {
    display: flex;
    align-items: center;
}

.quantity-input input {
    max-width: 50px;
}

.quantity-input button {
    padding: 0.25rem 0.5rem;
}



/* ===================== CATEGORÍAS ===================== */
/* Sidebar categorías */
.filtro-categoria-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
    position: relative; /* normal, sube con scroll */
}

.btn-toggle-categorias {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-toggle-categorias i {
    transition: transform 0.3s ease;
}

.filtro-categoria-cuerpo.cerrado {
    display: none;
}
