/* =====================================================
   Apex Peptides Lab
   style.css
   ===================================================== */

:root{
    --bg:#0b0d10;
    --bg2:#12161d;
    --card:#171c24;
    --text:#f5f5f5;
    --muted:#b8bcc5;
    --accent:#ff8a00;
    --accent2:#ffb347;
    --border:rgba(255,255,255,.08);
    --radius:18px;
    --shadow:0 20px 40px rgba(0,0,0,.35);
    --container:1240px;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:"Montserrat",sans-serif;
    background:var(--bg);
    color:var(--text);
    line-height:1.6;
}

img{
    display:block;
    max-width:100%;
}

a{
    text-decoration:none;
    color:inherit;
}

button{
    font:inherit;
    cursor:pointer;
    border:none;
}

.container{
    width:min(92%,var(--container));
    margin:auto;
}

/* ================= HEADER ================= */

.header{
    position:sticky;
    top:0;
    z-index:999;
    background:rgba(10,10,10,.75);
    backdrop-filter:blur(16px);
    border-bottom:1px solid var(--border);
}

.header .container{
    display:flex;
    justify-content:space-between;
    align-items:center;
    min-height:84px;
}

.logo img{
    height:54px;
    width:auto;
}

.nav ul{
    display:flex;
    gap:36px;
    list-style:none;
}

.nav a{
    color:#fff;
    transition:.25s;
    font-weight:500;
}

.nav a:hover{
    color:var(--accent);
}

/* ================= BUTTONS ================= */

.btn-primary,
.btn-outline,
.product-card button{
    display:inline-flex;
    justify-content:center;
    align-items:center;
    padding:14px 26px;
    border-radius:999px;
    transition:.3s;
    font-weight:700;
}

.btn-primary,
.product-card button{
    background:linear-gradient(135deg,var(--accent),var(--accent2));
    color:#111;
}

.btn-primary:hover,
.product-card button:hover{
    transform:translateY(-2px);
}

.btn-outline{
    border:2px solid var(--accent);
    color:var(--accent);
}

.btn-outline:hover{
    background:var(--accent);
    color:#111;
}

/* ================= HERO ================= */

.hero{
    position:relative;
    padding:0;
}

.hero-banner{
    width:100%;
    max-width:1800px;
    margin:0 auto;
    overflow:hidden;
    background:var(--bg);
}

.hero-banner img{
    width:100%;
    height:auto;
    display:block;
}

.hero-cta{
    display:flex;
    justify-content:center;
    gap:18px;
    flex-wrap:wrap;
    padding:36px 0;
}

.eyebrow{
    display:inline-block;
    letter-spacing:4px;
    color:var(--accent);
    margin-bottom:18px;
    font-weight:700;
}

/* ================= BANER PODSTRON ================= */

.page-banner{
    width:100%;
    max-width:1400px;
    margin:0 auto;
    overflow:hidden;
    background:var(--bg);
}

.page-banner img{
    width:100%;
    height:220px;
    object-fit:cover;
    object-position:center center;
    display:block;
}

.page-back-wrap{
    padding:26px 0 0;
}

.page-back{
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:var(--muted);
    font-weight:600;
    transition:.25s;
}

.page-back:hover{
    color:var(--accent);
}

/* ================= AKCENT BOCZNY (grafiki pionowe) ================= */

.side-accent{
    position:fixed;
    top:50%;
    right:0;
    transform:translateY(-50%);
    width:130px;
    border-radius:var(--radius) 0 0 var(--radius);
    overflow:hidden;
    box-shadow:var(--shadow);
    opacity:.4;
    cursor:pointer;
    z-index:1;
    transition:opacity .3s, transform .3s;
}

.side-accent:hover{
    opacity:1;
    transform:translateY(-50%) scale(1.04);
}

.side-accent img{
    width:100%;
    display:block;
}

.side-accent-label{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:6px;
    background:rgba(11,13,16,.72);
    color:#fff;
    font-weight:700;
    font-size:.85rem;
    text-align:center;
    opacity:0;
    transition:opacity .3s;
}

.side-accent-label svg{
    width:20px;
    height:20px;
}

.side-accent:hover .side-accent-label{
    opacity:1;
}

/* ================= SECTIONS ================= */

section{
    padding:110px 0;
}

/* Hity sprzedażowe siedzi tuż pod przyciskami hero — mniejszy odstęp od góry */
#produkty{
    padding-top:20px;
}

.section-header{
    text-align:center;
    margin-bottom:70px;
}

