/* ====================================================================
   DYNAMIC ACF FILTER SYSTEM - GRID-BASED LAYOUT
   Version: 2.0 - Optimized for BTPF Plugin
   ==================================================================== */

/* Import Fonts used in the design */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@700&family=Mulish:wght@400;600;700&display=swap');

/* ====================================================================
   GLOBAL TYPOGRAPHY (From provided style)
   ==================================================================== */

/* Note: These styles are global. If you only want them to apply 
   inside the filter section, prefix them with .btpf-filter-section */

body {
    font-family: "Mulish", "Crimson Pro", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Crimson Pro", serif;
    font-weight: 700; 
}


/* CSS Reset for Plugin Container */
.btpf-filter-section,
.btpf-filter-section * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.btpf-filter-section {
    all: initial;
    display: block;
    box-sizing: border-box;
}

.btpf-filter-section * {
    box-sizing: border-box;
}

/* Section Container */
.btpf-filter-section {
    margin: 60px 0;
    padding: 0;
    font-family: "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
}

/* Section Header */
.btpf-section-header {
    margin-bottom: 40px;
    text-align: center;
}

.btpf-section-title {
    font-size: 36px;
    font-weight: 700;
    margin: 0;
    color: #333;
    line-height: 1.2;
}

/* ====================================================================
   FILTERS CAROUSEL - HYBRID GRID + SLICK APPROACH
   ==================================================================== */

.btpf-filters-carousel-wrapper {
    margin-bottom: 50px;
    position: relative;
    width: 100%;
    max-width: 1400px; 
    margin-left: auto;
    margin-right: auto;
    padding: 0; 
}

.btpf-filters-carousel {
    margin: 0;
    width: 100%;
}

/* Grid Layout for Filters - Let Slick handle widths */
.btpf-filters-carousel .slick-track {
    display: flex !important;
    align-items: stretch;
    padding: 20px 0;
    justify-content: center; 
    margin-left: auto !important;
    margin-right: auto !important;
}

.btpf-filters-carousel .slick-list {
    overflow: hidden;
    margin: 0 -7.5px; /* Negative margin for gaps */
    padding: 0;
    width: 100%;
}

.btpf-filter-slide {
    outline: none;
    box-sizing: border-box;
    height: auto;
    display: flex !important;
    padding: 0 7.5px; 
    flex-shrink: 0; 
}

/* Filter Item */
.btpf-filter-item {
    background: transparent;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    width: 100%;
}

.btpf-filter-item:hover {
    outline: 5px solid #0B5B50;
    transform: scale(1.03);
    padding: 17px;
}

.btpf-filter-item.active {
    outline: 5px solid #0B5B50;
    background: #ddf5f2;
    box-shadow: none;
    padding: 17px;
}

/* Filter Image */
.btpf-filter-image {
    margin-bottom: 15px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.btpf-filter-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    max-height: 120px;
    object-fit: contain;
    display: block;
}

/* Filter Name */
.btpf-filter-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.btpf-filter-item.active .btpf-filter-name {
    color: #0B5B50;
}

/* ====================================================================
   FILTER CAROUSEL ARROWS
   ==================================================================== */

.btpf-filters-carousel-wrapper .slick-arrow,
.btpf-filters-carousel-wrapper .slick-prev,
.btpf-filters-carousel-wrapper .slick-next {
    width: auto;
    height: auto;
    z-index: 10;
    background: #0B5B50;
    border: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 20px;
}

.btpf-filters-carousel > .slick-prev {
  left: -25px;
}

.btpf-filters-carousel > .slick-next {
  right: -25px;
}

.btpf-filters-carousel-wrapper .slick-arrow:before,
.btpf-filters-carousel-wrapper .slick-prev:before,
.btpf-filters-carousel-wrapper .slick-next:before {
    font-size: 0;
    opacity: 0;
}

/* Chevron Icons */
.btpf-filters-carousel-wrapper .slick-prev:after,
.btpf-filters-carousel-wrapper .slick-next:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 16px;
    height: 16px;
    border-style: solid;
    border-color: white;
}

