/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: #111;
  color: #fff;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
header {
  background-color: #000;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo img {
  height: 50px;
  width: auto;
}


nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: #1aca0b;
}

/* Hero */
.hero {
  background: linear-gradient(to right, #000, #1a1a1a);
  padding: 5rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  color: #ffffff;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: #ccc;
}

/* Productos */
.productos {
  padding: 3rem 2rem;
  text-align: center;
}

.productos h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #ffffff;
}

.grid-productos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.producto {
  background-color: #1a1a1a;
  border-radius: 10px;
  padding: 1rem;
  transition: transform 0.3s;
  width: 100%;
  min-height: 450px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.producto:hover {
  transform: translateY(-5px);
}

.producto img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.producto h3 {
  margin: 0.5rem 0;
  color: #fff;
}

.producto p {
  color: #ccc;
  margin-bottom: 0.5rem;
}

.producto button {
  background-color: #e50914;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.producto button:hover {
  background-color: #ff1a25;
}

/* Modal del carrito */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.8);
}

.modal-contenido {
  background-color: #222;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 700px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cerrar {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  align-self: flex-end;
}

.cerrar:hover {
  color: #fff;
}

#lista-carrito {
  list-style: none;
  padding: 1rem 0;
  width: 100%;
}

#lista-carrito li {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
}

/* Nuevo estilo para el botón de eliminar del carrito */
.btn-eliminar-item {
    background-color: #e50914;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s;
}

.btn-eliminar-item:hover {
    background-color: #ff1a25;
}

/* Resto de estilos para el modal */
.modal-contenido #btn-whatsapp {
    margin-top: 1rem;
}


#lista-carrito li {
  margin-bottom: 0.5rem;
}

/* Estilos para el contenedor de la galería de fotos */
.detalle-galeria {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 1rem 0;
}

/* Estilos para la imagen dentro del modal */
#detalle-imagen {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
}

/* Estilos para las flechas de navegación */
.galeria-flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    user-select: none;
    transition: background-color 0.2s;
}

.galeria-flecha:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.galeria-izquierda {
    left: 10px;
}

.galeria-derecha {
    right: 10px;
}


/* Contenedor principal para las dos columnas en el modal de detalle */
.detalle-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .detalle-grid {
        grid-template-columns: 1.5fr 1fr;
    }
}

.detalle-caracteristicas {
    text-align: left;
}

.detalle-caracteristicas p {
    margin-bottom: 0.5rem;
}

.detalle-cantidad-acciones {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

.detalle-cantidad-acciones p {
    margin-bottom: 0.5rem;
    font-weight: bold;
}


/* Estilos para el selector de cantidad */
.cantidad-selector {
  display: flex;
  align-items: center;
  border: 1px solid #555;
  border-radius: 25px;
  overflow: hidden;
  margin: 0.5rem 0 1rem 0;
  width: fit-content;
  background-color: #333;
}

.cantidad-selector button {
  background-color: #444;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cantidad-selector button:hover {
  background-color: #666;
}

.cantidad-selector input[type="number"] {
  width: 60px;
  text-align: center;
  border: none;
  background-color: #333;
  color: #fff;
  font-size: 1.2rem;
  padding: 0.5rem 0;
  -moz-appearance: textfield;
  height: 40px;
}

.cantidad-selector input::-webkit-outer-spin-button,
.cantidad-selector input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Estilo para el botón de agregar al carrito dentro del modal */
#btn-agregar-detalle {
    background-color: #e50914;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    width: auto;
    margin-top: 1rem;
}

#btn-agregar-detalle:hover {
  background-color: #ff1a25;
}


/* Estilos para los nuevos selectores de color y talla */
.opcion-selector {
    margin-bottom: 1rem;
    width: 100%;
}

.opcion-selector p {
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #fff;
}

.opciones-contenedor {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
}

/* Estilos para los cuadros de color */
.opcion-color {
    width: 35px;
    height: 35px;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
}

.opcion-color:hover {
    transform: scale(1.05);
}

.opcion-color.selected {
    border-color: #e50914;
    box-shadow: 0 0 5px rgba(229, 9, 20, 0.7);
}

/* Estilos para los botones de talla */
.opcion-talla {
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    font-size: 0.9rem;
    min-width: 50px;
    text-align: center;
}

.opcion-talla:hover {
    background-color: #555;
    border-color: #777;
}

.opcion-talla.selected {
    background-color: #e50914;
    border-color: #e50914;
    font-weight: bold;
}

/* Nuevo estilo para el botón de WhatsApp */
#btn-whatsapp {
    background-color: #25D366; /* Color de WhatsApp */
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px; /* Bordes redondeados */
    font-size: 1rem;
    font-weight: bold;
    margin-top: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

#btn-whatsapp:hover {
    background-color: #128C7E;
}


/* Responsive */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .detalle-grid {
      grid-template-columns: 1fr;
  }

  .detalle-caracteristicas,
  .detalle-cantidad-acciones {
      text-align: center;
      align-items: center;
  }

  .opciones-contenedor {
    justify-content: center;
  }
}
