/* ============================================================
   WOOCOMMERCE — DEEPLY-EDU (premium, spójny z nowymi stronami)
   ============================================================ */

@keyframes gradientFlowBtn { 0% { background-position: 0% center; } 100% { background-position: 200% center; } }
@keyframes deGradText { 0% { background-position: 0% center; } 100% { background-position: 200% center; } }

/* ─── BAZA ─── */
.woocommerce, .woocommerce-page {
    font-family: 'Inter', sans-serif;
    color: #333;
}
.woocommerce h1, .woocommerce h2, .woocommerce h3, .woocommerce h4,
.woocommerce-page h1, .woocommerce-page h2, .woocommerce-page h3, .woocommerce-page h4,
#main-content h1, #main-content h2, #main-content h3 {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700;
    color: #111111;
    letter-spacing: -0.01em;
}
/* tytuł strony (Koszyk / Kasa / Moje konto) */
#main-content > h1 {
    font-size: clamp(2rem, 4vw, 2.8rem) !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 34px !important;
    position: relative;
}
#main-content > h1::after {
    content: '';
    display: block;
    width: 68px;
    height: 4px;
    margin-top: 16px;
    border-radius: 4px;
    background: linear-gradient(270deg, #2E0011, #A00037, #2E0011);
    background-size: 200% auto;
    animation: deGradText 8.5s linear infinite;
}
.woocommerce a { color: #A00037; }
.woocommerce a:hover { color: #75002C; }

/* ─── PRZYCISKI ─── */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce #place_order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 34px;
    border-radius: 50px;
    background: linear-gradient(270deg, #100005 0%, #75002C 50%, #100005 100%);
    background-size: 200% auto;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    text-transform: none;
    border: none;
    cursor: pointer;
    animation: gradientFlowBtn 8.5s linear infinite;
    box-shadow: 0 10px 20px rgba(117,0,44,0.28);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-shadow: none;
}
/* WooCommerce w swoim CSS ustawia na hover `background-image:none` + jasne tło (#dad8da).
   Bez ponownego zadeklarowania gradientu przyciski robiły się prawie białe. */
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce #place_order:hover {
    background: linear-gradient(270deg, #100005 0%, #75002C 50%, #100005 100%) !important;
    background-size: 200% auto !important;
    transform: translateY(-3px);
    box-shadow: 0 15px 26px rgba(117,0,44,0.4);
    color: #ffffff !important;
}
/* przycisk drugorzędny (np. Zaktualizuj koszyk) */
.woocommerce button[name="update_cart"],
.woocommerce input[name="update_cart"] {
    background: #ffffff;
    color: #75002C !important;
    border: 1.5px solid #E4D7DC;
    box-shadow: none;
    animation: none;
}
.woocommerce button[name="update_cart"]:hover:not(:disabled),
.woocommerce input[name="update_cart"]:hover:not(:disabled) {
    /* !important, bo reguła hover przycisków głównych też łapie ten element */
    background: #ffffff !important;
    border-color: #A00037;
    color: #A00037 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(117,0,44,0.12);
}
.woocommerce button.button:disabled,
.woocommerce button.button[disabled],
.woocommerce input.button:disabled {
    opacity: 0.5;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    animation: none;
}

/* ─── POLA / FORMULARZE ─── */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text,
.woocommerce-page form .form-row textarea,
.woocommerce form.login input[type="text"],
.woocommerce form.login input[type="password"],
.woocommerce form.register input[type="text"],
.woocommerce form.register input[type="email"],
.woocommerce form.register input[type="password"],
.woocommerce .coupon input[type="text"],
.woocommerce #coupon_code,
.woocommerce .quantity input.qty,
select.woocommerce-widget-layered-nav-dropdown,
.select2-container .select2-selection--single {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 0.98rem;
    color: #111;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1.5px solid #E2E2DE;
    background: #ffffff;
    transition: border-color .25s, box-shadow .25s, background .25s;
    box-shadow: none;
    line-height: 1.4;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus,
.woocommerce form.login input:focus,
.woocommerce form.register input:focus,
.woocommerce .coupon input[type="text"]:focus,
.woocommerce #coupon_code:focus,
.woocommerce .quantity input.qty:focus {
    outline: none;
    border-color: #A00037;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(160,0,55,0.10);
}
.woocommerce form .form-row label,
.woocommerce-account label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
    line-height: 1.4;
}
.woocommerce form .form-row .required { color: #A00037; text-decoration: none; border: none; }
.woocommerce .quantity input.qty { width: 74px; text-align: center; padding: 11px 6px; }

/* ─── TABELE (KOSZYK / ZAMÓWIENIE) ─── */
.woocommerce table.shop_table {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #EBE4E6;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 30px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(30,20,25,0.05);
}
.woocommerce table.shop_table thead th {
    background-color: #faf7f8;
    font-weight: 700;
    color: #4a4a4a;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 18px 20px;
    border: none;
}
.woocommerce table.shop_table td {
    padding: 18px 20px;
    border-top: 1px solid #F0EAEC;
    vertical-align: middle;
    color: #333;
}
.woocommerce table.shop_table tbody tr:first-child td { border-top: none; }
.woocommerce table.cart img {
    width: 64px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}
/* stałe szerokości kolumn — likwiduje wielką przerwę przy ✕ */
.woocommerce table.cart { table-layout: fixed; }
.woocommerce table.cart th.product-remove,
.woocommerce table.cart td.product-remove { width: 46px !important; text-align: center; padding-left: 10px; padding-right: 4px; }
.woocommerce table.cart th.product-thumbnail,
.woocommerce table.cart td.product-thumbnail { width: 90px !important; padding-left: 4px; padding-right: 12px; }
.woocommerce table.cart th.product-name,
.woocommerce table.cart td.product-name { width: auto !important; padding-left: 6px; word-break: break-word; }
.woocommerce table.cart th.product-price,
.woocommerce table.cart td.product-price,
.woocommerce table.cart th.product-quantity,
.woocommerce table.cart td.product-quantity,
.woocommerce table.cart th.product-subtotal,
.woocommerce table.cart td.product-subtotal { width: 120px !important; }
.woocommerce table.cart td.product-name a,
.woocommerce table.shop_table td.product-name a {
    color: #111;
    font-weight: 600;
    text-decoration: none;
}
.woocommerce table.cart td.product-name a:hover { color: #A00037; }
.woocommerce table.shop_table td.product-total,
.woocommerce table.shop_table td.product-subtotal,
.woocommerce table.shop_table .amount { font-weight: 700; color: #111; }

/* przycisk usuwania (✕) jako kółko */
.woocommerce a.remove {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f6ebee;
    color: #A00037 !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    transition: background .2s, color .2s, transform .2s;
}
.woocommerce a.remove:hover {
    background: #A00037;
    color: #fff !important;
    transform: rotate(90deg);
}

/* wiersz akcji / kupon (to jest <td class="actions"> w stopce tabeli) */
.woocommerce table.cart td.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 22px 0;
    background: transparent;
}
.woocommerce table.cart td.actions .coupon {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    max-width: 480px;
    margin: 0;
}
.woocommerce table.cart td.actions .coupon label { display: none; }
/* Pole kuponu jest polem drugorzednym — nie musi miec wysokosci pol
   adresowych z kasy (51px), przy ktorej wygladalo na przeskalowane. */
.woocommerce table.cart td.actions .coupon input#coupon_code {
    flex: 1;
    width: auto !important;
    min-width: 150px;
    margin: 0;
    padding: 10px 14px;
    font-size: 0.92rem;
}
.woocommerce table.cart td.actions .coupon input#coupon_code::placeholder {
    font-size: 0.88rem;
    opacity: 1;
}
.woocommerce table.cart td.actions .coupon .button {
    flex-shrink: 0;
    margin: 0;
    white-space: nowrap;
}
/* Przycisk „Zaktualizuj koszyk" jest ukryty — ilosc pozycji i tak jest stala
   (produkty sa sprzedawane pojedynczo), a przycisk tylko zasmiecal wiersz
   akcji. Zostaje w DOM, zeby skrypt w stopce mogl go klilknac, gdyby ktorys
   produkt jednak pozwalal zmienic ilosc. */
.woocommerce table.cart td.actions button[name="update_cart"],
.woocommerce table.cart td.actions input[name="update_cart"] {
    display: none !important;
}

/* ─── UKŁAD KOSZYKA: tabela po lewej, podsumowanie po prawej ─── */
.woocommerce-cart .woocommerce {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 20px 44px;
    align-items: start;
}
.woocommerce-cart .woocommerce > * { grid-column: 1 / -1; }
.woocommerce-cart .woocommerce > form.woocommerce-cart-form { grid-column: 1; margin-bottom: 0; }
.woocommerce-cart .woocommerce > .cart-collaterals { grid-column: 2; width: 100%; }
.woocommerce-cart .woocommerce-cart-form table.cart { margin-bottom: 0; }

/* ─── PODSUMOWANIE KOSZYKA (CART TOTALS) ─── */
.woocommerce .cart-collaterals, .woocommerce-page .cart-collaterals { width: 100%; }
.woocommerce .cart-collaterals .cart_totals,
.woocommerce-page .cart-collaterals .cart_totals {
    width: 100%;
    max-width: none;
    margin: 0;
    background: #fff;
    border-radius: 20px;
    padding: 34px 34px 38px;
    border: 1px solid #EBE4E6;
    box-shadow: 0 16px 40px rgba(30,20,25,0.06);
    position: sticky;
    top: 90px;
}
.woocommerce .cart_totals h2 { font-size: 1.5rem; margin-bottom: 20px; }
.woocommerce .cart_totals table.shop_table {
    border: none;
    box-shadow: none;
    margin: 0;
    border-radius: 0;
}
.woocommerce .cart_totals table.shop_table th {
    background: transparent;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.95rem;
    color: #555;
    padding: 14px 0;
}
.woocommerce .cart_totals table.shop_table td {
    padding: 14px 0;
    text-align: right;
    border-top: 1px solid #F0EAEC;
}
.woocommerce .cart_totals .order-total th,
.woocommerce .cart_totals .order-total td { font-size: 1.15rem; color: #111; padding-top: 18px; }
.woocommerce .cart_totals .order-total .amount {
    font-size: 1.4rem;
    background: linear-gradient(270deg, #2E0011, #A00037, #2E0011);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: deGradText 8.5s linear infinite;
}
.woocommerce .wc-proceed-to-checkout { padding-top: 24px; }
.woocommerce .wc-proceed-to-checkout a.checkout-button {
    display: flex;
    width: 100%;
    min-height: 52px;      /* glowne CTA — bazowe 10px paddingu dawalo cienka pigulke */
    padding: 14px 28px;
}

/* ─── KASA (CHECKOUT) ─── */
.woocommerce-checkout #customer_details,
.woocommerce-checkout #order_review,
.woocommerce-checkout #order_review_heading { }
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 { float: none; width: 100%; }
.woocommerce-checkout #order_review {
    background: #fff;
    border: 1px solid #EBE4E6;
    border-radius: 20px;
    padding: 30px 32px;
    box-shadow: 0 16px 40px rgba(30,20,25,0.06);
}
.woocommerce-checkout #payment {
    background: #faf7f8;
    border-radius: 16px;
    border: 1px solid #EFE3E7;
}
.woocommerce-checkout #payment ul.payment_methods { border-bottom: 1px solid #EFE3E7; }
.woocommerce-checkout #payment div.payment_box {
    background: #ffffff;
    border-radius: 12px;
    color: #555;
}
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: #ffffff; }
.woocommerce-checkout #place_order { display: block; width: 100%; margin-top: 10px; }
.woocommerce-billing-fields h3,
#order_review_heading { font-size: 1.35rem; margin-bottom: 18px; }
/* „Twoje zamowienie" siedzialo tuz pod polem uwag — bez odstepu wygladalo
   jak podpis do tego pola, a nie jak nowa sekcja. */
#order_review_heading { margin-top: 38px; }
/* „Informacje dodatkowe" to duzy naglowek nad jednym opcjonalnym polem —
   sama etykieta pola wystarczy. */
.woocommerce-checkout .woocommerce-additional-fields > h3 { display: none; }
/* Pole „Uwagi do zamowienia": ogolna regula na .form-row textarea przegrywa
   z CSS-em wtyczek, wiec domykamy jawnie po ID. Placeholder mniejszy — przy
   domyslnym rozmiarze byl wiekszy niz etykieta nad polem. */
.woocommerce form .form-row textarea#order_comments,
.woocommerce-checkout #order_comments {
    border-radius: 12px !important;
    border: 1.5px solid #E2E2DE;
    padding: 13px 16px;
    font-size: 0.95rem;
    line-height: 1.55;
    min-height: 92px;
    resize: vertical;
}
.woocommerce-checkout #order_comments::placeholder {
    font-size: 0.9rem;
    color: #8b8b8b;
    opacity: 1;
}

