/* =====================================================================
   Sklep KEM – koszyk, warianty produktu, zamówienie, konto, lightbox.
   Osobny arkusz (style.css = wygląd strony). Akcent: #bca276.
   ===================================================================== */

:root { --kem-zloty: #bca276; --kem-zloty-ciemny: #a3895c; --kem-tekst: #2b2b2b; --kem-tlo: #f7f5f0; }

/* --- widoczność stron (jak pozostałe .website.*page) --- */
.website.koszykpage, .website.zamowieniepage, .website.logowaniepage,
.website.rejestracjapage, .website.kontopage, .website.regulaminpage { display: none; }
body.koszyk .website.koszykpage, body.zamowienie .website.zamowieniepage, body.logowanie .website.logowaniepage,
body.rejestracja .website.rejestracjapage, body.konto .website.kontopage, body.regulamin .website.regulaminpage { display: block; }
body.koszyk, body.zamowienie, body.logowanie, body.rejestracja, body.konto, body.regulamin { background: #fff; position: relative; }
body.koszyk header, body.zamowienie header, body.logowanie header,
body.rejestracja header, body.konto header, body.regulamin header { background: #fff; }
.sklep-strona { min-height: 60vh; }
.sklep-strona h1 { font-weight: 700; }

/* --- przyciski --- */
.sklep-btn {
    background: var(--kem-zloty); border: 2px solid var(--kem-zloty); color: #fff; font-weight: 700;
    border-radius: 0; padding: .5rem 1.1rem; letter-spacing: .02em; transition: background .15s, border-color .15s;
}
.sklep-btn:hover, .sklep-btn:focus { background: var(--kem-zloty-ciemny); border-color: var(--kem-zloty-ciemny); color: #fff; }
.sklep-btn:disabled, .sklep-btn.laduje { opacity: .65; cursor: progress; }
.sklep-btn-lg { padding: .8rem 1.2rem; font-size: 1.1rem; }

/* --- nagłówek: koszyk + konto --- */
header .feature.sklep-koszyk-link { position: relative; }
.sklep-licznik {
    display: inline-block; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
    background: var(--kem-zloty); color: #fff; font-size: 12px; line-height: 20px; text-align: center; font-weight: 700;
}
.sklep-licznik[hidden] { display: none; }
header .sklep-koszyk-link .sklep-licznik { position: absolute; top: 12px; left: 20px; }
.sklep-nav-koszyk a { white-space: nowrap; }
.sklep-nav-koszyk .icons { font-size: 1.1em; vertical-align: -2px; }

/* --- warianty na stronie produktu --- */
.sklep-warianty { margin-top: .5rem; }
.sklep-wariant {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .5rem 1rem; align-items: center;
    padding: .75rem 0; border-bottom: 1px solid #eee;
}
.sklep-wariant:first-of-type { border-top: 1px solid #eee; }
.sklep-wariant.niedostepny { opacity: .6; }
.sklep-wariant-nazwa { font-weight: 600; line-height: 1.3; }
.sklep-wariant-cena { text-align: right; white-space: nowrap; }
.sklep-cena { display: block; font-size: 1.2rem; font-weight: 700; color: var(--kem-tekst); }
.sklep-cena small { font-weight: 400; font-size: .75rem; }
.sklep-cena-2 { display: block; font-size: .78rem; color: #888; }
.sklep-wariant-kup { display: flex; align-items: center; gap: .5rem; }
.sklep-info a { color: var(--kem-zloty-ciemny); text-decoration: underline; }

/* --- licznik ilości --- */
.sklep-ilosc { display: inline-flex; align-items: stretch; border: 1px solid #ddd; background: #fff; height: 40px; }
.sklep-ilosc-btn { width: 36px; border: 0; background: #f4f4f4; font-size: 1.1rem; line-height: 1; cursor: pointer; color: #333; }
.sklep-ilosc-btn:hover { background: #eae6dc; }
.sklep-ilosc-input {
    width: 56px; border: 0; text-align: center; font-size: 16px; /* 16px = brak auto-zoomu w iOS Safari */
    -moz-appearance: textfield; appearance: textfield;
}
.sklep-ilosc-input::-webkit-outer-spin-button, .sklep-ilosc-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* --- panel koszyka (wysuwany) --- */
.sklep-panel { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 2000; visibility: hidden; pointer-events: none; }
.sklep-panel.otwarty { visibility: visible; pointer-events: auto; }
.sklep-panel-tlo { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .25s; }
.sklep-panel.otwarty .sklep-panel-tlo { opacity: 1; }
.sklep-panel-box {
    position: absolute; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100%; background: #fff;
    display: flex; flex-direction: column; transform: translateX(100%); transition: transform .28s ease;
    box-shadow: -10px 0 30px rgba(0, 0, 0, .15);
    height: 100%; height: 100dvh;
}
.sklep-panel.otwarty .sklep-panel-box { transform: none; }
.sklep-panel-box > header {
    display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid #eee;
    background: #fff !important; position: static !important; height: auto !important;
}
.sklep-panel-box > header h4 { margin: 0; font-weight: 700; letter-spacing: .03em; }
.sklep-panel-zamknij { border: 0; background: none; font-size: 2rem; line-height: 1; padding: 0 .25rem; cursor: pointer; color: #333; min-width: 44px; min-height: 44px; }
.sklep-panel-lista { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 1.25rem; }
.sklep-panel-stopka { border-top: 1px solid #eee; padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom)); background: var(--kem-tlo); }
.sklep-panel-stopka .btn { margin-top: .5rem; }
body.sklep-blokada { overflow: hidden; }

/* --- pozycje koszyka (panel i strona) --- */
.sklep-poz { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: .75rem; padding: 1rem 0; border-bottom: 1px solid #eee; align-items: start; }
.sklep-poz-img img { width: 72px; height: 72px; object-fit: cover; background: #f6f6f6; display: block; }
.sklep-poz-nazwa { display: block; font-weight: 600; color: var(--kem-tekst); line-height: 1.25; margin-bottom: .2rem; }
.sklep-poz-opis small { display: block; color: #777; }
.sklep-poz-akcje { display: flex; align-items: center; gap: .75rem; margin-top: .5rem; flex-wrap: wrap; }
.sklep-poz-akcje .sklep-ilosc { height: 36px; }
.sklep-poz-akcje .sklep-ilosc-btn { width: 34px; }
.sklep-poz-akcje .sklep-ilosc-input { width: 52px; }
.sklep-usun { border: 0; background: none; color: #999; text-decoration: underline; font-size: .85rem; padding: .5rem 0; cursor: pointer; }
.sklep-usun:hover { color: #c0392b; }
.sklep-poz-wartosc { font-weight: 700; white-space: nowrap; text-align: right; }
.sklep-pusty { text-align: center; padding: 3rem 0; color: #777; }
.sklep-pusty a { color: var(--kem-zloty-ciemny); text-decoration: underline; }
.sklep-koszyk-strona .sklep-poz { grid-template-columns: 96px minmax(0, 1fr) auto; }
.sklep-koszyk-strona .sklep-poz-img img { width: 96px; height: 96px; }

/* --- podsumowanie --- */
.sklep-suma table { width: 100%; }
.sklep-suma td { padding: .25rem 0; }
.sklep-suma td:last-child { text-align: right; white-space: nowrap; }
.sklep-suma .razem td { font-size: 1.25rem; font-weight: 700; border-top: 1px solid #ddd; padding-top: .5rem; }
.sklep-dostawa-pasek { height: 6px; background: #e8e2d4; margin: .5rem 0 .25rem; }
.sklep-dostawa-pasek span { display: block; height: 100%; background: var(--kem-zloty); }
.sklep-uwaga { font-size: .85rem; color: #8a6d3b; background: #fcf8e3; padding: .5rem .75rem; margin-top: .5rem; }
.sklep-podsumowanie { background: var(--kem-tlo); padding: 1.5rem; position: sticky; top: 90px; }
.sklep-b2b-info { background: #eef6ee; padding: .5rem .75rem; border-left: 3px solid #5a9a5a; }

/* --- formularze --- */
.sklep-strona .form-control { border-radius: 0; font-size: 16px; min-height: 44px; }
.sklep-strona .form-control:focus { border-color: var(--kem-zloty); box-shadow: 0 0 0 .2rem rgba(188, 162, 118, .25); }
.sklep-strona label { font-weight: 600; font-size: .9rem; }
.sklep-opcja { padding: .4rem 0 .4rem 1.5rem; }
.sklep-opcja label { font-weight: 400; }
.sklep-strona .custom-control-input:checked ~ .custom-control-label::before { background-color: var(--kem-zloty); border-color: var(--kem-zloty); }
.sklep-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sklep-typ .btn { flex: 1 1 0; border: 2px solid var(--kem-zloty); border-radius: 0; color: var(--kem-zloty-ciemny); font-weight: 700; }
.sklep-typ .btn.active { background: var(--kem-zloty); color: #fff; }
.sklep-typ input { position: absolute; clip: rect(0, 0, 0, 0); pointer-events: none; }
.sklep-dziekujemy .sklep-ok-ikona { width: 72px; height: 72px; line-height: 72px; border-radius: 50%; margin: 0 auto 1rem; background: var(--kem-zloty); color: #fff; font-size: 2.2rem; }
.sklep-zam-szczegoly { max-width: 820px; margin: 0 auto; overflow-x: auto; }
.sklep-regulamin { max-width: 860px; }
.sklep-regulamin h2 { font-size: 1.2rem; margin-top: 1.5rem; }

/* --- komunikat (toast) --- */
.sklep-toast {
    position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 150%); z-index: 2100;
    background: #2b2b2b; color: #fff; padding: .75rem 1.25rem; max-width: calc(100% - 32px); box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
    transition: transform .25s ease; font-size: .95rem;
}
.sklep-toast.widoczny { transform: translate(-50%, 0); }
.sklep-toast.blad { background: #a33; }

/* --- lightbox zdjęć produktu --- */
.carousel-photo { cursor: zoom-in; }
.sklep-lb { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 2200; background: rgba(20, 20, 20, .94); display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.sklep-lb img { max-width: calc(100vw - 32px); max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); object-fit: contain; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); user-select: none; -webkit-user-drag: none; }
.sklep-lb button { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; min-width: 48px; min-height: 48px; font-size: 1.8rem; line-height: 1; }
.sklep-lb button:hover { background: rgba(255, 255, 255, .25); }
.sklep-lb-zamknij { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.sklep-lb-pop { left: 12px; top: 50%; transform: translateY(-50%); }
.sklep-lb-nast { right: 12px; top: 50%; transform: translateY(-50%); }
.sklep-lb-licznik { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: #ddd; font-size: .9rem; }

/* --- responsywność --- */
@media (max-width: 991.98px) {
    .sklep-podsumowanie { position: static; margin-top: 2rem; }
}
@media (max-width: 767.98px) {
    .sklep-wariant { grid-template-columns: minmax(0, 1fr) auto; }
    .sklep-wariant-kup { grid-column: 1 / -1; }
    .sklep-wariant-kup .sklep-dodaj { flex: 1 1 auto; min-height: 44px; }
    .sklep-ilosc { height: 44px; }
    .sklep-ilosc-btn { width: 44px; }
    .sklep-poz, .sklep-koszyk-strona .sklep-poz { grid-template-columns: 64px minmax(0, 1fr); }
    .sklep-poz-img img, .sklep-koszyk-strona .sklep-poz-img img { width: 64px; height: 64px; }
    .sklep-poz-wartosc { grid-column: 2; text-align: left; }
    .sklep-lb-pop, .sklep-lb-nast { top: auto; bottom: calc(8px + env(safe-area-inset-bottom)); transform: none; }
    .sklep-lb img { max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); }
    header .feature.sklep-konto-link p span { display: none; }
}

/* =====================================================================
   Konto klienta: logowanie, rejestracja, „Moje konto”
   ===================================================================== */
.konto-auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; max-width: 980px; margin: 1rem auto 0; align-items: start; }
.konto-auth-szeroki { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); max-width: 1080px; }
.konto-karta { background: #fff; border: 1px solid #ece6da; padding: 2rem; box-shadow: 0 8px 30px rgba(60, 45, 20, .06); }
.konto-karta-akcent { background: #fcf2eb; border-color: #f1e2d4; box-shadow: none; }
.konto-tytul { font-size: 2.1rem; font-weight: 700; margin-bottom: .25rem; }
.konto-tytul-2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem; }
.konto-podtytul { color: #777; margin-bottom: 1.5rem; }
.konto-podtytul a, .konto-drobne a { color: var(--kem-zloty-ciemny); text-decoration: underline; }
.konto-drobne { font-size: .9rem; color: #777; margin: 1rem 0 0; }
.konto-korzysci { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.konto-korzysci li { position: relative; padding: .45rem 0 .45rem 1.9rem; line-height: 1.4; }
.konto-korzysci li::before { content: '✓'; position: absolute; left: 0; top: .4rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--kem-zloty); color: #fff; font-size: .75rem; line-height: 1.3rem; text-align: center; font-weight: 700; }
.konto-karta .btn + .btn { margin-top: .6rem; }
.konto-btn-obrys { border: 2px solid var(--kem-zloty); color: var(--kem-zloty-ciemny); background: transparent; border-radius: 0; font-weight: 700; }
.konto-btn-obrys:hover, .konto-btn-obrys:focus { background: var(--kem-zloty); color: #fff; }
.konto-adres-opcja summary { cursor: pointer; color: var(--kem-zloty-ciemny); font-weight: 600; padding: .25rem 0; }
.sklep-rejestracja .sklep-b2b-tylko, .konto-auth .sklep-b2b-tylko { display: none; }
body.konto-b2b .sklep-b2b-tylko { display: block; }
body.konto-b2b .form-row.sklep-b2b-tylko { display: flex; }
body.konto-b2b .sklep-b2c-tylko { display: none; }
.konto-auth label .sklep-b2b-tylko { display: none; }
body.konto-b2b .konto-auth label .sklep-b2b-tylko { display: inline; }

.konto-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; background: #fcf2eb; padding: 1.75rem 2rem; margin-bottom: 1.5rem; }
.konto-hero-witaj { margin: 0; color: var(--kem-zloty-ciemny); font-weight: 600; letter-spacing: .03em; }
.konto-odznaka { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: .25rem .6rem; background: #fff; border: 1px solid #e6d8c3; color: #6d5a3a; margin-right: .75rem; }
.konto-odznaka-b2b { background: #2f5d3a; border-color: #2f5d3a; color: #fff; }
.konto-hero-email { color: #777; font-size: .95rem; }

.konto-uklad { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2rem; align-items: start; }
.konto-menu { display: flex; flex-direction: column; border: 1px solid #ece6da; position: sticky; top: 90px; }
.konto-menu a { display: flex; align-items: center; gap: .65rem; padding: .85rem 1rem; color: #333; border-bottom: 1px solid #f1ece2; font-weight: 600; text-decoration: none; }
.konto-menu a:last-child { border-bottom: 0; }
.konto-menu a:hover { background: #faf7f1; color: #000; }
.konto-menu a.aktywny { background: #fcf2eb; box-shadow: inset 3px 0 0 var(--kem-zloty); color: #000; }
.konto-menu a .icons { color: var(--kem-zloty-ciemny); width: 18px; text-align: center; }
.konto-menu a span { margin-left: auto; background: var(--kem-zloty); color: #fff; font-size: .75rem; min-width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 11px; padding: 0 6px; }

.konto-kafle { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.konto-kafel { border: 1px solid #ece6da; padding: 1.1rem 1.25rem; background: #fff; }
.konto-kafel small { display: block; color: #888; font-size: .85rem; }
.konto-kafel b { display: block; font-size: 1.5rem; line-height: 1.3; margin-top: .2rem; }
.konto-promo { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.5rem; margin-bottom: 1.5rem; background: linear-gradient(135deg, #fcf2eb, #f6eadb); border-left: 4px solid var(--kem-zloty); }
.konto-promo h3 { font-size: 1.2rem; margin: 0 0 .35rem; }
.konto-promo p { margin: 0; color: #555; }
.konto-promo .btn { white-space: nowrap; }
.konto-info { padding: 1rem 1.25rem; background: #fdf8ec; border-left: 4px solid #d9b45a; margin-bottom: 1.5rem; }
.konto-sekcja-glowa { display: flex; justify-content: space-between; align-items: baseline; margin: .5rem 0 1rem; }
.konto-sekcja-glowa h2, .konto-h2 { font-size: 1.4rem; font-weight: 700; margin: 0 0 1rem; }
.konto-sekcja-glowa h2 { margin: 0; }
.konto-sekcja-glowa a { color: var(--kem-zloty-ciemny); text-decoration: underline; }

.konto-zam { border: 1px solid #ece6da; background: #fff; margin-bottom: 1rem; }
.konto-zam-glowa { display: flex; justify-content: space-between; align-items: center; padding: .85rem 1.25rem; border-bottom: 1px solid #f1ece2; background: #fcfaf6; }
.konto-zam-glowa span { color: #888; margin-left: .75rem; font-size: .9rem; }
.konto-zam-cialo { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; gap: 1rem; }
.konto-zam-mini { display: flex; gap: .5rem; align-items: center; }
.konto-zam-mini img { width: 54px; height: 54px; object-fit: cover; background: #f6f6f6; }
.konto-zam-mini span { color: #888; font-size: .9rem; }
.konto-zam-suma { text-align: right; }
.konto-zam-suma small { display: block; color: #888; }
.konto-zam-suma b { font-size: 1.2rem; }
.konto-zam-akcje { display: flex; gap: .5rem; justify-content: flex-end; padding: 0 1.25rem 1rem; }
.konto-status { font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 2px; margin: 0 !important; color: #fff !important; }
.konto-status-nowe { background: #8a7a5c; } .konto-status-potw { background: #c08a2b; } .konto-status-wysl { background: #3a6ea5; }
.konto-status-ok { background: #2f7d45; } .konto-status-anul { background: #999; }
.konto-pusto { text-align: center; padding: 2.5rem 1rem; border: 1px dashed #e0d6c4; color: #777; }
.konto-pusto .icons { font-size: 2.2rem; color: var(--kem-zloty); }
.konto-pusto p { margin: .75rem 0 1rem; }
.konto-form { max-width: 760px; }
.konto-form-waski { max-width: 460px; }

@media (max-width: 991.98px) {
    .konto-uklad { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .konto-menu { flex-direction: row; overflow-x: auto; -webkit-overflow-scrolling: touch; position: static; border: 0; border-bottom: 1px solid #ece6da; scrollbar-width: none; }
    .konto-menu::-webkit-scrollbar { display: none; }
    .konto-menu a { white-space: nowrap; border-bottom: 0; padding: .75rem .9rem; }
    .konto-menu a.aktywny { box-shadow: inset 0 -3px 0 var(--kem-zloty); background: transparent; }
}
@media (max-width: 767.98px) {
    .konto-auth, .konto-auth-szeroki { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .konto-karta { padding: 1.25rem; }
    .konto-tytul { font-size: 1.7rem; }
    .konto-hero { padding: 1.25rem; align-items: flex-start; }
    .konto-hero-email { display: block; margin-top: .35rem; }
    .konto-kafle { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .konto-kafle .konto-kafel:last-child { grid-column: 1 / -1; }
    .konto-kafel b { font-size: 1.2rem; }
    .konto-promo { flex-direction: column; align-items: flex-start; }
    .konto-zam-cialo { flex-direction: column; align-items: flex-start; }
    .konto-zam-suma { text-align: left; }
    .konto-zam-akcje { justify-content: stretch; }
    .konto-zam-akcje .btn { flex: 1 1 0; min-height: 44px; }
}

/* urządzenia dotykowe (np. iPad pion): cele dotykowe min. 44 px – wg audytu CSS */
@media (pointer: coarse) {
    .sklep-ilosc { height: 44px; }
    .sklep-ilosc-btn { width: 44px; }
    .sklep-dodaj { min-height: 44px; }
}