.section-header span{
    color:var(--accent);
    letter-spacing:3px;
    font-weight:700;
}

.section-header h2{
    margin-top:12px;
    font-size:44px;
}

/* ================= PRODUCTS ================= */

.products-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:30px;
}

/* Hity sprzedażowe — karty ok. 90% obecnej wielkości (powiększone o 20% objętościowo względem v3), wyśrodkowane */
#featured-products-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    max-width:1019px;
    margin:0 auto;
}

.product-card{
    background:var(--card);
    border-radius:var(--radius);
    overflow:hidden;
    border:1px solid var(--border);
    box-shadow:var(--shadow);
    transition:.35s;
    display:flex;
    flex-direction:column;
}

/* Podnoszenie karty pod kursorem zdjete na prosbe klienta (09.09).
   Na telefonie stan "hover" zostaje po dotknieciu i karta potrafila
   wisiec przesunieta do momentu dotkniecia czegos innego. */

.product-card-media{
    position:relative;
    display:block;
    width:100%;
    padding-bottom:100%; /* wymusza kwadrat niezależnie od zawartości - działa zawsze, w każdej przeglądarce */
    background:var(--bg);
    overflow:hidden;
    outline:2px solid var(--accent);
}

.product-card-media img{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    padding:22px;
    box-sizing:border-box;
    object-fit:contain;
}

.product-card h3{
    padding:24px 24px 8px;
    font-size:1.4rem;
}

.product-card p{
    padding:0 24px;
    color:var(--muted);
    flex:1;
}

.product-card strong{
    display:block;
    padding:22px 24px 10px;
    color:var(--accent);
    font-size:1.5rem;
}

.product-card button{
    margin:0 24px 24px;
}

.variant-select{
    margin:0 24px;
    padding:10px 14px;
    background:var(--bg);
    color:var(--text);
    border:1px solid var(--border);
    border-radius:10px;
    font:inherit;
    font-weight:600;
    cursor:pointer;
}

.variant-select:focus{
    outline:none;
    border-color:var(--accent);
}

.products-more{
    text-align:center;
    margin-top:50px;
}

/* Podstrona z pełnym katalogiem — nagłówek bliżej góry (mniej pustej przestrzeni) */
.catalog-products{
    padding-top:30px;
}

.catalog-products .section-header{
    margin-bottom:40px;
}

/* Katalog: kafelki obok siebie, gęsto — z myślą o rosnącej liczbie
   produktów. Karta wygląda tak samo jak w „Top 3", tylko jest mniejsza
   (pomniejszenie w woocommerce.css, blok „KATALOG — KAFELKI"). */
#all-products-grid{
    grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
    gap:18px;
}

/* ================= ANIMACJA WEJŚCIA — HITY SPRZEDAŻOWE (3D TILT) =================
   Karty "wychylają się" z przestrzeni 3D w momencie, gdy wjeżdżają w pole
   widzenia podczas scrollowania — nie przy starcie strony (żeby nie zależeć
   od tego, czy sekcja mieści się w pierwszym ekranie). */

#featured-products-grid{
    perspective:1400px;
}

/* Karta jest widoczna zawsze. Stan poczatkowy animacji wlacza dopiero
   app.js klasa apex-animacje na <html> — i tylko na szerokim ekranie
   z kursorem. Bez tego zadna tresc nie zalezy od JavaScriptu.
   will-change celowo usuniete: staly kontekst kompozycji na wysokich
   elementach gubil sie w Safari na iOS (pusta tresc do pierwszego scrolla). */

html.apex-animacje #featured-products-grid .product-card{
    opacity:0;
    transform:perspective(1400px) rotateX(35deg) translateY(50px) scale(.92);
    transform-origin:center bottom;
    transition:opacity .8s cubic-bezier(.19,1,.22,1), transform .8s cubic-bezier(.19,1,.22,1);
}

html.apex-animacje #featured-products-grid .product-card.tilt-visible{
    opacity:1;
    transform:perspective(1400px) rotateX(0) translateY(0) scale(1);
}

html.apex-animacje #featured-products-grid .product-card:nth-child(1){ transition-delay:0s; }
html.apex-animacje #featured-products-grid .product-card:nth-child(2){ transition-delay:.12s; }
html.apex-animacje #featured-products-grid .product-card:nth-child(3){ transition-delay:.24s; }

