*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:'Poppins', sans-serif;
}

body{
  background:#F0F8FF;
  color:#4b5d63;
}

/* NAVBAR */
nav{
  width:100%;
  padding:15px 8%; 
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#dff4f3;
  position:sticky;
  top:0;
  z-index:1000;
  box-shadow:0 2px 10px rgba(0,0,0,0.05);
}

.logo{
  display:flex;
  align-items:center;
  gap:10px;
}

.logo img{
  width:60px;   
  height:60px;  
  object-fit:contain;
}

nav ul{
  display:flex;
  list-style:none;
  gap:25px;
}

nav ul li a{
  text-decoration:none;
  color:#6d8b92;
  font-size:15px;
  font-weight:500;
  transition:0.3s;
}

nav ul li a:hover{
  color:#5fa7a5;
}

/* Contenedor del carrito + botón hamburguesa (a la derecha del nav) */
.nav-derecha{
  display:flex;
  align-items:center;
  gap:8px;
}

.menu-toggle{
  display:none;
  background:none;
  border:none;
  font-size:26px;
  line-height:1;
  color:#5fa7a5;
  cursor:pointer;
  padding:4px 8px;
}

/* DROPDOWN NAVBAR (Productos) */

.nav-dropdown{
  position:relative;
}

.nav-dropdown > a::after{
  content:'▾';
  margin-left:5px;
  font-size:11px;
}

.submenu{
  display:block;
  opacity:0;
  visibility:hidden;
  transform:translate(-50%, 8px);
  position:absolute;
  top:calc(100% + 12px);
  left:50%;
  background:white;
  border-radius:15px;
  box-shadow:0 10px 25px rgba(0,0,0,0.08);
  list-style:none;
  min-width:160px;
  padding:8px;
  z-index:1001;
  transition:opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.nav-dropdown:hover .submenu,
.nav-dropdown:focus-within .submenu,
.nav-dropdown.submenu-abierto .submenu{
  opacity:1;
  visibility:visible;
  transform:translate(-50%, 0);
}

.submenu li a{
  display:block;
  padding:8px 12px;
  border-radius:10px;
  white-space:nowrap;
}

.submenu li a:hover{
  background:#dff4f3;
}

@media(max-width:768px){
  nav{
    flex-direction:row;
    flex-wrap:wrap;
    justify-content:space-between;
    align-items:center;
    gap:0;
  }

  .menu-toggle{
    display:block;
  }

  nav ul{
    display:none;
    width:100%;
    flex-direction:column;
    gap:15px;
    text-align:center;
    order:4;
    margin-top:20px;
  }

  nav ul.menu-abierto{
    display:flex;
  }

  .nav-dropdown{
    width:100%;
  }

  .submenu{
    position:static;
    transform:none;
    box-shadow:none;
    background:#eef8f8;
    margin-top:0;
    display:none;
  }

  .nav-dropdown.submenu-abierto .submenu{
    display:flex;
    flex-direction:column;
    margin-top:10px;
    transform:none;
    left:auto;
  }
}

/* HERO */

.hero{
  height:60vh;
  background: url('./imagenes/kiacraft.portada.jpg') center/cover no-repeat;
  }

.hero-content h2{
  font-size:80px;
  color:#5fa7a5;
  margin-bottom:20px;
  font-family:'Great Vibes', cursive;
  font-weight:normal;
}

.hero-content p{
  font-size:18px;
  max-width:650px;
  margin:auto;
  line-height:1.7;
  color:#6f8c93;
}

.hero-content button{
  margin-top:35px;
  padding:14px 35px;
  border:none;
  border-radius:40px;
  background:#8fd0d0;
  color:white;
  font-size:16px;
  cursor:pointer;
  transition:0.3s;
  box-shadow:0 4px 15px rgba(143,208,208,0.3);
}

.hero-content button:hover{
  transform:translateY(-3px);
  background:#79c1c1;
}

/* PRODUCTOS */

.productos{
  padding:80px 8%;
}

.titulo{
  text-align:center;
  margin-bottom:50px;
}

.titulo h3{
  font-size:38px;
  color:#5fa7a5;
}

.cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:30px;
}

.card{
  background:white;
  border-radius:25px;
  overflow:hidden;
  box-shadow:0 6px 20px rgba(0,0,0,0.06);
  transition:0.3s;
  cursor: pointer;
}

.card:hover{
  transform:translateY(-8px);
}

.card img{
  width:100%;
  height:250px;
  object-fit:cover;
}

.card-content{
  padding:20px;
}

.card-content h4{
  color:#5fa7a5;
  margin-bottom:10px;
  font-size:22px;
}

.card-content p{
  color:#7a9197;
  font-size:15px;
  line-height:1.5;
}

