/* ╔═════════════════════════════════════╗
   ║ VARIABLES Y RESET                  ║
   ╚═════════════════════════════════════╝ */
:root {
  --violeta: #8246ab;
  --azul: #31829b;
  --gris-fondo: #ede6f5;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', 'Arial', sans-serif;
  background: linear-gradient(135deg, var(--gris-fondo) 0%, #fff 100%);
  color: #333;
  min-height: 100vh;
}

/* ╔═════════════════════════════════════╗
   ║ NAVBAR                             ║
   ╚═════════════════════════════════════╝ */
.navbar {
  width: 100%;
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 2px 8px 0 rgba(50,30,80,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 8vw;
  z-index: 10;
  animation: fadeDown 1s ease;
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-25px);}
  to { opacity: 1; transform: translateY(0);}
}
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo {
  height: 44px;
}
.brand {
  font-size: 2rem;
  font-weight: bold;
  color: var(--violeta);
  letter-spacing: -1px;
}
.brand-blue {
  color: var(--azul);
  font-weight: normal;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  text-decoration: none;
  color: var(--violeta);
  font-weight: 500;
  font-size: 1.1rem;
  transition: color 0.3s, font-size 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--azul);
}

/* ╔═════════════════════════════════════╗
   ║ NAVBAR RESPONSIVE (ajustado y limpio)
   ╚═════════════════════════════════════╝ */
@media (max-width: 900px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 4vw;
  }
  .logo-container {
    margin-bottom: 4px;
    gap: 8px;
  }
  .logo {
    height: 32px;
  }
  .brand {
    font-size: 1.1rem;
  }
  .nav-links {
    gap: 14px;
  }
  .nav-links a {
    font-size: 0.98rem;
  }
}

@media (max-width: 650px) {
  .navbar {
    padding: 7px 3vw;
    flex-direction: column;
    gap: 2px;
  }
  .logo {
    height: 24px;
  }
  .brand {
    font-size: 0.92rem;
  }
  .nav-links {
    gap: 9px;
  }
  .nav-links a {
    font-size: 0.89rem;
  }
}

@media (max-width: 450px) {
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100vw;
  }
  .navbar {
    align-items: flex-start;
    padding: 4px 2vw;
  }
  .logo {
    height: 20px;
  }
  .brand {
    font-size: 0.8rem;
  }
  .nav-links a {
    font-size: 0.78rem;
  }
}

/* ╔═════════════════════════════════════╗
   ║ ESPACIADOR DE NAVBAR FIJA          ║
   ╚═════════════════════════════════════╝ */
.navbar-spacer {
  height: 72px;
}
@media (max-width: 900px) {
  .navbar-spacer { height: 86px; }
}
@media (max-width: 650px) {
  .navbar-spacer { height: 54px; }
}
@media (max-width: 450px) {
  .navbar-spacer { height: 44px; }
}
/* ╔═════════════════════════════════════╗
   ║ MENÚ APILADO EXTRA PEQUEÑO         ║
   ╚═════════════════════════════════════╝ */
@media (max-width: 450px) {
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100vw;
  }
  .navbar {
    align-items: flex-start;
  }
}

/* ╔═════════════════════════════════════╗
   ║ CARRUSEL DE INICIO (INDEX)         ║
   ╚═════════════════════════════════════╝ */
.carrusel-section {
  background: transparent;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.carrusel {
  position: relative;
  width: 95vw;
  max-width: 700px;
  height: 350px;
  margin: 0 auto 26px auto;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 8px 24px 0 rgba(50,30,80,0.11);
  background: #fff;
  animation: fadeIn 1.2s;
}
@keyframes fadeIn {
  from {opacity:0;}
  to {opacity:1;}
}
.carrusel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  opacity: 0;
  transition: opacity 0.8s;
  left: 0; top: 0;
  border-radius: 22px;
}
.carrusel-img.active {
  opacity: 1;
  position: relative;
}
.carrusel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--violeta);
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: 8px 14px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.78;
  z-index: 2;
  transition: background 0.3s, opacity 0.2s;
}
.carrusel-btn:hover {
  background: var(--azul);
  opacity: 1;
}
.carrusel-btn.prev { left: 18px; }
.carrusel-btn.next { right: 18px; }
.carrusel-indicadores {
  text-align: center;
  margin-top: 18px;
}
.indicador {
  display: inline-block;
  width: 12px; height: 12px;
  background: var(--violeta);
  border-radius: 50%;
  margin: 0 4px;
  opacity: 0.3;
  transition: opacity 0.3s;
  cursor: pointer;
}
.indicador.active {
  opacity: 1;
  background: var(--azul);
}
.carrusel-titulo {
  margin-top: 24px;
  text-align: center;
  animation: fadeIn 1.6s;
}
.carrusel-titulo h1 {
  font-size: 2.4rem;
  color: var(--violeta);
  margin-bottom: 8px;
  font-weight: bold;
  letter-spacing: -1px;
}
.carrusel-titulo p {
  color: #4a4a4a;
  font-size: 1.14rem;
}

