/* === RESET === */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Playfair Display', serif;
  background: radial-gradient(circle at 20% 10%, #071226 0%, #0b1723 35%, #000814 100%);
  color: #e6eef9;
  background-attachment: fixed;
  background-size: cover;
  padding-top: 80px;
  transition: background 0.5s ease, color 0.3s ease;
}

/* === MENÚ SUPERIOR === */
.menu-superior {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  background: rgba(8,12,20,0.9);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  z-index: 10000;
}
.menu-superior ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  list-style: none;
  padding: 0.8rem 1rem;
  margin: 0;
}
.menu-superior a {
  text-decoration: none;
  color: #dbefff;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.menu-superior a:hover {
  background: #0077cc;
  color: white;
  transform: translateY(-2px);
}
.btn-apk {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff !important;
  padding: 0.45rem 0.95rem;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(37,211,102,0.18);
}

/* === BOTÓN DE TEMA === */
.boton-tema {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #ffffff;
  color: #333;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  padding: 0.55rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  cursor: pointer;
  z-index: 10001;
}

/* === FONDO ESTELAR === */
#estrellas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: -2; background: transparent;
}
.mostrar-estrellas {
  background-image: radial-gradient(white 1px, transparent 1px);
  background-size: 2px 2px;
  animation: moverEstrellas 80s linear infinite;
  opacity: 0.9;
}
@keyframes moverEstrellas {
  from { background-position: 0 0; }
  to { background-position: 1500px 1500px; }
}

#fugaces {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: -1;
}
.estrella-fugaz {
  position: absolute;
  width: 3px; height: 90px;
  background: linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0.1));
  opacity: 0.95;
  transform: rotate(45deg);
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.6));
}
.mostrar-fugaces .estrella-fugaz {
  animation: fugaz linear forwards;
}
@keyframes fugaz {
  0% { transform: translate(0,0) rotate(45deg); opacity: 1; }
  100% { transform: translate(-600px, 600px) rotate(45deg); opacity: 0; }
}