.btpf-filters-carousel-wrapper .slick-prev:after {
    border-width: 0 0 4px 4px;
    margin-left: 3px;
}

.btpf-filters-carousel-wrapper .slick-next:after {
    border-width: 4px 4px 0 0;
    margin-left: -3px;
}

.btpf-filters-carousel-wrapper .slick-arrow:hover,
.btpf-filters-carousel-wrapper .slick-prev:hover,
.btpf-filters-carousel-wrapper .slick-next:hover {
    background: #094840;
}

.btpf-filters-carousel-wrapper .slick-dots {
    display: none !important;
}

/* ====================================================================
   PRODUCTS CONTAINER
   ==================================================================== */

.btpf-products-container {
    width: 100%;
    max-width: 1400px; 
    margin-left: auto;
    margin-right: auto;
    padding: 0; 
    position: relative;
    margin-top: 50px;
    min-height: 300px;
}

.btpf-products-wrapper {
    display: block;
}

/* Loading State */
.btpf-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.btpf-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0B5B50;
    border-radius: 50%;
    animation: btpf-spin 1s linear infinite;
    margin-right: 12px;
    vertical-align: middle;
}

@keyframes btpf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ====================================================================
   PRODUCTS CAROUSEL - HYBRID FLEX + SLICK APPROACH
   ==================================================================== */

.btpf-products-carousel {
    margin: 0;
    width: 100%;
}

/* Flex Layout for Products - Let Slick handle widths */
.btpf-products-carousel .slick-track {
    display: flex !important;
    align-items: stretch;
    gap: 15px;
}

.btpf-products-carousel .slick-list {
    overflow: hidden;
    margin: 0 -10px; /* Negative margin for gaps */
    padding: 0;
    width: 100%;
}

.btpf-products-carousel .slick-slide {
    outline: none;
    box-sizing: border-box;
    height: auto;
    display: flex !important;
    padding: 10px; /* 20px total gap */
}

.btpf-product-card.slick-slide.slick-active {
  min-height: 400px;
  height: 400px;
}
.btpf-product-card.slick-slide {
  min-height: 400px;
  height: 400px;
}

/* ====================================================================
   PRODUCT CAROUSEL ARROWS
   ==================================================================== */

.btpf-products-carousel .slick-arrow,
.btpf-products-carousel .slick-prev,
.btpf-products-carousel .slick-next {
    width: auto;
    height: auto;
    z-index: 10;
    background: #0B5B50;
    border: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 20px;
}

.btpf-products-carousel > .slick-prev {
  left: -15px;
}

.btpf-products-carousel > .slick-next {
  right: -10px;
}

.btpf-products-carousel .slick-arrow:before,
.btpf-products-carousel .slick-prev:before,
.btpf-products-carousel .slick-next:before {
    font-size: 0;
    opacity: 0;
}

/* Chevron Icons */
.btpf-products-carousel .slick-prev:after,
.btpf-products-carousel .slick-next:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 16px;
    height: 16px;
    border-style: solid;
    border-color: white;
}

.btpf-products-carousel .slick-prev:after {
    border-width: 0 0 4px 4px;
    margin-left: 2px;
}

.btpf-products-carousel .slick-next:after {
    border-width: 4px 4px 0 0;
    margin-left: -2px;
}

.btpf-products-carousel .slick-arrow:hover,
.btpf-products-carousel .slick-prev:hover,
.btpf-products-carousel .slick-next:hover {
    background: #0B5B50;
}


.btpf-products-carousel .slick-dots {
    display: none !important;
}

/* ====================================================================
   PRODUCT CARD - EQUAL HEIGHT
   ==================================================================== */

.btpf-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 500px;
}

/* Product Image */
.btpf-product-image {
    position: relative;
    overflow: hidden;
    background: #f9f9f9;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
}

.btpf-product-image a {
    display: block;
    text-decoration: none;
    width: 100%;
    height: 100%;
}

