/* Tienda Virtual - Estilos */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Productos */
.producto-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #dee2e6;
    position: relative;
    overflow: hidden;
}

.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.producto-imagen {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    overflow: hidden;
}

.producto-imagen img,
.producto-imagen .producto-imagen-con-marca img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    padding: 10px;
}

.sin-imagen {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #adb5bd;
}

/* Badges de descuento */
.badge.bg-danger.position-absolute {
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 5px 0 5px 0;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.5);
    animation: pulseOffer 2s infinite;
}

@keyframes pulseOffer {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Precios */
.precio-container {
    margin: 10px 0;
    min-height: 50px;
}

/* Tarjetas con borde especial para ofertas */
.card.border-danger {
    border-width: 2px !important;
}

/* Filtros */
.filter-section {
    border-bottom: 1px solid #dee2e6;
    padding: 15px;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    color: #495057;
    transition: all 0.2s ease;
}

.filter-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.filter-item.active {
    background-color: var(--primary-color);
    color: white;
}

.filter-item.active .badge {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

/* Carrito */
.carrito-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: white;
}

.carrito-imagen {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 4px;
}

/* Footer */
footer {
    margin-top: 50px;
}

/* Responsive */
@media (max-width: 768px) {
    .producto-imagen {
        height: 150px;
    }
    
    .precio-normal,
    .precio-oferta {
        font-size: 1.2rem;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.producto-card {
    animation: fadeIn 0.5s ease;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast de notificaciones */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}
/* Responsive Improvements */
@media (max-width: 991.98px) {
    .producto-imagen {
        height: 180px;
    }
    
    .card-title {
        font-size: 0.85rem !important;
    }
    
    .precio-normal, .precio-oferta {
        font-size: 1rem !important;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
}

@media (max-width: 767.98px) {
    .producto-imagen {
        height: 160px;
    }
    
    body {
        font-size: 0.9rem;
    }
    
    .btn {
        font-size: 0.85rem;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
}

@media (max-width: 575.98px) {
    .producto-imagen {
        height: 200px;
    }
    
    .producto-card .card-body {
        padding: 0.75rem;
    }
    
    .badge-oferta {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
    
    h4, .h4 {
        font-size: 1.25rem;
    }
    
    .pagination {
        font-size: 0.85rem;
    }
    
    .page-link {
        padding: 0.375rem 0.75rem;
    }
}

/* Sidebar collapse en móviles */
.collapse:not(.show) {
    display: none;
}

@media (min-width: 992px) {
    .collapse {
        display: block !important;
    }
}

/* Mejorar scrolling en móviles */
body {
    -webkit-overflow-scrolling: touch;
}

/* Botones táctiles más grandes en móvil */
@media (max-width: 767.98px) {
    .btn {
        padding: 0.5rem 1rem;
        min-height: 44px;
    }
    
    .list-group-item-action {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
}