/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Estilo general del body */
body {
  font-family: Arial, sans-serif;
  background-color: #c6e0ff;
  color: #222;
  padding: 20px;
}

/* Título principal */
h1 {
  font-size: 28px;
  color: #111;
  margin-bottom: 10px;
}

/* Subtítulos */
h2 {
  font-size: 22px;
  color: #333;
  margin: 20px 0 10px;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.btn-ver-catalogo {
  background-color: #0056d2;
  color: white;
  font-weight: 500;
  border-radius: 50px;
  padding: 12px 28px;
  font-size: 16px;
  transition: background-color 0.2s ease;
}

.btn-ver-catalogo:hover {
  background-color: #0045a5;
  color: white;
}


/* Contenedor de productos */
.producto {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 20px;
  background-color: #fff;
  max-width: 300px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

/* Imagen del producto */
.producto img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Nombre del producto */
.producto h3 {
  font-size: 18px;
  margin-top: 10px;
  margin-bottom: 5px;
}

/* Precio */
.producto p {
  font-size: 16px;
  font-weight: bold;
  color: #009900;
  margin: 5px 0;
}

/* Botón */
button, .btn {
  padding: 8px 16px;
  background-color: #0066cc;
  border: none;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}

button:hover, .btn:hover {
  background-color: #0055a5;
}

/* Sección de ofertas */
.ofertas {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* Logo en navbar */
.navbar-brand img {
  height: 50px;  /* Puedes aumentar a 60px o más si quieres */
  width: auto;   /* Mantiene la proporción */
}

.is-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.card.metodo-activo {
  border: 2px solid #007bff;
  box-shadow: 0 0 10px rgba(0,123,255,0.2);
}

.metodo-pago.metodo-activo {
  border: 2px solid #007bff !important;
  box-shadow: 0 0 10px rgba(0,123,255,0.2);
  transition: all 0.3s ease;
}

/* 🎯 Estilo para el título del banner */
.titulo-banner {
  color: rgb(255, 23, 23);
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
  font-weight: bold;
}
/* Animación de entrada tipo fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInMove 1s ease-out forwards;
}

@keyframes fadeInMove {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Retrasos progresivos para los productos */
.fade-in-delay-1 { animation-delay: 0.2s; }
.fade-in-delay-2 { animation-delay: 0.4s; }
.fade-in-delay-3 { animation-delay: 0.6s; }
.fade-in-delay-4 { animation-delay: 0.8s; }
.fade-in-delay-5 { animation-delay: 1s; }
.fade-in-delay-6 { animation-delay: 1.2s; }
.fade-in-delay-7 { animation-delay: 1.4s; }
.fade-in-delay-8 { animation-delay: 1.6s; }
.fade-in-delay-9 { animation-delay: 1.8s; }
.fade-in-delay-10 { animation-delay: 2s; }
.fade-in-delay-11 { animation-delay: 2.2s; }
.fade-in-delay-12 { animation-delay: 2.4s; }

/* Estilo mejorado para título de secciones */
.titulo-seccion {
  font-size: 2.2rem;
  font-weight: 700;
  color: #111;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
  margin-bottom: 30px;
}

.titulo-seccion::after {
  content: "";
  width: 60px;
  height: 4px;
  background-color: #007bff;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.contenedor-productos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
}
.producto {
    border: 1px solid #ccc;
    padding: 10px;
    width: 220px;
    text-align: center;
    background: #fff;
}
.producto img {
    max-width: 100%;
    height: auto;
}
.precio {
    color: green;
    font-weight: bold;
    margin: 10px 0;
}

.disponibilidad {
    font-size: 14px;
    color: #555;
    margin-top: 5px;
}


.metodo-pago:has(input:checked) {
  border: 2px solid #0d6efd;
  background-color: #eaf1ff;
}


.resumen-compra {
  max-width: 800px;
  margin: auto;
}

.detalle-pedido {
  background-color: #f6fdf7;
  border-left: 6px solid #0d6efd;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.detalle-pedido:hover {
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.producto-item img {
  max-height: 80px;
  object-fit: cover;
  border: 1px solid #beffd7;
  padding: 2px;
  background-color: #fcffcf;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
}

.card-text {
  font-size: 0.95rem;
}

.card-opinion {
  animation: fadeInUp 0.8s ease both;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pagination {
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 6px;
}

.page-item .page-link {
  border-radius: 8px;
  color: #007bff;
  transition: all 0.2s ease-in-out;
  border: 1px solid #dcdcdc;
}

.page-item.active .page-link {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
  font-weight: bold;
}

.page-item .page-link:hover {
  background-color: #0056b3;
  color: white;
  border-color: #0056b3;
}

.page-item.disabled .page-link {
  background-color: transparent;
  border: none;
  color: #888;
  pointer-events: none;
}

/* ✅ ESTILOS CORREGIDOS Y MEJORADOS PARA SELECT2 EN EL MODAL */
.modal-body .select2-container {
    width: 100% !important; /* Asegura que el contenedor de Select2 ocupe todo el ancho */
}

.modal-body .select2-container--default .select2-selection--single {
    height: calc(2.25rem + 2px) !important; /* Alinea la altura con otros campos de formulario de Bootstrap */
    border: 1px solid #ced4da !important;  /* Asegura que el borde sea como el de Bootstrap */
    border-radius: 0.25rem !important;
}

.modal-body .select2-selection__rendered {
    line-height: 2.25rem !important; /* Ajusta la altura de la línea para centrar el texto */
    padding: 0 12px !important;      /* Añade un poco de espacio horizontal */
    
    /* Reglas para el desbordamiento de texto */
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100% !important;
}

.modal-body .select2-selection__arrow {
    height: 100% !important;
    width: 20px !important;
}

/* Contenedor principal para el scroll horizontal */
.horizontal-scroll-container {
    overflow-x: auto;         /* Permite el scroll horizontal */
    overflow-y: hidden;       /* Oculta el scroll vertical */
    white-space: nowrap;      /* Evita que los elementos se envuelvan a la siguiente línea */
    padding-bottom: 1rem;     /* Espacio para la barra de desplazamiento */
    -webkit-overflow-scrolling: touch; /* Mejora el desplazamiento en dispositivos iOS */
    scrollbar-width: none;    /* Oculta la barra de desplazamiento en Firefox */
}

/* Oculta la barra de desplazamiento en navegadores WebKit (Chrome, Safari, etc.) */
.horizontal-scroll-container::-webkit-scrollbar {
    display: none;
}

/* Contenedor interno de las reseñas */
.review-carousel {
    display: flex;
    gap: 20px; /* Espacio entre cada tarjeta de reseña */
}

/* Estilo para cada tarjeta de reseña individual */
.review-card-item {
    flex: 0 0 auto;           /* Permite que los elementos mantengan su tamaño fijo */
    width: 300px;             /* Ancho fijo para cada tarjeta de reseña */
    max-width: 80vw;          /* Máximo del 80% del viewport para dispositivos pequeños */
}

.review-card-item .card {
    height: 100%; /* Asegura que todas las tarjetas tengan la misma altura */
}

.resumen-compra {
  max-width: 900px;
  margin: auto;
}

.resumen-compra .alert {
  background-color: #e9f7ef;
  border-left: 5px solid #0d6efd;
}

.producto-item img {
  max-height: 80px;
  object-fit: cover;
  border: 1px solid #ddd;
  background-color: #fff;
  padding: 2px;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
}

.card-text {
  font-size: 0.95rem;
}

.receipt-actions .btn {
  min-width: 180px;
}

.copy-badge {
  cursor: pointer;
  user-select: none;
}