/* ==========================================================================
   KONTENER GŁÓWNY I UKŁAD "MOBILE FIRST"
   ========================================================================== */
.page-content-wrapper .container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Domyślne style (Mobile) - POPRAWIONA KOLEJNOŚĆ --- */
.product-main-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
}
.product-description {
    order: 1; /* Kolejność: 1. Opis */
}
.product-image {
    max-width: 400px;
    margin: 0 auto;
    order: 2; /* Kolejność: 2. Obrazek */
}

/* NOWA REGUŁA - ZAPEWNIA POPRAWNY ROZMIAR OBRAZKA */
.product-image img {
    width: 100%;
    height: auto;
    display: block; /* Zapobiega powstawaniu dziwnych marginesów */
}

.purchase-sidebar {
    order: 3; /* Kolejność: 3. Panel zakupu */
}

/* ==========================================================================
   SEKCJE: NAWIGACJA OKRUSZKOWA I BANER
   ========================================================================== */
.breadcrumbs {
    background-color: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9rem;
}
.breadcrumbs .container { padding: 0 20px; }
.breadcrumbs ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.breadcrumbs a { text-decoration: none; color: var(--color-blue, #006094); font-weight: 500; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { color: #6c757d; }
.breadcrumbs .separator { margin: 0 8px; color: #ccc; }

.ebook-banner-container {
    max-width: 1440px; /* <-- POPRAWKA: Ustawia maksymalną szerokość */
    height: 194px;
    margin: 30px auto 0 auto; /* <-- POPRAWKA: Wyśrodkowuje baner na stronie */
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ebook-banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease-out;
    filter: brightness(0.9); /* Lekkie przyciemnienie obrazka dla czytelności tekstu */
}
.ebook-banner-container:hover .ebook-banner-image {
    /* Usunięto linię:  */
    transform: scale(1.01);
    filter: brightness(1);
}

.banner-text-overlay {
    position: absolute; /* Nakładka na obrazek */
    color: white;
    text-align: center;
    padding: 20px;
    z-index: 2;
}
.banner-text-overlay h1 {
    color: white;
    font-size: 2.2rem;
    margin: 0;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}
.banner-text-overlay p {
    font-size: 1.2rem;
    margin-top: 10px;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.7);
    opacity: 0.9;
}


/* ==========================================================================
   GŁÓWNY UKŁAD STRONY PRODUKTOWEJ
   ========================================================================== */
.ebook-header { text-align: center; padding: 40px 20px 20px 20px; }
.ebook-header h1 { font-size: 2.5rem; color: var(--color-blue, #006094); margin-bottom: 10px; }
.ebook-header h3 { font-size: 1.4rem; color: var(--color-dark, #333); font-weight: 400; }
.description-content { line-height: 1.7; }
.description-content h3 { margin-top: 20px; }

/* ==========================================================================
   PANEL ZAKUPU (SIDEBAR)
   ========================================================================== */
.purchase-sidebar {
    background-color: var(--color-white, #ffffff);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
}

.purchase-sidebar .price-section {
    text-align: center;
    margin-bottom: 25px;
}

.purchase-sidebar .price-label {
    display: block;
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.purchase-sidebar .current-price {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-pink, #d9006c);
    line-height: 1.1;
}

.buy-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background-image: linear-gradient(to right, #e00074, #d9006c);
    color: white;
    text-align: center;
    padding: 18px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(217, 0, 108, 0.3);
    box-sizing: border-box;
}

.buy-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(217, 0, 108, 0.4);
}

.buy-button .fa-lock {
    font-size: 1.1rem;
}

.purchase-guarantee {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #555;
    text-align: center;
}
.purchase-guarantee strong {
    color: var(--color-dark, #333);
}

/* ==========================================================================
   SEKCJE DODATKOWE (KORZYŚCI, FAQ, GALERIA, ITP.)
   ========================================================================== */
.benefits-section, .faq-section, .gallery-section, .toc-section, .testimonials-section, .author-section { 40px 0 60px 0; margin-top: 40px; }
.benefits-section h2, .faq-section h2, .gallery-section h2, .toc-section h2, .testimonials-section h2, .author-section h2 { text-align: center; margin-bottom: 40px; font-size: 2.2rem; }
.benefits-section, .testimonials-section, .author-section { background-color: var(--color-light-gray, #f8f9fa); }

/* --- Korzyści --- */
.benefits-grid { display: grid; grid-template-columns: 1fr; gap: 30px; text-align: center; }
.benefit-card { background: white; padding: 25px; border-radius: 10px; box-shadow: 0 4px 25px rgba(0,0,0,0.08); }
.benefit-card h3 { font-size: 1.3rem; color: var(--color-blue, #006094); }

/* --- Galeria --- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 5px; }
.gallery-item img { width: 100%; height: auto; display: block; border-radius: 8px; }

/* --- Spis Treści --- */
.toc-list { list-style: none; padding: 0; counter-reset: chapter-counter; column-count: 1; }
.toc-list li { counter-increment: chapter-counter; margin-bottom: 15px; font-size: 1.1rem; padding-left: 45px; position: relative; }
.toc-list li::before {
    content: counter(chapter-counter); position: absolute; left: 0; top: 0;
    width: 30px; height: 30px; background-color: var(--color-blue);
    color: var(--color-white); border-radius: 50%; text-align: center;
    font-weight: bold; line-height: 30px;
}

/* --- Opinie --- */
.testimonials-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
.testimonial-card { background-color: #fff; border-left: 5px solid var(--color-pink); padding: 25px; border-radius: 8px; }
.testimonial-card blockquote { margin: 0; font-style: italic; font-size: 1.1rem; }
.testimonial-card cite { display: block; text-align: right; margin-top: 15px; font-weight: bold; color: var(--color-dark); }

/* --- Autor --- */
.author-bio { max-width: 800px; margin: 0 auto; text-align: center; }

/* --- FAQ --- */
.faq-item {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 15px;
}

/* To jest styl dla pytania - teraz będzie ładnie wyróżnione */
.faq-item summary {
    font-size: 1.2rem;
    font-weight: 700; /* Pogrubienie tekstu pytania */
    color: var(--color-blue, #006094); /* Kolor tekstu pytania */
    padding: 20px 0;
    cursor: pointer;
    position: relative;
    padding-right: 30px; /* Miejsce na plusik */
    list-style: none; /* Ukrycie domyślnej strzałki */
}

/* Usuwamy domyślny marker rozwijania */
.faq-item summary::-webkit-details-marker {
    display: none;
}

/* Styl dla plusika '+' do rozwijania */
.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    color: var(--color-pink, #d9006c);
    transition: transform 0.3s;
}

/* Obracamy plusik w 'x' gdy pytanie jest rozwinięte */
.faq-item[open] > summary::after {
    transform: translateY(-50%) rotate(45deg);
}

/* Styl dla odpowiedzi, która się pojawia po kliknięciu */
.faq-item div {
    padding: 0 10px 20px 10px;
    line-height: 1.7;
    color: #333; /* Kolor tekstu odpowiedzi */
}

/* ==========================================================================
   RESPONSYWNOŚĆ (Style dla większych ekranów)
   ========================================================================== */
@media (min-width: 992px) {
    .product-main-layout {
        display: grid;
        grid-template-columns: 350px 1fr 350px;
        gap: 40px;
        align-items: flex-start;
    }
    .purchase-sidebar {
        position: sticky;
        top: 20px;
        order: 0;
    }
    .product-image { order: 0; }
    .product-description { order: 0; }
    .benefits-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .toc-list { column-count: 2; }
    .testimonials-grid { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
    .ebook-header h1 { font-size: 2.8rem; }
    .ebook-header h3 { font-size: 1.5rem; }
    
    .banner-text-overlay h1 { font-size: 2.8rem; }
    .banner-text-overlay p { font-size: 1.4rem; }
}

/* ==========================================================================
   SEKCJA: BLOK Z ZAKŁADKAMI (TABS) - WERSJA FINALNA
   ========================================================================== */

.tabs-section-container {
    max-width: 1440px; /* Szerokość dopasowana do reszty strony */
    margin: 60px auto 0;
    padding: 0 20px;
}

.tab-navigation {
    display: flex;
    border-bottom: 2px solid #e0e0e0; /* <-- OTO JEST TWOJA PRZYWRÓCONA SZARA LINIA */
    margin-bottom: 30px;

    /* --- POPRAWKA DLA TELEFONÓW --- */
    overflow-x: auto;   /* Włącza przewijanie w poziomie, gdy brakuje miejsca */
    flex-wrap: nowrap;    /* Zapobiega "łamaniu się" zakładek na kilka wierszy */
    -webkit-overflow-scrolling: touch; /* Płynniejsze przewijanie na iOS */
}

/* Ukrycie paska przewijania dla czystszego wyglądu */
.tab-navigation::-webkit-scrollbar {
    display: none;
}

.tab-link {
    padding: 15px 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: #6c757d;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: -2px;
    white-space: nowrap; /* Gwarantuje, że nazwa zakładki się nie złamie */
}

.tab-link:hover {
    color: var(--color-blue, #006094);
}

.tab-link.active {
    color: var(--color-blue, #006094);
    border-bottom-color: var(--color-pink, #d9006c);
}

.tab-panel {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 5. Czystość i integracja - usunięcie zbędnych stylów z komponentów wewnątrz zakładek */
.tab-panel .faq-section,
.tab-panel .author-section {
    padding: 0;
    margin-top: 0;
    background-color: transparent;
}

.tab-panel .faq-section h2,
.tab-panel .author-section h2 {
    display: none; /* Ukrywamy nagłówki (np. "FAQ"), bo mamy je już w linkach zakładek */
}

/* Style dla kontenera z zakładkami */
.tabs-container {
    max-width: 100%;
    overflow: hidden; /* Zapobiega wychodzeniu elementów poza kontener */
}

/* Style dla treści wewnątrz aktywnej zakładki */
.description-content {
    word-wrap: break-word; /* Zapewnia zawijanie długich słów */
    overflow-wrap: break-word;
}

.description-content ul {
    padding-left: 20px; /* Dodaje wcięcie do list */
}

.section-box {
    margin-bottom: 2em; /* Dodaje odstęp między sekcjami */
}


/* --- Style dla banera z dwiema okładkami (WERSJA FINALNA) --- */
.two-covers-banner {
    display: flex;          /* Ustawia elementy w jednym rzędzie */
    padding: 0;             /* USUWAMY wewnętrzny margines */
    gap: 0;                 /* USUWAMY przerwę między okładkami */
    overflow: hidden;       /* Ważne, aby efekt "ruchu" nie wychodził poza baner */
    align-items: stretch;   /* Rozciąga elementy na całą wysokość */
}

.banner-cover-image {
    width: 50%;             /* Każda okładka zajmuje dokładnie połowę szerokości banera */
    height: 194px;          /* Utrzymujemy stałą wysokość banera */
    object-fit: cover;      /* Obrazek wypełnia swoją przestrzeń (może być delikatnie przycięty po bokach, aby wypełnić wysokość) */

    /* --- EFEKT RUCHU PO NAJECHANIU MYSZKĄ --- */
    transition: transform 0.4s ease; /* Płynne przejście dla animacji */
}

.banner-cover-image:hover {
    transform: scale(1.05); /* Lekkie powiększenie po najechaniu myszką */
    z-index: 10;            /* Gwarantuje, że powiększony obrazek jest na wierzchu */
}

/* ==========================================================================
   WIZUALNA WSKAZÓWKA PRZEWIJANIA ZAKŁADEK NA MOBILE
   ========================================================================== */

/* Ten kod zadziała tylko na ekranach węższych niż 992px (czyli głównie na telefonach) */
@media (max-width: 991px) {
    
    /* NOWA REGUŁA: Zmniejsza odstępy między nazwami zakładek */
    .tab-link {
        padding: 15px 16px; /* Zmniejszamy odstępy po bokach z 25px na 16px */
    }

    /* Poniższy kod już tam jest - zostawiamy go */
    .tabs-section-container {
        position: relative;
    }

    .tabs-section-container::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 50px;
        height: 55px;
        background: linear-gradient(to left, white 25%, transparent);
        pointer-events: none;
    }
}



