/**
 * Page: Product Archive
 */

.page-product-archive {
    padding-bottom: 40px;
    color: var(--color-text);
}

/* Pagination - extends global .pagination styles from style.css */
.page-product-archive .pagination {
    margin-top: 80px;
}
a.product-cards__card-link.button.primary.arrow.white {
    margin: 0;
}
/* Basic Layout */
.page-product-archive__layout {
    display: block; /* Remove grid/flex used for sidebar */
    padding-bottom: 40px;
}

/* Header & Filter Bar */
.product-archive-header {
    margin-bottom: 80px;
}

.product-archive-header__content {
    margin-bottom: 30px;
}

.page-hero__title {
    margin-bottom: 16px;
    color:#004789 ;
}

.page-hero__desc {
    max-width: 800px;
    line-height: 1.6;
}

/* Top Filter Bar */
.product-filter-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-dropdown {
    position: relative;
    min-width: 268px;
    font-family: inherit;
}

.js-input-container {
    display: none;
}

/* Trigger Button */
.filter-dropdown__trigger {
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    padding-right: 50px;
    gap: 10px;
    background: #FFFFFF;
    border: 1.5px solid #004789;
    border-radius: 99px;
}

.filter-dropdown__text {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #004789;
}

.filter-dropdown__icon {
    width: 10px;
    height: 5px;
    background: url('../../assets/images/arrow-down.svg');
    background-size: cover;
    background-repeat: no-repeat;
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.js-product-filter-select.open .filter-dropdown__icon {
    transform: translateY(-50%) rotate(180deg);
}

/* Dropdown Wrapper */
.filter-dropdown__wrapper {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #fff;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow: hidden;
    padding: 10px 0;
}

.js-product-filter-select.open .filter-dropdown__wrapper {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Options List */
.filter-dropdown__options {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
}

/* Scrollbar styling */
.filter-dropdown__options::-webkit-scrollbar {
    width: 3px;
}

.filter-dropdown__options::-webkit-scrollbar-track {
    background: transparent;
}

.filter-dropdown__options::-webkit-scrollbar-thumb {
    background-color: #D1D5DB;
    border-radius: 3px;
}

/* Individual Option */
.filter-dropdown__option {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 10px 24px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    color: var(--color-text);
}

.filter-dropdown__option:hover,
.filter-dropdown__option.selected {
    color: var(--color-primary);
}


/* Product Grid (Full Width now) */
/* Product Grid - 2 Columns Desktop */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}


.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* Icons Filter (Water Types) */
.filter-group__content--icons {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-icon {
    cursor: pointer;
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.filter-icon input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.filter-icon:has(input:checked) {
    border-color: var(--color-primary);
    background-color: #e6f0fa; /* Light primary bg */
    box-shadow: 0 0 0 2px var(--color-primary-light);
}

.filter-icon:hover {
    border-color: var(--color-primary);
}

.filter-icon__visual {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    /* You can add background icons here based on class */
}

/* Simple color coding for prototype */
.filter-icon__visual--cold { background-color: #00BFFF; }
.filter-icon__visual--hot { background-color: #FF4500; }
.filter-icon__visual--sparkling { background-color: #32CD32; }
.filter-icon__visual--ambient { background-color: #808080; }

/* Grid */
/* Remove Conflicting Grid Definition */

/* Responsive */
@media (max-width: 991px) {
    .page-product-archive__layout {
        grid-template-columns: 1fr; /* Stack sidebar and grid */
    }

    .product-filter-sidebar {
        margin-bottom: 40px;
    }
}



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



/* -----------------------------
   Product Card Styles
----------------------------- */
.product-cards__card {
    background-color: #F4F4F4;
    border-radius: 16px;
    padding: 32px;
    position: relative;
    max-height: 510px; /* Restore min-height for consistent card size */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-cards__card-inner {
    display: flex;
    flex-direction: row;
    gap: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: auto;
}

/*  Remove card lift hover
.product-cards__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
*/


.product-cards__card-content {
    display: flex;
    flex-direction: column;
    z-index: 2;
    flex: 1;
    max-width: 50%; /* Reduce width to prevent overlap */
}

@media (max-width: 991px) {
    .product-cards__card-content {
        max-width: 100%;

    }
    .product-cards__card-features{
        margin-bottom:18px;
    }
}

.product-cards__card-title {
    margin: 0 0 20px 0;
    color:#004789;
}

/* Features / Water Options */
.product-cards__card-features {
    display: grid;
    grid-template-columns: repeat(5, max-content);
    gap: 10px;
    margin-bottom: 20px;
}

.product-cards__card-feature {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00A9E0; /* Cyan Blue */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.product-cards__card-feature svg {
    width: 18px;
    height: 18px;
}

/* Sectors */
.product-cards__card-sectors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: auto; /* Push button to bottom */
}

.product-cards__card-sector {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #004789;
    border-radius: 99px;
    color: #004789;
    font-weight: 500;
    background-color: transparent;
}

/* View Product Link/Button */
.product-cards__card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #fff;
    border-radius: 99px;
    color: #003057;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    width: fit-content;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    margin-top: 30px;
}

.product-cards__card-link:hover {
    background-color: #003057;
    color: #fff;
}

/* Product Image */
/* Product Image - Absolute Position Bottom Right */
.product-cards__card-image {
    right: 0;
    bottom: 0;
    width: 50%; /* Adjusted width to 50% */
    /* height: 85%; */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.product-cards__card-image a {
    display: flex;
    height: 100%;
    object-fit: cover;
    justify-content: center;
    align-items: end;
}

.product-cards__card-image img {
    max-width: 85%;
    max-height: 85%;
    z-index: 22;
    object-fit: contain;
    object-position: bottom center;
    transition: transform 0.5s ease; /* Smooth scale transition */
}

.product-cards__card:hover .product-cards__card-image img {
    transform: scale(1.08); /* Scale up image on hover */
}



/* Mobile Tweaks */
@media (max-width: 991px) {
    .product-cards__card-features{
        display: flex;
        margin-bottom: 18px;
    }
    .product-cards__card-title{
        margin-bottom: 18px;;
    }
    .page-product-archive .pagination{
        margin-top:40px;
    }
    .page-product-archive .navigation.pagination{
        margin-top: 40px;
    }
    .product-cards__card {
        padding: 30px;
        min-height: auto;
        max-height: none;
        align-items: center;
    }

    .product-cards__card span.product-cards__card-link.button.primary.arrow.white{
        width: auto;
        margin-top: 18px;
        margin-bottom: 5px;
    }

    .filter-dropdown{
        width: 100%;
    }
    a.product-cards__card-link.button.primary.arrow.white {
        margin-top: 30px;
    }
    .product-cards__card-inner {
        flex-direction: column;
    }
    
    .product-cards__card-content {
        max-width: 100%; /* Stacks on mobile */
        margin-bottom: 20px;
        text-align: center;
        align-items: center;
    }
    .product-cards__card-sectors{
        justify-content: center;
    }

    .product-cards__card-image {
        position: relative;
        width: 100%;
        height: 250px;
        right: auto;
        bottom: auto;
        align-items: center;
        justify-content: center;
    }
    
    .product-cards__card-image img {
        object-position: center;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    .page-product-archive__layout{
        padding-bottom: 10px;
    }

    .product-cards__card-link {
        width: 100%;
        justify-content: center;
    }
}