/* ╔═════════════════════════════════════╗
   ║ CARRUSEL COMPACTADO EN MOBILE      ║
   ╚═════════════════════════════════════╝ */
@media (max-width: 650px) {
  .carrusel {
    height: 145px;
    max-width: 99vw;
    border-radius: 11px;
  }
  .carrusel-img {
    border-radius: 11px;
  }
  .carrusel-indicadores {
    margin-top: 12px;
  }
  .carrusel-titulo h1 {
    font-size: 1.09rem;
    margin-bottom: 5px;
  }
  .carrusel-titulo p {
    font-size: .98rem;
  }
}

/* =====================================================
   PRODUCTOS (CATÁLOGO)
===================================================== */
.productos-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 110px 12px 64px 12px; /* padding-top igual que navbar */
}
.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
  align-items: center;
}
.filtro-input {
  border: 1.5px solid #e3e7fa;
  padding: 8px 16px;
  border-radius: 1em;
  font-size: 1em;
  background: #f7faff;
  transition: border .2s;
}
.filtro-input:focus {
  border: 1.5px solid var(--violeta);
  outline: none;
}
.catalogo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.product-card {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 2px 16px #4a63a61a;
  padding: 20px 16px 16px 16px;
  text-align: center;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.product-card:hover {
  box-shadow: 0 4px 22px var(--violeta)44;
  transform: translateY(-4px) scale(1.02);
}
.product-img {
  width: 100%;
  max-height: 170px;
  object-fit: contain;
  margin-bottom: 14px;
  border-radius: 14px;
  background: #f7faff;
}
.product-title {
  font-size: 1.08em;
  font-weight: 700;
  margin: 8px 0 10px 0;
  color: var(--violeta);
  min-height: 2.2em;
}
.product-precio {
  color: var(--azul);
  font-size: 1.2em;
  font-weight: 700;
  margin-bottom: 6px;
}
.product-stock {
  color: #4caf50;
  font-size: .97em;
  margin-bottom: 10px;
}
.product-stock.agotado {
  color: #c62828;
}
.btn-comprar {
  background: linear-gradient(90deg, var(--violeta), var(--azul) 80%);
  color: #fff;
  font-weight: 600;
  padding: 8px 0;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.07em;
  margin-top: 10px;
  transition: background .2s, filter .2s;
  box-shadow: 0 1px 6px #8d7cf921;
}
.btn-comprar:hover {
  filter: brightness(1.08);
  background: linear-gradient(90deg, var(--azul) 60%, var(--violeta) 100%);
}
/* Estilo para el selector de rubros */
.filtro-select {
  padding: 8px 14px;
  border: 2px solid var(--violeta);
  border-radius: 8px;
  background: #fff;
  color: var(--violeta);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.filtro-select:hover {
  background: var(--violeta);
  color: #fff;
}

.filtro-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(130, 70, 171, 0.3);
}

/* Opciones del dropdown */
.filtro-select option {
  font-weight: bold;
  color: #333;
}

/* =====================================================
   SECCIÓN CONSULTAR PUNTOS - MOBILE FIRST Y PROFESIONAL
===================================================== */
.puntos-container {
  max-width: 370px;
  width: 94vw;
  margin: 110px auto 0 auto;
  background: #fff;
  padding: 2.1em 1.3em 1.6em 1.3em;
  border-radius: 1.3em;
  box-shadow: 0 2px 14px 0 rgba(130,70,171,0.10), 0 1.5px 8px 0 rgba(49,130,155,0.06);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  animation: fadeIn .85s;
}

.puntos-container h1 {
  color: var(--violeta);
  margin-bottom: .65em;
  font-size: 2.1em;
  letter-spacing: -1px;
  font-weight: bold;
}

#puntos-form {
  display: flex;
  flex-direction: column;
  gap: .8em;
  align-items: center;
}