.precio{
  margin-top:15px;
  font-size:20px;
  color:#73b8c7;
  font-weight:600;
}

/* PÁGINA DE PRODUCTOS (productos.html) */

.tienda-container{
  padding:60px 8%;
}

.titulo-pagina{
  text-align:center;
  margin-bottom:50px;
}

.titulo-pagina h2{
  font-size:38px;
  color:#5fa7a5;
}

.grid-productos{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(250px, 300px));
    gap:30px;
    justify-content:center;
  }

.producto-card{
  background:white;
  border-radius:25px;
  overflow:hidden;
  box-shadow:0 6px 20px rgba(0,0,0,0.06);
  transition:0.3s;
  display:flex;
  flex-direction:column;
  height:100%;
}

.producto-card:hover{
  transform:translateY(-8px);
}

.producto-imagen img{
  width:100%;
  height:250px;
  object-fit:cover;
  display:block;
}

.producto-info{
  padding:20px;
  display:flex;
  flex-direction:column;
  flex:1;
}

.producto-titulo{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:2.6em;
}

.producto-categoria{
  display:inline-block;
  font-size:12px;
  font-weight:600;
  color:#8fd0d0;
  text-transform:uppercase;
  letter-spacing:0.5px;
  margin-bottom:8px;
}

.producto-titulo{
  color:#5fa7a5;
  margin-bottom:10px;
  font-size:20px;
}

.producto-precio{
  margin-top:10px;
  font-size:20px;
  color:#73b8c7;
  font-weight:600;
}

/* CTA PERSONALIZADOS */

.personalizados-cta{
  text-align:center;
  padding:60px 8%;
}

.personalizados-cta h3{
  font-size:32px;
  color:#5fa7a5;
  margin-bottom:30px;
}

.personalizados-cta-botones{
  display:flex;
  justify-content:center;
  gap:20px;
  flex-wrap:wrap;
}

.personalizados-cta-botones button{
  width:auto;
  padding:14px 30px;
  border-radius:40px;
}

.producto-boton--whatsapp{
  background:#8fd0d0;
}

.producto-boton--whatsapp:hover{
  background:#79c1c1;
}

/* FOOTER */

footer{
  margin-top:60px;
  background:#dff4f3;
  text-align:center;
  padding:25px;
  color:#6d8b92;
  font-size:14px;
}

@media(max-width:768px){

  .hero-content h2{
    font-size:42px;
  }

  .hero{
    height:0;
    padding-top:38.46%; /* ⚠ ajustá este número, ver abajo cómo */
    background-size:contain;
    background-position:top center;
    background-color:#F0F8FF;
    background-repeat:no-repeat;
  }
}

@media(max-width:600px){

  .tienda-container{
    padding:40px 4%;
  }

  .grid-productos{
    grid-template-columns:repeat(2, 1fr);
    gap:14px;
  }

  .producto-imagen img{
    height:160px;
  }

  .producto-info{
    padding:14px 10px;
  }

  .producto-categoria{
    font-size:9px;
  }

  .producto-titulo{
    font-size:14px;
    margin-bottom:4px;
  }

  .producto-precio{
    font-size:16px;
    margin-top:4px;
  }

  .producto-boton{
    font-size:0.65rem;
    padding:6px 8px;
    width:fit-content;
    align-self:center;
    margin-top:auto;
    white-space:nowrap;
  }
}
@media(max-width:600px){
  .cards{
    grid-template-columns:repeat(2, 1fr);
    gap:14px;
  }

  .card img{
    height:160px;
  }

  .card-content{
    padding:14px 10px;
  }

  .card-content h4{
    font-size:14px;
    margin-bottom:4px;
  }

  .card-content p{
    font-size:12px;
  }

  .precio{
    font-size:16px;
    margin-top:4px;
  }
}

/* ===== GALERÍA / VISOR EMERGENTE (Personalizados) ===== */

.modal-galeria{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.6);
  z-index:9999;
  justify-content:center;
  align-items:center;
  padding:20px;
}

.modal-galeria .modal-contenido{
  background:white;
  border-radius:20px;
  padding:30px;
  max-width:820px;
  width:100%;
  max-height:90vh;
  overflow-y:auto;
  position:relative;
  display:flex;
  flex-direction:row;
  align-items:flex-start;
  gap:20px;
}

.modal-galeria .btn-cerrar{
  position:absolute;
  top:15px;
  right:20px;
  font-size:28px;
  color:#8fd0d0;
  cursor:pointer;
  line-height:1;
  transition:0.3s;
  z-index:1;
}

.modal-galeria .btn-cerrar:hover{
  color:#5fa7a5;
}

