/**
 * YSF Product Sets Styles
 */

/* Grid Layout */
.ysf-product-sets {
    margin: 0 auto 40px auto ;
    max-width: 1200px;

}

/* Product Filters */
.ysf-filter-label {
    font-weight: 500;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1rem;
    display: block;
    color: #000;
}

@media only screen and (max-width: 767px) {.ysf-filter-label {

        font-size: 0.875rem;
 
    }}

.ysf-product-filters {
    margin-bottom: 1rem;
    position: relative;
}

.ysf-product-filters ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
    align-items: center;
}

.ysf-product-filters li {
    margin: 0;
}

.ysf-product-filters .ysf-filter-item {
    display: inline-block;
    padding: 8px 16px;
    background-color: #ffe3d0;
    border-radius: 0.5rem;
    color: #000;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap; /* Prevent text wrapping */
}

.ysf-product-filters .ysf-filter-item:hover,
.ysf-product-filters .ysf-filter-item:focus {
    background-color: #ffe3d0;
}

.ysf-product-filters .ysf-filter-item.active {
    background-color: #000;
    color: #fff;
}

/* Mobile filters with horizontal scrolling */
@media only screen and (max-width: 767px) {
    .ysf-product-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        scrollbar-width: none; /* Hide scrollbar on Firefox */
        -ms-overflow-style: none; /* Hide scrollbar on IE/Edge */
        margin: 0;
        padding-bottom: 5px; /* Space for overflow shadow */
    }
    
    /* Hide scrollbar on Chrome/Safari */
    .ysf-product-filters::-webkit-scrollbar {
        display: none;
    }
    
    .ysf-product-filters ul {
        display: flex;
        flex-wrap: nowrap; /* No wrapping on mobile */
        gap: 8px;
        padding-left: 5px;
        padding-right: 5px;
        width: max-content; /* Allow content to exceed container width */
    }
    
    .ysf-product-filters .ysf-filter-item {
        padding: 6px 14px;
        font-size: 0.875rem;
    }
}

/* Product Grid */
.ysf-product-grid {
    display: grid;
    gap: 0.25rem;
        grid-template-columns: repeat(auto-fit, minmax(150px, 250px));
    margin: 0.25rem auto;
    justify-content: center;
    max-width: 100%;
}





@media screen and (min-width: 992px) {
    .ysf-product-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 250px));
        justify-content: center;
    }
}


/* Wrapper generell zentrierend lassen (hast du eh schon ungefähr so) */
.ysf-product-slider .swiper-wrapper {
    display: flex;
    align-items: stretch;
    height: auto;
    justify-content: center;
}

/* Wenn zu wenige Slides: transform ignorieren + Pfeile verstecken */
.ysf-product-slider.swiper-few-slides .swiper-wrapper {
    transform: none !important;
    justify-content: center;
}

.ysf-product-slider.swiper-few-slides .swiper-button-next,
.ysf-product-slider.swiper-few-slides .swiper-button-prev {
    display: none !important;
}

/* Product Item Styles */
.ysf-product-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 0 !important;
    position: relative;
}

.ysf-product-item h3  {
padding: 0 !important;
    width: 100%;
}


.ysf-product-item button {
    margin-left: 0; 
    margin-right: 0;  }

.ysf-product-item:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 0.25rem 2rem rgba(0, 0, 0, 0.05);
}

.ysf-product-link {
    display: block;
    text-decoration: none;
    height: 100%;
    width: 100%;
    position: relative;
}

.ysf-product-image {
    position: relative;
    overflow: hidden;
    padding-top: 0; /* Remove padding-top */
    height: 500px; /* Fixed height instead of padding-top */
    min-height: 500px; /* Minimum height for product items */
}

@media only screen and (max-width: 767px) {
    .ysf-product-image {
        height: 40vh !important; /* 40% of viewport height on mobile */
        min-height: 100% !important; /* Use 100% instead of fixed px value */
    }
    
    .ysf-product-title {
        font-size: 0.9rem !important; /* Smaller font size on mobile */
    }
    
    .ysf-product-price {
        font-size: 1rem !important;
    }
}

.ysf-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-radius: 1rem;
    z-index: 1;
    object-position: center; /* Center the image */
}

.ysf-product-item:hover .ysf-product-image img {
    transform: scale(1.05);
}

