 /* Evita que cualquier elemento se desborde por padding o width */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
  font-family: sans-serif;
}

 
 .titulo-categorias {
  background: #002c7d;
  color: white;
  padding: 10px;
  font-weight: bold;
}

.list-group-item {
  display: block;
  padding: 10px 15px;
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid #eee;
}

.subcat {
  font-size: 14px;
  padding-left: 25px;
}

.list-group-item:hover {
  background-color: #f4f4f4;
  text-decoration: none;
  color: #002c7d;
}

.categorias-horizontal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  background: #f5f5f5;
  border-radius: 10px;
  margin-bottom: 30px;
}

/* Tarjetas de categoría */
.categoria-box {
  flex: 1 1 calc(25% - 20px);
  min-width: 220px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 15px;
  border-top: 5px solid #1d4ed8;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.categoria-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.categoria-box img {
  width: 100%;
  max-height: 180px; /* ✅ Limita la altura */
  object-fit: contain; /* ✅ Mantiene proporciones sin deformar */
  margin-bottom: 10px;
}


.categoria-box h3 {
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: bold;
  color: #1d4ed8;
}

.categoria-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.categoria-box ul li {
  margin: 5px 0;
}

.categoria-box ul li a {
  color: #333;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.categoria-box ul li a:hover {
  color: #1d4ed8;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .categoria-box {
    flex: 1 1 100%;
  }
}

/* CARRITO LATERAL */

.carrito-lateral {
  position: fixed;
  top: 0;
  right: 0;
  width: 340px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  overflow-y: auto;
  transition: right 0.3s;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}
.carrito-lateral.mostrar { right: 0; }
.carrito-lateral.oculto { right: -100%; }
.carrito-header {
  padding: 15px;
  background: #f8f8f8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
}
.carrito-header h3 { margin: 0; font-size: 18px; }
.carrito-header button {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}
#carrito_contenido_ajax {
  padding: 20px;
  font-size: 15px;
}
.carrito-footer {
  margin-top: auto;
  padding: 15px;
  background: #fff;
  border-top: 1px solid #ddd;
  display: flex;
  gap: 10px;
  flex-direction: column;
}
.btn-realizar-pedido {
  background: #c00;
  color: #fff;
  font-weight: bold;
  border: none;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
  text-align: center;
}
.btn-realizar-pedido:hover {
  background: #a00;
}



.banner-destacado {
  background-color: #0069d9;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  font-weight: bold;
  font-family: sans-serif;
}
.banner-texto span {
  font-size: 16px;
}
.contador {
  display: flex;
  gap: 15px;
  align-items: center;
}
.contador div {
  text-align: center;
}
.contador strong {
  display: block;
  font-size: 18px;
}
.contador span {
  font-size: 12px;
}


/* Swiper contenedor */
.productos-swiper {
  width: 100%;
  overflow: hidden;
  padding: 20px 0;
  position: relative;
}

/* Cada slide */
.swiper-slide {
  width: auto !important;
  display: flex;
  align-items: stretch;
}

/* Tarjeta producto */
.producto {
  width: 220px;
  height: 500px;
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}
.producto:hover {
  transform: scale(1.02);
}

/* Título */
.producto p {
  font-size: 0.9em;
  line-height: 1.3;
  max-height: 3.9em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Botón abajo */
.form-carrito {
  margin-top: auto;
}

/* Etiquetas de oferta */
.etiqueta {
  background: #dc3545;
  color: #fff;
  padding: 4px 8px;
  font-size: 0.8em;
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 4px;
}
.badge-descuento {
  background: #ff9800;
  color: white;
  font-size: 0.75em;
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 6px;
  border-radius: 4px;
}

/* Detalles */
.estrellas {
  font-size: 1em;
  color: #ffc107;
  margin-top: 6px;
}
.estado-stock {
  font-size: 0.85em;
  font-weight: bold;
  margin-top: 6px;
}
.text-success { color: green; }
.text-warning { color: orange; }
.text-danger { color: red; }

/* Botón */
.btn-carrito {
  background-color: #f6a400;
  border: none;
  color: #fff;
  padding: 8px 12px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  transition: 0.2s;
  margin-top: 6px;
}
.btn-carrito:hover {
  background-color: #e38b00;
}
.btn-carrito[disabled] {
  background: #ccc;
  cursor: not-allowed;
}

/* ✅ Responsive: ajustar ancho y altura */
@media (max-width: 768px) {
  .producto {
    width: 180px;
    height: 480px;
    padding: 12px;
  }
  .producto p {
    font-size: 0.85em;
  }
}

@media (max-width: 480px) {
  .producto {
    width: 150px;
    height: auto;
    padding: 10px;
  }
  .producto img {
    max-width: 100%;
    height: auto;
  }
  .btn-carrito {
    padding: 6px 10px;
    font-size: 0.9em;
  }
}




.mosaico-banner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 40px 0;
}

