/* ================= HERO ================= */
.products-hero {
    position: relative;

    border-radius: var(--radius-xl);
    padding: 50px 20px;
    margin-bottom: 30px;

    overflow: hidden;

    background:
        linear-gradient(
            rgba(15, 23, 42, 0.85),
            rgba(15, 23, 42, 0.85)
        ),
        url('https://images.unsplash.com/photo-1556740738-b6a63e27c4df?q=80&w=1400&auto=format&fit=crop') center/cover;

    color: #ffffff;
    text-align: center;
}

/* subtle floating text layer */
.products-hero::after {
    content: "Compare • Discover • Shop Smart";
    position: absolute;

    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);

    font-size: 12px;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.25);
}

/* content */
.hero-content h1 {
    font-size: 30px;
    font-weight: 700;
}

.hero-content p {
    font-size: 14px;
    color: rgba(255,255,255,0.80);
}


/* ================= FILTER ================= */
.filters {
    margin-bottom: 24px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

/* INPUTS */
.filter-bar input,
.filter-bar select {
    padding: 10px 12px;
    border-radius: var(--radius-sm);

    border: 1px solid var(--border);
    background: var(--surface-soft);

    font-size: 0.85rem;
    min-width: 140px;
}

/* FOCUS */
.filter-bar input:focus,
.filter-bar select:focus {
    outline: none;
    border-color: var(--brand-green);
    background: #ffffff;
}


/* ================= ACTIONS ================= */
.filter-actions {
    display: flex;
    gap: 10px;
}


/* ================= BUTTONS ================= */

/* FIXED PRIMARY BUTTON */
/* ================= BUTTONS ================= */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 11px 18px;
    border-radius: var(--radius-sm);

    background: var(--brand-green) !important;
    color: #ffffff !important;

    font-size: 0.85rem;
    font-weight: 600;

    border: 1px solid var(--brand-green-dark);

    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);

    text-decoration: none;

    transition: all 0.2s var(--ease);
}

/* HOVER STATE */
.btn-primary:hover {
    background: var(--brand-green-dark) !important;
    color: #ffffff !important;

    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.35);
}

/* ACTIVE CLICK */
.btn-primary:active {
    transform: translateY(0);
}

/* FIX BUTTON INSIDE PRODUCT CARD */
.product-card .btn-primary {
    width: 100%;
}

/* CLEAR BUTTON */
.btn-clear {
    padding: 10px 16px;
    border-radius: var(--radius-sm);

    background: var(--surface-soft);
    color: var(--text-secondary);

    text-decoration: none;
    font-size: 0.85rem;
}

.btn-clear:hover {
    background: var(--surface-muted);
}


/* ================= CATEGORY CHIPS ================= */
.category-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.chip {
    padding: 7px 14px;
    border-radius: var(--radius-full);

    font-size: 12px;
    font-weight: 500;

    background: var(--surface-card);
    border: 1px solid var(--border);

    color: var(--text-secondary);

    transition: 0.2s;
}

.chip:hover {
    background: var(--brand-green-ghost);
    color: var(--brand-green-dark);
}


/* ================= RESULTS ================= */
.results-bar {
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--text-muted);
}


/* ================= GRID ================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 22px;
}

@media (max-width: 1400px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}


/* ================= PRODUCT CARD ================= */
.product-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-img {
    border-radius: var(--radius-md);
    overflow: hidden;
}

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

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-info h3 {
    font-size: 14px;
    font-weight: 600;
}

.price {
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-green);
}

.compare-tag {
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 6px;

    background: var(--surface-soft);
    color: var(--text-muted);

    padding: 5px 10px;
    border-radius: var(--radius-xs);
}

.product-card .btn-primary {
    margin-top: auto;
    text-align: center;
}

.empty {
    text-align: center;
    margin-top: 40px;
    color: var(--text-muted);
}


/* ================= MOBILE ================= */
@media (max-width: 768px) {

    .products-hero {
        padding: 30px 16px;
    }

    .hero-content h1 {
        font-size: 24px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-actions {
        width: 100%;
        justify-content: space-between;
    }
}