/* =========================
   CONTENEDOR PRODUCTOS
========================= */
.contenedor-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
    padding: 40px;
    max-width: 1300px;
    margin: auto;
}

/* =========================
   TARJETA PRODUCTO
========================= */
.producto-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.producto-card:hover {
    transform: translateY(-5px);
}

.producto-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
}

/* =========================
   TEXTO
========================= */
.producto-card h3 {
    font-size: 18px;
    margin: 10px 0;
}

.precio {
    font-size: 18px;
    font-weight: bold;
    color: #000;
}

.medida {
    font-size: 14px;
    color: #666;
}

/* =========================
   BOTONES
========================= */
.acciones {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* BOTÓN VER DETALLES */
.btn-detalles {
    background: #eee;
    color: #333;

    padding: 12px;

    border-radius: 12px;

    text-decoration: none;

    font-weight: bold;
    font-size: 16px;

    display: block;
    width: 100%;

    text-align: center;

    transition: 0.3s ease;

    box-sizing: border-box;
}

.btn-detalles:hover {
    background: #e2e2e2;
    transform: translateY(-2px);
}

/* BOTÓN AGREGAR AL CARRITO */
.btn-comprar {
    background: #00adfe;
    color: white;

    padding: 12px;

    border-radius: 12px;

    border: none;
    cursor: pointer;

    font-weight: bold;
    font-size: 16px;

    width: 100%;

    transition: 0.3s ease;

    box-sizing: border-box;
}

/* HOVER */
.btn-comprar:hover {
    background: #0094da;
    transform: translateY(-2px);
}

/* CLICK */
.btn-comprar:active {
    transform: scale(0.98);
}

/* =========================
   MODAL FONDO
========================= */
.modal-producto {
    display: none;
    position: fixed;
    z-index: 9999;

    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.6);

    justify-content: center;
    align-items: center;
}

/* =========================
   CONTENIDO MODAL
========================= */
.modal-contenido {
    background: white;
    width: 90%;
    max-width: 1000px;
    border-radius: 10px;
    padding: 20px;
    position: relative;

    animation: aparecer 0.3s ease;
}

/* ANIMACIÓN */
@keyframes aparecer {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* =========================
   BOTÓN CERRAR
========================= */
.cerrar {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 25px;
    cursor: pointer;
}

/* =========================
   GRID MODAL
========================= */
.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

/* =========================
   IMAGEN GRANDE
========================= */
.modal-img img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 6px;
}

/* =========================
   INFO
========================= */
.modal-info h2 {
    font-size: 22px;
    margin-bottom: 5px;
}

.modal-precio {
    font-size: 22px;
    font-weight: bold;
    margin: 10px 0;
}

.modal-info p {
    color: #555;
    margin-bottom: 10px;
}

/* =========================
   CANTIDAD
========================= */
.cantidad-box {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.cantidad-box button {
    width: 40px;
    height: 40px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 18px;
}

.cantidad-box input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #ccc;
    font-size: 16px;
}

/* =========================
   TOTAL
========================= */
.total-modal {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* =========================
   PAYPAL
========================= */
#paypal-button-container {
    margin-top: 10px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {

    .modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-img img {
        height: 250px;
    }
}