#puntos-form label {
  font-weight: 500;
  color: var(--azul);
  margin-bottom: .3em;
  font-size: 1.08em;
}

#puntos-form input[type="text"] {
  margin: 0;
  padding: 0.7em 1.1em;
  width: 98%;
  border-radius: 0.9em;
  border: 1.5px solid var(--violeta);
  font-size: 1.08em;
  outline: none;
  background: var(--gris-fondo);
  transition: border 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px #e0e0e020;
}
#puntos-form input[type="text"]:focus {
  border: 2px solid var(--azul);
  box-shadow: 0 1px 8px #31829b22;
}

#puntos-form button[type="submit"] {
  background: linear-gradient(90deg, var(--violeta) 70%, var(--azul) 100%);
  color: #fff;
  border: none;
  border-radius: 0.9em;
  padding: 0.85em 1.3em;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.22s, filter 0.18s;
  box-shadow: 0 1px 6px #8d7cf929;
  font-weight: 700;
  letter-spacing: .5px;
}
#puntos-form button[type="submit"]:hover {
  background: linear-gradient(90deg, var(--azul) 80%, var(--violeta) 100%);
  filter: brightness(1.08);
}

#resultado-puntos {
  margin-top: 1.15em;
  font-size: 1.11em;
  color: var(--azul);
  min-height: 2em;
  word-break: break-word;
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(30px);}
  to {opacity: 1; transform: translateY(0);}
}
/* ╔═════════════════════════════════════╗
   ║ BOTÓN VOLVER AL INICIO (PUNTOS)    ║
   ╚═════════════════════════════════════╝ */
.btn-volver {
  display: inline-block;
  margin: 1.7em auto 0 auto;
  padding: 0.75em 1.7em;
  background: linear-gradient(90deg, var(--azul), var(--violeta) 90%);
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 1em;
  text-decoration: none;
  font-size: 1em;
  box-shadow: 0 1px 4px #aaa2;
  transition: background 0.22s, filter 0.18s;
}
.btn-volver:hover {
  filter: brightness(1.08);
  background: linear-gradient(90deg, var(--violeta) 90%, var(--azul));
  color: #fff;
}
/* =====================================================
   SOBRE NOSOTROS
===================================================== */
.sobre-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 120px 20px 40px 20px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 28px 0 rgba(130,70,171,0.09);
  margin-top: 50px;
}
.sobre-hero {
  text-align: center;
  margin-bottom: 38px;
}
.sobre-hero h1 {
  color: var(--violeta);
  font-size: 2.2rem;
  margin-bottom: 8px;
  font-weight: bold;
  letter-spacing: -1px;
}
.sobre-hero p {
  font-size: 1.17rem;
  color: #555;
}
.sobre-historia h2, .sobre-equipo h2, .sobre-valores h2 {
  color: var(--azul);
}
.sobre-historia, .sobre-equipo, .sobre-valores {
  margin-bottom: 32px;
}
.equipo-grid {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 10px;
}
.equipo-grid div {
  flex: 1 1 180px;
  min-width: 160px;
  background: #f5f1fa;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 2px 10px 0 rgba(130,70,171,0.06);
  text-align: center;
}
.equipo-grid h3 {
  color: var(--violeta);
  margin-bottom: 5px;
}
.sobre-foto img {
  max-width: 90%;
  border-radius: 20px;
  box-shadow: 0 4px 28px 0 rgba(49,130,155,0.10);
}

