/* ===================================================================
   WeatherSeal PLP Component Styles
   =================================================================== */

.cmp-weatherseal-plp {
    padding: 40px;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    font-family: Archivo, sans-serif;
    max-width: 1440px;
    margin: 0 auto;
}

@media screen and (max-width: 767px) {
    .cmp-weatherseal-plp {
        padding: 20px;
        gap: 16px;
    }
}

/* ==================== Category Selector ==================== */

.cmp-weatherseal-plp__category-selector {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 32px 0 24px;
}

@media screen and (max-width: 767px) {
    .cmp-weatherseal-plp__category-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 20px 0 16px;
    }
}

.cmp-weatherseal-plp__category-header {
    flex-shrink: 0;
    max-width: 280px;
}

@media screen and (max-width: 991px) {
    .cmp-weatherseal-plp__category-header {
        max-width: 200px;
    }
}

@media screen and (max-width: 767px) {
    .cmp-weatherseal-plp__category-header {
        max-width: 100%;
    }
}

.cmp-weatherseal-plp__section-title {
    font-size: 28px;
    font-weight: 500;
    color: #202129;
    margin: 0;
    line-height: 1.3;
}

@media screen and (max-width: 991px) {
    .cmp-weatherseal-plp__section-title {
        font-size: 22px;
    }
}

@media screen and (max-width: 767px) {
    .cmp-weatherseal-plp__section-title {
        font-size: 20px;
    }
}

.cmp-weatherseal-plp__category-carousel-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    position: relative;
}

.cmp-weatherseal-plp__cat-prev,
.cmp-weatherseal-plp__cat-next {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.cmp-weatherseal-plp__cat-prev:hover,
.cmp-weatherseal-plp__cat-next:hover {
    border-color: #202129;
    background: #202129;
    color: #fff;
}

.cmp-weatherseal-plp__cat-prev svg,
.cmp-weatherseal-plp__cat-next svg {
    stroke: currentColor;
}

.cmp-weatherseal-plp__category-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
}

.cmp-weatherseal-plp__category-carousel::-webkit-scrollbar {
    display: none;
}

.cmp-weatherseal-plp__category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.cmp-weatherseal-plp__category-img-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
    background: #f5f5f5;
}

@media screen and (max-width: 767px) {
    .cmp-weatherseal-plp__category-img-wrapper {
        width: 64px;
        height: 64px;
    }
}

.cmp-weatherseal-plp__category-item--active .cmp-weatherseal-plp__category-img-wrapper {
    border-color: #202129;
}

.cmp-weatherseal-plp__category-item--active .cmp-weatherseal-plp__category-img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") center/20px no-repeat;
    border-radius: 10px;
    pointer-events: none;
}

.cmp-weatherseal-plp__category-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.cmp-weatherseal-plp__category-item:hover .cmp-weatherseal-plp__category-img {
    transform: scale(1.05);
}

.cmp-weatherseal-plp__category-label {
    font-size: 12px;
    font-weight: 400;
    color: #666;
    text-align: center;
    white-space: nowrap;
}

.cmp-weatherseal-plp__category-item--active .cmp-weatherseal-plp__category-label {
    color: #202129;
    font-weight: 600;
}

/* ==================== Filter Bar ==================== */

.cmp-weatherseal-plp__filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    display: none !important;
}

.cmp-weatherseal-plp__filter-dropdown {
    position: relative;
    flex-shrink: 0;
}

.cmp-weatherseal-plp__filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px solid #ebeced;
    border-radius: 30px;
    background: #fff;
    font-size: 14px;
    font-weight: 400;
    color: #202129;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: Archivo, sans-serif;
}

.cmp-weatherseal-plp__filter-btn:hover {
    border-color: #999;
}

.cmp-weatherseal-plp__filter-dropdown.open .cmp-weatherseal-plp__filter-btn {
    border-color: #202129;
    color: #9DA1B0;
}

.cmp-weatherseal-plp__filter-btn svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.cmp-weatherseal-plp__filter-dropdown.open .cmp-weatherseal-plp__filter-btn svg {
    transform: rotate(180deg);
}

.cmp-weatherseal-plp__filter-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 8px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.cmp-weatherseal-plp__filter-dropdown.open .cmp-weatherseal-plp__filter-panel {
    display: block;
}

.cmp-weatherseal-plp__filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #202129;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
    font-family: Archivo, sans-serif;
}

.cmp-weatherseal-plp__filter-option:last-child {
    border-bottom: none;
}

