/* Tabbed Products Carousel */
.tabbed-products-carousel {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

/* Top */
.tabbed-products-carousel .top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-grow: 1;
}
/* Header */
.tabbed-products-header {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-start;
    column-gap: 48px;
    row-gap: 12px;
    width: 100%;
    flex-wrap: wrap;
}

.tabbed-products-header h2 {
    /* Overline */
    color: var(--theme-color-text);
    font-family: var(--theme-font-family);
    font-size: var(--theme-font-size-overline);
    font-weight: var(--theme-font-weight-overline);
    line-height: var(--theme-line-height-overline);
    letter-spacing: var(--theme-letter-spacing-overline);
    text-transform: uppercase;
}
.tabbed-products-header h2 span {
    /* H1 */
    color: var(--theme-color-text);
    font-family: var(--theme-font-family);
    font-size: var(--theme-font-size-h1);
    font-weight: var(--theme-font-weight-h1);
    line-height: var(--theme-line-height-h1);
    letter-spacing: var(--theme-letter-spacing-h1);
}

.tabbed-products-header .view-all {
    color: var(--theme-color-text);
    font-family: var(--theme-font-family);
    font-size: var(--theme-font-size-action-sm);
    font-weight: var(--theme-font-weight-action-sm);
    line-height: var(--theme-line-height-action-sm);
}

.tabbed-products-header .view-all:hover {
    text-decoration: underline;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tab-button {
    padding: 8px 24px;
    border: 2px solid #F3F3F3;
    background: white;
    color: #666;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.6s ease;
    white-space: nowrap;
    color: #000;
    font-family: "Ebony";
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
}

.tab-button:hover {
    border-color: var(--e-global-color-primary);
    background: #FFF;
    color: var(--e-global-color-text);
}

.tab-button.active {
    background: var(--e-global-color-primary);
    border-color: var(--e-global-color-primary);
    color: #FFF;
}

/* Tab Content */
.tab-content-wrapper {
    position: relative;
    width: 100%;
}

.tab-content-wrapper .tab-content {
    display: none;
    width: 100%;
    padding: 0px;
    background-color: transparent !important;
}

.tab-content.active {
    display: block;
}

.products-container {
    width: 100%;
}

/* Swiper Container */
.tabbed-products-carousel .swiper-container {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.tabbed-products-carousel .swiper-slide {
    height: auto;
    width: 20%;
}

/* Navigation Buttons */
.tabbed-products-nav-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    column-gap: 12px;
    position: relative;
    min-width: 120px;
    min-height: 48px;
}

.tabbed-products-nav-buttons .swiper-button-next,
.tabbed-products-nav-buttons .swiper-button-prev {
    margin: 0 !important;
    position: relative !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background-color: #FFF !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
    border: 2px solid #DFDFDF !important;
    left: 0;
}

/* Disabled state - must come before hover */
.tabbed-products-nav-buttons .swiper-button-next.swiper-button-disabled,
.tabbed-products-nav-buttons .swiper-button-prev.swiper-button-disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background-color: #FFF !important;
}

.tabbed-products-nav-buttons .swiper-button-next.swiper-button-disabled:hover,
.tabbed-products-nav-buttons .swiper-button-prev.swiper-button-disabled:hover {
    background-color: #FFF !important;
}

.tabbed-products-nav-buttons .swiper-button-next:hover,
.tabbed-products-nav-buttons .swiper-button-prev:hover {
    background-color: var(--e-global-color-accent) !important;
}

.tabbed-products-nav-buttons .swiper-button-next.swiper-button-disabled:hover,
.tabbed-products-nav-buttons .swiper-button-prev.swiper-button-disabled:hover {
    background-color: #FFF !important;
}

.tabbed-products-nav-buttons .swiper-button-next:after,
.tabbed-products-nav-buttons .swiper-button-prev:after {
    content: "" !important;
    width: 20px !important;
    height: 20px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

.tabbed-products-nav-buttons .swiper-button-next:after {
    background-image: url("/wp-content/uploads/2025/09/arrow_next.svg") !important;
}

.tabbed-products-nav-buttons .swiper-button-prev:after {
    background-image: url("/wp-content/uploads/2025/09/arrow_prev.svg") !important;
}

/* Pagination styling */
.tabbed-products-carousel .swiper-pagination {
    display: none; /* Hidden by default on desktop */
    position: relative;
    bottom: 10px;
    left: 0;
    right: 0;
    top: 0;
    text-align: center;
    width: 100% !important;
}

/* Force the correct bullet size with high specificity and !important */
.tabbed-products-carousel .swiper-container .swiper-pagination-bullet,
.tabbed-products-carousel .swiper-pagination .swiper-pagination-bullet {
    width: 8px !important;
    height: 8px !important;
    display: inline-block !important;
    border-radius: 50% !important;
    background: #D9D9D9 !important;
    opacity: 0.5 !important;
    margin: 0 4px !important;
    transition: all 0.3s !important;
}

/* Active bullet styling with high specificity */
.tabbed-products-carousel .swiper-container .swiper-pagination-bullet-active,
.tabbed-products-carousel .swiper-pagination .swiper-pagination-bullet-active {
    opacity: 1 !important;
    width: 24px !important;
    height: 8px !important;
    border-radius: 4px !important;
    background: #e1052c !important;
}

/* Responsive Layout */
@media (max-width: 768px) {
    .tabbed-products-carousel .top {
        width: 100%;
    }
    .tabbed-products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .tab-navigation {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        -webkit-scroll-snap-type: mandatory;
        scroll-snap-type: mandatory;
        flex-wrap: nowrap;
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }
    
    .tab-button {
        flex-shrink: 0;
        padding: 10px 20px;
        font-size: 13px;
    }
    
    /* Show pagination on mobile */
    .tabbed-products-carousel .swiper-pagination {
        display: block;
    }

    .tabbed-products-nav-buttons {
        display: none !important;
    }
}