.btpf-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.btpf-product-card:hover .btpf-product-image img {
    transform: scale(1.1);
}

.btpf-product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff5252;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

/* Product Info */
.btpf-product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 15px;
}

/* Top Section (Structural class from new design) */
.btpf-product-top-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

/* Bottom Section (Structural class from new design) */
.btpf-product-bottom-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    margin-top: auto;
}

/* Benefit Tags */
.btpf-benefit-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
}

.btpf-benefit-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Mulish', 'Crimson Pro', sans-serif;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #000;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Benefit Tag Colors */
.btpf-benefit-tag[data-benefit="calm-spirit"],
.btpf-benefit-tag[data-benefit="Calm Spirit"] {
    background-color: #67DFD0;
}

.btpf-benefit-tag[data-benefit="discomfort-relief"],
.btpf-benefit-tag[data-benefit="Discomfort Relief"] {
    background-color: #54D5C6;
}

.btpf-benefit-tag[data-benefit="energy-boost"],
.btpf-benefit-tag[data-benefit="Energy Boost"] {
    background-color: #F58F29;
}

.btpf-benefit-tag[data-benefit="focus-productivity"],
.btpf-benefit-tag[data-benefit="Focus & Productivity"],
.btpf-benefit-tag[data-benefit="focus-&-productivity"] {
    background-color: #A0CF29;
}

.btpf-benefit-tag[data-benefit="relaxed-body"],
.btpf-benefit-tag[data-benefit="Relaxed Body"] {
    background-color: #3EAEDB;
}

.btpf-benefit-tag:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

/* Product Title */
.btpf-product-title {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    font-family: 'Mulish', sans-serif;
    line-height: 1.4;
    text-align: center;
    width: 100%;
}

.btpf-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.btpf-product-title a:hover {
    color: #0B5B50;
}

/* Product Price */
.btpf-product-price {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Mulish', sans-serif;
    color: black;
    text-align: center;
    width: 100%;
}

.btpf-product-price del {
    color: #999;
    font-weight: 400;
    font-size: 16px;
    margin-right: 8px;
    text-decoration: line-through;
}

.btpf-product-price ins {
    text-decoration: none;
}

.btpf-product-price .amount {
    font-weight: inherit;
}

/* Product Actions */
.btpf-product-actions {
    width: 100%;
}

