/* Estilos generales */
:root {
    --primary-color: #198754;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navbar */
.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

/* Banner principal */
.jumbotron {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0d6efd 100%);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Cards de productos */
.producto-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #ddd;
}

.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.producto-img {
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #ddd;
}

/* Botones */
.btn {
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.agregar-carrito {
    font-weight: 600;
}

/* Badge del carrito */
.position-relative .badge {
    font-size: 0.7rem;
}

/* Cards de categorías */
.card {
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Footer */
footer {
    margin-top: auto;
}

/* Alertas */
.alert {
    border-radius: 8px;
    border: none;
}

/* Carrito */
.cantidad-input {
    width: 60px;
}

.cantidad-input::-webkit-inner-spin-button,
.cantidad-input::-webkit-outer-spin-button {
    opacity: 1;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Responsive */
@media (max-width: 768px) {
    .jumbotron {
        padding: 2rem 1rem !important;
    }

    .producto-card {
        margin-bottom: 1rem;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Success messages */
.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.6em;
}

/* Icons */
.bi {
    vertical-align: -0.125em;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Modal del carrito */
#modalCarrito .list-group-item {
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 8px;
}

#modalCarrito .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.cantidad-input-modal {
    border-left: none !important;
    border-right: none !important;
}

/* Responsive para el modal del carrito */
@media (max-width: 768px) {
    #modalCarrito .col-md-2,
    #modalCarrito .col-md-4,
    #modalCarrito .col-md-3,
    #modalCarrito .col-md-1 {
        width: 100%;
        margin-bottom: 10px;
        text-align: center !important;
    }

    #modalCarrito .list-group-item {
        padding: 15px;
    }

    #modalCarrito .input-group {
        justify-content: center;
    }

    #modalCarrito .modal-dialog {
        margin: 10px;
    }
}
