/* Modal de Detalle de Producto */
#modal-producto {
    display: none;
}

#modal-producto.active {
    display: flex;
}

.modal-producto-contenido {
    position: relative;
    background: white;
    border-radius: 24px;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideUp 0.3s ease-out;
}

.btn-cerrar-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.btn-cerrar-modal:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.detalle-producto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.detalle-imagen {
    position: relative;
}

.detalle-imagen img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    object-fit: cover;
    max-height: 500px;
}

.detalle-imagen .producto-descuento {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.detalle-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detalle-info h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.detalle-categoria,
.detalle-marca {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.detalle-precios {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detalle-precios .precio-original {
    font-size: 1.2rem;
    color: #999;
    text-decoration: line-through;
}

.detalle-precios .precio-final {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
}

.detalle-descripcion h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.detalle-descripcion p {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

.detalle-stock {
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 8px;
}

.stock-disponible {
    color: #10b981;
    font-weight: 600;
    font-size: 1rem;
}

.stock-agotado {
    color: #ef4444;
    font-weight: 600;
    font-size: 1rem;
}

.detalle-acciones {
    display: flex;
    gap: 1rem;
}

.btn-agregar-grande {
    flex: 1;
    padding: 1.2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-agregar-grande:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn-agregar-grande:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .detalle-producto-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .detalle-info h2 {
        font-size: 1.5rem;
    }
    
    .detalle-precios .precio-final {
        font-size: 2rem;
    }
    
    .btn-cerrar-modal {
        top: 0.5rem;
        right: 0.5rem;
    }
}
