/**
 * Product Cards Styles - Using ID for high specificity
 */

/* Main wrapper with ID for highest specificity */
#hh-product-cards {
    display: block;
    width: 100%;
}

/* Reset all child elements */
#hh-product-cards *,
#hh-product-cards *::before,
#hh-product-cards *::after {
    box-sizing: border-box;
}

/* Filters and Navigation Container */
#hh-product-cards .filters-nav-container {
    max-width: 1624px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

/* Filters */
#hh-product-cards .hh-product-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background-color: #fff;
    border-radius: 6px;
    width: max-content;
}

/* Swiper Navigation Controls */
#hh-product-cards .swiper-nav-controls {
    display: flex;
    gap: 24px;
    align-items: center;
}

/* Mobile Navigation Controls - hidden on desktop by default, but can be overridden by inline style */
#hh-product-cards .swiper-nav-controls-mobile {
    display: none;
    position: absolute;
    top: 40%;
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none;
    justify-content: space-between;
    transform: translateY(-40%);
}

/* When nav_location="normal", this will be display: flex via inline style */
#hh-product-cards[data-nav-location="normal"] .swiper-nav-controls-mobile {
    display: flex;
}

#hh-product-cards .swiper-button-prev-mobile,
#hh-product-cards .swiper-button-next-mobile {
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

#hh-product-cards .swiper-button-prev-custom,
#hh-product-cards .swiper-button-next-custom {
    width: 50px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    opacity: 1;
}

#hh-product-cards .swiper-button-prev-custom:hover,
#hh-product-cards .swiper-button-next-custom:hover {
    opacity: 0.7;
}

/* Disabled state for custom navigation */
#hh-product-cards .swiper-button-prev-custom.swiper-button-disabled,
#hh-product-cards .swiper-button-next-custom.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Hide navigation when no slides */
#hh-product-cards .swiper-nav-controls .swiper-button-lock {
    display: none;
}

#hh-product-cards .nav-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Swiper Container - now uses the calculation method */
#hh-product-cards .halo-product-swiper {
    padding-left: calc((100% - 1624px) / 2);
}

/* Swiper Scrollbar Container */
#hh-product-cards .swiper-scrollbar-container {
    max-width: 1624px;
    padding: 0 10px;
    margin: 10px auto 20px;
}

/* Swiper Scrollbar Styling */
#hh-product-cards .swiper-scrollbar {
    background: #EBEBEB;
    height: 4px;
    border-radius: 0;
    position: relative;
    width: 100%;
}

#hh-product-cards .swiper-scrollbar .swiper-scrollbar-drag {
    background: #000;
    height: 4px;
    border-radius: 0;
    position: absolute;
    top: 0;
    left: 0;
}

#hh-product-cards .filter-btn {
    background-color: #fff;
    font-family: "utile", sans-serif;
    font-size: 18px;
    font-weight: 400;
    border-width: 0;
    border-radius: 6px;
    padding: 12px 16px 12px 21px;
    cursor: pointer;
    display: inline-block;
    color: #000;
    outline: 2px solid transparent;
    line-height: 1;
}

#hh-product-cards .filter-btn.active,
#hh-product-cards .filter-btn:focus {
    outline-color: #000;
    background-color: #FCF6F1;
}

#hh-product-cards .hh-product-card {
    margin-top: 40px;
}

#hh-product-cards .filter-btn:hover {
    background-color: #FCF6F1;
}

#hh-product-cards .filter-btn:focus:hover {
    background-color: #FCF6F1;
    outline-color: #000;
}

/* Product Cards Swiper */
#hh-product-cards .halo-product-swiper .swiper-wrapper {
    display: flex;
}

#hh-product-cards .halo-product-swiper .swiper-slide {
    width: 355px !important;
    flex-shrink: 0;
    margin-right: 32px;
}

#hh-product-cards .halo-product-swiper .swiper-slide:last-child {
    margin-right: 0;
}

#hh-product-cards .product-description {
    margin-bottom: 10px;
}

/* Swiper Navigation */
#hh-product-cards .halo-product-swiper .swiper-button-next,
#hh-product-cards .halo-product-swiper .swiper-button-prev {
    color: #8B4513;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: -20px;
}

#hh-product-cards .halo-product-swiper .swiper-button-next:after,
#hh-product-cards .halo-product-swiper .swiper-button-prev:after {
    font-size: 16px;
    font-weight: bold;
}

#hh-product-cards .halo-product-swiper .swiper-button-next {
    right: 10px;
}

#hh-product-cards .halo-product-swiper .swiper-button-prev {
    left: 10px;
}

/* Hide navigation when not needed */
#hh-product-cards .halo-product-swiper .swiper-button-disabled {
    opacity: 0.3;
    pointer-events: none;
}

#hh-product-cards .btn-view-details {
    background-color: #000000;
    font-family: "utile", Sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: 1px;
    fill: #FFFFFF;
    color: #FFFFFF;
    border-style: none;
    border-radius: 30px;
    padding: 10px 10px 12px 10px;
}

#hh-product-cards .btn-view-details:focus:hover {
    background-color: #E0ABAEC7;
}

#hh-product-cards .btn-shop-now {
    background-color: #E0ABAE;
    font-family: "utile", Sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: 1px;
    fill: #000000;
    color: #000000;
    border-style: none;
    border-radius: 31px;
    padding: 10px 10px 12px 10px;
}

#hh-product-cards .btn-shop-now:focus:hover {
    background-color: #5B5B5B;
}

