/**
 * CUSTOM PRODUCT TABS CSS - OD ZERA
 * Plik: assets/css/custom-tabs.css
 * 
 * Własne zakładki - bez WooCommerce conflicts
 */

/* ============================================
   1. WRAPPER - Chmurkowy pastelowy background
   ============================================ */
.custom-product-tabs-wrapper {
    /* Chmurkowy gradient */
    background: 
        radial-gradient(ellipse 800px 600px at 20% 30%, rgba(255, 182, 193, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse 900px 700px at 80% 70%, rgba(255, 218, 185, 0.35) 0%, transparent 50%),
        radial-gradient(ellipse 600px 500px at 50% 80%, rgba(255, 192, 203, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse 700px 600px at 90% 20%, rgba(255, 222, 173, 0.25) 0%, transparent 50%),
        linear-gradient(135deg, #FFE5E5 0%, #FFF5E1 50%, #FFE5E5 100%);
    
    padding: 60px 20px;
    margin: 60px 0 0 0;
    position: relative;
    overflow: hidden;
}

/* Dodatkowa tekstura "brush strokes" */
.custom-product-tabs-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 20px,
            rgba(255, 255, 255, 0.03) 20px,
            rgba(255, 255, 255, 0.03) 40px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 20px,
            rgba(255, 192, 203, 0.02) 20px,
            rgba(255, 192, 203, 0.02) 40px
        );
    z-index: 0;
    opacity: 0.6;
}

.custom-product-tabs-wrapper > * {
    position: relative;
    z-index: 1;
}

/* ============================================
   2. NAWIGACJA ZAKŁADEK - DOKŁADNIE Z FIGMA
   ============================================ */

.custom-tabs-navigation {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
}

/* BUTTON - Nieaktywna zakładka */
.custom-tab-button {
    background: #FFFFFF;
    border: 2px solid #E0E0E0;
    color: #555555;
    font-size: 24px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    padding: 0 35px; /* ZMIENIONE - usunięty vertical padding */
    height: 55px; /* ZWIĘKSZONE */
    line-height: 55px; /* DODANE - wyśrodkowanie */
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    outline: none;
    display: inline-block; /* DODANE */
    text-align: center; /* DODANE */
}

/* Hover na nieaktywnej */
.custom-tab-button:hover {
    background: #F8F8F8;
    border-color: #FDA635;
    color: #333333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* AKTYWNA ZAKŁADKA - Z FIGMA */
.custom-tab-button.active {
    background: #FDA635 !important; /* Pomarańczowy */
    border: 2px solid #FDA635;
    color: #FFFFFF !important; /* Biały tekst */
     line-height: 51px;
    min-width: 177px;
}

.custom-tab-button.active:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

/* ============================================
   3. BIAŁY BOX Z TREŚCIĄ
   ============================================ */

.custom-tabs-content-wrapper {
    background: #FFFFFF;
    border-radius: 10px;
    padding: 50px 60px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 0 auto;
    max-width: 1213px;
    min-height: 400px;
}

/* Ukryj wszystkie contenty */
.custom-tab-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

/* Pokaż aktywny */
.custom-tab-content.active {
    display: block;
}

/* Animacja fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   4. TREŚĆ - ZAKŁADKA OPIS
   ============================================ */

.tab-description-content {
    max-width: 1100px;
}

/* Tytuł */
.tab-description-content h1,
.tab-description-content h2 {
    font-size: 32px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #333333;
    margin: 0 0 30px 0;
    line-height: 1.3;
}

.tab-description-content h3,
.tab-description-content h4 {
    font-size: 17px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #333333;
    margin: 30px 0 20px 0;
}

/* Pierwszy paragraph - intro (bold) */
.tab-description-content > p:first-of-type {
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #333333;
    margin: 0 0 25px 0;
    line-height: 1.6;
}

/* Normalne paragrafy */
.tab-description-content p {
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    color: #333333;
    margin-bottom: 20px;
}

/* Strong/Bold */
.tab-description-content strong,
.tab-description-content b {
    font-weight: 600;
}

/* Numbered lists */
.tab-description-content ol {
    margin: 25px 0;
    padding: 0;
    list-style: none;
    counter-reset: item;
}

.tab-description-content ol li {
    margin-bottom: 20px;
    padding-left: 0;
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    color: #333333;
    counter-increment: item;
    display: flex;
    gap: 12px;
}

.tab-description-content ol li::before {
    content: counter(item) ".";
    font-weight: 700;
    color: #333333;
    flex-shrink: 0;
    min-width: 25px;
}

/* Bullet points */
.tab-description-content ul {
    margin: 20px 0;
    padding-left: 30px;
}

.tab-description-content ul li {
    margin-bottom: 12px;
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    color: #333333;
    list-style-type: disc;
}

.tab-description-content ul li::marker {
    color: #FDA635;
}

/* ============================================
   5. TREŚĆ - ZAKŁADKA PARAMETRY - PIĘKNA WERSJA
   ============================================ */

.tab-attributes-content {
    max-width: 1100px;
}

/* Wrapper tabeli z rounded corners */
.custom-attributes-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Rzędy */
.custom-attributes-table tr {
    transition: all 0.2s ease;
}

.custom-attributes-table tr:hover {
    background: #FFF5E8 !important; /* Jasny pomarańczowy hover */
    transform: scale(1.005);
}

/* Header kolumny (TH) - pomarańczowy akcent */
.custom-attributes-table th {
    text-align: left;
    padding: 20px 25px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: #333333;
    width: 35%;
    background: linear-gradient(90deg, #FFE8D1 0%, #FFF5E8 100%); /* Pomarańczowy gradient */
    border-right: 3px solid #FDA635; /* Pomarańczowa linia oddzielająca */
    position: relative;
}

/* Bullet point przed nazwą parametru */
.custom-attributes-table th::before {
    content: '▸';
    color: #FDA635;
    font-size: 20px;
    margin-right: 10px;
    font-weight: 700;
}

/* Wartość (TD) */
.custom-attributes-table td {
    padding: 20px 25px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 17px;
    color: #555;
    background: #FFFFFF;
}

/* Zebra striping - co drugi rząd */
.custom-attributes-table tr:nth-child(even) th {
    background: linear-gradient(90deg, #FFEEDD 0%, #FFFAF3 100%);
}

.custom-attributes-table tr:nth-child(even) td {
    background: #FAFAFA;
}

/* Pierwszy rząd - zaokrąglone górne rogi */
.custom-attributes-table tr:first-child th {
    border-top-left-radius: 12px;
}

.custom-attributes-table tr:first-child td {
    border-top-right-radius: 12px;
}

/* Ostatni rząd - zaokrąglone dolne rogi */
.custom-attributes-table tr:last-child th {
    border-bottom-left-radius: 12px;
}

.custom-attributes-table tr:last-child td {
    border-bottom-right-radius: 12px;
}

/* Dodatkowy styl - jeśli wartość jest liczbą */
.custom-attributes-table td:has(+ td:empty),
.custom-attributes-table td[data-numeric="true"] {
    font-weight: 600;
    color: #FDA635;
}

/* Pusta tabela fallback */
.tab-attributes-content p {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
}
/* ============================================
   6. TREŚĆ - ZAKŁADKA OPINIE
   ============================================ */

.tab-reviews-content {
    max-width: 1100px;
}

.reviews-title {
    font-size: 28px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #333333;
    margin-bottom: 30px;
}

.custom-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Pojedyncza opinia */
.custom-review-item {
    border-bottom: 1px solid #F0F0F0;
    padding-bottom: 25px;
}

.custom-review-item:last-child {
    border-bottom: none;
}

/* Header opinii */
.review-header {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.review-avatar {
    flex-shrink: 0;
}

.review-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.review-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.review-author {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: #333333;
}

.review-date {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #999;
}

.review-rating {
    margin-top: 5px;
}

.review-rating .star-rating {
    color: #FFD700;
    font-size: 14px;
}

/* Treść opinii */
.review-content {
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #555;
}

.review-content p {
    margin: 0 0 10px 0;
}

/* Brak opinii */
.no-reviews {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
}

/* ============================================
   7. RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .custom-product-tabs-wrapper {
        padding: 40px 15px;
    }
    
    .custom-tabs-content-wrapper {
        padding: 40px 35px;
    }
    
    .custom-tab-button {
        font-size: 20px;
        padding: 10px 30px;
    }
    
    .tab-description-content p,
    .tab-description-content li {
        font-size: 16px;
    }
}

/* Mobile */
/* Mobile */
@media (max-width: 767px) {
    .custom-product-tabs-wrapper {
        padding: 30px 10px;
        margin-top: 30px;
    }
    
    /* ============================================
       BUTTONY - Rozciągnięte w poziomie, bez gap
       ============================================ */
    .custom-tabs-navigation {
        gap: 0;
        margin-bottom: 25px;
        width: 100%;
        display: flex;
    }
    
   .custom-tab-button {
    flex: 1;
    font-size: 14px;
    padding: 0 10px;
    height: 45px;
    min-width: auto;
    border-radius: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    
    /* Wyśrodkowanie flexem - ZAWSZE DZIAŁA */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2; /* Reset line-height */
}
    
    /* Pierwszy button - lewy zaokrąglony */
    .custom-tab-button:first-child {
        border-radius: 50px 0 0 50px;
    }
    
    /* Ostatni button - prawy zaokrąglony */
    .custom-tab-button:last-child {
        border-radius: 0 50px 50px 0;
    }
    
    .custom-tab-button.active {
        min-width: auto;
       
    }
    
    /* ============================================
       TABELA PARAMETRÓW - [parametr]: [wartość]
       ============================================ */
    
    /* Biały box */
    .custom-tabs-content-wrapper {
        padding: 25px 15px;
    }
    
    /* Tabela - card layout */
    .custom-attributes-table {
        display: block;
        border-radius: 0;
        box-shadow: none;
    }
    
    .custom-attributes-table tbody {
        display: block;
    }
    
    .custom-attributes-table tr {
        display: block;
        padding: 15px 0;
        border-bottom: 1px solid #F0F0F0;
    }
    
    .custom-attributes-table tr:hover {
        background: transparent !important;
        transform: none;
    }
    
    /* TH i TD w jednej linii */
    .custom-attributes-table th,
    .custom-attributes-table td {
        display: inline;
        width: auto;
        padding: 0;
        background: transparent !important;
        border: none;
        font-size: 14px;
        line-height: 1.6;
    }
    
    /* [Parametr]: */
    .custom-attributes-table th {
        font-weight: 600;
        color: #333;
        background: transparent !important;
        border-right: none;
    }
    
    .custom-attributes-table th::before {
        display: none; /* Usuń bullet */
    }
    
    .custom-attributes-table th::after {
        content: ': '; /* Dwukropek po nazwie */
        margin-right: 5px;
    }
    
    /* [Wartość] - scroll jeśli długa */
    .custom-attributes-table td {
        color: #555;
        font-weight: 400;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        max-width: calc(100vw - 100px);
        display: inline-block;
        vertical-align: top;
        -webkit-overflow-scrolling: touch; /* Smooth scroll iOS */
    }
    
    /* Ukryj scrollbar ale pozostaw funkcjonalność */
    .custom-attributes-table td::-webkit-scrollbar {
        height: 3px;
    }
    
    .custom-attributes-table td::-webkit-scrollbar-thumb {
        background: #FDA635;
        border-radius: 10px;
    }
    
    /* ============================================
       RESZTA - OPISY, TYTUŁY
       ============================================ */
    
    /* Tytuły */
    .tab-description-content h1,
    .tab-description-content h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .tab-description-content h3,
    .tab-description-content h4 {
        font-size: 16px;
        margin: 20px 0 15px 0;
    }
    
    /* Tekst */
    .tab-description-content p,
    .tab-description-content li {
        font-size: 14px;
    }
    
    .tab-description-content > p:first-of-type {
        font-size: 16px;
    }
    
    /* Opinie */
    .reviews-summary {
        flex-direction: column;
        gap: 25px;
        padding: 20px 15px;
    }
    
    .reviews-summary-left {
        flex: none;
    }
    
    .average-rating-big {
        font-size: 42px;
    }
    
    .stars-big .star-big {
        font-size: 20px;
    }
    
    .review-avatar img {
        width: 40px;
        height: 40px;
    }
    
    .review-content {
        font-size: 14px;
    }
    
    .reviews-list-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .custom-product-tabs-wrapper {
        padding: 20px 8px;
    }
    
    .custom-tabs-content-wrapper {
        padding: 20px 12px;
    }
    
    .custom-tab-button {
        font-size: 12px;
        padding: 0 5px;
        height: 40px;
        
    }
    
    .custom-tab-button.active {
        
    }
}

@media (max-width: 480px) {
    .custom-product-tabs-wrapper {
        padding: 20px 8px;
    }
    
    .custom-tabs-content-wrapper {
        padding: 25px 20px;
    }
    
    .custom-tab-button {
        font-size: 14px;
        padding: 8px 20px;
    }
}

/* ============================================
   8. UKRYJ DOMYŚLNE WOOCOMMERCE TABS
   ============================================ */

/* Upewnij się że domyślne są ukryte */
.woocommerce-tabs.wc-tabs-wrapper,
.woocommerce-tabs {
    display: none !important;
}

/* ============================================
   OPINIE - ROZSZERZONE STYLE
   ============================================ */

/* Summary header */
.reviews-summary {
    display: flex;
    gap: 60px;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #FFF5E8 0%, #FFFFFF 100%);
    border-radius: 12px;
    border: 2px solid #FFE8D1;
}

.reviews-summary-left {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.average-rating-big {
    font-size: 64px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #FDA635;
    line-height: 1;
}

.stars-big {
    display: flex;
    gap: 4px;
}

.star-big {
    font-size: 28px;
    color: #FFD700;
}

.star-big.empty {
    color: #E5E5E5;
}

.star-big.half {
    background: linear-gradient(90deg, #FFD700 50%, #E5E5E5 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.reviews-count-text {
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    color: #666;
    text-align: center;
}

/* Histogram */
.reviews-summary-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rating-label {
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #333;
    min-width: 35px;
}

.rating-bar {
    flex: 1;
    height: 8px;
    background: #F0F0F0;
    border-radius: 10px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #FDA635 0%, #FFBE7A 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.rating-count {
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    color: #666;
    min-width: 30px;
    text-align: right;
}

/* Divider */
.reviews-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #FDA635 50%, transparent 100%);
    margin: 40px 0;
}

.reviews-list-title {
    font-size: 24px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
}

/* Verified badge */
.verified-badge {
    display: inline-block;
    background: #4CAF50;
    color: #FFFFFF;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
    margin-left: 8px;
    font-weight: 700;
}

/* Star ratings in reviews */
.star-small {
    font-size: 16px;
    color: #FFD700;
}

.star-small.empty {
    color: #E5E5E5;
}

/* No reviews box */
.no-reviews-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.no-reviews-box svg {
    margin-bottom: 25px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.no-reviews-title {
    font-size: 24px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.no-reviews-text {
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    color: #999;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .reviews-summary {
        flex-direction: column;
        gap: 30px;
        padding: 25px 20px;
    }
    
    .reviews-summary-left {
        flex: none;
    }
    
    .average-rating-big {
        font-size: 48px;
    }
    
    .stars-big .star-big {
        font-size: 24px;
    }
}