/* ─── KASA NA DUZYM EKRANIE: dwie kolumny ───
   Jedna dluga kolumna (dane -> uwagi -> zamowienie -> platnosc) wymuszala
   scrollowanie w te i z powrotem przy sprawdzaniu, co sie wlasciwie kupuje.
   Po lewej dane platnosci i uwagi, po prawej przyklejone podsumowanie.
   Wiersze przypisujemy jawnie, bo automat wsadzilby `#order_review` pod
   caly lewy blok zamiast tuz pod naglowek. */
@media (min-width: 981px) {
    .woocommerce-checkout form.checkout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 500px;
        column-gap: 40px;
        row-gap: 0;
        align-items: start;
    }
    .woocommerce-checkout form.checkout > * { grid-column: 1 / -1; }
    .woocommerce-checkout form.checkout > .woocommerce-NoticeGroup {
        grid-column: 1 / -1;
        grid-row: 1;
    }
    .woocommerce-checkout form.checkout > #customer_details {
        grid-column: 1;
        grid-row: 2 / span 2;
    }
    .woocommerce-checkout form.checkout > #order_review_heading {
        grid-column: 2;
        grid-row: 2;
        margin-top: 0;
    }
    .woocommerce-checkout form.checkout > #order_review {
        grid-column: 2;
        grid-row: 3;
        position: sticky;
        top: 90px;
    }
}