/* =====================================================
   CONTACTO
===================================================== */
.contacto-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 120px 20px 40px 20px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 22px 0 rgba(49,130,155,0.08);
  margin-top: 50px;
  animation: fadeIn 1.2s;
}
.contacto-hero {
  text-align: center;
  margin-bottom: 35px;
}
.contacto-hero h1 {
  color: var(--violeta);
  font-size: 2.1rem;
  margin-bottom: 8px;
}
.contacto-hero p {
  color: #444;
  font-size: 1.13rem;
}
.contacto-flex {
  display: flex;
  gap: 38px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.contacto-form {
  flex: 1 1 340px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f6f1fb;
  border-radius: 14px;
  padding: 30px 20px;
  box-shadow: 0 1px 6px 0 rgba(130,70,171,0.05);
  animation: fadeIn 1.4s;
}
.contacto-form label {
  color: var(--violeta);
  font-weight: 500;
}
.contacto-form input,
.contacto-form textarea {
  font-size: 1rem;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #e0d6ef;
  outline: none;
  resize: none;
  margin-bottom: 4px;
  transition: border 0.2s;
}
.contacto-form input:focus,
.contacto-form textarea:focus {
  border: 1.6px solid var(--violeta);
}
.contacto-form button {
  margin-top: 8px;
  padding: 11px 0;
  border: none;
  background: var(--violeta);
  color: #fff;
  font-size: 1.11rem;
  border-radius: 7px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 6px 0 rgba(130,70,171,0.06);
}
.contacto-form button:hover {
  background: var(--azul);
}
.contacto-info {
  flex: 1 1 260px;
  background: #e1f4fa;
  border-radius: 14px;
  padding: 28px 20px;
  color: #31829b;
  box-shadow: 0 1px 7px 0 rgba(49,130,155,0.08);
  animation: fadeIn 1.7s;
}
.contacto-info h2 {
  color: var(--azul);
  margin-bottom: 10px;
}
.contacto-info li {
  margin-bottom: 8px;
  font-size: 1.05rem;
  color: #27718b;
}
.contacto-info a {
  color: var(--violeta);
  text-decoration: none;
  transition: color 0.2s;
}
.contacto-info a:hover {
  color: var(--azul);
}
.contacto-redes {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}
.contacto-redes img {
  width: 28px;
  height: 28px;
  filter: grayscale(40%);
  transition: filter 0.2s;
}
.contacto-redes img:hover {
  filter: none;
}

/* =====================================================
   FOOTER
===================================================== */
footer {
  width: 100%;
  background: var(--violeta);
  color: #fff;
  text-align: center;
  padding: 24px 0 16px 0;
  font-size: 1.1rem;
  letter-spacing: 1px;
  margin-top: 42px;
}

/* =====================================================
   RESPONSIVE (CELULARES Y TABLETS)
===================================================== */
@media (max-width: 900px) {
  .contacto-flex { flex-direction: column; gap: 22px; }
  .contacto-main { padding: 80px 4vw 30px 4vw; }
}
@media (max-width: 750px) {
  .navbar { padding: 12px 4vw; }
  .logo { height: 36px;}
  .brand { font-size: 1.3rem;}
  .carrusel { height: 220px;}
  .carrusel-section { min-height: 360px;}
  .productos-section, .productos-main { padding: 38px 0 32px 0;}
}
@media (max-width: 650px) {
  .productos-main {
    padding: 16px 3vw 64px 3vw;
  }
  .catalogo-grid {
    grid-template-columns: 1fr;
  }
  .navbar {
    flex-direction: column;
    gap: 8px;
    padding: 10px 4vw;
  }
}
@media (max-width: 600px) {
  .puntos-container {
    max-width: 99vw;
    width: 99vw;
    padding: 1.6em 0.3em 1.4em 0.3em;
    border-radius: 0.9em;
    margin-top: 86px;
    box-shadow: 0 1px 8px 0 rgba(130,70,171,0.14), 0 1px 4px 0 rgba(49,130,155,0.09);
  }
  .puntos-container h1 {
    font-size: 1.25em;
    margin-bottom: .3em;
  }
  #puntos-form input[type="text"] {
    font-size: .97em;
    padding: .65em .8em;
    width: 98vw;
    max-width: 410px;
  }
  #puntos-form button[type="submit"] {
    font-size: .95em;
    padding: .7em 1.1em;
  }
  #resultado-puntos {
    font-size: .99em;
    min-height: 1.7em;
  }
}
@media (max-width: 480px) {
  .nav-links { gap: 15px; font-size: 1rem;}
  .carrusel { height: 160px; }
  .carrusel-titulo h1 { font-size: 1.2rem;}
}
@media (max-width: 700px) {
  .sobre-main {
    padding: 80px 6vw 28px 6vw;
    margin-top: 30px;
  }
  .equipo-grid {
    flex-direction: column;
    gap: 12px;
  }
}
.aviso-vencimiento {
  margin: 20px 0 10px 0;
  color: #b63b1c;
  font-weight: bold;
  background: #fff3e2;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
}