.visor-contenedor{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:15px;
  flex:1.3;
  min-width:0;
  order:2;
}

.visor-info{
  flex:1;
  min-width:180px;
  order:3;
  padding-top:10px;
}

.visor-info h3{
  color:#5fa7a5;
  font-size:22px;
  margin-bottom:12px;
}

.visor-info p{
  color:#7a9197;
  font-size:14px;
  line-height:1.6;
}

.visor-info .producto-boton{
  margin-top:20px;
  max-width:220px;
}

.visor-imagen-principal{
  max-width:100%;
  max-height:65vh;
  object-fit:contain;
  border-radius:15px;
}

.flecha{
  background:#dff4f3;
  border:none;
  color:#5fa7a5;
  width:40px;
  height:40px;
  min-width:40px;
  border-radius:50%;
  font-size:16px;
  cursor:pointer;
  transition:0.3s;
  display:flex;
  align-items:center;
  justify-content:center;
}

.flecha:hover{
  background:#8fd0d0;
  color:white;
}

.miniaturas-contenedor{
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow-y:auto;
  max-height:65vh;
  padding-right:5px;
  order:1;
}

.miniatura{
  width:60px;
  height:60px;
  object-fit:cover;
  border-radius:10px;
  cursor:pointer;
  opacity:0.6;
  border:2px solid transparent;
  transition:0.3s;
  flex-shrink:0;
}

.miniatura:hover{
  opacity:0.9;
}

.miniatura.activa{
  opacity:1;
  border-color:#8fd0d0;
}

@media(max-width:600px){
  .modal-galeria{
    padding:10px;
    align-items:flex-start;
  }

  .modal-galeria .modal-contenido{
    flex-direction:column;
    align-items:center;
    max-height:95vh;
    padding:20px 15px;
    gap:10px;
    margin-top:10px;
  }

  .miniaturas-contenedor{
    flex-direction:row;
    max-height:none;
    max-width:100%;
    overflow-x:auto;
    overflow-y:visible;
    order:2;
    padding-bottom:5px;
  }

  .visor-contenedor{
    order:1;
    width:100%;
  }

  .visor-info{
    order:3;
    text-align:center;
    width:100%;
    padding-top:0;
  }

  .visor-info h3{
    font-size:18px;
    margin-bottom:6px;
  }

  .visor-info p{
    font-size:13px;
    line-height:1.4;
  }

  .visor-imagen-principal{
    max-height:32vh;
  }
  .flecha{
    width:32px;
    height:32px;
    min-width:32px;
    font-size:13px;
  }
}

/* ===== BOTÓN AGREGAR AL CARRITO (tarjeta de producto) ===== */

.producto-boton{
  margin-top:auto;
  width:100%;
  padding:10px;
  border:none;
  border-radius:20px;
  background:#8fd0d0;
  color:white;
  font-size:0.9rem;
  font-family:'Poppins', sans-serif;
  cursor:pointer;
  transition:0.3s;
}

.producto-boton:hover{
  background:#79c1c1;
}

/* ===== CARRITO ===== */

.carrito-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 14px;
  background:transparent;
  border:none;
  border-radius:20px;
  color:#5fa7a5;
  font-size:15px;
  font-family:'Poppins', sans-serif;
  cursor:pointer;
  transition:0.3s;
}

.carrito-btn:hover{
  background:#dff4f3;
}

#carrito-cantidad{
  font-size:0.8rem;
  font-weight:600;
  color:#5fa7a5;
  background:#dff4f3;
  border-radius:50%;
  padding:2px 7px;
}

.carrito-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  z-index:9998;
  opacity:0;
  pointer-events:none;
  transition:.3s;
  backdrop-filter:blur(2px);
}

.carrito-overlay--activo{
  opacity:1;
  pointer-events:all;
}

.carrito-panel{
  position:fixed;
  top:0;
  right:-380px;
  width:380px;
  max-width:90%;
  height:100vh;
  background:#fff;
  z-index:9999;
  transition:right .35s ease;
  display:flex;
  flex-direction:column;
  box-shadow:-12px 0 30px rgba(0,0,0,.08);
}

.carrito-panel--activo{
  right:0 !important;
}

.carrito__header{
  padding:18px 24px;
  border-bottom:1px solid #dff4f3;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.carrito__titulo{
  font-family:'Great Vibes', cursive;
  font-size:28px;
  color:#5fa7a5;
}

.carrito__cerrar{
  width:36px;
  height:36px;
  border:none;
  background:transparent;
  color:#8fd0d0;
  cursor:pointer;
  font-size:22px;
  transition:.25s;
}

.carrito__cerrar:hover{
  color:#5fa7a5;
}

.carrito__items{
  flex:1;
  overflow-y:auto;
  padding:20px;
}

