/* =====================
   BODY Y RESET
===================== */
body {
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #f9f9f9;
}

/* =====================
   FONDO INDEX
===================== */
.fondo {
  background-image: url(../assets/fondoPrueba.svg);
  background-size: cover;
  background-position: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 110%;
  height: 110%;
  z-index: -1;
  transition: transform 0.1s ease-out;
}

/* =====================
   FONDO MAIN
===================== */
body.fondomain {
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* para que el contenido no quede centrado verticalmente */
  min-height: 100vh;           /* permite que el body crezca si hay mucho contenido */
  margin: 0;
  padding: 0;
  overflow: auto;              /* habilita scroll */
  background-color: #f9f9f9;
}
.fondomain {
  background-image: url(../assets/fondoPrepage.svg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* para que el fondo quede fijo al scrollear */
  width: 100%;
  min-height: 100vh;
}


/* =====================
   MELTING TEXT INDEX
===================== */
.melting-text-container {
  position: relative;
  overflow: hidden;
}

.melting-text {
  font-size: 6rem;
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
  position: relative;
  animation: melt 5s infinite ease-in-out;
  background: linear-gradient(90deg, #6F5E86, #F29690, #FFD078);
  -webkit-background-clip: text;
  color: transparent;
}

.melting-text::before,
.melting-text::after {
  content: 'BIENVENIDO';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #6F5E86, #F29690, #FFD078);
  -webkit-background-clip: text;
  color: transparent;
  z-index: -1;
  transform: scaleY(0.5);
  opacity: 0.5;
  animation: drip 5s infinite ease-in-out;
}

.melting-text::after {
  filter: blur(10px);
  opacity: 0.3;
}

@keyframes melt {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(20px); }
}

@keyframes drip {
  0%, 100% { transform: scaleY(1); opacity: 0.5; }
  50% { transform: scaleY(1.1); opacity: 0.3; }
}

/* =====================
   CARD INDEX
===================== */
.card {
  background-color: #cccccc26;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px 40px;
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.05);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -5px rgba(124, 58, 237, 0.2);
}

.card h4 {
  color: white;
}

/* =====================
   INPUT Y BOTON INDEX
===================== */
input {
  padding: 10px;
  font-size: 1rem;
  margin-bottom: 10px;
  width: 250px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

button {
  padding: 10px 20px;
  font-size: 1rem;
  background-color: #007BFF;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}

/* =====================
   CHECKBOX INDEX
===================== */
#mayorDeEdadContainer {
  margin-top: 10px;
  color: white;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

#mayorDeEdadCheckbox {
  appearance: none;
  -webkit-appearance: none;
  background-color: transparent;
  border: 2px solid #FFD078;
  border-radius: 4px;
  width: 18px;
  height: 18px;
  position: relative;
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
}

#mayorDeEdadCheckbox:checked {
  background-color: #FFD078;
}

#mayorDeEdadCheckbox:checked::after {
  content: "✓";
  color: #3D3056;
  font-size: 14px;
  position: absolute;
  top: -1px;
  left: 3px;
}

/* =====================
   MAIN - SALUDO
===================== */
.tituloBnvnd {
  font-size: 2rem;
  color: white;
  background-color: rgba(255, 239, 239, 0.139);
  padding: 10px 15px;
  border-radius: 20px;
  text-align: center;
  margin-bottom: 20px;
}

/* =====================
   MAIN - CARRITO
===================== */
.carrito-container {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 25px 30px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  max-width: 480px;
  margin: 20px auto;
}

.carrito-container h2 {
  text-align: center;
  color: #fff;
  font-size: 2rem;
  margin-bottom: 15px;
}

#listaCarrito {
  list-style: none;
  padding: 0;
  margin-top: 12px;
}

#listaCarrito li {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-weight: 500;
}

/* Inputs y botones solo dentro del carrito */
.carrito-container input[type="text"], 
.carrito-container input[type="number"] {
  padding: 10px;
  font-size: 1rem;
  margin-bottom: 12px;
  width: 100%;
  border: none;
  border-radius: 8px;
  outline: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.carrito-container button {
  padding: 10px 22px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background-color: #6a5acd;
  transition: all 0.3s ease;
  margin: 5px;

}

.carrito-container button:hover {
  background-color: #483d8b;
}

/* Mensajes carrito */
#mensajeCarrito {
  font-weight: bold;
  margin-top: 10px;
  color: #fff;
}

/* =====================
   RESPONSIVE MAIN
===================== */
@media (max-width: 500px) {
  .carrito-container {
    width: 90%;
    padding: 20px;
  }
}

/* ====== CARDS DE PRODUCTOS ====== */
.productos-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  padding: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.card-vino {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
  backdrop-filter: blur(6px);
}

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

.card-vino img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
}

.card-vino h3 {
  color: #fff;
  margin: 10px 0 5px;
}

.card-vino .desc {
  font-size: 0.9rem;
  color: #ddd;
  margin-bottom: 8px;
}

.card-vino .precio {
  font-weight: bold;
  color: #ffd078;
  margin-bottom: 10px;
}

.btn-agregar {
  background-color: #6a5acd;
  border: none;
  color: white;
  padding: 8px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-agregar:hover {
  background-color: #483d8b;
}

/* ====== HEADER CARRITO ====== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
}

.carrito-icono {
  font-size: 1rem;
  padding: 8px 14px;
  background-color: #ffd078;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.carrito-icono:hover {
  background-color: #f5c85a;
}
