﻿/* === 🎨 PRODUCTO.CSS === */

/* CARD GENERAL */
.producto-card {
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background-color: #fff;
}

    .producto-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
    }

/* IMAGEN Y OVERLAY */
.card-img-top-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.producto-hover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.overlay-ver-detalle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.25rem;
    transition: all 0.4s ease;
    pointer-events: none;
    z-index: 1 !important;
}

.card-img-top-wrapper:hover .producto-hover {
    transform: scale(1.1);
    filter: brightness(0.8);
}

.card-img-top-wrapper:hover .overlay-ver-detalle {
    opacity: 1;
}

/* BOTONES */
.btn-primary {
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
}

    .btn-primary:hover {
        transform: translateY(-2px);
    }

/* ANIMACIONES AL CARGAR LA CARD */
.animate-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* TEXTO Y CARD BODY */
.card-body h5,
.card-body p {
    transition: all 0.2s ease-in-out;
}

.card-body h5 {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-body p {
    font-size: 0.95rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .card-img-top-wrapper {
        height: 180px;
    }
}

/* TITULO H2 */
h2 {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-top: 20px;
    margin-bottom: 20px;
    position: relative;
}

    h2::after {
        content: "";
        display: block;
        width: 60px;
        height: 4px;
        background-color: #0d6efd;
        margin: 10px auto 0;
        border-radius: 2px;
    }

    h2:hover {
        color: #0d6efd;
        transition: color 0.3s ease;
    }

/* BADGE DISPONIBILIDAD */
.badge-stock.disponible {
    background-color: rgba(40, 167, 69, 0.9) !important;
    color: #fff !important;
}

.badge-stock.agotado {
    background-color: rgba(220, 53, 69, 0.9) !important;
    color: #fff !important;
}

/* === 💡 FIX: Modal que no se puede hacer clic === */
.modal-backdrop {
    z-index: 1040 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.modal {
    z-index: 1050 !important;
}

.modal-content {
    position: relative;
    z-index: 1060 !important;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Evita que overlays u otros divs tapen el modal */
.card,
.producto-card {
    z-index: auto;
}

/* === 🧩 DISEÑO EXTRA PARA EL MODAL === */
.modal-header {
    background-color: #dc3545;
    color: white;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

.modal-footer {
    background-color: #f8f9fa;
}

.modal-body {
    font-size: 1.05rem;
    color: #333;
}
