/* detalle.css */

body {
  background-color: #F6F5F3;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #1D3557;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.encabezado {
  background-color: #457B9D;
  width: 100%;
  padding: 20px 0;
  text-align: center;
  color: #F6F5F3;
  font-weight: 700;
  font-size: 1.8rem;
  box-shadow: 0 2px 6px rgba(29, 53, 87, 0.2);
}

.productos-container {
  max-width: 1000px;
  width: 90%;
  margin: 30px auto;
  background-color: #ffffff;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(29, 53, 87, 0.1);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 1000px;
}

.producto h3,
.producto p,
.stock,
.precios,
.boton-accion,
.btn-volver {
  text-align: center;
}

.producto h3 {
  margin-top: 15px;
  font-weight: 700;
  font-size: 1.6rem;
  color: #1D3557;
}

.producto p {
  font-size: 1rem;
  line-height: 1.5;
  color: #1D3557;
  margin: 20px 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

.slider {
  position: relative;
  width: 100%;
  height: 240px;
  margin-bottom: 25px;
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
}

.slider-imagenes img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease-in-out;
  border-radius: 12px;
  pointer-events: none;
  z-index: 1;
}

.slider-imagenes img.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 10;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(231, 111, 81, 0.85);
  border: none;
  color: #F6F5F3;
  font-size: 2rem;
  padding: 6px 14px;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
  user-select: none;
  z-index: 20;
}

.slider-btn:hover {
  background-color: rgba(231, 111, 81, 1);
}

.slider-btn.prev {
  left: 10px;
}

.slider-btn.next {
  right: 10px;
}

.precios {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.precio-tag {
  background-color: #008080;
  color: #F6F5F3;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  min-width: 110px;
  text-align: center;
  box-shadow: none;
}

.stock {
  font-weight: 600;
  color: #457B9D;
  font-size: 1.1rem;
  margin-bottom: 25px;
}

.agregar-btn {
  display: inline-block;
  text-align: center;
  width: auto;
  padding: 12px 28px;
  margin: 0 auto;
  background-color: #E76F51;
  color: #F6F5F3;
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease;
  user-select: none;
  box-shadow: 0 4px 12px rgba(231, 111, 81, 0.5);
}

.agregar-btn:hover {
  background-color: #d55a38;
}
@media (max-width: 1068px) {
   .productos-container {
    max-width: 90% !important;
    padding: 20px !important;
    margin: 30px auto !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
 .mensaje-precios {
    font-size: 0.95rem;
    color: #155724; /* Verde oscuro */
    background-color: #d4edda; /* Verde claro */
    border: 1px solid #c3e6cb;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    line-height: 1.5;
    text-align: center;
    display: block;
  }

  .mensaje-precios strong {
    color: #0c5c2c; /* Verde más fuerte para los resaltados */
  }
  .producto {
    width: 100%;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(29, 53, 87, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
  }

    /* Nombre del producto */
    .producto h3 {
        font-size: 2.8rem !important;
        text-align: center !important;
        margin-bottom: 20px !important;
        word-break: break-word !important;
        width: 100%;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Descripción del producto */
    .producto p {
        font-size: 2.5rem !important;
        text-align: center !important;
        line-height: 1.5 !important;
        margin-bottom: 20px !important;
        word-break: break-word !important;
        width: 100%;
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Slider contenedor */
    .slider {
        position: relative;
        width: 100%;
        max-width: 600px;
        height: 450px; /* Más alto para imagen más grande */
        margin-bottom: 25px;
        background-color: #ffffff;
        border-radius: 12px;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-left: auto;
        margin-right: auto;
    }

    /* Imágenes slider */
    .slider-imagenes img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        border-radius: 12px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        opacity: 0;
        transition: opacity 0.4s ease-in-out;
    }

    .slider-imagenes img.visible {
        opacity: 1;
        position: absolute;
         
    }

    /* Botones slider */
    .slider-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background-color: rgba(231, 111, 81, 0.85);
        border: none;
        color: #F6F5F3;
        font-size: 2.6rem;
        padding: 10px 18px;
        border-radius: 50%;
        cursor: pointer;
        transition: background-color 0.3s ease;
        user-select: none;
        z-index: 20;
    }

    .slider-btn:hover {
        background-color: rgba(231, 111, 81, 1);
    }

    .slider-btn.prev {
        left: 10px;
    }

    .slider-btn.next {
        right: 10px;
    }

    /* Precios */
    .precio-tag {
        font-size: 2.4rem !important;
        padding: 14px 20px !important;
        width: 100%;
        max-width: 200px !important;
        box-sizing: border-box !important;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    /* Botones de acción */
    .agregar-btn, .boton-accion {
        font-size: 2.1rem !important;
        padding: 16px 35px !important;
        width: 100% !important;
        max-width: 380px !important;
        box-sizing: border-box !important;
        margin: 10px auto !important;
        display: block;
    }

    /* Stock */
    .stock {
        font-size: 2.8rem !important;
        word-break: break-word !important;
        text-align: center;
        margin-bottom: 25px;
    }

    /* Botón Volver */
    .btn-volver {
        font-size: 2.8rem !important;
        padding: 18px 60px !important; /* Más ancho padding horizontal */
        width: auto !important; /* Que el ancho sea automático */
        min-width: 750px !important; /* Ancho mínimo mayor para que no quede cuadrado */
        box-sizing: border-box !important;
        text-align: center;
        margin: 10px auto 20px auto !important;
        display: block;
        border-radius: 25px; /* Más redondeado */
        cursor: pointer;
    }
   .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(29, 53, 87, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(6px);
  }

  .modal.mostrar {
    display: flex;
  }

  .modal-contenido {
    background-color: #F6F5F3;
    padding: 25px 20px;
    border-radius: 26px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 8px 24px rgba(231, 111, 81, 0.3);
    color: #1D3557;
    position: relative;
    transition: transform 0.3s ease;
    transform: translateY(0);
    margin: 0;
  }

  .modal-contenido:hover {
    transform: translateY(-5px);
  }

  .cerrar {
    position: absolute;
    top: 10px;
    right: 16px;
    font-size: 60px;
    font-weight: 700;
    color: #E76F51;
    cursor: pointer;
    transition: color 0.3s ease;
  }

  .cerrar:hover {
    color: #d55a38;
  }

  #nombreProductoModal {
    font-weight: 700;
    font-size: 2.6rem;
    margin-bottom: 16px;
    text-align: center;
  }

  label[for="cantidadProducto"] {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 2.1rem;
    color: #457B9D;
  }

  #cantidadProducto {
    width: 100%;
    padding: 12px 16px;
    font-size: 2.2rem;
    border-radius: 12px;
    border: 2px solid #457B9D;
    outline-color: #E76F51;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    margin-bottom: 20px;
  }

  #cantidadProducto:focus {
    border-color: #E76F51;
    box-shadow: 0 0 8px rgba(231, 111, 81, 0.5);
  }

  #btnConfirmarCantidad {
    width: 100%;
    background-color: #E76F51;
    color: #F6F5F3;
    font-weight: 700;
    font-size: 2.3rem;
    padding: 14px 0;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(231, 111, 81, 0.5);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    user-select: none;
  }

  #btnConfirmarCantidad:hover {
    background-color: #d55a38;
    box-shadow: 0 8px 22px rgba(213, 90, 56, 0.7);
  }
}