/* === LOGO NOCTURNO CON RESPLANDOR === */
.logo-nocturno {
  filter: brightness(1.2) drop-shadow(0 0 12px white);
  animation: resplandor 2.4s infinite ease-in-out;
}
@keyframes resplandor {
  0% { filter: brightness(0.9) drop-shadow(0 0 6px white); }
  50% { filter: brightness(1.6) drop-shadow(0 0 22px white); transform: scale(1.03); }
  100% { filter: brightness(0.9) drop-shadow(0 0 6px white); transform: scale(1); }
}
/* === ENCABEZADO === */
header {
  text-align: center;
  padding: 2.2rem 1rem 1rem;
  position: relative;
  z-index: 2;
}
.encabezado {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
/* Tamaño base del logo */
.logo-principal {
  width: 100px;
  max-width: 100%;
  height: auto;
  transition: transform 0.4s, filter 0.4s;
}

/* Ajuste para tablet */
@media (max-width: 900px) {
  .logo-principal {
    width: 80px;
  }
}

/* Ajuste para móvil */
@media (max-width: 600px) {
  .logo-principal {
    width: 65px;
  }
}
.titulo-especial {
  font-size: 2.6rem;
  color: #e6eef9;
  letter-spacing: 2px;
}
.animar-titulo {
  animation: deslizarTitulo 1.1s cubic-bezier(.2,.9,.2,1);
}
@keyframes deslizarTitulo {
  0% { transform: translateY(-60px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.subtitulo {
  color: #d0e0ff;
  margin-top: 0.2rem;
  font-size: 1rem;
}

/* === CATÁLOGO === */
main {
  padding: 1.5rem 1rem 3rem;
  z-index: 1;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.6rem;
  max-width: 1200px;
  margin: 0 auto;
}
.card {
  background: rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 12px 30px rgba(3,18,56,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.card:hover {
  transform: translateY(-10px) scale(1.01);
  box-shadow: 0 22px 44px rgba(3,18,56,0.12);
}
.card img {
  width: 100%;
  border-radius: 10px;
  height: 180px;
  object-fit: cover;
  cursor: pointer;
}
.card h3 {
  margin: 0.6rem 0 0.2rem;
  color: #25d366;
  font-size: 1.15rem;
  text-align: center;
}
.card p {
  color: #d0e0ff;
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 0.6rem;
}
.card .acciones {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  margin-top: auto;
}

/* === BOTONES GRANDES === */
.btn-grande {
  padding: 0.65rem 1.1rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  transition: transform 0.18s, box-shadow 0.18s;
}
.btn-carrito {
  background: linear-gradient(135deg, #ff9a00, #ff6a00);
  color: #fff;
  border: none;
}
.btn-wha {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  border: none;
}
.btn-ver {
  background: linear-gradient(135deg, #0077cc, #005fa3);
  color: #fff;
  border: none;
}
.btn-grande:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 32px rgba(0,0,0,0.18);
}

/* === MODAL DE IMAGEN === */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.85);
  z-index: 10002;
  animation: modalIn 0.35s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}
.modal.hidden {
  display: none;
}
.modal img {
  max-width: 92%;
  max-height: 86%;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
.modal button#cerrar {
  position: absolute;
  top: 22px;
  right: 30px;
  font-size: 1.6rem;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
}

/* === TARJETA DE CONTACTO === */
.perfil {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
  background: transparent;
}
.tarjeta-contacto {
  max-width: 420px;
  width: 100%;
  background: rgba(255,255,255,0.05);
  padding: 1.6rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 14px 36px rgba(3,18,56,0.06);
}
.logo {
  width: 70px;
  margin-bottom: 0.8rem;
}
.foto {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #25d366;
  margin-bottom: 0.8rem;
}
.tarjeta-contacto h2 {
  color: #25d366;
  margin-bottom: 0.2rem;
}
/* === CESTA FLOTANTE === */
.cesta-flotante {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10003;
  background: rgba(255,255,255,0.05);
  padding: 0.9rem;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(3,18,56,0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.icono-cesta {
  font-size: 1.3rem;
  color: #25d366;
}
.icono-cesta span {
  background: #25d366;
  color: #fff;
  padding: 0.22rem 0.6rem;
  border-radius: 10px;
  margin-left: 0.4rem;
  font-weight: 700;
}

/* === MODAL DE PEDIDO === */
.modal-pedido {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10004;
  background: rgba(0,0,0,0.7);
}
.modal-pedido.hidden {
  display: none;
}
.contenido-pedido {
  width: 95%;
  max-width: 520px;
  background: #fff;
  border-radius: 18px;
  padding: 1.6rem;
  text-align: left;
  box-shadow: 0 26px 60px rgba(3,18,56,0.14);
}
.contenido-pedido h2 {
  color: #25d366;
  margin-bottom: 0.6rem;
}
.contenido-pedido input,
.contenido-pedido select,
.contenido-pedido textarea {
  width: 100%;
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid #d0d8e6;
  margin-bottom: 0.6rem;
}

/* === SECCIONES INFORMATIVAS === */
section.info-extra,
section.asesoramiento,
section.seguimiento,
section.opiniones,
section.perfil {
  padding: 3rem 1rem;
  text-align: center;
  background: transparent;
}
.contenedor-info,
.contenedor-asesoramiento,
.contenedor-seguimiento,
.contenedor-opiniones,
.tarjeta-contacto {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(255,255,255,0.05);
  animation: aparecer 0.8s ease-out forwards;
  color: #ffffff;
}
@keyframes aparecer {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === TESTIMONIOS === */
.testimonio {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255,255,255,0.05);
  border-left: 5px solid #25d366;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
  color: #ffffff;
}
.testimonio p {
  font-size: 1rem;
}
.testimonio span {
  display: block;
  margin-top: 0.5rem;
  font-weight: bold;
  color: #25d366;
}

/* === FORMULARIOS === */
form textarea,
form input,
form select {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 1rem;
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  backdrop-filter: blur(4px);
}

/* === BOTONES VIBRANTES === */
form button,
.btn-solicitar,
.btn-vaciar,
.btn-enviar {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 12px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
form button:hover,
.btn-solicitar:hover,
.btn-vaciar:hover,
.btn-enviar:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 28px rgba(0,0,0,0.2);
}

/* === MODO OSCURO === */
body.tema-oscuro {
  background: radial-gradient(circle at 20% 10%, #071226 0%, #0b1723 35%, #000814 100%);
  color: #f0f4ff;
  background-attachment: fixed;
  background-size: cover;
}
body.tema-oscuro h1,
body.tema-oscuro h2,
body.tema-oscuro h3,
body.tema-oscuro p,
body.tema-oscuro li,
body.tema-oscuro label,
body.tema-oscuro span {
  color: #ffffff;
}
body.tema-oscuro .subtitulo,
body.tema-oscuro .card p,
body.tema-oscuro .testimonio p,
body.tema-oscuro .contenedor-info p,
body.tema-oscuro .contenedor-info li {
  color: #d0e0ff;
}
body.tema-oscuro .card,
body.tema-oscuro .tarjeta-contacto,
body.tema-oscuro .contenedor-info,
body.tema-oscuro .contenedor-asesoramiento,
body.tema-oscuro .contenedor-seguimiento,
body.tema-oscuro .contenedor-opiniones,
body.tema-oscuro .modal,
body.tema-oscuro .modal-pedido,
body.tema-oscuro .cesta-flotante {
  background-color: #0f1720;
  border: 1px solid rgba(255,255,255,0.05);
  color: #f0f4ff;
}
body.tema-oscuro input,
body.tema-oscuro select,
body.tema-oscuro textarea {
  background-color: #1a2330;
  border: 1px solid #3a4a60;
  color: #ffffff;
}
body.tema-oscuro button {
  background: linear-gradient(135deg, #0077cc, #005fa3);
  color: #ffffff;
  border: none;
}
body.tema-oscuro .btn-apk {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #ffffff !important;
}
body.tema-oscuro .estrella-fugaz {
  background: linear-gradient(90deg, #aaffff, rgba(170,255,255,0.05));
  filter: drop-shadow(0 0 10px #aaffff);
  opacity: 1;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .titulo-especial { font-size: 2.1rem; }
  .logo-principal { width: 90px; }
  .grid { gap: 1rem; padding: 1rem; }
}
@media (max-width: 600px) {
  .menu-superior ul {
    gap: 0.5rem;
    padding: 0.6rem;
    overflow-x: auto;
    justify-content: flex-start;
  }
  .titulo-especial { font-size: 1.6rem; }
  .card img { height: 150px; }
  .boton-tema {
    left: 12px;
    bottom: 12px;
    padding: 0.45rem;
  }
  .cesta-flotante {
    bottom: 12px;
    right: 12px;
    padding: 0.6rem;
  }
}