.carrito__item{
  display:flex;
  align-items:center;
  gap:15px;
  background:#fff;
  border-radius:18px;
  padding:14px;
  margin-bottom:15px;
  border:1px solid #dff4f3;
  box-shadow:0 5px 15px rgba(0,0,0,.04);
}

.carrito__item-img{
  width:60px;
  height:60px;
  object-fit:cover;
  border-radius:12px;
  flex-shrink:0;
}

.carrito__item-detalle{
  flex:1;
  min-width:0;
}

.carrito__item-nombre{
  font-weight:500;
  font-size:0.85rem;
  color:#4b5d63;
}

.carrito__item-precio{
  font-size:0.8rem;
  color:#7a9197;
}

.carrito__item-quitar{
  width:32px;
  height:32px;
  border:none;
  border-radius:50%;
  background:#dff4f3;
  color:#5fa7a5;
  cursor:pointer;
  font-size:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:.3s;
}

.carrito__item-quitar:hover{
  background:#8fd0d0;
  color:white;
}

.carrito__vacio{
  text-align:center;
  padding:60px 20px;
  color:#7a9197;
}

.carrito__vacio-icono{
  font-size:3rem;
  opacity:0.3;
  margin-bottom:15px;
}

.carrito__footer{
  padding:20px 24px;
  border-top:1px solid #dff4f3;
}

.carrito__total{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  margin-bottom:20px;
}

.carrito__total-label{
  font-size:0.85rem;
  color:#7a9197;
}

.carrito__total-valor{
  font-size:1.25rem;
  font-weight:700;
  color:#4b5d63;
}

.carrito__checkout{
  width:100%;
  padding:14px;
  border:none;
  border-radius:30px;
  background:#8fd0d0;
  color:white;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  transition:.25s;
}

.carrito__checkout:hover{
  background:#79c1c1;
  transform:translateY(-2px);
  box-shadow:0 8px 18px rgba(143,208,208,.35);
}

/* ===== TOAST ===== */

.toast{
  position:fixed;
  bottom:30px;
  left:50%;
  transform:translateX(-50%) translateY(20px);
  background:#5fa7a5;
  color:#fff;
  padding:12px 24px;
  border-radius:40px;
  font-size:0.85rem;
  font-weight:500;
  box-shadow:0 8px 20px rgba(0,0,0,0.1);
  z-index:300;
  opacity:0;
  pointer-events:none;
  transition:all 0.3s;
}

.toast--activo{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}

/* ===== CHECKOUT ===== */

.checkout-container{
  padding:60px 8%;
  max-width:1100px;
  margin:0 auto;
}

.checkout-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:40px;
  margin-top:20px;
}

.checkout-resumen,
.checkout-pago{
  background:white;
  border-radius:25px;
  padding:30px;
  box-shadow:0 6px 20px rgba(0,0,0,0.06);
}

.checkout-resumen h3,
.checkout-pago h3{
  color:#5fa7a5;
  font-size:24px;
  margin-bottom:20px;
}

.checkout-item{
  display:flex;
  align-items:center;
  gap:15px;
  padding:12px 0;
  border-bottom:1px solid #eef6f6;
}

.checkout-item img{
  width:55px;
  height:55px;
  object-fit:cover;
  border-radius:10px;
}

.checkout-item-info{
  flex:1;
}

.checkout-item-nombre{
  font-size:0.9rem;
  color:#4b5d63;
}

.checkout-item-detalle{
  font-size:0.8rem;
  color:#7a9197;
}

.checkout-total{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:20px;
  padding-top:20px;
  border-top:2px solid #dff4f3;
  font-size:1.3rem;
  font-weight:600;
  color:#4b5d63;
}

.checkout-subtexto{
  color:#7a9197;
  font-size:0.9rem;
  margin-bottom:20px;
  line-height:1.6;
}

.metodo-pago{
  background:#f0f8fF;
  border-radius:15px;
  padding:15px 20px;
  margin-bottom:15px;
}

.metodo-pago h4{
  color:#5fa7a5;
  margin-bottom:8px;
  font-size:16px;
}

.metodo-pago p{
  font-size:0.9rem;
  color:#6f8c93;
  margin-bottom:4px;
}

.checkout-whatsapp{
  display:block;
  text-align:center;
  margin-top:10px;
  padding:14px;
  border-radius:30px;
  background:#8fd0d0;
  color:white;
  text-decoration:none;
  font-weight:600;
  transition:0.3s;
}

.checkout-whatsapp:hover{
  background:#79c1c1;
  transform:translateY(-2px);
}

@media(max-width:768px){
  .checkout-grid{
    grid-template-columns:1fr;
  }
}