/* ─── POWIADOMIENIA ─── */
.woocommerce-message, .woocommerce-error, .woocommerce-info {
    border-top: none;
    background: #faf7f8;
    color: #111;
    border-radius: 12px;
    padding: 16px 20px 16px 52px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
    border-left: 4px solid;
    margin-bottom: 28px;
    font-weight: 500;
    list-style: none;
    /* WooCommerce puszcza przycisk floatem w prawo, przez co dlugi komunikat
       wchodzil pod niego. Flex + gap gwarantuje odstep miedzy trescia
       a przyciskiem. */
    display: flex;
    align-items: center;
    gap: 24px;
}
.woocommerce-message .button,
.woocommerce-error .button,
.woocommerce-info .button {
    order: 1;            /* w markupie przycisk jest PRZED tekstem */
    margin-left: auto;
    flex-shrink: 0;
    float: none !important;
}
.woocommerce-message { border-left-color: #16a34a; background: rgba(74,222,128,0.07); }
.woocommerce-message::before { color: #16a34a; top: 18px; left: 20px; }
.woocommerce-error { border-left-color: #A00037; background: rgba(160,0,55,0.06); }
.woocommerce-error::before { color: #A00037; top: 18px; left: 20px; }
.woocommerce-info { border-left-color: #75002C; background: rgba(117,0,44,0.05); }
.woocommerce-info::before { color: #75002C; top: 18px; left: 20px; }
.woocommerce-message .button,
.woocommerce-error .button,
.woocommerce-info .button { padding: 8px 20px; font-size: 0.85rem; box-shadow: none; }

/* ─── LOGOWANIE / REJESTRACJA ─── */
.woocommerce-account:not(.logged-in) .woocommerce {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    justify-content: center;
    align-items: flex-start;
}
.woocommerce form.login,
.woocommerce form.register {
    flex: 1 1 380px;
    max-width: 460px;
    background: #fff;
    border: 1px solid #EBE4E6;
    border-radius: 22px;
    padding: 38px 34px;
    box-shadow: 0 20px 50px rgba(30,20,25,0.06);
    margin: 0;
}
.woocommerce h2 { font-size: 1.5rem; margin-bottom: 22px; }
.woocommerce form.login .button,
.woocommerce form.register .button { width: 100%; margin-top: 6px; }
.woocommerce-form-login__rememberme { font-weight: 500 !important; color: #666; }
.woocommerce-LostPassword a { font-size: 0.88rem; }

/* ─── MOJE KONTO ─── */
.woocommerce-account.logged-in .woocommerce {
    display: flex;
    gap: 34px;
    align-items: flex-start;
}
.woocommerce-account .woocommerce-MyAccount-navigation {
    width: 260px;
    flex-shrink: 0;
    float: none;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 8px;
    margin: 0;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #EBE4E6;
    box-shadow: 0 12px 30px rgba(30,20,25,0.05);
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li { border: none; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 12px 16px;
    color: #444;
    text-decoration: none;
    font-weight: 500;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background: linear-gradient(270deg, #100005 0%, #75002C 50%, #100005 100%);
    background-size: 200% auto;
    animation: gradientFlowBtn 8.5s linear infinite;
    color: #fff;
    box-shadow: 0 6px 14px rgba(117,0,44,0.22);
}
/* „Usuń konto" — ostatnia pozycja menu. Dostęp do usunięcia konta jest
   wymagany prawem, ale nie jest codzienną czynnością: zostaje w karcie menu,
   odcięty linią i wyciszony typografią, bez gradientu na hoverze. */
.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--usun-konto-link {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #EBE4E6;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--usun-konto-link a {
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 400;
    color: #9a9298;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--usun-konto-link a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--usun-konto-link.is-active a {
    background: none;
    animation: none;
    box-shadow: none;
    color: #A00037;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.woocommerce-account .woocommerce-MyAccount-content {
    flex: 1;
    min-width: 0;
    float: none;
    width: auto;
    background: #fff;
    border: 1px solid #EBE4E6;
    border-radius: 18px;
    padding: 30px 32px;
    box-shadow: 0 12px 30px rgba(30,20,25,0.05);
}

/* ─── PRZYCISKI W TABELACH / POBIERANIA / SKLEP ─── */
/* kompaktowe przyciski wewnątrz tabel (np. Moje konto → Pliki do pobrania) */
.woocommerce table.shop_table td .button,
.woocommerce-MyAccount-downloads .button,
.woocommerce-orders-table .button {
    padding: 7px 20px;
    font-size: 0.85rem;
    box-shadow: 0 6px 14px rgba(117,0,44,0.2);
}
/* wiele przycisków w jednej komórce → obok siebie */
.woocommerce-MyAccount-downloads td.download-file,
.woocommerce table.shop_table td.download-file,
.woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* archiwum sklepu — akcje produktu obok siebie */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart {
    display: inline-flex;
    margin: 4px 6px 0 0;
    padding: 9px 22px;
    font-size: 0.9rem;
    vertical-align: middle;
}
.woocommerce ul.products li.product { text-align: left; }

/* pojedyncza strona produktu — przyciski w rzędzie */
.woocommerce div.product form.cart { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.woocommerce div.product form.cart .quantity { margin: 0; }

/* ─── RESPONSYWNOŚĆ ─── */
@media (max-width: 980px) {
    .woocommerce-cart .woocommerce { grid-template-columns: 1fr; }
    .woocommerce-cart .woocommerce > .cart-collaterals { grid-column: 1; grid-row: auto; }
    .woocommerce .cart-collaterals .cart_totals { position: static; top: auto; }
}
@media (max-width: 860px) {
    .woocommerce-account.logged-in .woocommerce { flex-direction: column; }
    .woocommerce-account .woocommerce-MyAccount-navigation,
    .woocommerce-account .woocommerce-MyAccount-content { width: 100%; }
    .woocommerce table.cart td.actions { flex-direction: column; align-items: stretch; }
    .woocommerce table.cart td.actions .coupon { max-width: 100%; }
    .woocommerce table.cart td.actions button[name="update_cart"],
    .woocommerce table.cart td.actions input[name="update_cart"] { margin-left: 0; }
}
@media (max-width: 768px) {
    /* ═══ KOSZYK NA TELEFONIE ═══
       WooCommerce poniżej 768px zamienia komórki tabeli w bloki
       (display:block + td::before { content: attr(data-title) }).
       Nasze sztywne szerokości kolumn i table-layout: fixed w takim
       układzie robiły bałagan: nazwa uciekała w prawo, ✕ i miniatura
       zajmowały osobne wiersze, a wszystko było rozstrzelone na pół
       ekranu. Tutaj tabela staje się listą KART produktów. */

    /* Formularz koszyka, tabela i tbody nie generuja wlasnych pudelek
       (`display: contents`), dzieki czemu wiersze tabeli staja sie bezposrednimi
       elementami siatki `.woocommerce`. Tylko tak da sie CSS-em wsunac
       podsumowanie koszyka POMIEDZY liste produktow a wiersz z kuponem —
       kupon i „Odswiez" siedza w <form>, a podsumowanie jest poza nim,
       wiec zwykly `order` na rodzenstwie by nie wystarczyl. */
    .woocommerce-cart .woocommerce { row-gap: 14px; }
    .woocommerce-cart .woocommerce > form.woocommerce-cart-form,
    .woocommerce-cart .woocommerce-cart-form table.cart,
    .woocommerce-cart .woocommerce-cart-form table.cart tbody,
    .woocommerce-cart .woocommerce-cart-form table.cart tfoot {
        display: contents;
    }
    .woocommerce-cart .woocommerce-cart-form table.cart thead { display: none; }
    .woocommerce-cart .woocommerce > .cart-collaterals { order: 2; }

    /* pojedyncza pozycja koszyka = karta */
    .woocommerce-cart .woocommerce-cart-form table.cart tbody tr.cart_item,
    .woocommerce-cart .woocommerce-cart-form table.cart tbody tr.woocommerce-cart-form__cart-item {
        position: relative;
        display: grid;
        grid-template-columns: 68px minmax(0, 1fr);
        column-gap: 14px;
        align-items: center;
        background: #fff;
        border: 1px solid #EBE4E6;
        border-radius: 16px;
        box-shadow: 0 10px 26px rgba(30,20,25,0.05);
        padding: 16px 16px 6px;
        margin: 0;
        grid-column: 1;
        order: 1;   /* produkty na gorze */
    }

    /* komórki: etykieta z lewej, wartość z prawej */
    .woocommerce-cart .woocommerce-cart-form table.cart tbody td {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: auto !important;
        padding: 10px 0 !important;
        border: none;
        border-top: 1px solid #F4EEF0;
        text-align: left !important;
        font-size: 0.95rem;
    }
    .woocommerce-cart .woocommerce-cart-form table.cart tbody td::before {
        float: none !important;
        content: attr(data-title);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #6d7178;
        white-space: nowrap;
    }

    /* miniatura + nazwa: pierwszy rząd karty, obok siebie */
    .woocommerce-cart .woocommerce-cart-form table.cart tbody td.product-thumbnail {
        grid-column: 1;
        grid-row: 1;
        display: block !important;
        padding: 0 !important;
        border-top: none;
    }
    .woocommerce-cart .woocommerce-cart-form table.cart tbody td.product-thumbnail::before { display: none; }
    .woocommerce-cart .woocommerce-cart-form table.cart tbody td.product-thumbnail img {
        width: 68px;
        height: auto;
        display: block;
        border-radius: 12px;
        box-shadow: none;
    }
    .woocommerce-cart .woocommerce-cart-form table.cart tbody td.product-name {
        grid-column: 2;
        grid-row: 1;
        display: block !important;
        padding: 0 40px 0 0 !important;   /* miejsce na ✕ w rogu karty */
        border-top: none;
        font-size: 1rem;
        line-height: 1.35;
    }
    .woocommerce-cart .woocommerce-cart-form table.cart tbody td.product-name::before { display: none; }
    .woocommerce-cart .woocommerce-cart-form table.cart tbody td.product-name a {
        display: block;
        font-weight: 700;
        word-break: break-word;
    }

    /* pozostałe komórki (cena, ilość, kwota) — pełna szerokość karty */
    .woocommerce-cart .woocommerce-cart-form table.cart tbody td.product-price,
    .woocommerce-cart .woocommerce-cart-form table.cart tbody td.product-quantity,
    .woocommerce-cart .woocommerce-cart-form table.cart tbody td.product-subtotal {
        grid-column: 1 / -1;
    }
    .woocommerce-cart .woocommerce-cart-form table.cart tbody td.product-price { margin-top: 12px; }
    .woocommerce-cart .woocommerce-cart-form table.cart tbody td.product-quantity .quantity { margin: 0; }
    .woocommerce-cart .woocommerce-cart-form table.cart tbody td.product-quantity input.qty {
        width: 84px;
        padding: 9px 6px;
    }

    /* ✕ w prawym górnym rogu karty */
    .woocommerce-cart .woocommerce-cart-form table.cart tbody td.product-remove {
        position: absolute;
        top: 12px;
        right: 12px;
        display: block !important;
        width: auto !important;
        padding: 0 !important;
        border: none;
    }
    .woocommerce-cart .woocommerce-cart-form table.cart tbody td.product-remove::before { display: none !important; }

    /* wiersz akcji laduje POD podsumowaniem koszyka (order: 3); dodatkowy
       margines na gorze wyraznie oddziela sekcje kuponu od podsumowania */
    .woocommerce-cart .woocommerce-cart-form table.cart tfoot tr,
    .woocommerce-cart .woocommerce-cart-form table.cart tr:has(td.actions) {
        display: block;
        grid-column: 1;
        order: 3;
        margin: 16px 0 0;
    }
    .woocommerce-cart .woocommerce-cart-form table.cart td.actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        width: auto !important;
        padding: 0 !important;
        border: none;
        text-align: left !important;
    }
    .woocommerce-cart .woocommerce-cart-form table.cart td.actions::before { display: none !important; }
    /* `.coupon` rozpuszczamy, zeby jego przycisk trafil do tej samej siatki
       co „Odswiez" — inaczej siedzialby w osobnym pudelku i nie dalby sie
       ustawic w jednej linii. */
    .woocommerce-cart .woocommerce-cart-form table.cart td.actions .coupon {
        display: contents;
    }
    /* Pozycje w siatce podajemy JAWNIE (`grid-row`), zeby ewentualny dodatkowy
       element w `td.actions` (np. z wtyczki) nie rozjechal ukladu — wyladuje
       w kolejnym wierszu. Pole i przycisk siedza obok siebie. */
    .woocommerce-cart .woocommerce-cart-form table.cart td.actions .coupon input#coupon_code {
        grid-column: 1;
        grid-row: 1;
        width: 100% !important;
        min-width: 0;
        margin: 0 !important;
        padding: 11px 14px;
    }
    .woocommerce-cart .woocommerce-cart-form table.cart td.actions .coupon .button {
        grid-column: 2;
        grid-row: 1;
    }

    /* Przycisk drugorzedny i niski — jedynym mocnym akcentem na ekranie
       ma zostac „Przejdz do platnosci". */
    .woocommerce-cart .woocommerce-cart-form table.cart td.actions .coupon .button {
        min-height: 46px;
        margin: 0 !important;
        float: none;
        padding: 10px 18px;
        font-size: 0.9rem;
        white-space: nowrap;
        /* Twardy zakaz zgniatania: kolumna `auto` nie moze zejsc ponizej
           szerokosci napisu, niezaleznie od tego ile miejsca zabierze pole. */
        min-width: max-content;
        background: #ffffff !important;
        color: #75002C !important;
        border: 1.5px solid #E4D7DC;
        box-shadow: none;
        animation: none;
    }
    .woocommerce-cart .woocommerce-cart-form table.cart td.actions .coupon .button:hover {
        background: #ffffff !important;
        border-color: #A00037;
        color: #A00037 !important;
        transform: none;
        box-shadow: none;
    }

    /* Etykieta „Użyj kuponu" przychodzi z filtra gettext w functions.php.
       Wczesniej byla podmieniana przez `font-size: 0` + `::before` — przy
       liczeniu szerokosci kolumny `auto` przegladarka brala pod uwage tekst
       o zerowym rozmiarze, wiec przycisk zgniatal sie do samego paddingu,
       a napis z niego wychodzil. */

    /* podsumowanie koszyka — mniej powietrza, etykieta i kwota w jednej linii */
    .woocommerce-cart .cart-collaterals .cart_totals { padding: 24px 20px 26px; border-radius: 16px; }
    .woocommerce-cart .cart_totals h2 { font-size: 1.3rem; margin-bottom: 12px; }
    .woocommerce-cart .cart_totals table.shop_table tr {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 14px;
    }
    .woocommerce-cart .cart_totals table.shop_table th,
    .woocommerce-cart .cart_totals table.shop_table td {
        display: block !important;
        width: auto !important;
        padding: 12px 0 !important;
        border-top: none;
        text-align: right !important;
    }
    .woocommerce-cart .cart_totals table.shop_table th { text-align: left !important; }
    .woocommerce-cart .cart_totals table.shop_table td::before,
    .woocommerce-cart .cart_totals table.shop_table th::before { display: none !important; }
    .woocommerce-cart .cart_totals table.shop_table tr + tr { border-top: 1px solid #F0EAEC; }
    .woocommerce-cart .cart_totals .order-total .amount { font-size: 1.25rem; }
    .woocommerce-cart .wc-proceed-to-checkout { padding-top: 18px; }
    /* glowne CTA — na telefonie ma byc solidne, nie cienka pigulka */
    .woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
        min-height: 54px;
        padding: 15px 24px;
        font-size: 1.05rem;
    }

    /* Odstep pod tytulem strony („Koszyk") — 34px + pusty kontener na
       powiadomienia robily na waskim ekranie sporo martwej przestrzeni. */
    .woocommerce-cart #main-content > h1 { margin-bottom: 14px !important; }
    .woocommerce-cart .woocommerce-notices-wrapper:empty { display: none; }

    /* ═══ KASA NA TELEFONIE ═══
       Karta `#order_review` ma 32px paddingu, a w srodku siedza kolejne
       karty z wlasnymi marginesami — na 412px ekranu zjadalo to ~64px
       szerokosci i nazwa produktu lamala sie na cztery linie. Sciagamy
       zewnetrzny padding, zeby tresc dostala miejsce. */
    .woocommerce-checkout #order_review {
        padding: 14px 12px;
        border-radius: 16px;
    }
    .woocommerce-checkout #order_review table.shop_table th,
    .woocommerce-checkout #order_review table.shop_table td {
        padding: 14px 18px;   /* tresc nie moze dotykac krawedzi bialej karty */
    }
    .woocommerce-checkout #payment ul.payment_methods { padding: 12px 12px 4px; }
    .woocommerce-checkout #payment div.payment_box { padding: 12px 14px; }
    .woocommerce-checkout #payment .form-row.place-order { padding: 14px 12px 18px; }
    .woocommerce-checkout #payment .woocommerce-terms-and-conditions-wrapper { padding: 0 12px; }

    /* powiadomienia: najpierw treść, przycisk pod spodem na całą szerokość
       (przestawienie przycisku na koniec robi `order: 1` w regule bazowej) */
    .woocommerce-message, .woocommerce-error, .woocommerce-info {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px 18px 16px 46px;
    }
    .woocommerce-message .button,
    .woocommerce-error .button,
    .woocommerce-info .button {
        float: none !important;
        width: 100%;
        margin: 0 !important;
    }
    .woocommerce-message::before,
    .woocommerce-error::before,
    .woocommerce-info::before { left: 16px; top: 17px; }
}
@media (max-width: 600px) {
    .woocommerce table.shop_table thead { display: none; }
    .woocommerce table.cart img { width: 54px; }
}

/* ═══════════════════════════════════════════════════════════════════
   STRONY PRZEDMIOTOWE (korepetycje: biologia, fizyka, chemia, matma, ang)
   System klas .sp-*  —  ładowany globalnie (ten plik jest enqueue'owany
   w functions.php), więc szablony nie zależą od dodatkowego pliku CSS.

   ⚠ Layout jest CELOWO inny niż na stronie głównej:
     • brak bordowego „łuku" pod wycinkiem PNG i brak pływających kafli
       ★★★★★ — zamiast tego karta portretowa 4:5 (działa też ze zwykłym,
       prostokątnym zdjęciem, a takie mają Marta / Szymon / Adam / Hania),
     • zamiast pigułek — hairline'y (cienkie linie) i numerowane kroki,
     • dokładnie DWIE ciemne sekcje na stronę (środek + domknięcie),
       żeby końcówka nie była ścianą bordo.
   ═══════════════════════════════════════════════════════════════════ */

@keyframes spGradFlow { 0% { background-position: 0% center; } 100% { background-position: 200% center; } }
@keyframes spPulse    { 0%,100% { opacity: .5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.35); } }

.sp-page {
    --ink:    #14161a;
    --body:   #3d4147;
    --muted:  #6d7178;
    --line:   #e8e4e5;
    --tint:   #f6f6f4;
    --accent: #A00037;
    background: #ffffff;
    color: var(--body);
}
.sp-page .sp-sec { position: relative; padding: 96px 40px; }
.sp-page .sp-in  { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; }
.sp-page img     { user-select: none; }

/* ── Typografia wspólna ── */
.sp-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.sp-eyebrow::before { content: ''; width: 26px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), rgba(160,0,55,0)); }
.sp-eyebrow.on-dark { color: #ffb3c8; }
.sp-eyebrow.on-dark::before { background: linear-gradient(90deg, #ffb3c8, rgba(255,179,200,0)); }

.sp-h2 { font-size: clamp(1.75rem, 3.1vw, 2.5rem); font-weight: 700; color: var(--ink); line-height: 1.18; letter-spacing: -.018em; margin: 0 0 16px; }
.sp-h2.on-dark { color: #ffffff; }
.sp-p  { font-size: 1.02rem; line-height: 1.78; color: var(--body); margin: 0 0 16px; max-width: 62ch; }
.sp-p:last-child { margin-bottom: 0; }
.sp-p strong { color: var(--ink); font-weight: 700; }
.sp-p.on-dark { color: rgba(255,255,255,.78); }
.sp-p.on-dark strong { color: #ffffff; }
.sp-p.big { font-size: 1.1rem; font-weight: 600; color: var(--ink); }
.sp-p.big.on-dark { color: #ffffff; font-weight: 400; }

.sp-grad   { background: linear-gradient(270deg, #2E0011 0%, #A00037 50%, #2E0011 100%); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: spGradFlow 8.5s linear infinite; }
.sp-grad-l { background: linear-gradient(270deg, #ffc2d6, #ffffff, #ffc2d6); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: spGradFlow 8.5s linear infinite; }

.sp-head { max-width: 660px; margin-bottom: 52px; }
.sp-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sp-head.center .sp-p { margin-left: auto; margin-right: auto; }

/* ── HERO ── */
.sp-hero { position: relative; overflow: hidden; padding: 78px 40px 84px; background: radial-gradient(ellipse at 88% -6%, rgba(160,0,55,.11) 0%, transparent 54%), #ffffff; }
.sp-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(20,22,26,.038) 1px, transparent 1px), linear-gradient(90deg, rgba(20,22,26,.038) 1px, transparent 1px);
    background-size: 68px 68px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 80%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 80%); }
.sp-hero-in { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.06fr .94fr; gap: 64px; align-items: center; }
.sp-h1 { font-size: clamp(2.2rem, 4.4vw, 3.55rem); font-weight: 700; color: var(--ink); line-height: 1.1; letter-spacing: -.024em; margin: 0 0 20px; }
.sp-lead { font-size: 1.12rem; line-height: 1.72; color: var(--body); max-width: 33em; margin: 0 0 32px; }
.sp-lead strong { color: var(--ink); font-weight: 700; }
.sp-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.sp-actions .btn-primary, .sp-actions .btn-secondary, .sp-actions .btn-white { padding: 14px 34px; }

/* pasek dowodów — hairline'y zamiast pigułek */
body .sp-page .sp-proof { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line) !important; padding-top: 24px !important; margin-top: 6px; }
.sp-proof > div { padding-right: 26px; margin-right: 26px; border-right: 1px solid var(--line); }
.sp-proof > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.sp-proof .n { display: block; font-size: 1.3rem; font-weight: 700; color: var(--ink); line-height: 1.12; }
.sp-proof .l { display: block; font-size: .8rem; color: var(--muted); margin-top: 5px; }

/* karta portretowa (działa i z fotką, i z wycinkiem PNG) */
.sp-portrait { position: relative; }
.sp-portrait-card { position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 4 / 5; background: linear-gradient(165deg, #2E0011 0%, #75002C 55%, #3a0016 100%); box-shadow: 0 34px 70px rgba(117,0,44,.26); }
.sp-portrait-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; pointer-events: none; }
.sp-portrait-card.cutout > img { object-fit: contain; object-position: bottom center; }
/* przycina ~12% (40px) dołu zdjęcia — zsuwa fotkę w dół, container overflow:hidden obcina spód */
.sp-portrait-card.crop-b > img { transform: translateY(40px); }
.sp-portrait-card::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,0) 44%, rgba(18,0,7,.74) 100%); pointer-events: none; }
.sp-nameplate { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(255,255,255,.13); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.3); border-radius: 16px; padding: 13px 16px; }
.sp-nameplate .who  { font-size: 1rem; font-weight: 700; color: #ffffff; line-height: 1.2; }
.sp-nameplate .role { font-size: .78rem; color: rgba(255,255,255,.75); margin-top: 3px; }
.sp-nameplate .live { display: inline-flex; align-items: center; gap: 7px; font-size: .74rem; font-weight: 600; color: #ffffff; white-space: nowrap; }
.sp-nameplate .live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #ff7ea6; box-shadow: 0 0 10px rgba(255,126,166,.95); animation: spPulse 2.6s ease-in-out infinite; }

/* znak wodny przedmiotu — każda strona ma swój motyw */
.sp-motif { position: absolute; z-index: 0; right: -34px; top: -26px; width: 232px; height: 232px; color: var(--accent); opacity: .14; pointer-events: none; }
.sp-motif svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.15; }

/* ── PASEK ZAPEWNIEŃ pod hero ── */
.sp-marks { background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 40px; }
.sp-marks-in { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 34px; }
.sp-marks span { display: inline-flex; align-items: center; gap: 9px; font-size: .9rem; font-weight: 600; color: #33373d; }
.sp-marks span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 7px rgba(160,0,55,.75); }
.sp-marks a { color: inherit; text-decoration: none; transition: color .2s ease; }
.sp-marks a:hover { color: var(--accent); }

/* ── 404 ── */
.sp-404-num { font-size: clamp(4.2rem, 15vw, 8rem); font-weight: 700; line-height: .95; margin-bottom: 6px; }
.sp-404-num.on-dark { color: #ffffff; }

/* ── NUMEROWANE KROKI / ZAKRES ── */
.sp-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.sp-steps.c3 { grid-template-columns: repeat(3, 1fr); }
.sp-step { background: #ffffff; padding: 34px 32px; transition: background .3s ease; }
.sp-step:hover { background: #fcfafb; }
.sp-step .no { display: block; font-size: .76rem; font-weight: 700; letter-spacing: .15em; color: var(--accent); margin-bottom: 14px; }
.sp-step h3 { font-size: 1.15rem; font-weight: 700; color: var(--ink); line-height: 1.3; margin: 0 0 9px; }
.sp-step p  { font-size: .96rem; line-height: 1.7; color: var(--body); margin: 0; }
.sp-step .sp-list { margin-top: 14px; }

/* li NIE jest flex: z <strong>tekst</strong> luzem tekstem w środku flex robił
   z każdego fragmentu osobny element i wpychał .gap między pogrubienie a resztę
   zdania — kropka jako position:absolute + padding-left naprawia to raz na zawsze */
.sp-list { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; }
.sp-list li { position: relative; padding-left: 17px; font-size: .94rem; line-height: 1.6; color: var(--body); }
.sp-list li::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px rgba(160,0,55,.6); }
.sp-list li strong { color: var(--ink); font-weight: 700; }
.sp-list.lg li { font-size: 1rem; line-height: 1.62; }
.sp-list.on-dark li { color: rgba(255,255,255,.86); }
.sp-list.on-dark li strong { color: #ffffff; }
.sp-list.on-dark li::before { background: #ffffff; box-shadow: 0 0 10px rgba(255,255,255,.95); }

/* ── GALERIA NOTATEK obok tekstu: duże wideo na górze, pod nim dwa zdjęcia obok siebie ── */
.sp-notes-media { display: flex; flex-direction: column; gap: 18px; }
.sp-notes-media .sp-frame { margin: 0; }
.sp-notes-media .sp-frame > video { display: block; width: 100%; aspect-ratio: 1106 / 620; object-fit: contain; background: #fff; border-radius: 11px; }
.sp-notes-media .sp-frame video::-webkit-media-controls { display: none !important; }
.sp-note-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
/* notatki (zrzuty ekranu) są panoramiczne — "contain" pokazuje całość bez ucinania tytułów */
.sp-note-imgs .sp-frame > img { display: block; width: 100%; aspect-ratio: 1024 / 573; object-fit: contain; background: #fff; border-radius: 11px; }

/* ── GALERIA MATERIAŁÓW ── */
.sp-tinted { background: var(--tint); }
.sp-page .sp-in.narrow { max-width: 780px; }
.sp-mat-grid { display: grid; gap: 18px; }
.sp-mat-grid.c3 { grid-template-columns: repeat(3, 1fr); }
.sp-mat-grid.c2 { grid-template-columns: repeat(2, 1fr); }
.sp-mat-grid.c1 { grid-template-columns: 1fr; max-width: 840px; margin: 0 auto; }
.sp-frame { background: #ffffff; border: 1px solid var(--line); border-radius: 18px; padding: 12px; box-shadow: 0 10px 30px rgba(20,22,26,.06); transition: transform .35s cubic-bezier(.25,1,.5,1), box-shadow .35s ease; }
.sp-frame:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(117,0,44,.14); }
.sp-frame > img, .sp-frame > video { width: 100%; display: block; border-radius: 11px; background: #000000; }
.sp-frame .cap { display: block; font-size: .82rem; color: var(--muted); padding: 12px 6px 4px; }

/* ── SEKCJA CIEMNA (split) ── */
.sp-dark { position: relative; overflow: hidden; background: linear-gradient(160deg, #1e000d 0%, #43001a 55%, #1e000d 100%); }
.sp-dark::before { content: ''; position: absolute; top: -18%; left: 62%; width: 820px; height: 820px; transform: translateX(-50%); background: radial-gradient(circle, rgba(160,0,55,.28) 0%, transparent 66%); pointer-events: none; }
.sp-split { display: grid; grid-template-columns: 1.02fr .98fr; gap: 64px; align-items: center; }
.sp-split.rev .sp-split-media { order: -1; }
.sp-shot { border-radius: 20px; overflow: hidden; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 30px 70px rgba(0,0,0,.42); background: rgba(255,255,255,.05); }
.sp-shot > img { width: 100%; display: block; }
.sp-shot.pad { padding: 16px; }
.sp-shot.pad > img { border-radius: 12px; }
.sp-shot .cap, .sp-split-media > .cap { display: block; font-size: .8rem; color: rgba(255,255,255,.6); padding: 12px 4px 2px; }

/* ── O KOREPETYTORZE ── */
.sp-bio-in { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: center; }
.sp-bio-in .sp-portrait-card { aspect-ratio: 3 / 4; }
/* selektor "body .sp-page .sp-facts" (wysoka specyficzność) + !important:
   globalne reguły motywu na p/div potrafiły zerować ten odstęp mimo !important
   na samej klasie — podbijamy specyficzność, żeby na pewno wygrać w kaskadzie */
body .sp-page .sp-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line) !important; border-bottom: 1px solid var(--line) !important; margin: 32px 0 !important; }
body .sp-page .sp-fact { padding: 24px 20px 24px 0 !important; border-right: 1px solid var(--line); }
.sp-fact:last-child { border-right: 0; }
.sp-fact .n { font-size: 1.32rem; font-weight: 700; color: var(--ink); line-height: 1.15; }
.sp-fact .l { font-size: .79rem; color: var(--muted); margin-top: 5px; line-height: 1.4; }

/* ── WIDEO ── */
.sp-video { max-width: 460px; margin: 0 auto; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(20,22,26,.16); background: #000000; }
.sp-video video { width: 100%; min-height: 280px; display: block; }
.sp-vidwrap { max-width: 520px; margin: 0 auto; }
.sp-vidwrap .sp-video { max-width: 100%; }
.sp-vidwrap .cap { display: block; text-align: center; font-size: .85rem; color: var(--muted); margin-top: 14px; }

/* ── DOMKNIĘCIE: licznik + CTA w jednej ciemnej sekcji ── */
.sp-close { position: relative; overflow: hidden; text-align: center; background: linear-gradient(160deg, #16000a 0%, #4a001d 52%, #16000a 100%); }
.sp-close::before { content: ''; position: absolute; top: -15%; left: 50%; transform: translateX(-50%); width: 960px; height: 700px; background: radial-gradient(circle, rgba(117,0,44,.45) 0%, transparent 66%); pointer-events: none; }
.sp-close .sp-eyebrow { justify-content: center; }
.sp-close h2 { font-size: clamp(1.85rem, 3.6vw, 2.7rem); font-weight: 700; color: #ffffff; line-height: 1.16; letter-spacing: -.018em; margin: 0 auto 14px; max-width: 18ch; }
.sp-close p { color: rgba(255,255,255,.76); font-size: 1.05rem; line-height: 1.7; max-width: 56ch; margin: 0 auto 36px; }
.sp-close .btn-white { padding: 14px 36px; }
.sp-close .fine { font-size: .85rem; color: rgba(255,255,255,.5); margin: 18px auto 0; }
.sp-count { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 0 auto 36px; }
.sp-cell { min-width: 112px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-radius: 18px; padding: 20px 14px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sp-cell .v { font-size: clamp(2rem, 5.4vw, 2.9rem); font-weight: 700; color: #ffffff; line-height: 1; font-variant-numeric: tabular-nums; }
.sp-cell .k { margin-top: 8px; font-size: .7rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: rgba(255,255,255,.55); }

/* ── odsłanianie na scroll ── */
.sp-up { opacity: 0; transform: translateY(24px); transition: opacity .75s ease, transform .75s cubic-bezier(.25,1,.5,1); }
.sp-up.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .sp-up { opacity: 1; transform: none; transition: none; }
    .sp-grad, .sp-grad-l, .sp-nameplate .live::before { animation: none; }
}
/* zabezpieczenie mobilne: gdyby IntersectionObserver nie odpalił się (np. plugin
   optymalizujący JS/cache na telefonie), treść — w tym zdjęcia korepetytorów —
   ma być i tak od razu widoczna, a nie zostać na zawsze przy opacity:0 */
@media (max-width: 1024px) {
    .sp-up { opacity: 1 !important; transform: none !important; }
}

/* ── RESPONSYWNOŚĆ ── */
@media (max-width: 1024px) {
    .sp-hero-in, .sp-split, .sp-bio-in { grid-template-columns: 1fr; gap: 46px; }
    .sp-split.rev .sp-split-media { order: 0; }
    /* bug: w gridzie z align-items:center, "margin:0 auto" bez jawnej szerokości
       potrafił rozjechać się do width/height:0 (zdjęcie znikało na telefonie) */
    .sp-portrait { width: 100%; max-width: 430px; margin: 0 auto; }
    .sp-mat-grid.c3 { grid-template-columns: repeat(2, 1fr); }
    .sp-steps.c3 { grid-template-columns: repeat(2, 1fr); }
    .sp-motif { width: 180px; height: 180px; }
}
@media (max-width: 768px) {
    .sp-page .sp-sec { padding: 64px 20px; }
    .sp-hero { padding: 52px 20px 58px; }
    .sp-marks { padding: 18px 20px; }
    .sp-marks-in { justify-content: flex-start; gap: 10px 20px; }
    .sp-steps, .sp-steps.c3 { grid-template-columns: 1fr; }
    .sp-step { padding: 28px 24px; }
    .sp-mat-grid.c3, .sp-mat-grid.c2 { grid-template-columns: 1fr; }
    .sp-note-imgs { grid-template-columns: 1fr; }
    body .sp-page .sp-facts { grid-template-columns: 1fr 1fr; }
    .sp-fact:nth-child(2) { border-right: 0; }
    .sp-proof > div { padding-right: 18px; margin-right: 18px; }
    .sp-cell { min-width: calc(50% - 7px); flex: 1; }
    .sp-actions { gap: 10px; }
    .sp-actions .btn-primary, .sp-actions .btn-secondary, .sp-actions .btn-white { flex: 1 1 100%; text-align: center; }
    .sp-motif { width: 148px; height: 148px; right: -18px; top: -14px; }
    .sp-head { margin-bottom: 36px; }
}
@media (max-width: 520px) {
    /* plakietka na karcie portretowej: „Wolne terminy" nie mieści się obok imienia */
    .sp-nameplate { flex-direction: column; align-items: flex-start; gap: 9px; }
    .sp-proof > div { padding-right: 14px; margin-right: 14px; }
    .sp-proof .n { font-size: 1.15rem; }
}

/* ============================================================
   FORMULARZ ZAPISU NA KOREPETYCJE  (template-zapisy.php, prefiks .zf-)
   Jeden krok = jedno pytanie. Pasek postępu u góry, strzałki na dole.
   ============================================================ */

@keyframes zfInR   { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes zfInL   { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
@keyframes zfPop   { 0% { transform: scale(.55); opacity: 0; } 60% { transform: scale(1.16); opacity: 1; } 100% { transform: scale(1); } }
@keyframes zfSpin  { to { transform: rotate(360deg); } }

/* ciemniejszy szary niż globalne --muted (#6d7178) — na białej karcie tamten
   zlewał się z tłem; #55595f daje kontrast 7:1 zamiast 4.9:1 */
.zf-page { min-height: 100vh; --zf-muted: #55595f; }
.zf-wrap {
    position: relative;
    overflow: hidden;
    padding: 56px 40px 80px;
    background: radial-gradient(ellipse at 82% -10%, rgba(160,0,55,.10) 0%, transparent 56%), #ffffff;
}
.zf-wrap::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(20,22,26,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(20,22,26,.035) 1px, transparent 1px);
    background-size: 68px 68px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}
.zf-shell { position: relative; z-index: 1; max-width: 840px; margin: 0 auto; }

/* ── PASEK POSTĘPU ── */
.zf-top { margin-bottom: 18px; }
.zf-top-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.zf-kicker { font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.zf-count  { font-size: .8rem; font-weight: 600; color: var(--zf-muted); font-variant-numeric: tabular-nums; }
.zf-bar { position: relative; height: 6px; border-radius: 50px; background: #ececee; overflow: hidden; }
.zf-bar-fill {
    display: block; height: 100%; width: 10%; border-radius: 50px;
    background: linear-gradient(270deg, #2E0011 0%, #A00037 50%, #2E0011 100%);
    background-size: 200% auto;
    animation: spGradFlow 8.5s linear infinite;
    box-shadow: 0 0 12px rgba(160,0,55,.45);
    transition: width .45s cubic-bezier(.25,1,.5,1);
}

/* pigułka „Przedmiot: Biologia · zmień" (wejście ze strony przedmiotu) */
.zf-chip {
    display: inline-flex; align-items: center; gap: 9px; margin-top: 14px;
    padding: 7px 15px; border-radius: 50px; background: var(--tint);
    border: 1px solid var(--line); font-size: .85rem; color: var(--body);
}
.zf-chip strong { color: var(--ink); font-weight: 700; }
.zf-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(160,0,55,.75); }
.zf-chip-edit {
    background: none; border: 0; padding: 0 0 0 4px; cursor: pointer;
    font: inherit; font-weight: 600; color: var(--accent); text-decoration: underline;
    text-underline-offset: 3px;
}
.zf-chip-edit:hover { color: #75002C; }

/* ── KARTA ── */
.zf-card, .zf-done {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 44px 44px 28px;
    box-shadow: 0 22px 60px rgba(20,22,26,.09);
}
.zf-done { padding: 52px 44px 44px; text-align: center; animation: zfInR .5s cubic-bezier(.25,1,.5,1) both; }

/* stała wysokość obszaru pytania — karta nie „skacze" między krokami.
   Kroki z jednym polem tekstowym mają własną, niższą wartość: przy 292px
   pod inputem zostawała duża pusta przestrzeń. */
.zf-step { min-height: 300px; }
.zf-step--text { min-height: 188px; }
.zf-step.zf-in-r { animation: zfInR .42s cubic-bezier(.25,1,.5,1) both; }
.zf-step.zf-in-l { animation: zfInL .42s cubic-bezier(.25,1,.5,1) both; }

.zf-page .zf-q {
    font-size: clamp(1.55rem, 3.1vw, 2.15rem);
    font-weight: 700; color: var(--ink); line-height: 1.2;
    letter-spacing: -.02em; margin: 0 0 10px;
}
.zf-page .zf-hint { font-size: 1rem; line-height: 1.62; color: var(--zf-muted); margin: 0 0 26px; max-width: 46ch; }

/* ── OPCJE WYBORU ── */
.zf-opts { display: grid; gap: 12px; }
.zf-opts--2 { grid-template-columns: repeat(2, 1fr); }
.zf-opts--3 { grid-template-columns: repeat(3, 1fr); }
.zf-opt {
    display: flex; align-items: center; gap: 13px; width: 100%;
    padding: 18px 18px; text-align: left; cursor: pointer;
    background: #ffffff; border: 1.5px solid var(--line); border-radius: 16px;
    font-family: inherit; color: var(--ink);
    transition: border-color .2s ease, background .2s ease, transform .25s cubic-bezier(.25,1,.5,1), box-shadow .25s ease;
}
.zf-opt:hover { border-color: rgba(160,0,55,.45); background: #fdfafb; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(117,0,44,.10); }
.zf-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.zf-opt.is-sel { border-color: var(--accent); background: #fdf4f7; box-shadow: 0 10px 26px rgba(117,0,44,.14); }

.zf-opt-mark {
    flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
    border: 1.5px solid #d6d2d4; position: relative; transition: all .2s ease;
}
.zf-opt.is-sel .zf-opt-mark { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 10px rgba(160,0,55,.5); }
.zf-opt-mark::after {
    content: ''; position: absolute; left: 6px; top: 9px; width: 8px; height: 4px;
    border-left: 2px solid #fff; border-bottom: 2px solid #fff;
    transform: rotate(-45deg) scale(0); opacity: 0; transition: transform .22s cubic-bezier(.25,1.6,.5,1), opacity .18s ease;
}
.zf-opt.is-sel .zf-opt-mark::after { transform: rotate(-45deg) scale(1); opacity: 1; }

.zf-opt-txt  { display: block; min-width: 0; }
.zf-opt-name { display: block; font-size: 1rem; font-weight: 700; line-height: 1.25; }
.zf-opt-desc { display: block; font-size: .84rem; color: var(--zf-muted); margin-top: 4px; line-height: 1.4; }

/* ── POLA TEKSTOWE ── */
.zf-reveal { margin-top: 18px; animation: zfInR .3s ease both; }
.zf-label { display: block; font-size: .86rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.zf-page .zf-input {
    width: 100%; font-family: inherit; color: var(--ink);
    background: #ffffff; border: 1.5px solid var(--line); border-radius: 14px;
    padding: 15px 18px; font-size: 1rem;
    transition: border-color .2s ease, box-shadow .2s ease;
}
/* pole na imię/telefon/e-mail: krótka odpowiedź, więc i pole ma być krótkie —
   pas na całą szerokość karty przytłaczał pytanie */
.zf-page .zf-input--big { font-size: 1.1rem; font-weight: 600; padding: 15px 18px; border-radius: 14px; max-width: 420px; }
/* autouzupełnianie w Chrome wstawia niebieskie tło — nadpisujemy je cieniem */
.zf-page .zf-input:-webkit-autofill,
.zf-page .zf-input:-webkit-autofill:hover,
.zf-page .zf-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ink);
    -webkit-box-shadow: 0 0 0 40px #ffffff inset;
    box-shadow: 0 0 0 40px #ffffff inset;
}
.zf-page .zf-input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 40px #ffffff inset, 0 0 0 4px rgba(160,0,55,.12); }
.zf-page .zf-input::placeholder { color: #b6b2b4; font-weight: 400; }
.zf-page .zf-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(160,0,55,.12); }
.zf-page .zf-input.has-err { border-color: #c62348; box-shadow: 0 0 0 4px rgba(198,35,72,.10); }
.zf-err { font-size: .85rem; color: #c62348; margin: 10px 2px 0; }

/* honeypot — poza ekranem, niewidoczny dla użytkownika i czytnika ekranu */
.zf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── NAWIGACJA (strzałki na dole) ── */
.zf-nav {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line);
}
.zf-nav-right { display: flex; align-items: center; gap: 14px; }
.zf-enter { font-size: .78rem; color: var(--zf-muted); }
.zf-enter kbd {
    font-family: inherit; font-size: .74rem; font-weight: 600;
    background: var(--tint); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; color: var(--body);
}
.zf-back {
    flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #ffffff; border: 1.5px solid var(--line); cursor: pointer;
    transition: border-color .2s ease, color .2s ease, transform .25s ease, opacity .2s ease;
    color: var(--ink);
}
.zf-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.zf-back:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); transform: translateX(-3px); }
.zf-back:disabled { opacity: .3; cursor: default; }

.zf-page .zf-next {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 30px; border-radius: 50px; border: none; cursor: pointer;
    font-family: inherit; font-size: 1rem; font-weight: 600; color: #ffffff;
    background: linear-gradient(270deg, #100005 0%, #75002C 50%, #100005 100%);
    background-size: 200% auto;
    animation: gradientFlowBtn 8.5s linear infinite;
    box-shadow: 0 10px 20px rgba(117,0,44,.3);
    transition: transform .3s ease, box-shadow .3s ease, opacity .2s ease;
}
.zf-next svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.zf-page .zf-next:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 15px 25px rgba(117,0,44,.4); }
.zf-page .zf-next:disabled { opacity: .34; cursor: default; box-shadow: none; animation: none; }
.zf-next.is-send svg { display: none; }
.zf-next.is-busy { pointer-events: none; opacity: .75; }
.zf-next.is-busy svg { display: inline-block; stroke-dasharray: 8 40; animation: zfSpin .9s linear infinite; }

.zf-formerr {
    margin: 16px 0 0; padding: 13px 16px; border-radius: 12px;
    background: #fdf1f4; border: 1px solid rgba(198,35,72,.28);
    font-size: .9rem; color: #8f1836;
}

/* ── EKRAN PODZIĘKOWANIA ── */
.zf-done-mark {
    width: 74px; height: 74px; margin: 0 auto 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(165deg, #2E0011 0%, #A00037 60%, #3a0016 100%);
    box-shadow: 0 16px 34px rgba(117,0,44,.32);
    animation: zfPop .55s cubic-bezier(.25,1.4,.5,1) both;
}
.zf-done-mark svg { width: 34px; height: 34px; fill: none; stroke: #ffffff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.zf-page .zf-done-lead { margin: 0 auto 26px; max-width: 40ch; }
.zf-page .zf-done-list { max-width: 380px; margin: 0 auto 30px; text-align: left; }
.zf-done-btn { display: inline-block; }

/* ── PASEK ZAUFANIA ── */
.zf-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin: 22px 0 0; }
.zf-trust span { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--zf-muted); }
.zf-trust span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 7px rgba(160,0,55,.7); }

/* ── RESPONSYWNOŚĆ ── */
@media (min-width: 1100px) {         /* komputer — karta i typografia o stopień większe */
    .zf-card { padding: 50px 50px 30px; }
    .zf-page .zf-q { font-size: 2.3rem; }
    .zf-page .zf-hint { font-size: 1.06rem; }
    .zf-opt { padding: 20px 20px; }
    .zf-opt-name { font-size: 1.07rem; }
    .zf-opt-desc { font-size: .87rem; }
    .zf-page .zf-input--big { font-size: 1.16rem; padding: 16px 19px; max-width: 440px; }
    .zf-page .zf-next { padding: 15px 34px; font-size: 1.04rem; }
}
@media (max-width: 900px) {          /* tablet */
    .zf-wrap { padding: 44px 24px 64px; }
    .zf-card { padding: 36px 32px 24px; }
    .zf-opts--3 { grid-template-columns: repeat(2, 1fr); }
    .zf-step { min-height: 268px; }
    .zf-enter { display: none; }
}
@media (max-width: 600px) {          /* telefon */
    .zf-wrap { padding: 24px 14px 48px; }
    .zf-card, .zf-done { padding: 26px 20px 20px; border-radius: 22px; box-shadow: 0 14px 36px rgba(20,22,26,.08); }
    .zf-done { padding: 36px 20px 30px; }
    .zf-opts, .zf-opts--2, .zf-opts--3 { grid-template-columns: 1fr; gap: 10px; }
    .zf-opt { padding: 16px 16px; }
    .zf-step { min-height: 0; }
    .zf-page .zf-hint { margin-bottom: 20px; }
    .zf-nav { margin-top: 22px; padding-top: 18px; }
    /* na telefonie CTA ma być duże i dosunięte w prawo obok strzałki wstecz */
    .zf-nav-right { flex: 1; justify-content: flex-end; }
    .zf-page .zf-next { flex: 1; justify-content: center; padding: 15px 20px; }
    .zf-trust { gap: 8px 16px; }
    .zf-trust span { font-size: .78rem; }
}
@media (prefers-reduced-motion: reduce) {
    .zf-step.zf-in-r, .zf-step.zf-in-l, .zf-done, .zf-done-mark, .zf-reveal { animation: none; }
    .zf-bar-fill, .zf-page .zf-next { animation: none; }
    .zf-opt:hover, .zf-page .zf-next:hover:not(:disabled) { transform: none; }
}
