/* ============================
   PRODUCTS PAGE — products.css
   ============================ */

/* ---- Main Section ---- */
.products-main-section {
    padding: 2rem 0 3rem;
    background: var(--bg);
    overflow-x: hidden;
}

/* ---- Layout: sidebar + grid ---- */
.products-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ---- Sidebar Filters ---- */
.products-sidebar {
    position: sticky;
    top: 80px;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 12px;
    padding: 1.2rem 1rem;
}

.sidebar-filter-group {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.sidebar-filter-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-filter-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary, #d44);
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}
.sidebar-filter-title svg {
    flex-shrink: 0;
    color: var(--text-light);
    transition: transform 0.2s;
}

.sidebar-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-filter-list li {
    margin-bottom: 0.4rem;
}
.sidebar-filter-list label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text);
    cursor: pointer;
    line-height: 1.4;
}
.sidebar-filter-list input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--primary, #d44);
    cursor: pointer;
    flex-shrink: 0;
}

/* ---- Mobile Filter Pills ---- */
.mobile-filter-bar {
    display: none;
}

.product-filters-wrap {
    position: relative;
}
.product-filters-wrap::before,
.product-filters-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2rem;
    z-index: 2;
    pointer-events: none;
}
.product-filters-wrap::before {
    left: 0;
    background: linear-gradient(to right, var(--bg, #f8f8f8), transparent);
}
.product-filters-wrap::after {
    right: 0;
    background: linear-gradient(to left, var(--bg, #f8f8f8), transparent);
}

.product-filters {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.5rem 0.25rem;
}
.product-filters::-webkit-scrollbar { display: none; }

.filter-btn {
    flex-shrink: 0;
    padding: 0.45rem 1rem;
    border: 1.5px solid rgba(0,0,0,0.12);
    border-radius: 100px;
    background: var(--white);
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ---- Grid Area ---- */
.products-grid-area {
    min-width: 0;
}

.products-count {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* ---- Product Card ---- */
.product-card {
    background: var(--white);
    border-radius: 12px;
    border: 1.5px solid rgba(0,0,0,0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.25s ease;
    position: relative;
}
.product-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: var(--primary);
}

/* Badge */
.product-badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    z-index: 2;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--primary);
    color: #fff;
}
.product-badge-premium {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

/* Image */
.product-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}
.product-card:hover .product-img-wrap img {
    transform: scale(1.04);
}

/* Info */
.product-info {
    padding: 0.9rem 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    width: 100%;
}

.product-brand {
    display: none;
}

.product-name {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.product-variant {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.product-specs {
    display: none;
}

/* CTA Button */
.product-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.25s ease;
    margin-top: auto;
    box-sizing: border-box;
}
.product-cta:hover {
    background: #c94444;
}

/* ---- CTA Banner ---- */
.products-cta-section {
    padding: 0 0 3rem;
    background: var(--bg);
}

.products-cta-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.products-cta-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}
.products-cta-content p {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    max-width: 520px;
}

.products-cta-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}
.products-cta-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}
.products-cta-actions .btn i {
    width: 18px;
    height: 18px;
}

/* ============================
   RESPONSIVE
   ============================ */

/* Tablet */
@media (max-width: 960px) {
    .products-layout {
        grid-template-columns: 200px 1fr;
        gap: 1.5rem;
    }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .products-main-section {
        padding: 1rem 0 2rem;
    }
    .products-sidebar {
        display: none;
    }
    .mobile-filter-bar {
        display: block;
        margin-bottom: 1rem;
    }
    .products-layout {
        display: block;
    }
    .products-grid-area {
        width: 100%;
    }
    .products-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }
    .product-card {
        border-radius: 10px;
        overflow: hidden;
        min-width: 0;
    }
    .product-img-wrap {
        aspect-ratio: 1 / 1;
    }
    .product-info {
        padding: 0.6rem 0.5rem 0.75rem;
    }
    .product-name {
        font-size: 0.78rem;
        margin-bottom: 0.5rem;
    }
    .product-cta {
        padding: 0.4rem 1rem;
        font-size: 0.72rem;
        border-radius: 6px;
    }
    .product-badge {
        font-size: 0.55rem;
        padding: 0.15rem 0.45rem;
        top: 0.4rem;
        left: 0.4rem;
    }
    .products-cta-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding: 1.5rem 1.2rem;
    }
    .products-cta-content p {
        max-width: 100%;
    }
    .products-cta-content h2 {
        font-size: 1.2rem;
    }
    .products-cta-content p {
        font-size: 0.82rem;
    }
    .products-cta-actions {
        flex-direction: column;
        width: 100%;
    }
    .products-cta-actions .btn {
        justify-content: center;
    }
}