.cmp-weatherseal-plp__filter-option:hover {
    background: #f5f5f5;
}

.cmp-weatherseal-plp__filter-option input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    min-width: 16px;
    flex-shrink: 0;
    opacity: 0;
    cursor: pointer;
    position: relative;
    z-index: 1;
    margin: 0;
}

.cmp-weatherseal-plp__filter-option::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 1.5px solid #D5D7DE;
    border-radius: 3px;
    background: #fff;
    box-sizing: border-box;
    pointer-events: none;
}

.cmp-weatherseal-plp__filter-option:has(input[type="checkbox"]:checked)::after {
    content: '';
    position: absolute;
    left: 21px;
    top: 50%;
    width: 4px;
    height: 8px;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

/* Mobile controls */
.cmp-weatherseal-plp__mobile-controls {
    display: none;
}

.cmp-weatherseal-plp__mobile-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px solid #ebeced;
    border-radius: 30px;
    background: #fff;
    font-size: 14px;
    font-weight: 400;
    color: #202129;
    cursor: pointer;
    font-family: Archivo, sans-serif;
    position: relative;
}

.cmp-weatherseal-plp__filter-dot {
    width: 6px;
    height: 6px;
    background: #e74c3c;
    border-radius: 50%;
    display: inline-block;
}

/* ==================== Active Filter Chips ==================== */

.cmp-weatherseal-plp__active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cmp-weatherseal-plp__filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #cacbcc;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    color: #202129;
    white-space: nowrap;
}

.cmp-weatherseal-plp__filter-chip button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #999;
    padding: 0;
    line-height: 1;
}

/* ==================== Product Grid ==================== */

.cmp-weatherseal-plp__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px 20px;
}

@media screen and (max-width: 1199px) {
    .cmp-weatherseal-plp__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px 20px;
    }
}

@media screen and (max-width: 767px) {
    .cmp-weatherseal-plp__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 8px;
    }
}

/* ==================== Product Card ==================== */

.cmp-weatherseal-plp__card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
    @media screen and (max-width:767px){
        gap: 12px;
    }
}

/* Card image wrapper */
.cmp-weatherseal-plp__card-img-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f4f4f4;
    border-radius: 16px;
    cursor: pointer;
}

@media screen and (max-width: 767px) {
    .cmp-weatherseal-plp__card-img-wrapper {
        border-radius: 8px;
        aspect-ratio: 160 / 210;
    }
}

/* Top row: badges + actions */
.cmp-weatherseal-plp__card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 16px 0;
    flex-shrink: 0;
    @media screen and (max-widhth:767px){
        padding: 10px 10px 0;
    }
}

/* Image gallery */
.cmp-weatherseal-plp__card-gallery {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.cmp-weatherseal-plp__card-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    will-change: transform;
}

.cmp-weatherseal-plp__card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 16px;
    box-sizing: border-box;
    @media screen and (max-width:767px){
        padding: 10px;
    }
}

/* Carousel controls row */
.cmp-weatherseal-plp__card-carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    flex-shrink: 0;
    padding-bottom: 22px;
}

/* Prev/next arrows */
.cmp-weatherseal-plp__img-prev,
.cmp-weatherseal-plp__img-next {
    width: 28px;
    height: 28px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
    background: transparent;
    color: #232426;

}

.cmp-weatherseal-plp__img-prev.cmp-weatherseal-plp__img-btn--disabled,
.cmp-weatherseal-plp__img-next.cmp-weatherseal-plp__img-btn--disabled {
   color: #B0B1B3;
}

/* Badges */
.cmp-weatherseal-plp__card-badges {
    display: flex;
    gap: 6px;
}

.cmp-weatherseal-plp__card-badge {
    font-size: 12px;
    font-weight: 400;
    padding: 4px 10px;
    border-radius: 4px;
    border: 0.6px solid #CACBCC;
    font-family: Archivo, sans-serif;
    color: #232426;
    @media screen and (max-width:767px){
        font-size: 9px;
        padding: 2px 6px;
    }
}


/* Action icons (compare + wishlist) */
.cmp-weatherseal-plp__card-actions {
    display: flex;
    gap: 6px;
}

.cmp-weatherseal-plp__compare-btn,
.cmp-weatherseal-plp__like-btn {
    width: 24px;
    height: 24px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    background: transparent;
    @media screen and (max-width:767px){
        width: 16px;
        height: 16px;
    }
}

.cmp-weatherseal-plp__compare-btn img,
.cmp-weatherseal-plp__like-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Card content (below image) */
.cmp-weatherseal-plp__card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 2px;
}