/* Botones de acción: Agregar al carrito y Comprar ahora */
.boton-accion {
  background-color: #1D3557;
  color: #F6F5F3;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 12px 28px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  margin: 10px;
  box-shadow: 0 4px 12px rgba(29, 53, 87, 0.4);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
  min-width: 140px;
  display: inline-block;
  text-align: center;
}

.boton-accion:hover {
  background-color: #457B9D;
  box-shadow: 0 6px 20px rgba(69, 123, 157, 0.6);
}

/* Botón Volver a la tienda */
.btn-volver {
  display: inline-block;
  background-color: transparent;
  color: #457B9D;
  font-weight: 600;
  font-size: 1rem;
  padding: 8px 16px;
  border-radius: 20px;
  border: 2px solid #457B9D;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  user-select: none;
  margin-top: 10px;
  text-align: center;
}

.btn-volver:hover {
  background-color: #457B9D;
  color: #F6F5F3;
  box-shadow: 0 4px 10px rgba(69, 123, 157, 0.5);
}
.botones-compra {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    
}

@media (max-width: 480px) {
    .botones-compra {
        flex-direction: column;
    }
}
@media (min-width: 1069px) {
  .productos-container {
    max-width: 1000px;
    width: 90%;
    margin: 30px auto;
    padding: 0; /* Quitamos padding para que no se vea espacio como cuadro */
    background-color: transparent; /* Quitamos fondo blanco */
    box-shadow: none; /* Quitamos sombra */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    min-height: auto;
  }

  .producto {
    flex: 0 1 280px;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(29, 53, 87, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}


@media (min-width: 1069px) {
  .productos-container {
    max-width: 1000px;
    width: 90%;
    margin: 30px auto;
    padding: 25px;
    background-color: #ffffff;
    box-shadow: 0 8px 20px rgba(29, 53, 87, 0.1);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    min-height: auto;
  }

  .producto {
    flex: 0 1 280px;
    background-color: transparent; /* Quitamos fondo para que no se vea doble */
    box-shadow: none; /* Quitamos sombra del producto */
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(29, 53, 87, 0.7); /* fondo semitransparente */
  display: none; /* oculto por defecto */
  justify-content: center; /* centra horizontal */
  align-items: center; /* centra vertical */
  z-index: 1000;
  backdrop-filter: blur(6px);
}

.modal.mostrar {
  display: flex; /* muestra el modal y centra el contenido */
}

.modal-contenido {
  background-color: #F6F5F3;
  padding: 30px 25px;
  border-radius: 16px;
  width: 360px;
  max-width: 90%;
  box-shadow: 0 8px 24px rgba(231, 111, 81, 0.3);
  color: #1D3557;
  position: relative;
  transition: transform 0.3s ease;
  transform: translateY(0);
  /* Quitar márgenes arriba o posicionamientos extra */
  margin: 0;
}

.modal-contenido:hover {
  transform: translateY(-5px);
}

.cerrar {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 28px;
  font-weight: 700;
  color: #E76F51;
  cursor: pointer;
  transition: color 0.3s ease;
}

.cerrar:hover {
  color: #d55a38;
}

#nombreProductoModal {
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: 18px;
  text-align: center;
}

label[for="cantidadProducto"] {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 1.1rem;
  color: #457B9D;
}

#cantidadProducto {
  width: 100%;
  padding: 12px 16px;
  font-size: 1.2rem;
  border-radius: 12px;
  border: 2px solid #457B9D;
  outline-color: #E76F51;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
  margin-bottom: 20px;
}

#cantidadProducto:focus {
  border-color: #E76F51;
  box-shadow: 0 0 8px rgba(231, 111, 81, 0.5);
}

#btnConfirmarCantidad {
  width: 100%;
  background-color: #E76F51;
  color: #F6F5F3;
  font-weight: 700;
  font-size: 1.3rem;
  padding: 14px 0;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(231, 111, 81, 0.5);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
}

#btnConfirmarCantidad:hover {
  background-color: #d55a38;
  box-shadow: 0 8px 22px rgba(213, 90, 56, 0.7);
}
}