.item-banner {
  position: relative;
  width: 320px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f4c81, #5bc0eb);
  color: white;
  box-shadow: 0 0 15px rgba(0,0,0,0.15);
  text-align: center;
}

.item-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.item-banner .contenido {
  padding: 15px;
}

.item-banner .titulo-top {
  font-size: 14px;
  margin: 5px 0;
  font-weight: 600;
}

.item-banner h3 {
  font-size: 20px;
  font-weight: bold;
  margin: 0;
}

.item-banner .producto {
  margin: 10px 0 5px;
  font-size: 14px;
  color: #000000; /* negro o el color que tú desees */
}

.item-banner .producto span {
  font-size: 13px;
  display: block;
  opacity: 1;
  color: #000000; /* también cambia el <span> */
}


.precios {
  margin-top: 10px;
}

.precios .oferta {
  font-size: 18px;
  font-weight: bold;
  color: #fff200;
  display: block;
}

.precios .normal {
  font-size: 14px;
  text-decoration: line-through;
  opacity: 0.7;
}



ody {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #f9f9f9;
}

.container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px;
  justify-content: space-between;
}

/* Sidebar izquierdo */
.sidebar {
  flex: 0 0 220px;
  background: #fff;
  border-right: 1px solid #ccc;
  padding: 15px;
}

/* Categorías */
.categoria-titulo {
  font-weight: bold;
  color: #570b8a;
  margin-bottom: 10px;
}
.categorias {
  list-style: none;
  padding: 0;
  margin: 0;
}
.categorias li {
  margin: 6px 0;
}
.categorias li a {
  text-decoration: none;
  color: #333;
  display: block;
  padding: 8px;
  border-radius: 4px;
  transition: 0.2s ease-in-out;
}
.categorias li a:hover {
  background-color: #570b8a;
  color: #fff;
}

/* Contenido central */
.main-content {
  flex: 1 1 600px;
  padding: 0 10px;
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .main-content,
  .sidebar {
    width: 100%;
  }
}


.slider {
  width: 100%;
  height: 600px; /* 🔁 Ajusta esta altura como prefieras (ej. 280px, 250px) */
  overflow: hidden;
  border-radius: 10px;
}

.slider img {
  width: 100%;
  height: 100%;
  display: block;
}

.beneficios {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.box {
  flex: 1 1 150px;
  background: #ffd800;
  color: black;
  text-align: center;
  padding: 12px;
  font-weight: bold;
  border-radius: 6px;
}

.destacado {
  background: #0040a3;
  color: white;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  text-align: center;
}

/* Productos */
.productos {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.producto {
  background: white;
  padding: 10px;
  border-radius: 6px;
  width: 200px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  position: relative;
  text-align: center;
}
.producto img {
  width: 100%;
  height: auto;
}
.etiqueta {
  position: absolute;
  top: 0;
  left: 0;
  background: gold;
  font-size: 12px;
  padding: 4px;
  border-bottom-right-radius: 6px;
}
.producto a {
  text-decoration: none;
  color: inherit;
}

/* Botón carrito */
.btn-carrito {
  margin-top: 10px;
  background: #f7a70c;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  width: 100%;
}
.btn-carrito:hover {
  background: #001e5a;;
}

/* Contacto lateral derecho */
.contacto {
  flex: 0 0 220px;
  padding: 20px;
  background: #001e5a;
  color: white;
  font-size: 14px;
  border-radius: 8px;
  min-height: 300px;
}

/* Responsive (para móviles) */
@media screen and (max-width: 768px) {
  .container {
    flex-direction: column;
    margin: 10px;
  }

  .sidebar,
  .contacto,
  .main-content {
    flex: 1 1 100%;
    margin-bottom: 20px;
  }

  .productos {
    justify-content: center;
  }

  
}

