/* ===============================
   📌 VARIABLES GLOBALES
=============================== */
:root {
  --color-principal: #C00000;
  --color-secundario: #333333;
  --color-fondo-tarjeta: #ffffff;
  --navbar-bg: rgba(197, 0, 0, 0.6);
  --fondo-img: url("img/fondo44.jpg");
  --fondo-header-img: url("img/IMG-20251122-WA0151.jpg");
  --fondo-nav-img: url("img/f9653340-7806-11ee-bcbc-b524174ba5c7jpg"); /* opcional nav */
  --fondo-opacidad: 0.3;
  --header-height: 64px;
  --nav-height: 60px;
}

/* ===============================
   📌 RESET Y CONFIGURACIÓN BASE
=============================== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--color-secundario);
  position: relative;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================
   FONDO FIJO ESTABLE (SIN ANIMACIÓN)
   NO CAMBIA CON BARRA URL
========================= */
body::before{
  content:"";
  position:fixed;
  top:0;
  left:0;

  /* 🔒 viewport estable (NO depende del navegador) */
  width:100vw;
  height:100svh;

  /* 🎨 fondo real con tu imagen */
  background:
    linear-gradient(
      180deg,
      rgba(7,16,33,var(--fondo-opacidad)) 0%,
      rgba(12,19,32,var(--fondo-opacidad)) 100%
    ),
    var(--fondo-img);

  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;

  z-index:-1;

  /* 🧠 evita repaints y saltos */
  transform:translateZ(0);
  backface-visibility:hidden;
  will-change:transform;
}

/* ===============================
   📌 HEADER
=============================== */
header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  color: #fff;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1002;
  background-color: rgba(0,0,0,0.7);
  background-image: var(--fondo-header-img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: overlay;
}

header img.logo {
  width: 60px;
  height: auto;
  border-radius: 50px;
  box-shadow: 0px 1px 5px #000 inset, 0 0 10px 1px #fff;
}

header h1, header h2, header .titulo {
  margin: 0;
  font-size: clamp(1rem, 1.8vw, 1.8rem);
  color: #fff;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
  animation: brilloSuave 3s infinite alternate;
}

/* Redes */
header .redes {
  display: flex;
  align-items: center;
  gap: 6px;
}

header .redes img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  transition: transform 0.3s ease;
}
header .redes img:hover {
  transform: scale(1.1);
}

/* ===============================
   📌 NAV
=============================== */
nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 10px;
  padding: 7px;
  border-radius: 8px;
  box-shadow: 1px 8px 20px #320000 inset, 0 0 8px -6px #fff;
  position: fixed;
  top: calc(var(--header-height));
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  max-width: 1200px;
  height: 5vh;
  z-index: 1001;
  background-color: var(--navbar-bg);
  background-image: var(--fondo-nav-img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: overlay;
  backdrop-filter: blur(20px);
  flex-wrap: nowrap;
  overflow: hidden;
}

nav a {
  flex: 1 1 auto;
  min-width: 64px;
  max-width: 240px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--color-secundario);
  font-weight: 700;
  font-size: clamp(0.8rem,1.6vw,1rem);
  padding: 10px 14px;
  border-radius: 8px;
  background: linear-gradient(145deg,#fff,#e6e6e6);
  box-shadow: 0px 0px 7px #000 inset, 0 6px 8px -3px #000;
  transition: transform 0.18s ease-in-out, box-shadow 0.18s ease-in-out;
}

nav a:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 1px 5px 10px #000 inset, 0 0 8px -6px #fff;
}

nav a:active {
  transform: translateY(1px) scale(0.97);
}

nav a.active {
  color: var(--color-principal);
  background: linear-gradient(145deg,#fff7f7,#ffecec);
}

nav a:focus {
  outline: none;
  box-shadow: none;
}

/* ===============================
   📌 MAIN
=============================== */
main {
  max-width: 1100px;
  margin: 18px auto;
  padding: 0 14px;
  padding-top: calc(var(--header-height) + var(--nav-height) + 16px);
}

.welcome-text {
  text-align: center;
  color: var(--color-principal);
  margin: 18px 0;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
  animation: aparecer 2.5s ease-out;
}

.welcome-text h2 {
  margin: 1px 0;
  font-size: 2rem;
}

.hero {
  display: flex;
  justify-content: center;
  padding: 5px;
}

.img-bienvenida {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 50px;
  box-shadow: 0 0px 15px 1px rgba(255,255,255,1);
  animation: zoom 4.5s ease-out;
}

/* ===============================
   📌 GRID DE TARJETAS
=============================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 15px;
  margin-top: 12px;
}

.card {
  background: var(--color-fondo-tarjeta) url("img/pngtree-warm-pink-cute-mother-and-baby-background-image_147126.jpg") no-repeat center center;
  background-size: cover;
  border-radius: 70px 0 70px 0;
  padding: 10px;
  text-align: center;
  box-shadow: 0 0px 2px 2px rgba(178,34,34,1);
  position: relative;
  overflow: hidden;
}

.card img {
  width: 98%;
  height: 210px;
  object-fit: cover;
  border-radius: 70px 0 70px 0;
  margin-bottom: 5px;
  box-shadow: 0 0px 9px 2px rgba(0,0,0,1);
}

.price {
  color: var(--color-principal);
  font-weight: 800;
}

/* ===============================
   📌 FOOTER
=============================== */
footer {
  text-align: center;
  padding: 4px;
  color: #fff;
  margin-top: -10px;
  background: rgba(0,0,0,0.7);
  border-top-left-radius: 8px;
  border-top-right-radius: 1px;
}

/* ===============================
   📌 BOTONES FIJOS (Footer) 
=============================== */
.footer-botones {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-botones a {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 72px;
  height: 72px;
  background: rgba(255,255,255,0.18);
  border-radius: 50%;
  overflow: hidden;
  backdrop-filter: blur(3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  transition: 0.18s ease;
}

.footer-botones a:hover {
  transform: translateY(-4px) scale(1.08);
}

.footer-botones img {
  width: 85%;
  height: 85%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.footer-botones span {
  display: none !important;
}

/* ===============================
   📌 ANIMACIONES
=============================== */
@keyframes aparecer {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes zoom {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes brilloSuave {
  0% { text-shadow: 0 0 5px var(--color-secundario); }
  50% { text-shadow: 0 0 20px var(--color-secundario), 0 0 30px var(--color-principal); }
  100% { text-shadow: 0 0 5px var(--color-secundario); }
}

/* ===============================
   📌 HOVER ADICIONAL
=============================== */
nav a:hover,
.card button:hover {
  background-color: var(--color-secundario);
  color: #b22222;
  box-shadow: 0 0 10px var(--color-secundario);
  transform: scale(1.15);
  transition: all 0.3s ease-in-out;
}

/* ===============================
   📌 RESPONSIVE
=============================== */
@media(max-width:768px){
  .img-bienvenida { width: 92%; }
  nav { gap: 6px; top: var(--header-height); }
  header img.logo { width: 64px; }
}

@media(max-width:480px){
  nav a { font-size: 0.8rem; padding: 6px 8px; }
  .grid { gap: 10px; }
  header h1 { font-size: 1.5rem; }
  header img.logo { width: 50px; }
  main { padding-top: calc(var(--header-height) + var(--nav-height) + 12px); }
  .footer-botones a { width: 62px; height: 62px; }
  .footer-botones img { width: 86%; height: 86%; }
}