.btpf-product-actions a.added_to_cart,
.btpf-product-actions a.add_to_cart_button,
.btpf-product-actions .button {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 10px 10px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-family: 'Mulish', sans-serif !important;
    transition: all 0.3s ease !important;
    background-color: #FFDE21 !important;
    color: black !important;
    border: none !important;
    text-decoration: none !important;
    font-size: 16px !important;
    cursor: pointer !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.btpf-product-actions a.added_to_cart:hover,
.btpf-product-actions a.add_to_cart_button:hover,
.btpf-product-actions .button:hover {
   scale: 1.02;
}

.btpf-product-actions a.added_to_cart:before,
.btpf-product-actions a.add_to_cart_button:before,
.btpf-product-actions .button:before,
.btpf-product-actions a.added_to_cart:after,
.btpf-product-actions a.add_to_cart_button:after,
.btpf-product-actions .button:after {
    display: none !important;
    content: none !important;
}

.btpf-product-actions .button.loading {
    opacity: 0.7 !important;
    pointer-events: none !important;
}

/* No Products */
.btpf-no-products {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.btpf-no-products p {
    font-size: 18px;
    margin: 0;
}

/* Error Message */
.btpf-error-message {
    text-align: center;
    padding: 60px 20px;
    color: #f44336;
}

.btpf-error-message p {
    font-size: 18px;
    margin: 0;
}

/* ====================================================================
   RESPONSIVE DESIGN
   ==================================================================== */

/* Tablet - 1024px */
@media (max-width: 1024px) {
    .btpf-section-title {
        font-size: 30px;
    }
    
    .btpf-filters-carousel-wrapper,
    .btpf-products-container {
        max-width: 1200px;
        padding: 0 50px;
    }
}

/* Mobile - 768px */
@media (max-width: 768px) {
    .btpf-filter-section {
        margin: 40px 0;
        padding: 0;
    }
    
    .btpf-section-header {
        margin-bottom: 30px;
    }
    
    .btpf-section-title {
        font-size: 24px;
    }
    
    /* Smaller gaps on mobile */
    .btpf-filter-slide {
        padding: 0 5px; /* 10px total gap */
    }
    
    
    .btpf-filters-carousel .slick-list {
        margin: 0 -5px;
    }
    
    .btpf-products-carousel .slick-list {
        margin: 0 -7.5px;
    }
    
    .btpf-filters-carousel-wrapper {
        margin-bottom: 60px;
        padding: 0;
    }
    
    .btpf-products-container {
        padding: 0;
    }
    
    /* Show dots on mobile for filters */
    .btpf-filters-carousel-wrapper .slick-dots {
        display: block !important;
        bottom: -40px;
    }
    
    .btpf-filters-carousel-wrapper .slick-dots li button:before {
        font-size: 12px;
        color: #0B5B50;
        opacity: 0.3;
    }
    
    .btpf-filters-carousel-wrapper .slick-dots li.slick-active button:before {
        opacity: 1;
    }
    
    /* Hide filter arrows on mobile */
    .btpf-filters-carousel-wrapper .slick-arrow {
        display: none !important;
    }
    
    /* Smaller product arrows on mobile */
    .btpf-products-carousel .slick-arrow {
        width: 35px;
        height: 35px;
    }

    .btpf-products-carousel > .slick-prev {
  left: -5px;
}

.btpf-products-carousel > .slick-next {
  right: -5px;
}
    
    .btpf-filter-item {
        padding: 15px;
        min-height: 150px;
    }
    
    .btpf-filter-item:hover,
    .btpf-filter-item.active {
        padding: 12px;
    }
    
    .btpf-filter-image img {
        max-height: 80px;
    }
    
    .btpf-filter-name {
        font-size: 13px;
    }
    
    .btpf-products-container {
        margin-top: 40px;
    }
    
    .btpf-product-card {
        min-height: 450px;
    }
    
    .btpf-product-info {
        padding: 0;
    }
    
    .btpf-product-title {
        font-size: 14px;
    }
    
    .btpf-product-price {
        font-size: 18px;
    }
    /* Flex Layout for Products - Let Slick handle widths */
.btpf-products-carousel .slick-track {
    display: flex !important;
    align-items: stretch;
    gap: 10px;
}
}

/* Small Mobile - 480px */
@media (max-width: 480px) {
    .btpf-section-title {
        font-size: 20px;
    }
    
    .btpf-filter-item {
        padding: 12px;
        min-height: 130px;
    }
    
    .btpf-filter-item:hover,
    .btpf-filter-item.active {
        padding: 9px;
    }
    
    .btpf-filter-slide {
        padding: 0 4px; /* Smaller gap */
    }
    
    
    .btpf-filters-carousel .slick-list {
        margin: 0 -4px;
    }
    
    .btpf-products-carousel .slick-list {
        margin: 0 -6px;
    }
    
    
    
    .btpf-product-card {
        min-height: 400px;
    }
    
    .btpf-product-actions a.added_to_cart,
    .btpf-product-actions a.add_to_cart_button,
    .btpf-product-actions .button {
        padding: 10px 16px !important;
        font-size: 13px !important;
    }
}

/*

## Usage Examples
```
<!-- Show brands for "shoes" category -->
[brand_filter category="shoes" title="Shop by Shoe Brands"]

<!-- Show brands for "clothing" category -->
[brand_filter category="clothing" title="Shop by Clothing Brands"]

<!-- Show custom taxonomy terms -->
[taxonomy_filter taxonomy="benefit_effect" title="Shop by Benefit"]

<!-- Show another custom taxonomy -->
[taxonomy_filter taxonomy="genre" title="Shop by Genre"]

/*