﻿/* --- VARIABLES GLOBALES (Coherencia con Home) --- */
:root {
    --primary-color: #0026a7;
    --secondary-color: #1d1d1f;
    --bg-color: #f5f5f7;
    --card-bg: #ffffff;
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --radius-lg: 18px;
    --radius-sm: 8px;
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.04);
    --shadow-hover: 0 10px 30px rgba(0,0,0,0.12);
    --font-main: 'Inter', system-ui, sans-serif;
}

body {
    background-color: var(--bg-color);
    font-family: var(--font-main);
}

/* --- SIDEBAR DE FILTROS --- */
.filter-sidebar {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.05);
}

.filter-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #eee;
}

.filter-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    display: block;
}

/* Custom Range Slider */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

    input[type=range]::-webkit-slider-thumb {
        -webkit-appearance: none;
        height: 20px;
        width: 20px;
        border-radius: 50%;
        background: var(--secondary-color);
        cursor: pointer;
        margin-top: -8px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    }

    input[type=range]::-webkit-slider-runnable-track {
        width: 100%;
        height: 4px;
        cursor: pointer;
        background: #e1e1e1;
        border-radius: 2px;
    }

/* Custom Checkboxes */
.custom-check .form-check-input {
    width: 1.2em;
    height: 1.2em;
    border-radius: 4px;
    border: 2px solid #d1d1d6;
    cursor: pointer;
}

    .custom-check .form-check-input:checked {
        background-color: var(--secondary-color);
        border-color: var(--secondary-color);
    }

.custom-check label {
    font-size: 0.95rem;
    color: var(--text-main);
    cursor: pointer;
    margin-left: 5px;
}

/* --- TECH CARD (Reutilizada y Adaptada) --- */
.tech-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

    .tech-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-hover);
    }

.card-img-wrapper {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    padding: 10px;
}

.tech-card img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.tech-card:hover img {
    transform: scale(1.08);
}

.card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-top: auto;
}

/* Botón flotante al hacer hover */
.action-btn {
    margin-top: 1rem;
    width: 100%;
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-weight: 500;
    opacity: 0; /* Oculto por defecto */
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.tech-card:hover .action-btn {
    opacity: 1;
    transform: translateY(0);
}

.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 700;
    z-index: 2;
}

/* --- PAGINACIÓN --- */
.pagination .page-link {
    border: none;
    color: var(--text-muted);
    margin: 0 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.pagination .page-item.active .page-link {
    background-color: var(--secondary-color); 
    border-color: var(--secondary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.pagination .page-link:hover:not(.active) {
    background-color: #e1e1e1;
    color: var(--secondary-color);
}
.filter-sidebar h4.text-primary {
    color: var(--secondary-color) !important;
}
.filter-sidebar .btn-primary {
    background-color: var(--bg-color); /* Fondo gris suave */
    color: var(--secondary-color); /* Texto oscuro */
    border: 1px solid #d1d1d6;
    box-shadow: none;
}
    .filter-sidebar .btn-primary:hover {
        background-color: var(--secondary-color);
        color: white;
        border-color: var(--secondary-color);
    }
#btnChat .btn-primary {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    transition: all 0.3s ease;
}

    #btnChat .btn-primary:hover {
        transform: scale(1.1);
        background-color: #000000 !important; /* Negro puro en hover */
    }

/* HEADER DEL CHATBOX (Opcional: para que combine con el botón) */
#chatBox .bg-primary {
    background-color: var(--secondary-color) !important;
}
@media (max-width: 576px) {

    .filter-sidebar {
        display: none;
    }

    .col-lg-3 {
        display: none;
    }
}
@media (max-width: 576px) {

    #productos {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding-bottom: 0.5rem;
    }

        #productos::-webkit-scrollbar {
            display: none;
        }

        #productos > .col {
            flex: 0 0 48%;
            max-width: 48%;
            scroll-snap-align: start;
        }
    .tech-card {
        padding: 0.8rem;
        border-radius: 16px;
    }
    .card-img-wrapper {
        height: 160px;
        margin-bottom: 0.6rem;
    }
    .product-category {
        font-size: 0.7rem;
    }

    .product-title {
        font-size: 0.9rem;
        line-height: 1.3;
        -webkit-line-clamp: 2;
    }

    .product-price {
        font-size: 1rem;
    }
    .action-btn {
        padding: 8px;
        font-size: 0.9rem;
        border-radius: 10px;
        margin-top: 0.5rem;
    }
}
@media (max-width: 576px) {

    .tech-card {
        padding: 1.2rem;
        border-radius: 22px;
    }

    .card-img-wrapper {
        height: 240px;
        margin-bottom: 1rem;
    }

    .tech-card img {
        max-height: 100%;
    }
}
@media (max-width: 576px) {

    .product-category {
        font-size: 0.75rem;
    }

    .product-title {
        font-size: 1.05rem;
        line-height: 1.4;
    }

    .subtle-price {
        font-size: 1.15rem;
        font-weight: 700;
    }
}
@media (max-width: 576px) {

    .action-btn {
        opacity: 1;
        transform: none;
        padding: 12px;
        font-size: 1rem;
        border-radius: 14px;
        margin-top: 1rem;
    }
}
@media (max-width: 576px) {

    #filtrosMobile .filter-sidebar {
        display: block;
    }

    #filtrosMobile .filter-card {
        box-shadow: none;
        border: none;
        padding: 0;
    }
}

