/*
Theme Name: PureJoyBox
Description: Motyw sklepu pudełek-niespodzianek PureJoyBox — ciepły, tajemniczy klimat w odcieniach cappuccino, beżu i brązu.
Author: PureJoyBox
Version: 1.0
Text Domain: purejoybox
*/

:root {
    --pjb-cream:        #FAF3E8;
    --pjb-cream-deep:   #F0E4D3;
    --pjb-tan:          #C9A876;
    --pjb-cappuccino:   #8B5E3C;
    --pjb-coffee:       #5C3D2E;
    --pjb-coffee-dark:  #3E2723;
    --pjb-gold:         #D4A574;
    --pjb-white:        #FFFDF9;
    --pjb-shadow:       rgba(62, 39, 35, 0.12);
    --pjb-radius:       18px;
    --pjb-font-display: 'Fraunces', Georgia, serif;
    --pjb-font-body:    'Nunito Sans', -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
    background: var(--pjb-cream);
    color: var(--pjb-coffee-dark);
    font-family: var(--pjb-font-body);
    line-height: 1.6;
    margin: 0;
}

a { color: var(--pjb-cappuccino); text-decoration: none; }
a:hover { color: var(--pjb-coffee); }

h1, h2, h3, h4, .pjb-display {
    font-family: var(--pjb-font-display);
    color: var(--pjb-coffee-dark);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.pjb-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Header ─────────────────────────────────── */
.pjb-header {
    background: var(--pjb-white);
    border-bottom: 1px solid var(--pjb-cream-deep);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.pjb-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pjb-logo {
    font-family: var(--pjb-font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--pjb-coffee-dark);
}
.pjb-logo span { color: var(--pjb-cappuccino); }
.pjb-nav ul {
    list-style: none;
    display: flex;
    gap: 32px;
    margin: 0;
    padding: 0;
}
.pjb-nav a {
    color: var(--pjb-coffee);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ── Hero ───────────────────────────────────── */
.pjb-hero {
    background: linear-gradient(160deg, var(--pjb-cream) 0%, var(--pjb-cream-deep) 100%);
    padding: 90px 0 70px;
    position: relative;
    overflow: hidden;
}
.pjb-hero::before {
    content: "?";
    position: absolute;
    font-family: var(--pjb-font-display);
    font-size: 40rem;
    color: rgba(139, 94, 60, 0.05);
    right: -8%;
    top: -18%;
    line-height: 1;
    pointer-events: none;
}
.pjb-hero-inner {
    position: relative;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}
.pjb-hero-eyebrow {
    display: inline-block;
    background: var(--pjb-coffee-dark);
    color: var(--pjb-cream);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 7px 18px;
    border-radius: 30px;
    margin-bottom: 22px;
}
.pjb-hero h1 {
    font-size: 3.1rem;
    margin: 0 0 18px;
    line-height: 1.12;
}
.pjb-hero p {
    font-size: 1.15rem;
    color: var(--pjb-coffee);
    margin: 0 0 34px;
}
.pjb-btn {
    display: inline-block;
    background: var(--pjb-coffee-dark);
    color: var(--pjb-cream) !important;
    padding: 15px 36px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}
.pjb-btn:hover {
    background: var(--pjb-cappuccino);
    transform: translateY(-2px);
    color: var(--pjb-white) !important;
}
.pjb-btn-outline {
    background: transparent;
    color: var(--pjb-coffee-dark) !important;
    border: 2px solid var(--pjb-coffee-dark);
    padding: 13px 34px;
}
.pjb-btn-outline:hover {
    background: var(--pjb-coffee-dark);
    color: var(--pjb-cream) !important;
}

/* ── Sekcje ─────────────────────────────────── */
.pjb-section { padding: 70px 0; }
.pjb-section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 12px;
}
.pjb-section-sub {
    text-align: center;
    color: var(--pjb-cappuccino);
    margin-bottom: 48px;
    font-size: 1.05rem;
}

/* ── Karty produktów / boxów ────────────────── */
.pjb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}
.pjb-card {
    background: var(--pjb-white);
    border-radius: var(--pjb-radius);
    padding: 28px;
    box-shadow: 0 8px 24px var(--pjb-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
    text-align: center;
}
.pjb-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px var(--pjb-shadow);
}
.pjb-card-icon {
    width: 64px; height: 64px;
    margin: 0 auto 18px;
    background: var(--pjb-cream-deep);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
}
.pjb-card h3 { margin: 0 0 10px; font-size: 1.25rem; }
.pjb-card p { color: var(--pjb-coffee); font-size: 0.95rem; margin: 0; }

/* ── WooCommerce dopasowanie ────────────────── */
ul.products li.product {
    background: var(--pjb-white);
    border-radius: var(--pjb-radius);
    padding: 18px;
    box-shadow: 0 6px 18px var(--pjb-shadow);
}
ul.products li.product .price { color: var(--pjb-cappuccino) !important; font-weight: 700; }
.woocommerce a.button, .woocommerce button.button, .woocommerce #respond input#submit {
    background: var(--pjb-coffee-dark) !important;
    color: var(--pjb-cream) !important;
    border-radius: 40px !important;
    padding: 12px 28px !important;
    font-weight: 700 !important;
    border: none !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover {
    background: var(--pjb-cappuccino) !important;
}

/* ── Footer ─────────────────────────────────── */
.pjb-footer {
    background: var(--pjb-coffee-dark);
    color: var(--pjb-cream-deep);
    padding: 56px 0 28px;
    margin-top: 60px;
}
.pjb-footer a { color: var(--pjb-gold); }
.pjb-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 36px;
}
.pjb-footer h4 {
    color: var(--pjb-cream);
    font-size: 1rem;
    margin-bottom: 14px;
}
.pjb-footer ul { list-style: none; padding: 0; margin: 0; }
.pjb-footer li { margin-bottom: 8px; font-size: 0.92rem; }
.pjb-footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    font-size: 0.85rem;
    color: var(--pjb-tan);
}

