/**
 * Category Tabs Products - Main Styles
 * 
 * @package Category_Tabs_Products
 * @author UDX
 * @link https://udx.pl
 * @since 1.0.0
 */

.category-tabs-products-widget {
    width: 100%;
    margin-bottom: 50px;
}

/* Header - All in one line with flex */
.ctp-header {
    margin-bottom: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 30px !important;
    flex-wrap: wrap !important;
}

/* Section Title */
.ctp-section-title {
    font-size: 32px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #000 !important;
    flex-shrink: 0 !important;
}

/* Tabs Container */
.ctp-tabs {
    display: flex !important;
    gap: 20px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    flex: 1 !important;
}

/* Individual Tab - Simple Link Style */
.ctp-tab {
    padding: 0 !important;
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #666 !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: color 0.3s ease !important;
    text-decoration: none !important;
    position: relative !important;
    white-space: nowrap !important;
    display: inline-block !important;
}

.ctp-tab:hover {
    color: #000 !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.ctp-tab.active {
    color: #000 !important;
    font-weight: 500 !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.ctp-tab.active::after {
    content: '' !important;
    position: absolute !important;
    bottom: -2px !important;
    left: 0 !important;
    right: 0 !important;
    height: 2px !important;
    background-color: #000 !important;
}

/* All Button - Right side */
.ctp-all-button {
    display: inline-flex !important;
    align-items: center !important;
    padding: 10px 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #fff !important;
    background-color: #000 !important;
    border: none !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    transition: background-color 0.3s ease !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
}

.ctp-all-button:hover {
    background-color: #333 !important;
    color: #fff !important;
}

/* Desktop button - visible on desktop */
.ctp-all-button-desktop {
    display: inline-flex !important;
}

/* Mobile button - hidden on desktop */
.ctp-all-button-mobile {
    display: none !important;
}

/* Products Container */
.ctp-products-container {
    position: relative;
    min-height: 200px;
}

/* Loading State - Hide overlay */
.ctp-loading {
    display: none !important;
}

/* Products Grid - Don't override Bootstrap grid */
.ctp-products-grid {
    /* Remove CSS Grid - let Bootstrap handle it */
    display: block !important;
    transition: opacity 0.3s ease;
}

.ctp-products-grid ul.products {
    /* Ensure Bootstrap grid works properly */
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 0 -15px !important;
}

/* Product Item */
.ctp-products-grid .product {
    position: relative;
    transition: opacity 0.2s ease;
}

/* Loading state - fade existing products */
.ctp-products-grid.ctp-loading-state {
    opacity: 0.4;
    pointer-events: none;
}

.ctp-products-grid.ctp-loading-state .product {
    opacity: 0.5;
}

/* Responsive adjustments */
@media (max-width: 1199px) {
    .ctp-section-title {
        font-size: 28px !important;
    }
}

@media (max-width: 768px) {
    .ctp-header {
        gap: 15px;
    }
    
    .ctp-section-title {
        font-size: 24px !important;
        width: 100%;
    }
    
    .ctp-tabs {
        gap: 15px;
        width: 100%;
    }
    
    .ctp-tab {
        font-size: 14px !important;
    }
    
    /* Hide desktop button on mobile */
    .ctp-all-button-desktop {
        display: none !important;
    }
    
    /* Show mobile button on mobile */
    .ctp-all-button-mobile {
        display: inline-flex !important;
        width: 100%;
        justify-content: center;
        margin-left: 0 !important;
        margin-top: 20px !important;
        font-size: 13px !important;
        padding: 8px 20px !important;
    }
}

@media (max-width: 480px) {
    .ctp-tabs {
        gap: 12px;
    }
}

/* Remove old loading fade animation */
