:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4cc9f0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #4bb543;
    --warning-color: #fca311;
    --app-radius: 12px;
    --app-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --app-transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* padding-bottom: 80px; */
    background-color: #f8f9fa;
}

/* Estilos para modo app en móvil y tablet */
@media (max-width: 992px) {
    body {
        background-color: #f5f5f7;
    }

    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Header tipo app */
    .app-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background-color: white;
        box-shadow: var(--app-shadow);
        border-radius: 0 0 var(--app-radius) var(--app-radius);
        padding: 10px 15px;
        margin-bottom: 15px;
    }

    /* Filtros móviles */
    .mobile-filters {
        position: fixed;
        bottom: 80px;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
        padding: 15px;
        border-radius: 20px 20px 0 0;
        z-index: 999;
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }

    .mobile-filters.active {
        transform: translateY(0);
    }

    .filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        display: none;
    }

    .filter-overlay.active {
        display: block;
    }

    /* Productos en grid tipo app */
    .product-card {
        border-radius: var(--app-radius);
        overflow: hidden;
        box-shadow: var(--app-shadow);
        transition: var(--app-transition);
        margin-bottom: 20px;
        background-color: white;
        border: none;
    }

    .product-img {
        height: 180px;
        object-fit: cover;
        width: 100%;
    }

    /* Bottom navigation bar tipo app */
    .app-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        border-radius: 20px 20px 0 0;
        padding: 10px 0;
    }

    .nav-item {
        text-align: center;
        color: #666;
        text-decoration: none;
        font-size: 12px;
        transition: var(--app-transition);
    }

    .nav-item.active {
        color: var(--primary-color);
    }

    .nav-icon {
        font-size: 22px;
        display: block;
        margin-bottom: 5px;
    }

    /* Botones tipo app */
    .btn-app {
        border-radius: 50px;
        padding: 10px 20px;
        font-weight: 600;
        transition: var(--app-transition);
    }

    .btn-primary {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }

    .btn-primary:hover {
        background-color: var(--secondary-color);
        border-color: var(--secondary-color);
    }

    /* Ocultar elementos no esenciales en móvil */
    .desktop-only {
        display: none !important;
    }

    /* Carrito tipo app */
    .cart-badge {
        position: absolute;
        top: -5px;
        right: -5px;
        background-color: #ff4757;
        color: white;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Contador de resultados */
    .results-count {
        background: white;
        padding: 10px 15px;
        border-radius: var(--app-radius);
        margin-bottom: 15px;
        box-shadow: var(--app-shadow);
    }
}

/* Estilos para desktop */
@media (min-width: 993px) {

    .app-bottom-nav,
    .mobile-only {
        display: none !important;
    }

    .product-card {
        height: 100%;
    }

    .product-img {
        height: 200px;
        object-fit: cover;
    }

    /* Sidebar de filtros desktop */
    .filter-sidebar {
        position: sticky;
        top: 20px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        padding-right: 15px;
    }

    .filter-section {
        background: white;
        border-radius: var(--app-radius);
        padding: 20px;
        margin-bottom: 20px;
        box-shadow: var(--app-shadow);
    }
}

/* Estilos compartidos */
.category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.price {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff4757;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.rating {
    color: #ffc107;
}

.section-title {
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    font-size: 1.2rem;
}

/* Filtros específicos */
.filter-group {
    margin-bottom: 20px;
}

.filter-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #555;
    font-size: 1rem;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
}

.filter-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: var(--primary-color);
}

.filter-label {
    flex-grow: 1;
    color: #555;
}

.filter-count {
    color: #888;
    font-size: 0.9rem;
}

.price-display {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-weight: 600;
}

/* Estilos para el slider de precio */
.noUi-connect {
    background-color: var(--primary-color);
}

.noUi-handle {
    background-color: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.noUi-handle:after,
.noUi-handle:before {
    display: none;
}

/* Ordenamiento y vista */
.sort-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 15px;
    border-radius: var(--app-radius);
    margin-bottom: 20px;
    box-shadow: var(--app-shadow);
}

.sort-select {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 15px;
    background: white;
    color: #555;
    font-weight: 500;
}

.view-options {
    display: flex;
    gap: 10px;
}

.view-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: var(--app-transition);
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Badges de filtro activos */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.active-filter {
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.active-filter i {
    cursor: pointer;
    font-size: 0.8rem;
}

.clear-filters {
    background: #ff4757;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Paginación */
.pagination {
    justify-content: center;
    margin-top: 30px;
}

.page-link {
    border: none;
    color: var(--primary-color);
    margin: 0 5px;
    border-radius: 8px;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    color: white;
}

/* Resultados vacíos */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
}

.no-results-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Mejoras visuales */
.card-hover {
    transition: var(--app-transition);
}

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

.badge-new {
    background-color: var(--accent-color);
    color: white;
}

.badge-sale {
    background-color: #ff4757;
    color: white;
}

.badge-best {
    background-color: var(--warning-color);
    color: white;
}