/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

/* FONDO LILA SUAVE */
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, #f3e9fb 0%, transparent 40%),
    radial-gradient(circle at 80% 0%, #eadcf5 0%, transparent 35%),
    linear-gradient(180deg, #f7f1fb, #efe6f7);
  color: #333;
}

/* HEADER */
.header {
  display: flex;
  align-items: flex-start; /* Mantiene logo y menú en la parte superior */
  justify-content: space-between;
  padding: 14px 20px;
  width: 100%;
  position: relative; /* Necesario para posicionar el texto centrado */
}

.header-left {
  flex: 0 0 auto;
}

.header-right {
  flex: 0 0 auto;
}

.logo {
  height: 50px;
  border-radius: 8px;
}

.brand-name {
  position: absolute;
  top: 80%; /* Posición vertical centrada */
  left: 50%; /* Posición horizontal centrada */
  transform: translate(-50%, -50%); /* Ajusta exactamente al centro */
  font-size: 22px;
  font-weight: 600;
  color:#E6C98A;
  white-space: nowrap;
}


/* BRAND */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  height: 50px;
}


.header-left {
  flex: 0 0 auto;
}

.header-right {
  flex: 0 0 auto;
}

.logo {
  height: 50px;
  border-radius: 8px;
}

.brand-name {
  position: absolute;
  ; /* dorado vivo */
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

/* MENU */
.menu {
  display: flex;
  gap: 20px;
  align-items: center;
}

.menu a {
  text-decoration: none;
  color: #555;
  font-weight: 600;
  font-size: 16px;
}

.menu a:hover {
  color: #b59b6a;
}

/* MAIN */
.main {
  max-width: 1200px;
  margin: auto;
  padding: 30px 16px;
  text-align: center;
}

.titulo {
  margin-bottom: 20px;
  color: #333;
}

/* GRID PRODUCTOS */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 220px));
  gap: 20px;
  justify-content: center;
}

/* CARD PRODUCTO */
.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* empuja botones hacia abajo */
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%; /* importante */
}


.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
}

/* BOTONES */
button {
  margin-top: 8px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: #c6a6da;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: #b18ec9;
}

/* BOTÓN VOLVER */
.boton-volver {
  display: inline-block;
  margin-bottom: 20px;
  padding: 8px 16px;
  background: #c6a6da;
  color: white;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  float: right;
}

.boton-volver:hover {
  background: #b18ec9;
}

/* SECCIONES */
.section {
  max-width: 900px;
  margin: 40px auto;
  padding: 24px;
  border-radius: 14px;
  text-align: center;
}

/* CARRITO */
.carrito-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.carrito-item {
  width: 100%;
  max-width: 600px;
  display: flex;
  gap: 12px;
  background: rgba(255,255,255,0.9);
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}

/* MOBILE */
@media (max-width: 768px) {
  .brand-name {
    font-size: 20px;
  }

  .menu a {
    font-size: 14px;
  }

  .boton-volver {
    float: none;
    display: block;
    margin: 0 auto 20px;
  }
}
/* Animación al agregar al carrito */
@keyframes pop {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.agregar-animacion {
  animation: pop 0.3s ease;
}
/* =====================
   RESPONSIVE HEADER (MÓVIL)
===================== */
@media (max-width: 768px) {

  .header {
    align-items: center;
    padding: 10px 12px;
  }

  .logo {
    height: 42px;
  }

  /* Título más pequeño y un poco más abajo */
  .brand-name {
    top: 75%;
    font-size: 18px;
  }

  /* Menú más compacto */
  .header-right.menu {
    display: flex;
    gap: 10px;
  }

  .header-right.menu a {
    font-size: 14px;
  }
}

/* =====================
   TELÉFONOS MUY PEQUEÑOS
===================== */
@media (max-width: 480px) {

  .brand-name {
    top: 80%;
    font-size: 16px;
  }

  .header-right.menu a {
    font-size: 13px;
  }
}
.card h3 {
  font-size: 16px;
  margin: 8px 0;
  min-height: 40px;     /* fuerza misma altura */
  line-height: 1.2;
}
.card-actions {
  margin-top: auto; /* empuja los botones al fondo */
  display: flex;
  gap: 8px;
  justify-content: center;
}
.card img {
  display: block;          /* elimina comportamiento inline */
  margin: 0 auto 8px auto; /* centra horizontalmente */
  width: 100%;
  max-width: 220px;        /* evita que se vea gigante */
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

@media (max-width: 480px) {
  .card img {
    max-width: 100%;
    height: 160px;
  }
}
