/* Modern Tabs for Product Page */

/* Container resets */
.tvproduct-description-tab {
    margin-top: 40px;
    margin-bottom: 40px;
}

/* Nav tabs header */
.tvproduct-description-tab .nav-tabs {
    border-bottom: 2px solid #e5e5e5;
    display: flex;
    justify-content: flex-start;
    gap: 30px;
    margin-bottom: 30px;
    padding: 0;
    background: transparent;
}

/* Tab Item */
.tvproduct-description-tab .nav-tabs .nav-item {
    margin: 0;
    padding: 0;
    float: none; /* Reset float if bootstrap 3/4 */
}

/* Nav Link (The Tab itself) */
.tvproduct-description-tab .nav-tabs .nav-item .nav-link {
    border: none !important;
    border-bottom: 2px solid transparent !important;
    background: transparent !important;
    color: #777 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    padding: 12px 0 !important;
    margin-bottom: -2px !important; /* Overlap the header border */
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    border-radius: 0 !important;
    letter-spacing: 0.5px !important;
}

/* Hover state */
.tvproduct-description-tab .nav-tabs .nav-item .nav-link:hover {
    color: #CF0000 !important;
}

/* Active state */
.tvproduct-description-tab .nav-tabs .nav-item .nav-link.active {
    color: #CF0000 !important;
    border-bottom: 2px solid #CF0000 !important;
    font-weight: 700 !important;
}

/* Tab Content area */
.tvproduct-description-tab #tab-content {
    background: #fff !important;
    padding: 20px 0 !important;
    border: none !important;
    border-radius: 0 !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Responsive adjustments — taby poziome na wszystkich rozdzielczościach */
@media (max-width: 767px) {
    .tvproduct-description-tab .nav-tabs {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        border-bottom: 2px solid #e5e5e5 !important;
        gap: 20px !important;
        padding-bottom: 0 !important;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    .tvproduct-description-tab .nav-tabs::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .tvproduct-description-tab .nav-tabs .nav-item {
        width: auto !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
        display: inline-block !important;
    }

    .tvproduct-description-tab .nav-tabs .nav-item .nav-link {
        border: none !important;
        border-bottom: 2px solid transparent !important;
        border-radius: 0 !important;
        padding: 10px 0 !important;
        margin-bottom: -2px !important;
        background: transparent !important;
        text-align: center;
        white-space: nowrap;
        font-size: 14px !important;
    }

    .tvproduct-description-tab .nav-tabs .nav-item .nav-link:hover {
        color: #CF0000 !important;
    }

    .tvproduct-description-tab .nav-tabs .nav-item .nav-link.active {
        background-color: transparent !important;
        color: #CF0000 !important;
        border-bottom: 2px solid #CF0000 !important;
        border-color: transparent !important;
        border-bottom-color: #CF0000 !important;
        font-weight: 700 !important;
    }
}

/* Override dla theme.css @media(max-width: 480px) */
@media (max-width: 480px) {
    .tvproduct-description-tab .nav-tabs li.nav-item {
        display: inline-block !important;
        width: auto !important;
    }
}

/* Product Specifications Table Styling */
#product .product-features > dl.data-sheet {
    display: grid;
    grid-template-columns: 35% 65%;
    width: 100% !important;
    max-width: 100% !important;
    margin: 20px auto !important;
    border: 1px solid #e5e5e5;
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
}

#product .product-features > dl.data-sheet dt.name,
#product .product-features > dl.data-sheet dd.value {
    padding: 15px 20px;
    margin: 0;
    border: none;
    display: flex;
    align-items: center;
    min-height: 50px;
    line-height: 1.4;
}

/* Zebra striping for rows (dt/dd pairs) */
/* Rows 2, 4, 6... (elements 3,4, 7,8...) */
#product .product-features > dl.data-sheet > :nth-child(4n+3),
#product .product-features > dl.data-sheet > :nth-child(4n+4) {
    background-color: #f9fbfd !important;
}

#product .product-features > dl.data-sheet dt.name {
    font-weight: 400 !important;
    color: #555 !important;
    border-right: 1px solid #f0f0f0;
}

#product .product-features > dl.data-sheet dd.value {
    font-weight: 700 !important;
    color: #222 !important;
}

@media (max-width: 767px) {
    #product .product-features > dl.data-sheet {
        grid-template-columns: 1fr; /* Stack on mobile if needed, or keep 2 cols */
    }
    
    /* Optional: keep 2 columns on mobile but adjust ratio if they are too narrow */
    #product .product-features > dl.data-sheet {
        grid-template-columns: 40% 60%;
    }
}