/* Delikatny 3D tilt podążający za kursorem (desktop) — dokłada się do powyższego przez inline transform z JS */
html.apex-animacje #featured-products-grid .product-card.tilt-visible:hover{
    transition:transform .15s ease-out;
}

@media (prefers-reduced-motion: reduce){

    #featured-products-grid .product-card{
        opacity:1;
        transform:none;
        transition:none;
    }

}

/* ================= SIMPLE CONTENT ================= */

#jakosc,
#faq,
#kontakt{
    background:var(--bg2);
}

.jakosc-grid{
    display:grid;
    grid-template-columns:1.1fr 1fr;
    gap:60px;
    align-items:center;
}

.jakosc-banner{
    width:100%;
    border-radius:var(--radius);
    box-shadow:var(--shadow);
}

#jakosc h2,
#faq h2,
#kontakt h2{
    margin-bottom:24px;
    font-size:2.2rem;
}

details{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:14px;
    padding:18px 20px;
    margin-bottom:18px;
}

summary{
    cursor:pointer;
    font-weight:700;
}

details p{
    margin-top:14px;
    color:var(--muted);
}

/* ================= FOOTER ================= */

.footer{
    padding:60px 0 30px;
    border-top:1px solid var(--border);
    color:var(--muted);
}

.footer-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:36px;
    padding-bottom:40px;
}

.footer-col h4{
    color:var(--text);
    font-size:.95rem;
    letter-spacing:.5px;
    margin-bottom:16px;
}

.footer-col ul{
    list-style:none;
    display:flex;
    flex-direction:column;
    gap:10px;
    font-size:.9rem;
}

.footer-col a{
    color:var(--muted);
    transition:.2s;
}

.footer-col a:hover{
    color:var(--accent);
}

.footer-col li{
    line-height:1.5;
}

.footer-disclaimer{
    border-top:1px solid var(--border);
    padding-top:24px;
    font-size:.8rem;
    line-height:1.6;
    max-width:900px;
}

.footer-copy{
    margin-top:14px;
    font-size:.85rem;
}

/* ================= BANER I PANEL COOKIES ================= */

.cookie-banner{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:1200;
    background:var(--card);
    border-top:1px solid var(--border);
    box-shadow:0 -20px 40px rgba(0,0,0,.4);
    padding:22px 24px;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    transform:translateY(120%);
    transition:transform .4s ease;
}

.cookie-banner.visible{
    transform:translateY(0);
}

.cookie-banner-text{
    max-width:640px;
}

.cookie-banner-text strong{
    display:block;
    margin-bottom:6px;
}

.cookie-banner-text p{
    color:var(--muted);
    font-size:.88rem;
    line-height:1.5;
}

.cookie-banner-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
}

.cookie-banner-actions button{
    white-space:nowrap;
}

.cookie-panel-overlay{
    position:fixed;
    inset:0;
    z-index:1300;
    background:rgba(0,0,0,.6);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    opacity:0;
    pointer-events:none;
    transition:opacity .3s ease;
}

.cookie-panel-overlay.visible{
    opacity:1;
    pointer-events:auto;
}

.cookie-panel{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    padding:34px;
    width:100%;
    max-width:560px;
    max-height:86vh;
    overflow-y:auto;
}

.cookie-panel h3{
    margin-bottom:22px;
    font-size:1.4rem;
}

.cookie-category{
    padding:16px 0;
    border-top:1px solid var(--border);
}

.cookie-category:first-of-type{
    border-top:none;
}

.cookie-category-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:8px;
}

.cookie-category p{
    color:var(--muted);
    font-size:.85rem;
    line-height:1.5;
}

.cookie-toggle{
    position:relative;
    display:inline-block;
    width:44px;
    height:24px;
    flex-shrink:0;
}

.cookie-toggle input{
    opacity:0;
    width:0;
    height:0;
}

.cookie-toggle span{
    position:absolute;
    inset:0;
    background:var(--border);
    border-radius:999px;
    transition:.2s;
    cursor:pointer;
}

.cookie-toggle span::before{
    content:"";
    position:absolute;
    width:18px;
    height:18px;
    left:3px;
    top:3px;
    background:#fff;
    border-radius:50%;
    transition:.2s;
}

.cookie-toggle input:checked + span{
    background:var(--accent);
}

.cookie-toggle input:checked + span::before{
    transform:translateX(20px);
}

.cookie-toggle-disabled span{
    opacity:.6;
    cursor:not-allowed;
}

.cookie-panel-actions{
    display:flex;
    justify-content:flex-end;
    gap:12px;
    margin-top:24px;
}