/* Overlay with gradient */
.ysf-product-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.4) 30%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.2) 70%, rgba(0, 0, 0, 0) 100%);
    border-radius: 1rem;
    color: white;
    height: 100%; /* Cover the entire image */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 2; /* Higher than the image */
    pointer-events: none; /* Allow clicks to pass through to links */
}

@media only screen and (max-width: 767px) {
    .ysf-product-overlay {
        padding: 0.5rem;
    }
}



.ysf-product-details {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
    justify-content: flex-end;
    z-index: 3; /* Higher than overlay */
    gap: 0;
    position: relative; /* Create a new stacking context */
    pointer-events: auto; /* Ensure content remains clickable */
}

.ysf-product-title {
    font-size: 18px;
    margin: 0 0 5px;
    line-height: 1.3;
    font-weight: 400;
    color: white !important;
}

.ysf-product-title a {
    color: white !important;
    text-decoration: none;
    position: relative;
    z-index: 5;
}

.ysf-product-title a:hover {
    color: white !important;
    text-decoration: underline;
}

.ysf-product-price {
    font-weight: 700;
    margin-bottom: 10px;
    color: white !important;
    font-size: 1.25rem;
}

/* Product Ratings Styles */
.produkt-grid-ratings {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: white;
    position: relative;
    z-index: 5;
}

.produkt-grid-ratings a {
    color: white !important;
    text-decoration: none;
}

.produkt-grid-ratings .stars {
    display: flex;
    align-items: center;
}

/* Override the inline styles for star SVGs */
.produkt-grid-ratings .stars svg {
    width: 0.75rem !important;
    height: 0.75rem !important;
}

.produkt-grid-ratings .count-rating {
    margin-left: 5px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.ysf-add-to-cart {
    width: 100%;
    position: relative;
    z-index: 5;
    pointer-events: auto; /* Ensure button container is clickable */
 
}

.ysf-packages-button, .ysf-add-to-cart-button {
    display: inline-block;
    width: 100%;
    padding: 12px 15px;
    background-color: #23b772;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 5;
    pointer-events: auto; /* Ensure button is clickable */
}

@media only screen and (max-width: 767px) {.ysf-packages-button,
    .ysf-add-to-cart-button {font-size: 0.875rem}}

.ysf-packages-button,
.ysf-add-to-cart-button:hover {
    background-color: #1fa065;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}




/* Slider Layout */
.ysf-product-slider {
    position: relative;
    padding: 0 0 5px;
    overflow: hidden;
}

.ysf-product-slider.alignfull {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.ysf-product-slider .swiper-wrapper {
    display: flex;
    align-items: stretch;
    height: auto;
    justify-content: center;
}

/* Ensure same height for all product items in slider */
.ysf-product-slider .swiper-slide {
    height: auto;
}

.ysf-product-slider .ysf-product-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Consistent overlay in slider */
.ysf-product-slider .ysf-product-overlay {
    height: 100%;
}

.ysf-product-slider .ysf-product-details {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.ysf-product-slider .ysf-add-to-cart {
    width: 100%;
}

@media only screen and (max-width: 767px) {
    /* Slider specific styles */
    .ysf-product-slider .swiper-slide {
        width: 80vw;
        margin: 0 0 0 1rem;
        height: auto !important;
    }
    
    .ysf-product-slider .ysf-product-item {
        height: 100% !important;
    }
    
    /* Grid specific styles */
    .ysf-product-grid-item {
        min-height: 100%;
    }
}

/* Swiper Navigation Styles */
.swiper-button-next,
.swiper-button-prev {
    background: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    box-shadow: 0px 4px 1rem rgb(0 0 0 / 10%);
}

@media only screen and (max-width: 600px) {
    .swiper-button-next,
    .swiper-button-prev {
        width: 44px;
        height: 44px;
    }
}

.swiper-button-next:after,
.swiper-button-prev:after {
    color: black;
    font-size: 1rem;
}

.swiper-button-disabled {
    display: none;
}

/* Filter count styling */
.ysf-filter-count {
    opacity: 0.7;
    font-size: 0.9em;
    margin-left: 4px;
}

/* No Products Message */
.ysf-no-products {
    text-align: center;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 5px;
    grid-column: 1 / -1;
}

.ysf-product-grid-item {
    width: 100%;
    max-width: 600px;
}

.ysf-product-grid-item.hidden{
    display: none;
}

.load-more-wrapper {
    width: 100%;
        text-align: center;
        padding: 2.5rem 0;
}

.load-more-wrapper button, .load-more-wrapper button:hover {
background: #000;
color: #fff;
font-weight: 600;
}