/* ===== Products Page Styles ===== */

/* Hero Banner */
.products-hero {
    padding-top: calc(82px + 4.5rem);
    padding-bottom: 4rem;
    background-color: #f1f5f9;
    border-bottom: 1px solid rgba(195, 198, 215, 0.4);
}

.products-hero-label {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.products-hero-label::before {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--primary);
    flex-shrink: 0;
}

.products-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 700;
    color: var(--on-surface);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.products-hero-sub {
    font-size: 1.0625rem;
    color: var(--on-surface-variant);
    max-width: 580px;
    line-height: 1.75;
}

/* Filter Tabs */
.products-filter-section {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(195, 198, 215, 0.4);
    padding: 1.25rem 0;
    position: sticky;
    top: 82px;
    z-index: 100;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--on-surface-variant);
    background-color: var(--surface-container-low);
    border: 1px solid transparent;
    border-radius: 500px;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-tab:hover {
    background-color: var(--surface-container-high);
    color: var(--on-surface);
}

.filter-tab.active {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Products Grid Section */
.products-grid-section {
    padding: 4rem 0 5rem;
    background-color: #ffffff;
}

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

/* Product Card */
.product-card {
    background-color: var(--surface-container-lowest);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: none;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-float);
}

/* Card Image */
.product-card-img-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: var(--surface-container-lowest);
}

.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

/* Overlay */
.product-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 74, 198, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-card-overlay {
    opacity: 1;
}

.product-overlay-btn {
    background-color: #ffffff;
    color: var(--primary);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.625rem 1.5rem;
    border-radius: 500px;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s;
}

.product-overlay-btn:hover {
    background-color: var(--surface-container-low);
    transform: scale(1.04);
}

/* Card Body */
.product-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.product-tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    background-color: var(--surface-container-low);
    border-radius: 500px;
    padding: 0.2rem 0.625rem;
    display: inline-block;
    width: fit-content;
}

.product-card-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--on-surface);
    line-height: 1.3;
    margin-top: 0.25rem;
}

.product-card-desc {
    font-size: 0.8125rem;
    color: var(--on-surface-variant);
    line-height: 1.65;
    flex: 1;
}

.product-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    margin-top: 0.5rem;
    transition: gap 0.2s ease;
}

.product-card-cta svg {
    width: 15px;
    height: 15px;
    transition: transform 0.2s ease;
}

.product-card-cta:hover svg {
    transform: translateX(3px);
}

/* No Results */
.no-results {
    display: none;
    text-align: center;
    padding: 4rem 0;
    color: var(--on-surface-variant);
    font-size: 1rem;
}

.no-results.visible {
    display: block;
}

/* Card hidden state for filtering */
.product-card.hidden {
    display: none;
}

/* ===== Responsive ===== */

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

@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-filter-section {
        top: 82px;
    }
}

@media (max-width: 640px) {
    .products-hero {
        padding-top: calc(82px + 2.5rem);
        padding-bottom: 2.5rem;
    }

    .filter-tabs {
        gap: 0.375rem;
    }

    .filter-tab {
        font-size: 0.8rem;
        padding: 0.45rem 1rem;
    }

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

    .product-card-img-wrap {
        height: 160px;
    }

    .products-grid-section {
        padding: 2.5rem 0 3.5rem;
    }
}

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

    .products-hero-title {
        font-size: 1.875rem;
    }
}