/* ================= ANIMACJE / EFEKT HEADERA ================= */

/* Klasa .hidden (opacity: 0 na sekcjach) zostala usunieta razem
   z obserwatorem w app.js — patrz komentarz tam. Tresc strony nie
   zaczyna zycia jako niewidoczna. */

.header-scrolled{
    background:rgba(10,10,10,.92);
}

/* ================= FORMULARZE (LOGOWANIE / REJESTRACJA / CHECKOUT) ================= */

.auth-section{
    padding-top:70px;
}

.auth-container{
    display:flex;
    justify-content:center;
}

.auth-card{
    width:100%;
    max-width:460px;
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    padding:44px;
}

.auth-header{
    margin-bottom:34px;
    text-align:left;
}

.auth-header h2{
    font-size:32px;
}

.btn-google{
    width:100%;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    padding:14px 20px;
    border-radius:999px;
    background:#fff;
    color:#1f1f1f;
    font-weight:700;
    transition:.25s;
}

.btn-google:hover{
    transform:translateY(-2px);
}

.auth-divider{
    display:flex;
    align-items:center;
    gap:14px;
    margin:26px 0;
    color:var(--muted);
    font-size:.9rem;
}

.auth-divider::before,
.auth-divider::after{
    content:"";
    flex:1;
    height:1px;
    background:var(--border);
}

.auth-form{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.auth-form label{
    display:flex;
    flex-direction:column;
    gap:8px;
    font-size:.9rem;
    color:var(--muted);
    font-weight:600;
}

.auth-form input{
    background:var(--bg);
    border:1px solid var(--border);
    border-radius:12px;
    padding:14px 16px;
    color:var(--text);
    font:inherit;
}

.auth-form input:focus{
    outline:none;
    border-color:var(--accent);
}

.auth-submit{
    width:100%;
    margin-top:6px;
    border:none;
}

.auth-switch{
    text-align:center;
    margin-top:24px;
    color:var(--muted);
    font-size:.95rem;
}

.auth-switch a{
    color:var(--accent);
    font-weight:700;
}

/* ================= KOSZYK ================= */

.cart-section{
    padding-top:70px;
}

.cart-empty{
    display:none;
    text-align:center;
    padding:60px 0;
    color:var(--muted);
}

.cart-empty p{
    margin-bottom:22px;
    font-size:1.1rem;
}

.cart-layout{
    display:grid;
    grid-template-columns:1fr 340px;
    gap:40px;
    align-items:start;
}

.cart-items{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.cart-row{
    display:grid;
    grid-template-columns:70px 1fr auto auto auto;
    align-items:center;
    gap:20px;
    background:var(--card);
    border:1px solid var(--border);
    border-radius:14px;
    padding:16px;
}

.cart-row img{
    width:70px;
    height:70px;
    object-fit:contain;
    background:var(--bg);
    border-radius:10px;
    padding:6px;
    box-sizing:border-box;
}

.cart-row-info h3{
    font-size:1.1rem;
    margin-bottom:4px;
}

.cart-row-price{
    color:var(--muted);
    font-size:.85rem;
}

.qty-stepper{
    display:flex;
    align-items:center;
    gap:12px;
    background:var(--bg);
    border:1px solid var(--border);
    border-radius:999px;
    padding:6px 14px;
}

.qty-stepper button{
    background:none;
    color:var(--text);
    font-size:1.1rem;
    width:22px;
}

.cart-row-total{
    color:var(--accent);
    white-space:nowrap;
}

.cart-row-remove{
    background:none;
    color:var(--muted);
    font-size:1.1rem;
    transition:.25s;
}

.cart-row-remove:hover{
    color:#ff5c5c;
}

.cart-summary{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    padding:30px;
    display:grid;
    gap:18px;
    position:sticky;
    top:110px;
}

.cart-summary h3{
    font-size:1.3rem;
}

.cart-summary-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding-top:14px;
    border-top:1px solid var(--border);
}

.cart-summary-row strong{
    color:var(--accent);
    font-size:1.3rem;
}

.cart-summary-note{
    color:var(--muted);
    font-size:.85rem;
}

.cart-checkout-btn{
    width:100%;
    border:none;
    text-align:center;
}

/* ================= PŁATNOŚĆ ================= */

.checkout-section{
    padding-top:70px;
}

.checkout-layout{
    display:grid;
    grid-template-columns:1fr 360px;
    gap:40px;
    align-items:start;
}

.checkout-header{
    text-align:left;
    margin-bottom:30px;
}

.checkout-form{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    padding:36px;
}

.payment-methods{
    border:1px solid var(--border);
    border-radius:14px;
    padding:18px;
    display:flex;
    flex-direction:column;
    gap:12px;
}

.payment-methods legend{
    padding:0 8px;
    color:var(--muted);
    font-weight:700;
    font-size:.85rem;
    letter-spacing:1px;
}

.payment-option{
    display:flex;
    align-items:center;
    gap:12px;
    background:var(--bg);
    border:1px solid var(--border);
    border-radius:10px;
    padding:14px 16px;
    cursor:pointer;
    font-weight:600;
}

.payment-option input{
    accent-color:var(--accent);
    width:18px;
    height:18px;
}

.checkout-note{
    color:var(--muted);
    font-size:.85rem;
    line-height:1.5;
}

.checkout-consents{
    display:flex;
    flex-direction:column;
    gap:14px;
    padding:18px;
    background:var(--bg);
    border:1px solid var(--border);
    border-radius:12px;
}

.consent-checkbox{
    display:flex;
    align-items:flex-start;
    gap:10px;
    font-size:.85rem;
    line-height:1.5;
    color:var(--muted);
    cursor:pointer;
}

.consent-checkbox input{
    accent-color:var(--accent);
    width:18px;
    height:18px;
    flex-shrink:0;
    margin-top:2px;
}

.consent-checkbox a{
    color:var(--accent);
}

.checkout-privacy-note{
    font-size:.78rem;
    color:var(--muted);
    line-height:1.5;
    padding-top:4px;
    border-top:1px solid var(--border);
}

.checkout-privacy-note a{
    color:var(--accent);
}

.auth-submit:disabled{
    opacity:.45;
    cursor:not-allowed;
}

.checkout-summary{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    padding:30px;
    position:sticky;
    top:110px;
}

.checkout-summary h3{
    font-size:1.3rem;
    margin-bottom:20px;
}

.checkout-items{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.checkout-line{
    display:flex;
    justify-content:space-between;
    color:var(--muted);
    font-size:.95rem;
}

.checkout-total-line{
    margin-top:18px;
    padding-top:18px;
    border-top:1px solid var(--border);
    color:var(--text);
    font-weight:700;
    font-size:1.15rem;
}

.checkout-total-line strong{
    color:var(--accent);
}

/* ================= TOAST (KOMUNIKATY) ================= */

#apex-toast{
    position:fixed;
    left:50%;
    bottom:32px;
    transform:translate(-50%,20px);
    background:var(--card);
    border:1px solid var(--border);
    box-shadow:var(--shadow);
    color:var(--text);
    padding:16px 26px;
    border-radius:999px;
    font-size:.9rem;
    max-width:90%;
    text-align:center;
    opacity:0;
    pointer-events:none;
    transition:.3s;
    z-index:1000;
}

#apex-toast.visible{
    opacity:1;
    transform:translate(-50%,0);
}

