/* ================================================================
   public/assets/css/products/tienda.css
   Estilos específicos para la vista de Tienda (Filtros y Layout)
   ================================================================ */

.tienda-section {
    background-color: #fafbfd;
}

/* =========================================
   BARRA LATERAL DE FILTROS
   ========================================= */
.tienda-sidebar {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #eaeaea;
}

.filter-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: #0f172a;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

/* Slider de Precios */
.price-slider-wrapper {
    margin-bottom: 30px;
}

.price-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 8px;
    font-weight: 600;
}

/* Checkboxes (El toque Rosver) */
.rosver-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #475569;
    transition: color 0.2s ease;
}

.rosver-checkbox:hover {
    color: #0f172a;
}

.rosver-checkbox input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rosver-checkbox:hover .checkmark {
    border-color: #e30613;
}

.rosver-checkbox input:checked + .checkmark {
    background-color: #e30613;
    border-color: #e30613;
}

.rosver-checkbox input:checked + .checkmark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* Lista de Categorías — checklist */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list-checklist .cat-filter-group {
    margin-bottom: 6px;
}

.cat-check-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    text-decoration: none;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    border: 1px solid transparent;
    cursor: pointer;
}

.cat-check-row:hover {
    background: #f8fafc;
    color: #0f172a;
}

.cat-check-row.is-checked {
    background: #fff1f1;
    color: #e30613;
    border-color: rgba(227, 6, 19, 0.12);
    box-shadow: 0 2px 8px rgba(227, 6, 19, 0.08);
}

.cat-check-general .cat-check-label {
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: 0.82rem;
}

.cat-check-box {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: all 0.15s ease;
}

.cat-check-box .bi-check-lg {
    font-size: 0.85rem;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.15s, transform 0.15s;
    color: #fff;
}

.cat-check-row.is-checked .cat-check-box {
    background: #e30613;
    border-color: #e30613;
}

.cat-check-row.is-checked .cat-check-box .bi-check-lg {
    opacity: 1;
    transform: scale(1);
}

.cat-check-label {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.cat-check-badge {
    flex-shrink: 0;
    min-width: 26px;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    background: #f1f5f9;
    color: #64748b;
}

.cat-check-row.is-checked .cat-check-badge {
    background: #e30613;
    color: #fff;
}

.cat-check-sub {
    font-weight: 500;
    font-size: 0.84rem;
    padding: 0.4rem 0.55rem 0.4rem 0.5rem;
}

.cat-check-sub .cat-check-box {
    width: 18px;
    height: 18px;
}

.cat-check-children {
    display: none;
    margin: 0.35rem 0 0.5rem 0;
    padding: 0.35rem 0 0.35rem 0.35rem;
    border-left: 2px solid #f1f5f9;
    margin-left: 0.65rem;
}

.cat-filter-group.is-open .cat-check-children,
.cat-filter-group.is-general-active .cat-check-children {
    display: block;
}

.cat-check-grupo {
    margin-bottom: 0.65rem;
}

.cat-check-grupo:last-child {
    margin-bottom: 0.15rem;
}

.cat-check-grupo-title {
    margin: 0 0 0.35rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #64748b;
}

.cat-check-sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cat-check-sublist li {
    margin-bottom: 2px;
}

/* Banner filtro activo */
.productos-filter-active {
    background: #fff1f1;
    border: 1px solid rgba(227, 6, 19, 0.2);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #334155;
}

.productos-filter-active strong {
    color: #e30613;
}

.cat-filter-clear {
    margin-left: 0.75rem;
    color: #e30613;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.85rem;
}

.cat-filter-clear:hover {
    text-decoration: underline;
}

.productos-filter-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #64748b;
    font-size: 0.95rem;
}

.col.is-filter-hidden {
    display: none !important;
}

/* Buscador */
.rosver-search-input {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 10px 15px;
    width: 100%;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.rosver-search-input:focus {
    border-color: #e30613;
    outline: none;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.1);
}

/* =========================================
   GRILLA PRINCIPAL
   ========================================= */

/* --- Cabecera Premium estilo Falabella --- */
.store-header-premium {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
}