@media (max-width: 768px) {
    .pjb-hero h1 { font-size: 2.1rem; }
    .pjb-nav { display: none; }
}

/* ── Konfigurator "Dobierz swój Box" ────────── */
.pjb-quiz-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(62, 39, 35, 0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.pjb-quiz-modal.pjb-quiz-otwarty { display: flex; }
.pjb-quiz-box {
    background: var(--pjb-cream);
    border-radius: 24px;
    padding: 44px;
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 60px rgba(62, 39, 35, 0.3);
}
.pjb-quiz-zamknij {
    position: absolute;
    top: 18px; right: 18px;
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--pjb-coffee);
    cursor: pointer;
}
.pjb-quiz-opcje {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 32px;
}
.pjb-quiz-opcja {
    background: var(--pjb-white);
    border: 2px solid var(--pjb-cream-deep);
    border-radius: 16px;
    padding: 18px 24px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pjb-coffee-dark);
    cursor: pointer;
    text-align: left;
    transition: border-color .15s ease, transform .15s ease;
}
.pjb-quiz-opcja:hover {
    border-color: var(--pjb-cappuccino);
    transform: translateX(4px);
}

/* ── Losowanie (efekt "loteryjny") ──────────── */
.pjb-quiz-losowanie {
    text-align: center;
    padding: 40px 0;
}
.pjb-quiz-kostki {
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 24px;
    animation: pjb-losuj-puls 0.4s ease-in-out infinite;
}
@keyframes pjb-losuj-puls {
    0%, 100% { transform: scale(1) rotate(-4deg); }
    50%      { transform: scale(1.15) rotate(4deg); }
}
.pjb-quiz-wyniki-reveal {
    animation: pjb-wynik-odsloniecie 0.5s cubic-bezier(.2,.9,.3,1.3);
}
@keyframes pjb-wynik-odsloniecie {
    0%   { opacity: 0; transform: scale(0.85) translateY(14px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Konfetti ────────────────────────────────── */
@keyframes pjb-konfetti-spadek {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0.9; }
    100% { transform: translateY(100vh) rotate(540deg); opacity: 0; }
}

/* ── Licznik "zostało dzisiaj" ──────────────── */
.pjb-stock-urgency {
    display: inline-block;
    background: #FCE8D8;
    color: #B04A2A;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 20px;
    margin: 8px 0;
}

/* ── Odznaka "rzadkie niespodzianki" ────────── */
.pjb-odds-badge {
    display: block;
    background: var(--pjb-cream-deep);
    border-left: 3px solid var(--pjb-gold);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--pjb-coffee);
    margin: 14px 0;
}

/* ── Newsletter ──────────────────────────────── */
.pjb-newsletter {
    background: var(--pjb-coffee-dark);
    padding: 56px 0;
    text-align: center;
}
.pjb-newsletter h2 { color: var(--pjb-cream); }
.pjb-newsletter p { color: var(--pjb-tan); margin-bottom: 28px; }
.pjb-newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 420px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.pjb-newsletter-form input[type="email"] {
    flex: 1;
    min-width: 220px;
    padding: 13px 18px;
    border-radius: 30px;
    border: none;
    font-size: 1rem;
}
.pjb-newsletter-status {
    margin-top: 14px;
    font-size: 0.9rem;
    color: var(--pjb-gold);
}

/* ── Galeria społeczności ────────────────────── */
.pjb-community {
    background: var(--pjb-cream-deep);
}
.pjb-community-empty {
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
    padding: 40px;
    background: var(--pjb-white);
    border-radius: var(--pjb-radius);
    box-shadow: 0 8px 24px var(--pjb-shadow);
}
.pjb-community-empty .pjb-card-icon { margin: 0 auto 18px; }

/* ── Budowniczy Boxa (minimalistyczny) ──────── */
.pjb-builder-wiersz {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--pjb-cream-deep);
    gap: 12px;
}
.pjb-builder-wiersz:last-child { border-bottom: none; }
.pjb-builder-nazwa { font-size: 0.95rem; }
.pjb-builder-stepper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.pjb-builder-stepper button {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 1px solid var(--pjb-cappuccino);
    background: var(--pjb-white);
    color: var(--pjb-coffee-dark);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}
.pjb-builder-stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.pjb-builder-ilosc { min-width: 20px; text-align: center; font-weight: 700; }
.pjb-builder-podsumowanie {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--pjb-cream-deep);
    font-weight: 700;
}

/* ── Social media (minimalistyczne) ─────────── */
.pjb-social {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}
.pjb-social a {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--pjb-tan);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--pjb-tan) !important;
}