/* Straightener Product Card Styles */
#hh-product-cards .hh-product-card {
    background: #F9F2ED;
    border-bottom-left-radius: 50px;
}

#hh-product-cards .product-card-image {
    transform: translateY(-40px);
}

#hh-product-cards .product-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-top: -150px;
    padding: 0 32px 32px;
}

#hh-product-cards .btn-arrow-icon {
    object-fit: contain;
    width: 10px;
    height: 10px;
}

/* Product Image */
.product-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.product-main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.product-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.05);
    color: #999;
    font-size: 14px;
    border-radius: 8px;
}

#hh-product-cards .product-title {
    font-weight: 400;
    font-family: "utile-display", sans-serif;
    font-size: 30px;
    color: #000;
    max-width: 200px;
    height: 60px;
    display: flex;
    align-items: end;
}

#hh-product-cards .product-features p {
    font-family: "utile", sans-serif;
    font-size: 18px;
    color: #7a7a7a;
    font-weight: 300;
    line-height: 27px;
}

/* Color Swatches Area - Always present for consistent height */
#hh-product-cards .color-swatches-area {
    min-height: 35px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

#hh-product-cards .color-swatch img {
    width: 26px;
    max-width: 26px;
    border: 2px solid transparent;
    cursor: pointer;
    /* Removed transition for instant outline effect */
}

#hh-product-cards .color-swatch.active img,
#hh-product-cards .color-swatches-area .color-swatch:hover img {
    border: 2px solid transparent;
    background-clip: content-box;
    border-radius: 15px;
    -webkit-border-radius: 15px;
    box-shadow: 0 0 0 1px #000;
}

/* Product Actions */
#hh-product-cards .product-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#hh-product-cards .action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn-view-details,
.btn-shop-now {
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    display: inline-block;
}

#hh-product-cards .product-price {
    margin-bottom: 10px;
}

#hh-product-cards .product-rrp {
    font-size: 12px;
}

#hh-product-cards .product-price .price {
    font-size: 18px;
    font-weight: 300;
    color: #000;
}

/* Product Carousel */
.product-carousel-wrapper {
    position: relative;
    background: #f8f8f8;
    height: 300px;
    overflow: hidden;
}

.product-carousel {
    height: 100%;
}

.product-carousel .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-carousel .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.product-carousel .swiper-pagination {
    bottom: 15px;
}

.product-carousel .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.8);
    opacity: 1;
}

.product-carousel .swiper-pagination-bullet-active {
    background: #333;
}

.product-carousel .swiper-button-next,
.product-carousel .swiper-button-prev {
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.product-carousel .swiper-button-next:after,
.product-carousel .swiper-button-prev:after {
    font-size: 14px;
    font-weight: bold;
}

/* Color Variations */
#hh-product-cards .color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Responsive Design for Straightener Cards */
@media (max-width: 767px) {
    #hh-product-cards {
        padding: 10px;
    }
    
    #hh-product-cards .product-title h3 {
        font-size: 24px;
    }

    /* Mobile: Stack filters vertically with margins */
    #hh-product-cards .filters-nav-container {
        gap: 20px;
    }

    #hh-product-cards .product-features p {
        font-size: 14px;
        line-height: 21px;
    }
    
    #hh-product-cards .hh-product-filters {
        flex-direction: column;
        align-items: start;
        gap: 8px;
        background-color: transparent;
        margin-bottom: 0;
    }

    #hh-product-cards .color-swatches-area {
        min-height: 30px;
    }
    
    /* Hide desktop navigation on mobile */
    #hh-product-cards .swiper-nav-controls {
        display: none;
    }
    
    /* Show mobile navigation arrows */
    #hh-product-cards .swiper-nav-controls-mobile {
        display: flex;
    }
    
    #hh-product-cards .halo-product-swiper .swiper-slide {
        width: 280px !important;
        margin-right: 20px;
    }

    #hh-product-cards .product-card-inner {
        margin-top: -160px;
    }
    
    #hh-product-cards .filter-btn {
        min-width: 100px;
        padding: 12px 16px 12px 21px;
        font-size: 16px;
        line-height: 1;
    }
    
    #hh-product-cards .hh-product-card.straightener-card {
        min-height: 400px;
    }
    
    #hh-product-cards .straightener-card .product-card-inner {
        padding: 20px;
        gap: 0;
    }
    
    #hh-product-cards .product-image-wrapper {
        height: 150px;
    } 
    
    #hh-product-cards .action-buttons {
        gap: 8px;
        grid-template-columns: 1fr 1fr;
        margin-bottom: 12px;
    }

    #hh-product-cards .btn-arrow-icon {
        height: 8px;
    }
    
    #hh-product-cards .btn-view-details,
    #hh-product-cards .btn-shop-now {
        padding: 9px 5px;
        font-size: 12px;
    }

    #hh-product-cards .color-swatches {
        gap: 2px;
    }

    #hh-product-cards .product-price {
        margin-top: 5px;
    }

    #hh-product-cards .product-price .price {
        font-size: 16px;
    }

    #hh-product-cards .product-rrp {
        font-size: 12px;
    }
    
    #hh-product-cards .straightener-card .color-swatch {
        width: 26px;
        height: 26px;
    }
    
    #hh-product-cards .straightener-card .color-swatch img {
        max-width: 26px;
    }
    
    #hh-product-cards .halo-product-swiper .swiper-button-next,
    #hh-product-cards .halo-product-swiper .swiper-button-prev {
        width: 35px;
        height: 35px;
    }
}

/* Hidden state for filtering */
.hh-product-card.filtered-out {
    display: none;
}