/* ---------------------- RESET GENERAL ---------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---------------------- TIPOGRAFÍA GENERAL ---------------------- */
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  background-color: #f4f4f4;
  color: #222;
}

/* ---------------------- BARRA DE NAVEGACIÓN ---------------------- */
.navbar {
  background-color: #0b5173;
  padding: 12px 0;
  width: 100%;
}

.navbar ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
}

.navbar a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.navbar a:hover,
.navbar a.active {
  text-decoration: underline;
}

/* ---------------------- CONTENIDO PRINCIPAL ---------------------- */
.main {
  background-color: #f7f2ea;
  padding: 50px 10%;
  min-height: 70vh;
}

.logo {
  color: #f37c20;
  font-weight: bold;
}

h1 {
  text-align: center;
  color: #333;
}

hr {
  margin: 20px auto;
  width: 90%;
  border: 1px solid #ddd;
}

h2 {
  color: #333;
  margin-top: 20px;
}

p, li {
  color: #444;
  line-height: 1.6;
  margin-top: 10px;
}

ul {
  margin-top: 10px;
  padding-left: 20px;
}

a {
  color: #0073aa;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  justify-items: center;
  padding: 20px 0;
}

/* Tarjetas*/
.card{
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Mantiene botones abajo */
  text-align: center;
  transition: transform 0.3s;
}

.card:hover {
  transform: scale(1.02);
}

/* Descuento */
.discount {
  background-color: #62d353;
  color: white;
  padding: 5px;
  border-radius: 5px;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 10px;
}

/* Título y precios */
.card h3 {
  font-size: 18px;
  margin: 10px 0;
}

.price {
  font-size: 24px;
  font-weight: bold;
  color: #28a745;
}

.original-price {
  font-size: 14px;
  text-decoration: line-through;
  color: #888;
  margin-bottom: 10px;
}

/* Botones */
.buttons {
  display: flex;
  justify-content: center; /* Centra los botones */
  gap: 10px;
  margin-top: 10px;
  flex-shrink: 0; /* Evita que los botones se compriman */
}

button {
  padding: 10px 16px;
  font-size: 14px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  flex: 1; /* Hace que los botones ocupen el mismo ancho */
}

.buy {
  background-color: #007bff;
  color: white;
}

.add-to-cart {
  background-color: #28a745;
  color: white;
}

button:hover {
  opacity: 0.9;
}


/* ---------------------- SUCURSALES ---------------------- */
.sucursal-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}

.sucursal {
  display: block;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  width: 250px;
  text-align: center;
  padding: 15px;
  color: #003366;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
}

.sucursal img {
  max-width: 100%;
  border-radius: 5px;
  margin-bottom: 10px;
}

.sucursal h3 {
  color: #b22222;
  margin-bottom: 5px;
  font-size: 18px;
}

.sucursal p {
  font-size: 14px;
  line-height: 1.4;
  color: #444;
}

.sucursal:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  color: #b22222;
}

/* ---------------------- PIE DE PÁGINA ---------------------- */
.footer {
  background-color: #0b5e35;
  color: white;
  width: 100%;
  padding: 10px 0;
  border-top: 2px solid #ffffff;
  font-size: 13px;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

.footer-logo img {
  width: 55px;
}

.footer-info {
  flex: 1;
  text-align: center;
  line-height: 1.5;
  font-size: 13px;
}

.footer-link {
  color: #f9e10a;
  font-weight: bold;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

.footer-info a {
  color: white;
  text-decoration: underline;
}

.footer-right {
  text-align: right;
  font-size: 13px;
}

.footer-right .facebook {
  display: inline-block;
  background-color: #ffffff;
  color: #0b5e35;
  font-weight: bold;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  text-decoration: none;
  margin-bottom: 5px;
}

.footer-right p {
  margin: 0;
  font-size: 12px;
}

/* ---------------------- RESPONSIVO FOOTER ---------------------- */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .footer-right {
    text-align: center;
  }
}

/* ---------------------- MAPAS ---------------------- */
.contenedores-mapas {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 20px;
}

.mapa-tarjeta {
  background-color: #f0f8ff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  padding: 20px;
  width: 300px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.mapa-tarjeta h3 {
  margin-bottom: 10px;
  color: #0b5173;
}

.mapa-tarjeta p {
  margin-bottom: 5px;
  color: #333;
}

.mapa-tarjeta:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.mapa {
  margin-top: 15px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.mapa iframe {
  width: 100%;
  height: 200px;
  border: 0;
}

/* ---------------------- RESPONSIVO MAPAS ---------------------- */
@media (max-width: 900px) {
  .mapa-tarjeta {
    width: 45%;
  }
}

@media (max-width: 600px) {
  .mapa-tarjeta {
    width: 90%;
  }
}

/* ---------- SLIDER AUTOMÁTICO ---------- */
.slider {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: -50px;  /* CORREGIDO */
  margin-bottom: 50px;
  background-color: #f8f1e4;
}

.slider-container {
  position: relative;
  width: 80%;
  max-width: 900px;
  height: 450px;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.slider-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slider-container img.activa {
  opacity: 1;
}

/* ---------------------- MODAL ---------------------- */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

.modal-content {
  position: relative;
  background-color: #ffffff;
  padding: 30px 25px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  animation: fadeIn 0.3s ease-in-out;
}

.modal-content h2 {
  color: #0b5173;
  margin-bottom: 12px;
}

.modal-content p {
  color: #333;
  line-height: 1.5;
  margin-bottom: 10px;
}

.close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #555;
  cursor: pointer;
}

.close:hover {
  color: #0b5173;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------------------- CONTACTO ---------------------- */
header {
  background-color: #0b572a;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 40px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

nav a {
  color: white;
  font-weight: bold;
  text-decoration: none;
}

nav a.activo, nav a:hover {
  text-decoration: underline;
}

.contenedor {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  padding: 40px;
  background: white;
  margin: 40px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.info-contacto, .formulario {
  flex: 1;
  min-width: 250px;
  padding: 20px;
}

.info-contacto h2,
.formulario h2 {
  color: #0b572a;
}

form {
  display: flex;
  flex-direction: column;
}

label {
  margin-top: 10px;
  font-weight: bold;
}

input, textarea {
  margin-top: 5px;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

button {
  margin-top: 15px;
  padding: 10px;
  background-color: #0b572a;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

button:hover {
  background-color: #087a3a;
}