/* ================= STRONY PRAWNE / TREŚCIOWE ================= */

.legal-section{
    padding-top:50px;
}

.legal-content{
    max-width:820px;
    margin:0 auto;
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:50px;
}

.legal-content h1{
    font-size:2rem;
    margin-bottom:8px;
}

.legal-content .legal-updated{
    color:var(--muted);
    font-size:.9rem;
    margin-bottom:36px;
}

.legal-content h2{
    font-size:1.3rem;
    color:var(--accent);
    margin:34px 0 14px;
}

.legal-content h2:first-of-type{
    margin-top:0;
}

.legal-content p{
    color:var(--muted);
    line-height:1.7;
    margin-bottom:14px;
}

.legal-content p strong{
    color:var(--text);
}

.legal-content ul{
    color:var(--muted);
    line-height:1.7;
    margin:0 0 14px 22px;
}

.legal-content li{
    margin-bottom:6px;
}

.legal-content a{
    color:var(--accent);
}

.legal-content hr{
    border:none;
    border-top:1px solid var(--border);
    margin:30px 0;
}

.legal-content .legal-doc-link{
    display:inline-block;
    margin-top:10px;
}

/* Formularze do pobrania (zwroty i reklamacje) — obok siebie, a gdy
   brakuje miejsca, jeden pod drugim. */
.legal-content .legal-doc-linki{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
}

@media (max-width:768px){

    .legal-content{
        padding:30px 22px;
    }

}