.cmp-weatherseal-plp__card-title-link {
    text-decoration: none;
    color: inherit;
}

.cmp-weatherseal-plp__card-title {
    font-size: 14px;
    font-weight: 300;
    color: #232426;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* Colour swatches */
.cmp-weatherseal-plp__card-swatches {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cmp-weatherseal-plp__card-swatch {
    display: inline-block;
    text-decoration: none;
    flex-shrink: 0;
}

.cmp-weatherseal-plp__swatch-dot {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid transparent;
    transition: border-color 0.2s ease;
}

.cmp-weatherseal-plp__card-swatch--active .cmp-weatherseal-plp__swatch-dot {
    border-color: #BEBEBE;
}

.cmp-weatherseal-plp__card-swatch:hover .cmp-weatherseal-plp__swatch-dot {
    border-color: #999;
}

.cmp-weatherseal-plp__more-options {
    font-size: 12px;
    color: #53565A;
    font-weight: 300;
    white-space: nowrap;
}

/* ==================== Promo Banner ==================== */

.cmp-weatherseal-plp__promo-banner {
    grid-column: 1 / -1;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 200px;
}

.cmp-weatherseal-plp__promo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cmp-weatherseal-plp__promo-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cmp-weatherseal-plp__promo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.cmp-weatherseal-plp__promo-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

.cmp-weatherseal-plp__promo-cta {
    display: inline-block;
    padding: 10px 24px;
    background: #fff;
    color: #202129;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    align-self: flex-start;
    transition: background 0.2s ease;
}

.cmp-weatherseal-plp__promo-cta:hover {
    background: #f0f0f0;
}

/* ==================== No Results ==================== */

.cmp-weatherseal-plp__no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

.cmp-weatherseal-plp__no-results p {
    margin: 0;
}

/* ==================== Load More ==================== */

.cmp-weatherseal-plp__load-more {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.cmp-weatherseal-plp__load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 48px;
    border: 1px solid #202129;
    border-radius: 30px;
    background: #fff;
    color: #202129;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: Archivo, sans-serif;
}

.cmp-weatherseal-plp__load-more-btn:hover {
    background: #202129;
    color: #fff;
}

/* ==================== Mobile Filter Overlay ==================== */

.cmp-weatherseal-plp__mobile-filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.45);
    align-items: flex-end;
}

.cmp-weatherseal-plp__mobile-filter-overlay[style*="flex"] {
    display: flex !important;
}

.cmp-weatherseal-plp__mobile-filter-panel {
    background: #fff;
    width: 100%;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    animation: wsFilterSlideUp 0.25s ease;
}

@keyframes wsFilterSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.cmp-weatherseal-plp__mobile-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f2f3f5;
    font-size: 16px;
    font-weight: 500;
    color: #202129;
}

.cmp-weatherseal-plp__mobile-filter-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #444;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cmp-weatherseal-plp__mobile-filter-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

/* Show filter panels inline inside mobile body */
.cmp-weatherseal-plp__mobile-filter-body .cmp-weatherseal-plp__filter-panel {
    display: block !important;
    position: relative !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    min-width: unset !important;
    max-height: unset !important;
    top: auto !important;
    left: auto !important;
}

.cmp-weatherseal-plp__mobile-filter-body .cmp-weatherseal-plp__filter-dropdown {
    margin-bottom: 16px;
}

.cmp-weatherseal-plp__mobile-filter-body .cmp-weatherseal-plp__filter-btn {
    font-size: 14px;
    font-weight: 600;
    border: none;
    padding: 0 0 12px 0;
    border-radius: 0;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
    justify-content: space-between;
}

.cmp-weatherseal-plp__mobile-filter-footer {
    display: flex;
    border-top: 1px solid #f0f0f0;
}

.cmp-weatherseal-plp__mobile-reset {
    flex: 0 0 38%;
    padding: 16px;
    background: #fff;
    border: none;
    font-size: 13px;
    font-weight: 700;
    color: #202129;
    cursor: pointer;
    font-family: Archivo, sans-serif;
}

.cmp-weatherseal-plp__mobile-apply {
    flex: 1;
    padding: 16px;
    background: #202129;
    border: none;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: Archivo, sans-serif;
}

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

@media screen and (max-width: 767px) {
    /* Hide desktop filter dropdowns; show mobile button */
    .cmp-weatherseal-plp__filter-dropdown {
        display: none;
    }

    .cmp-weatherseal-plp__mobile-controls {
        display: block;
    }
}
