* {
  box-sizing: border-box;
  max-width: 100%;
}

/* ------------------ Fondo ------------------ */
body {
  font-family: 'Segoe UI', sans-serif;
  background: radial-gradient(circle, rgba(255, 255, 255, 1) 42%, rgb(205, 113, 113) 62%, rgb(179, 106, 106) 100%);
  margin: 0;
  color: #333;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  z-index: 0;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  z-index: -1;
}

/* ------------------ Encabezado ------------------ */
header {
  text-align: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

h1 {
  margin: 0;
}

h3 {
  text-align: center;
  font-size: 26px;
  color: #d1225b;
  font-weight: bold;
  margin: 40px 0 10px;
  text-transform: uppercase;
  position: relative;
}

h3::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background-color: #d1225b;
  margin: 10px auto 0;
  border-radius: 4px;
}


p {
  font-size: 35px; 
  color: #d1225b; 
  font-weight: bold;
}

/* ------------------ Productos ------------------ */
.productos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 4px;
  gap: 20px;
}

.producto {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 15px;
  width: 100%;
  max-width: 300px;
  text-align: center;
  transition: transform 0.2s ease;
  box-sizing: border-box;
}

.producto:hover {
  transform: scale(1.03);
}

.producto img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ------------------ Botones de medidas ------------------ */
.medidas {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.medida-btn {
  width: 40px;
  height: 40px;
  background-color: #ffe1ec;
  color: #d1225b;
  border: 2px solid #d1225b;
  font-weight: bold;
  font-size: 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.medida-btn:hover,
.medida-btn.selected {
  background-color: #d1225b;
  color: white;
  transform: scale(1.08);
}

/* ------------------ Botón agregar ------------------ */
.btn-agregar {
  background-color: #ff85a2;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 10px;
}

.btn-agregar:hover {
  background-color: #e46a8d;
}

/* ------------------ Carrito ------------------ */
.carrito {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background: #fff0f5;
  padding: 20px;
  border-left: 2px solid #e46a8d;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  overflow-y: auto;
  transition: right 0.4s ease;
}

.carrito.visible {
  right: 0;
}

main.con-carrito-abierto .productos {
  margin-right: 320px;
  transition: margin-right 0.4s ease;
}

.carrito ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

/* ------------------ Botón quitar ------------------ */
.btn-quitar {
  background-color: #ff6b6b;
  color: white;
  border: none;
  padding: 4px 8px;
  margin-left: 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
}

.btn-quitar:hover {
  background-color: #e04848;
}

/* ------------------ Botón cerrar carrito ------------------ */
.btn-cerrar {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #e04848;
}

.btn-cerrar:hover {
  transform: scale(1.2);
}

/* ------------------ Botón WhatsApp ------------------ */
.btn-whatsapp {
  background-color: #25d366;
  color: #fff;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  margin-top: 10px;
  width: 100%;
  display: none;
}

.btn-whatsapp:hover {
  background-color: #1ebd5a;
}

/* ------------------ Redes sociales ------------------ */
.social-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 30px 0;
}

.social-icon {
  width: 40px;
  height: 40px;
  background-color: #f0f0f0;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-icon.whatsapp {
  background-color: #25d366;
}

.social-icon.instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-flotante-carrito {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #ff85a2;
  color: white;
  border: none;
  padding: 15px 18px;
  border-radius: 50%;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 1100;
  transition: background-color 0.3s ease;
}

.btn-flotante-carrito:hover {
  background-color: #e46a8d;
}

/* Solo mostrar si el carrito está cerrado */
.carrito.visible ~ .btn-flotante-carrito {
  display: none;
}

.brand-filter {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 20px;
  margin-bottom: 30px;
}

.logo-btn {
  width: 160px;
  height: auto;
  cursor: pointer;
  border-radius: 20px;
  transition: all 0.3s ease;
  border: 2px solid #d1225b;
  padding: 8px;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 0.7;
}

.logo-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  background: #ffe6ef;
  opacity: 1;
}

.logo-btn.selected {
  border: 3px solid #a00c3f;
  box-shadow: 0 0 12px rgba(209, 34, 91, 0.4);
  opacity: 1;
}

.producto {
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.producto.oculto {
  display: none;
}

.oculto {
  display: none;
}

body.no-scroll {
  overflow: hidden;
}

#btn-subir {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 1000;
  background-color: #d1225b;
  color: white;
  border: none;
  padding: 12px 16px;
  font-size: 18px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

#btn-subir:hover {
  background-color: #a00c3f;
  transform: scale(1.1);
}



/* ------------------ Responsive: Celulares ------------------ */
@media (max-width: 680px) {
  .carrito {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 30vh; /* altura máxima dinámica */
    height: auto; /* auto para crecer si hay pocos productos */
    width: 100%;
    top: auto;
    border-left: none;
    border-top: 2px solid #e46a8d;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.15);
    background: #fff0f5;
    padding: 15px 20px;
    overflow-y: visible; /* para que no se esconda nada */
    transition: transform 0.3s ease;
    transform: translateY(100%);
    display: flex;
    flex-direction: column;
  }

  .carrito.visible {
    transform: translateY(0);
  }

  .carrito ul {
    display: flex;
    flex-direction: column-reverse;
    margin: 0;
    padding: 0;
    overflow-y: auto; /* solo la lista puede scrollear si es muy larga */
    max-height: 30vh; /* altura máxima para la lista */
    flex-grow: 1; /* para que tome todo el espacio disponible */
  }

  p {
  font-size: 30px; 
  color: #d1225b; 
  font-weight: bold;
}

  main.con-carrito-abierto .productos {
    margin-bottom: 65vh; /* espacio para el carrito máximo */
    margin-right: 0;
    margin-top: 0;
    transition: margin-bottom 0.3s ease;
  }
}