.store-header-left {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sort-label {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Custom Dropdown "Moderno Teal" --- */
.custom-sort-dropdown {
    position: relative;
    display: inline-block;
    user-select: none;
}

.custom-sort-selected {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 14px;
    min-width: 180px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-sort-selected:hover {
    border-color: #cbd5e1;
}

.custom-sort-selected.active-dropdown {
    border-color: #e30613;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.1);
}

.custom-sort-list {
    display: none; /* Hidden by default */
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 100%;
    background-color: #ffffff;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
}

.custom-sort-list.open {
    display: block;
    animation: fadeInDropdown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.custom-sort-option {
    padding: 12px 16px;
    font-size: 0.95rem;
    color: #0f172a;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.custom-sort-option:hover {
    background-color: #fff1f1;
    color: #e30613;
}

/* Color Rojo de Rosver activo */
.custom-sort-option.active {
    background-color: #e30613; 
    color: #ffffff;
    font-weight: 600;
}

/* Paginación rápida (Header) */
.quick-pagination {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quick-page-item {
    display: inline-block;
}

.quick-page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #475569;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.quick-page-link:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.quick-page-item.active .quick-page-link {
    background-color: #384e5e; /* Color exacto del círculo en el ejemplo */
    color: #ffffff;
}

.quick-page-item.disabled .quick-page-link {
    color: #cbd5e1;
    pointer-events: none;
}

.quick-page-item.dots span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #64748b;
    font-weight: 600;
}


/* =========================================
   BOTONES DE ACCIÓN DE PRODUCTO (Carrito/Wsp)
   ========================================= */
   
.producto-acciones {
    padding: 0 20px 20px 20px; /* Padding interior de la tarjeta */
    display: flex;
    flex-direction: column;
    gap: 8px; /* Espacio entre botones */
    background: #ffffff;
}

.btn-rosver-carrito {
    background-color: #ff6600; /* Naranja pedido por cliente en pantallazo */
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 0;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-rosver-carrito:hover {
    background-color: #e65c00;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 102, 0, 0.3);
}

.btn-rosver-wsp {
    background-color: #25d366; /* Verde Whatsapp oficial */
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 0;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-rosver-wsp:hover {
    background-color: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

/* =========================================
   RESPONSIVE MÓVIL - ESTILO SAGA/FALABELLA
   ========================================= */

/* --- Barra de filtros móvil --- */
.mobile-filter-bar {
    overflow: hidden;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 12px;
}

/* Botón principal "Filtros" */
.mobile-filter-btn {
    flex-shrink: 0;
    background-color: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.mobile-filter-btn:hover,
.mobile-filter-btn.active-filter {
    border-color: #e30613;
    color: #e30613;
}

/* Contenedor de chips con scroll horizontal sin scrollbar visible */
.mobile-chips-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 2px 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.mobile-chips-scroll::-webkit-scrollbar {
    display: none;
}

/* Chips individuales */
.filter-chip {
    flex-shrink: 0;
    background-color: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    border-color: #e30613;
    color: #e30613;
}

.filter-chip.active {
    background-color: #e30613;
    border-color: #e30613;
    color: #ffffff;
}

/* --- Overlay oscuro detrás del drawer --- */
.filter-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
}

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

/* --- Panel Drawer (desliza desde abajo) --- */
.filter-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    z-index: 1050;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
}

.filter-drawer.open {
    transform: translateY(0);
}

/* Asa visual del drawer */
.filter-drawer-header::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background-color: #cbd5e1;
    border-radius: 2px;
    margin: 0 auto 16px;
}

.filter-drawer-header {
    padding: 20px 20px 10px;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #f1f5f9;
}

.filter-drawer-header > div,
.filter-drawer-header h5,
.filter-drawer-header button {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-drawer-header h5 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: #0f172a;
    margin: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-drawer-close {
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
}

.filter-drawer-close:hover {
    background-color: #fee2e2;
    color: #e30613;
}

.filter-drawer-body {
    overflow-y: auto;
    padding: 20px;
    flex: 1;
}

.filter-drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 10px;
}

.btn-drawer-apply {
    flex: 1;
    background-color: #e30613;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-drawer-apply:hover {
    background-color: #c0000f;
}

.btn-drawer-clear {
    background-color: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-drawer-clear:hover {
    background-color: #e2e8f0;
}

/* En móvil, la grilla principal ocupa el ancho completo */
@media (max-width: 991px) {
    .tienda-section .col-lg-9 {
        width: 100%;
    }
}
