/* Theme "nowy" - uzupełnienia i nadpisania css/main.css (projekt graficzny z 2015 r.) */

:root {
	--blue: #2e9cc9;
	--blue-light: #39b2e3;
	--orange: #f29a00;
	--text: #42413d;
	--muted: #666561;
	--line: #e3e1d8;
	--bg-soft: #f6f6f4;
}

/* krój tekstu (main.css i Bootstrap ustawiają Roboto Slab / Helvetica) */
body, .popover, .tooltip { font-family: 'Red Hat Display', 'Helvetica Neue', Arial, sans-serif; }

body { color: var(--text); background: #fff; }

/* main.css ukrywa wszystkie pola wyboru (projekt zakładał własne kontrolki) - przywracamy natywne */
input[type="radio"], input[type="checkbox"] { display: inline-block; width: 16px; height: 16px; margin: 0; vertical-align: -3px; accent-color: var(--blue-light); }
input[type="radio"], label:has(> input[type="radio"]), input[type="radio"] + label { cursor: pointer; }
/* checkbox: własna kontrolka (ten sam wygląd w admin/admin.css) */
input[type="checkbox"] {
	-webkit-appearance: none; appearance: none; flex: 0 0 auto; box-sizing: border-box;
	border: 1.5px solid #8a8984; border-radius: 3px; background: #fff no-repeat center / 12px 12px; cursor: pointer;
	transition: background-color .15s, border-color .15s;
}
input[type="checkbox"]:hover { border-color: var(--blue-light); }
input[type="checkbox"]:checked { border-color: var(--blue-light); background-color: var(--blue-light); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 6.3l2.6 2.6 5-5.4' fill='none' stroke='%2342413d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
input[type="checkbox"]:indeterminate { border-color: var(--blue-light); background-color: var(--blue-light); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6h6' fill='none' stroke='%2342413d' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
input[type="checkbox"]:focus { outline: 0; }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 2px; }
input[type="checkbox"]:disabled { opacity: .45; cursor: default; }
@media (prefers-reduced-motion: reduce) { input[type="checkbox"] { transition: none; } }
label:has(> input[type="checkbox"]), input[type="checkbox"] + label, select { cursor: pointer; }
select:disabled { cursor: default; }
a { color: var(--blue); }
a:hover, a:focus { color: var(--orange); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6, .section-title span, .form-section-title, .menu-title, legend { color: var(--text); }

/* ---------- nagłówek ---------- */

.navbar { min-height: 0; }
.navbar-brand { min-height: 0; height: auto; padding: 30px 15px 20px; }
.navbar-brand picture, .navbar-brand img { display: block; }

.top_tools { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0 18px; height: auto; margin: 20px 0 22px; }
.top_tools > div { display: block; float: none; }
.top_tools .hello { color: var(--muted); }
.top_tools .login, .top_tools .register, .top_tools .orders, .top_tools .profile { border: 0; padding: 0; margin-left: 0; }
.top_tools .cart { position: relative; }
.top_tools .cart > a { color: var(--blue); }
.top_tools .cart > a i { margin: 0 6px 0 0; }
.top_tools .cart span { color: var(--orange); }

.top_tools .top-cart-container { display: none; position: absolute; right: 0; top: 100%; z-index: 1000; width: 340px; padding-top: 10px; text-align: left; }
.top_tools .cart.has-items:hover .top-cart-container,
.top_tools .cart.has-items:focus-within .top-cart-container { display: block; }

.menu_search { display: flex; align-items: center; gap: 20px; overflow: visible; }
.menu_search .navbar-nav { flex: 1 1 auto; }
.navbar-default .navbar-nav > li { padding: 0 2px; }
.navbar-default .navbar-nav > li.last { padding-right: 0; }
.navbar ul li.home { margin-left: 0; }
.site_search_container { flex: 0 0 280px; }
.navbar-default .navbar-nav > li > a .fa { margin-left: 4px; }
#menu-categories .dropdown-menu { column-count: 2; min-width: 420px; padding: 10px 0; border-radius: 0; }
#menu-categories .dropdown-menu > li > a { padding: 5px 20px; white-space: normal; }

.navbar-cart-button { display: none; }

/* ---------- treść ---------- */

.site-container { display: block; min-height: 300px; }

.breadcrumbs { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.breadcrumbs .fa { margin: 0 6px; color: var(--orange); }

h1.section-title { margin: 0 0 20px; font-size: inherit; }
/* kreski po bokach jako elementy flex: przy jednej linii wypełniają resztę szerokości, a gdy tytuł się łamie, span zabiera całą
   szerokość i kreski znikają (wcześniej absolutna linia przecinała odstęp między liniami tekstu). Linia przez środek małych liter:
   0.1em poniżej środka ramki; font-size pseudo-elementów = rozmiar tekstu, żeby em się zgadzał */
.section-title { display: flex; align-items: center; }
.section-title::before, .section-title::after { content: ''; position: static; flex: 1 1 0; min-width: 0; width: auto; border-top: 1px solid var(--line); transform: translateY(.1em); font-size: 30px; }
.section-title span { flex: 0 1 auto; display: block; min-width: 0; }
.content .section-title::after { display: none; }

.btn-outline, .btn-cart { display: inline-block; padding: 9px 18px; border: 1px solid var(--blue-light); color: var(--blue); background: #fff; font-weight: 300; font-size: 16px; line-height: 1.4; cursor: pointer; }
.btn-outline:hover, .btn-outline:focus { color: #fff; background: var(--blue-light); text-decoration: none; }
.btn-cart { background: var(--blue-light); color: #fff; border-color: var(--blue-light); }
.btn-cart:hover, .btn-cart:focus { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-cart .fa { margin-left: 6px; }

.badge-presale { position: absolute; top: 8px; left: 0; z-index: 2; background: #f3e833; color: var(--text); font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 3px 8px; }
.badge-upcoming { background: var(--blue); color: #fff; }
/* wersja/wariant na listach: plakietka na okładce, a przy małych miniaturach i w koszyku dopisek przy tytule */
.badge-version { position: absolute; bottom: 8px; left: 0; z-index: 2; background: var(--text); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 3px 8px; }
.version-label { display: inline-block; margin-left: 4px; padding: 1px 6px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; vertical-align: middle; white-space: nowrap; }

.rating-bar { display: inline-block; position: relative; width: 80px; height: 14px; vertical-align: middle; background: linear-gradient(90deg, #efeeeb 0 100%); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 14'%3E%3Cg%3E%3Cpath id='s' d='M7 0l2.1 4.5 4.9.6-3.6 3.3.9 4.9L7 10.9 2.7 13.3l.9-4.9L0 5.1l4.9-.6z'/%3E%3Cuse href='%23s' x='16.5'/%3E%3Cuse href='%23s' x='33'/%3E%3Cuse href='%23s' x='49.5'/%3E%3Cuse href='%23s' x='66'/%3E%3C/g%3E%3C/svg%3E") no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 14'%3E%3Cg%3E%3Cpath id='s' d='M7 0l2.1 4.5 4.9.6-3.6 3.3.9 4.9L7 10.9 2.7 13.3l.9-4.9L0 5.1l4.9-.6z'/%3E%3Cuse href='%23s' x='16.5'/%3E%3Cuse href='%23s' x='33'/%3E%3Cuse href='%23s' x='49.5'/%3E%3Cuse href='%23s' x='66'/%3E%3C/g%3E%3C/svg%3E") no-repeat; }
.rating-bar > span { position: absolute; left: 0; top: 0; bottom: 0; background: #f3c400; }
.rating { color: var(--muted); font-size: 13px; margin-top: 8px; }

.current-price { color: var(--orange); font-size: 26px; }
.old-price { color: var(--muted); font-size: 16px; text-decoration: line-through; margin-right: 8px; }
/* Omnibus: cena okładkowa (nie obniżka) i najniższa cena z 30 dni przy obniżce */
.cover-price { display: block; color: var(--muted); font-size: 13px; }
.lowest-price { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; margin-top: 4px; white-space: normal; }
.free-shipping { display: block; font-size: 13px; color: var(--muted); }

/* ---------- siatka książek ---------- */

.products-list.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 40px 30px; margin: 20px 0 0; }
.products-list.book-grid::before, .products-list.book-grid::after { display: none; }
.book-grid .item { width: auto; float: none; margin: 0; display: flex; flex-direction: column; }
.book-grid .img-container { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 270px; }
.book-grid .img-container img { max-height: 270px; width: auto; box-shadow: 0 6px 14px rgba(0, 0, 0, .15); }
.book-grid .details-container { margin: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.book-grid .details-container .title { font-size: 17px; line-height: 1.3; margin-top: 18px; }
.book-grid .details-container .title a { color: var(--blue-light); }
.book-grid .details-container .author { font-size: 14px; }
.book-grid .item { min-width: 0; overflow: hidden; }
.book-grid .details-container .price-container { margin-top: 12px; padding-right: 56px; }
.book-grid .current-price { font-size: 22px; white-space: nowrap; }
.book-grid .old-price { font-size: 14px; white-space: nowrap; }
.book-grid .details-container .cart-container { position: static; margin-top: auto; align-self: flex-end; }
.book-grid .details-container .price-container + .cart-container { margin-top: -46px; }

.home-grid h1, .home-sections h1, .home-sections h2 { grid-column: 1 / -1; display: flex; align-items: center; gap: 25px; margin: 30px 0 0; font-size: 28px; color: var(--text); text-align: center; line-height: 1.2; }
.home-sections h1::before, .home-sections h1::after, .home-sections h2::before, .home-sections h2::after { content: ''; flex: 1 1 auto; border-top: 1px solid var(--line); transform: translateY(-0.22em); }
.home-sections h1:first-child, .home-sections h2:first-child { margin-top: 0; }
/* karta książki: pozostałe tomy serii (nagłówek h2, bo h1 to tytuł) */
.series-sections { margin-top: 50px; }
.home-row { display: contents; } /* kontener z theme.js: na desktopie nie zmienia siatki */
@media screen and (max-width: 768px) {
	/* sekcja = poziomy pasek okładek: ok. 2,3 pozycji na ekranie, żeby było widać, że da się przesunąć */
	.home-sections .products-list.book-grid { display: block; }
	.home-sections .book-grid > h1, .home-sections .book-grid > h2 { margin: 30px 0 15px; }
	.home-row { display: flex; gap: 15px; margin: 0 -15px; padding: 0 15px 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 15px; overscroll-behavior-x: contain; }
	.home-row > .item { flex: 0 0 42%; scroll-snap-align: start; }
}

.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.list-toolbar-bottom { margin-top: 40px; }
.list-sort { margin: 0; }
.list-sort select { margin-left: 6px; padding: 4px 8px; border: 1px solid var(--line); background: var(--bg-soft); }
.page-link { display: inline-block; min-width: 32px; padding: 4px 8px; margin: 0 2px; text-align: center; border: 1px solid var(--line); }
.page-link.current { background: var(--blue-light); border-color: var(--blue-light); color: #fff; }
.page-link.ellipsis { border: 0; }

.empty-results h1 { font-size: 26px; }

/* ---------- strona produktu ---------- */

.product-top-container { height: auto; margin-bottom: 40px; padding-bottom: 40px; }
.product-top { display: flex; gap: 40px; min-height: 0; }
.product-top-container .img-container { flex: 0 0 38%; min-height: 0; }
.product-top-container .img-container .img-inner { min-height: 0; padding-bottom: 30px; }
.product-top-container .img-container .img-inner::before { left: 50%; transform: translateX(-50%); width: 100%; background-size: 100% 39px; }
.product-top-container .img-container img { position: static; max-height: 520px; width: auto; box-shadow: 0 10px 25px rgba(0, 0, 0, .18); }
.product-top-container .img-container .cover { position: relative; display: inline-block; cursor: zoom-in; }
.product-top-container .details-container { flex: 1 1 auto; }
.product-top-container .details-container .title { font-size: 40px; padding-right: 0; margin-top: 10px; }
.product-top-container .details-container .author { margin-right: 0; }
.product-top-container .details-container .price-container { float: none; margin: 25px 0 0; }
.product-top-container .details-container .current-price { font-size: 34px; }
/* seria przy autorze i przełącznik wariantów (oprawy, ebook, audiobook) */
.product-top-container .series { margin-top: 6px; color: var(--muted); font-size: 15px; }
.variants { margin-top: 20px; }
.variants-label { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.variants-list { display: flex; flex-wrap: wrap; gap: 8px; }
.variant { display: inline-flex; flex-direction: column; justify-content: center; min-width: 120px; min-height: 44px; padding: 6px 14px; border: 1px solid var(--line); background: #fff; color: var(--text); line-height: 1.3; }
a.variant:hover, a.variant:focus { border-color: var(--blue); color: var(--text); text-decoration: none; }
.variant.active { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); }
.variant-name { font-size: 15px; }
.variant-price { font-size: 13px; color: var(--muted); }

.galleryThumbs { list-style: none; padding: 0; margin: 15px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.galleryThumbs img { height: 70px; width: auto; }
.galleryThumb { display: block; border: 2px solid transparent; }
.galleryThumb.active { border-color: var(--blue-light); }

.buy-box { margin-top: 25px; }
.buy-box .cart-container { display: flex; gap: 12px; align-items: stretch; margin: 0; }
.amount-select { width: 80px; border: 0; background: var(--bg-soft); color: var(--blue); font-size: 18px; text-align: center; padding: 0 10px; }
.buy-box .btn-cart { font-size: 18px; padding: 12px 24px; }
.buy-box .safe-info, .buy-box .tell-friend { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.read-excerpt { margin-top: 15px; }
.read-excerpt .excerpt-size { color: var(--muted); font-size: 13px; }
.delivery-info { margin-top: 20px; color: var(--muted); font-size: 14px; }
.delivery-info .availability { color: var(--text); font-weight: 700; }
/* data premiery zapowiedzi */
.delivery-info .premiere { margin-bottom: 6px; font-size: 16px; color: var(--text); }
/* koszt dostawy i promocje dostawy na karcie książki */
.delivery-info .shipping-cost { margin-top: 10px; }
.delivery-info .shipping-cost strong { color: var(--text); }
.delivery-info .shipping-promo { margin-top: 4px; color: var(--text); font-weight: 700; }
.delivery-info .shipping-promo::before { content: "\f0d1"; font-family: FontAwesome; font-weight: 400; color: var(--orange); margin-right: 6px; }
.delivery-info .shipping-hint { margin-top: 4px; color: var(--text); }

.product-card { display: flex; gap: 40px; align-items: flex-start; }
.product-card .tabs-container { flex: 1 1 auto; min-width: 0; }
.product-card .nav-tabs > li > a { font-size: 18px; border-radius: 0; }
.product-card .tab-content { padding: 25px 0; line-height: 1.7; }
/* biogramy autorów: zakładka na karcie książki i blok na liście autora */
.author-bio p { margin: 0 0 10px; }
.author-bio h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.author-bio + .author-bio { margin-top: 25px; padding-top: 25px; border-top: 1px solid var(--line); }
.author-bio-list { max-width: 820px; margin: 0 0 25px; line-height: 1.7; }
.author-bio-list.is-clamped p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.author-bio-more { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--blue); cursor: pointer; }
.author-bio-more:hover, .author-bio-more:focus { color: var(--orange); }
.product-card .details-container { flex: 0 0 260px; background: var(--bg-soft); padding: 20px; }
.product-card .details-container .title { font-size: 20px; margin-bottom: 15px; }
.details-content { list-style: none; padding: 0; margin: 0; color: var(--muted); }
.details-content li { margin-bottom: 12px; }
.details-content span { color: var(--text); }

.reviews-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.review { padding: 15px 0; border-top: 1px solid var(--line); }
.review-head { margin-bottom: 6px; }
.review-date { color: var(--muted); font-size: 13px; }

.cover-preview { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 0, 0, .8); cursor: zoom-out; }
.cover-preview img { max-height: 100%; max-width: 100%; }
@media screen and (min-width: 769px) { .buy-bar { display: none !important; } }
.cover-preview-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--text); font-size: 28px; line-height: 1; cursor: pointer; }

/* ---------- mini-koszyk ---------- */
/* #mini-cart w selektorach: main.css koloruje wszystko wewnątrz .top_tools .cart i robi z każdego div inline-block;
   prawa krawędź okienka = prawa krawędź linku koszyka */

#mini-cart .cart-brief, .payment-summary .cart-brief { display: block; width: 100%; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 25px rgba(0, 0, 0, .12); padding: 18px 20px; font-size: 14px; line-height: 1.4; color: var(--text); text-align: left; }
.payment-summary .cart-brief { box-shadow: none; }
.cart-brief .cart-brief-title { display: block; color: var(--text); font-size: 17px; font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.cart-brief .cart-brief-rows { list-style: none; padding: 0; margin: 0; max-height: 280px; overflow: auto; }
.cart-brief .cart-brief-row { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-brief .cart-brief-book { min-width: 0; }
.cart-brief .cart-brief-book a { display: block; color: var(--blue); }
.cart-brief .cart-brief-book a:hover { color: var(--orange); }
#mini-cart .cart-brief .cart-brief-author, .cart-brief .cart-brief-author { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.cart-brief .cart-brief-price { flex: 0 0 auto; text-align: right; white-space: nowrap; }
#mini-cart .cart-brief .current-price, .cart-brief .current-price { display: block; color: var(--orange); font-size: 15px; }
#mini-cart .cart-brief .old-price, .cart-brief .old-price { display: block; color: var(--muted); font-size: 12px; margin: 0; }
#mini-cart .cart-brief .cart-brief-qty, .cart-brief .cart-brief-qty { display: block; color: var(--muted); font-size: 12px; }
.cart-brief .cart-brief-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 10px; }
#mini-cart .cart-brief .cart-brief-line .cb-label, .cart-brief .cart-brief-line .cb-label { color: var(--muted); }
#mini-cart .cart-brief .cart-brief-line .cb-value, .cart-brief .cart-brief-line .cb-value { color: var(--text); font-weight: 700; }
.cart-brief .cart-brief-total { font-size: 16px; }
#mini-cart .cart-brief .cart-brief-total .cb-label, .cart-brief .cart-brief-total .cb-label { color: var(--text); }
#mini-cart .cart-brief .cart-brief-total .cb-value, .cart-brief .cart-brief-total .cb-value { color: var(--orange); font-size: 20px; }
.cart-brief .cart-brief-total small { color: var(--muted); font-size: 12px; font-weight: 400; }
.cart-brief .cart-brief-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 15px; }
#mini-cart .cart-brief-checkout, .cart-brief-checkout { display: block; padding: 11px; text-align: center; background: var(--orange); color: #fff; font-size: 16px; margin: 0; }
#mini-cart .cart-brief-checkout:hover, #mini-cart .cart-brief-checkout:focus, .cart-brief-checkout:hover, .cart-brief-checkout:focus { background: var(--blue-light); color: #fff; text-decoration: none; }
#mini-cart .cart-brief-edit, .cart-brief-edit { display: block; padding: 9px; text-align: center; border: 1px solid var(--blue-light); color: var(--blue); margin: 0; }
/* hover z #mini-cart: bazowa reguła z id nadpisywała kolor tekstu (niebieski na niebieskim) */
#mini-cart .cart-brief-edit:hover, #mini-cart .cart-brief-edit:focus, .cart-brief-edit:hover, .cart-brief-edit:focus { background: var(--blue-light); color: #fff; text-decoration: none; }
#mini-cart .cart-brief-howto, .cart-brief-howto { display: block; text-align: center; font-size: 12px; color: var(--muted); margin: 0; }
.cart-brief .cart-brief-pay { width: 100%; margin-top: 12px; border-top: 1px solid var(--line); }
.cart-brief .cart-brief-pay td { padding-top: 8px; }
.cart-brief .cart-brief-topay td { font-weight: 700; color: var(--text); font-size: 16px; }
.cart-brief .cart-brief-topay .cb-value { text-align: right; color: var(--orange); font-size: 20px; }

/* ---------- polecane / ostatnio oglądane ---------- */

.extras-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; margin-top: 50px; }
.extras-box ul { list-style: none; padding: 0; margin: 20px 0 0; }
.extras-box ul li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.recommend-item { display: flex; gap: 20px; margin-top: 20px; }
.recommend-item .img-container { flex: 0 0 auto; }
.recommend-item .title { font-size: 18px; }
.recommend-item .author { color: var(--muted); margin: 6px 0 10px; }
.recommend-item .description { color: var(--muted); font-size: 14px; }

/* ---------- stopka ---------- */

.bottom-container .freeshipping-container { float: none; max-width: none; min-height: 0; padding: 25px 25px 25px 30px; }
.bottom-container .freeshipping-container .l1 { font-size: 26px; line-height: 1.15; }
.bottom-container .freeshipping-container .l2 { margin-top: 15px; font-size: 14px; line-height: 1.4; }
.bottom-container .freeshipping-container .l2 span { position: static; display: block; margin: 6px 0 0; font-size: 22px; line-height: 1.2; }
.bottom-container .freeshipping-container .l3 { margin-top: 18px; }

.footer-categories { columns: 3; column-gap: 20px; }
/* nagłówki stopki jaśniejsze, linki kategorii w podstawowym szarym stopki (main.css ma odwrotnie) */
.bottom-container .l2 .menu-title { color: #8e8d89; }
ul.footer-categories li a { color: var(--muted); }
/* bez paska copyright stopka kończy się na kategoriach - dolny oddech */
.bottom-container > .container-fluid { padding-bottom: 30px; }

.cookie-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 20px; padding: 15px 20px; background: rgba(66, 65, 61, .95); color: #fff; font-size: 13px; }
.cookie-bar[hidden] { display: none; }
.cookie-bar p { margin: 0; max-width: 900px; }
.cookie-bar a { color: #fff; text-decoration: underline; }

/* toast „Usunięto z koszyka… Przywróć” (koszyk, chowany przez theme.js po 10 s) */
.cart-toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 1600; width: max-content; max-width: calc(100% - 32px); transform: translateX(-50%); background: var(--text); color: #fff; border-radius: 4px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); font-size: 14px; transition: opacity .3s, transform .3s; }
.cart-toast.is-hiding { opacity: 0; transform: translate(-50%, 10px); }
.cart-toast form { display: flex; align-items: center; gap: 4px; padding: 0 4px 0 16px; }
.cart-toast-text { flex: 1 1 auto; padding: 12px 8px 12px 0; }
.cart-toast button { min-height: 44px; border: 0; background: none; color: #fff; }
.cart-toast-undo { padding: 0 12px; color: var(--blue-light) !important; font-weight: 700; white-space: nowrap; }
.cart-toast-undo:hover, .cart-toast-undo:focus { text-decoration: underline; }
.cart-toast-close { width: 44px; opacity: .7; }
.cart-toast-close:hover, .cart-toast-close:focus { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .cart-toast { transition: none; } }

/* ---------- strony tekstowe i formularze (wspólne) ---------- */

.text-page { max-width: 900px; line-height: 1.7; }
.text-page h1 { font-size: 32px; margin: 0 0 25px; }

/* ---------- mobile ---------- */

@media screen and (max-width: 991px) {
	.menu_search { flex-wrap: wrap; }
	.site_search_container { flex-basis: 100%; }
	.product-top { flex-direction: column; }
	.product-top-container .img-container { flex-basis: auto; text-align: center; }
	.product-top-container .details-container .title { font-size: 30px; }
	.product-card { flex-direction: column; }
	.product-card .details-container { flex-basis: auto; width: 100%; }
}

@media screen and (max-width: 768px) {
	/* main.css ma tu własny układ nagłówka (top_tools_m, logo w tle) - wracamy do jednego markupu */
	.navbar { position: static; min-height: 0; }
	.site-container { margin-top: 0; }
	.navbar-brand { background: none; width: auto; height: auto; min-height: 0; margin: 0; padding: 12px 15px; }
	.navbar-brand img { display: block; width: auto; height: 36px; } /* sygnet z <picture> */
	.navbar-cart-button { display: block; float: right; padding: 14px 12px; font-size: 22px; color: var(--blue); }
	.navbar-toggle { margin-right: 0; }
	.top_tools { display: flex; justify-content: flex-start; margin: 10px 0; gap: 8px 16px; padding: 0 15px; }
	.site_search_container { display: block; padding: 10px 15px; }
	.navbar-default .navbar-nav > li { padding: 0; }
	.top-cart-container { display: none !important; }
	.menu_search { display: block; }
	#menu-categories .dropdown-menu { column-count: 1; min-width: 0; }
	.products-list.book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 15px; }
	.book-grid .item { width: auto; margin: 0; }
	.book-grid .item .details-container { margin: 0; }
	.book-grid .img-container { height: 200px; }
	.book-grid .img-container img { max-height: 200px; }
	.book-grid .details-container .title { font-size: 15px; }
	.current-price { font-size: 20px; }
	.home-sections h1, .home-sections h2 { font-size: 21px; gap: 12px; }
	.footer-categories { columns: 2; }
	.extras-container { grid-template-columns: 1fr; }
}

/* 768px (iPad pionowo): main.css i ten plik mają tu jeszcze układ mobilny, a Bootstrap już desktopową nawigację - cofamy ją */
@media screen and (min-width: 768px) and (max-width: 768px) {
	.navbar-header { float: none; }
	.navbar > .container-fluid .navbar-brand { margin-left: 0; }
	.navbar-toggle { display: block; }
	.navbar-collapse.collapse { display: none !important; overflow: auto !important; }
	.navbar-collapse.collapse.in { display: flex !important; }
	.navbar-nav { float: none; }
	.navbar-nav > li { float: none; }
}

/* mobile: breadcrumbs i szczegóły produktu na linii logo (padding .navbar-brand = 15px) */
@media screen and (max-width: 768px) {
	.breadcrumbs { padding: 0 15px; margin-top: 16px; }
	.product-top-container .details-container { padding: 0 15px; }
}

/* ---------- etap 2: koszyk, zamówienie, płatność ---------- */

.checkout-steps { display: flex; list-style: none; padding: 0; margin: 0 0 30px; counter-reset: step; border-bottom: 1px solid var(--line); }
.checkout-steps li { flex: 1 1 0; padding: 10px 0; text-align: center; color: #b5b3ab; counter-increment: step; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.checkout-steps li::before { content: counter(step) '. '; }
.checkout-steps li.done { color: var(--muted); }
.checkout-steps li.active { color: var(--text); border-bottom-color: var(--orange); font-weight: 700; }

.message-box { display: flex; gap: 15px; align-items: flex-start; padding: 15px 20px; margin: 0 0 25px; border: 1px solid var(--line); background: var(--bg-soft); }
.message-box h4 { margin: 0 0 6px; font-size: 18px; }
.message-icon { flex: 0 0 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--blue-light); font-size: 18px; }
.message-error { border-color: #e8b4a8; background: #fdf3f0; }
.message-error .message-icon { background: #d9534f; }
.field-error { color: #c9302c; font-size: 13px; margin-top: 4px; }

.cart-table { margin: 0; }
.cart-table > thead > tr > th { border-bottom: 1px solid var(--line); color: var(--muted); font-weight: 400; }
.cart-table > tbody > tr > td { vertical-align: middle; border-top: 1px solid var(--line); padding: 15px 8px; }
.cart-table .img-container { width: 80px; }
.cart-table .img-container img { max-height: 110px; width: auto; box-shadow: 0 4px 10px rgba(0, 0, 0, .12); }
.cart-table .details-container .title { font-size: 17px; }
.cart-table .details-container .author, .cart-table .price-comment { color: var(--muted); font-size: 14px; }
.cart-table .availability { font-size: 13px; margin-top: 4px; }
.cart-table .qty-col, .cart-table .amount-container { width: 130px; text-align: center; }
.cart-table .price-col, .cart-table .price-container { width: 150px; text-align: right; white-space: nowrap; }
.cart-table .current-price { font-size: 20px; }
.cart-table .old-price { display: block; margin: 0; font-size: 14px; }
.qty-control { display: inline-flex; background: var(--bg-soft); }
.qty-control button { width: 32px; border: 0; background: none; color: var(--blue); font-size: 18px; }
.qty-control .amount-input { width: 40px; border: 0; background: none; text-align: center; color: var(--blue); font-size: 16px; padding: 8px 0; }
.button-remove { color: var(--muted); font-size: 18px; padding: 6px; }
.cart-recalc { display: flex; justify-content: flex-end; align-items: center; gap: 15px; padding: 12px 0; color: var(--muted); font-size: 13px; }
@media screen and (max-width: 768px) {
	/* cele dotyku min. 44px */
	.qty-control button { width: 44px; min-height: 44px; }
	.cart-table a.button-remove { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0; }
}
.cart-recalc.highlight .btn-outline { background: var(--orange); border-color: var(--orange); color: #fff; }
.cart-summary { border-top: 1px solid var(--line); padding: 15px 0; text-align: right; }
.cart-summary .delivery-container { color: var(--muted); }
.cart-summary .summary-container { margin-top: 8px; font-size: 22px; }
.cart-summary .summary-value { color: var(--orange); font-size: 30px; margin-left: 10px; }
/* promocje w koszyku: kod rabatowy, lista rabatów, dostawa przed rabatem, dopisek przy pozycji */
.promo-code { display: inline-block; width: 100%; max-width: 420px; margin-bottom: 15px; text-align: left; }
.promo-code label { display: block; font-weight: 400; color: var(--muted); margin-bottom: 4px; }
.promo-code-row { display: flex; gap: 8px; }
.promo-code-row .form-control { height: 44px; text-transform: uppercase; }
.promo-code-row .btn-outline { flex: 0 0 auto; min-height: 44px; }
.promo-msg { margin: 6px 0 0; color: #c0392b; font-size: 14px; }
.promo-codes { list-style: none; margin: 8px 0 0; padding: 0; font-size: 14px; }
.promo-codes li { margin-top: 4px; }
.promo-code-ok { color: #2e7d32; }
.promo-code-off { color: #c0392b; }
.promo-remove { border: 0; background: none; padding: 0 0 0 6px; color: var(--blue); text-decoration: underline; min-height: 0; }
.cart-summary .discount-container { color: var(--text); }
.cart-summary .discount-subtotal { color: var(--muted); }
.cart-summary .discount-value { white-space: nowrap; }
.shipping-base { color: var(--muted); }
.promo-note { margin-top: 4px; color: #2e7d32; font-size: 13px; white-space: normal; }
.promo-note-label { display: block; color: var(--muted); }
.shipping-hint { color: #2e7d32; font-size: 14px; }
/* karta książki: promocja katalogowa z odliczaniem i promocje koszykowe obejmujące tytuł */
.promo-badge { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 18px; padding: 6px 12px; background: #fdf1dc; color: var(--text); font-size: 15px; }
.promo-badge-label { font-weight: 700; color: #b06d00; }
.promo-countdown { font-variant-numeric: tabular-nums; }
.promo-teaser { margin-top: 10px; color: #2e7d32; font-size: 15px; }
.cart-info { color: var(--muted); font-size: 13px; margin-top: 30px; padding-left: 18px; }

.checkout-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; padding: 20px 0; border-top: 1px solid var(--line); margin-top: 10px; }
.checkout-nav .go-back { color: var(--muted); }
.checkout-nav .checkout { margin-left: auto; }
.checkout-nav .checkout a, .checkout-nav .checkout button { display: inline-block; border: 0; padding: 13px 30px; background: var(--orange); color: #fff; font-size: 18px; }
.checkout-nav .checkout a:hover, .checkout-nav .checkout button:hover { background: var(--blue-light); color: #fff; text-decoration: none; }

.order-form { max-width: 820px; }
.form-section-title { font-size: 24px; margin: 30px 0 15px; color: var(--text); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 25px; }
.form-row label { display: block; font-weight: 400; color: var(--muted); margin-bottom: 4px; }
.form-row .form-control { height: 42px; }
/* iOS Safari przybliża stronę po stuknięciu w pole z tekstem < 16px */
@media screen and (max-width: 768px) {
	.form-control, select, textarea, input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="search"], input[type="number"] { font-size: 16px; }
}
.form-row textarea.form-control { height: auto; }
.form-hint { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.form-row-wide { grid-column: 1 / -1; }
.form-row-split { display: flex; gap: 15px; flex-wrap: wrap; }
.form-row-split > div { flex: 1 1 0; }
.form-row-split > div.narrow { flex: 0 0 120px; }
.form-row-split > .field-error { flex-basis: 100%; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.checkbox-row label { font-weight: 400; margin: 0; }
.form-annot { color: var(--muted); font-size: 13px; }
.order-comment { margin-top: 30px; padding: 15px 20px; background: var(--bg-soft); color: var(--muted); }
.order-comment .form-section-title { margin-top: 0; font-size: 18px; }

/* zamówienie: sposób dostawy i wybór punktu InPost (opcje w stylu wyboru płatności) */
.field-note { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.delivery-options { border-bottom: 1px solid var(--line); }
.inpost-picker { padding: 15px 10px 5px 38px; }
.inpost-picker > label { display: block; font-weight: 400; color: var(--muted); margin-bottom: 4px; }
.inpost-chosen { margin: 0 0 12px; }
.inpost-chosen:empty { display: none; }
.inpost-search { display: flex; gap: 10px; max-width: 520px; }
.inpost-search .form-control { flex: 1 1 auto; height: 42px; }
.inpost-search .btn-outline { flex: 0 0 auto; }
.inpost-results { margin-top: 10px; max-height: 420px; overflow-y: auto; }
.inpost-results .pay-option { padding: 10px; }
.inpost-results .pay-title { font-size: 15px; }
.inpost-type { margin-left: 6px; font-weight: 400; font-size: 13px; color: var(--muted); }
.inpost-msg { margin: 0; padding: 10px 0; color: var(--muted); }
@media (max-width: 768px) {
	.inpost-picker { padding-left: 10px; }
	.inpost-search .form-control { font-size: 16px; }
	.inpost-search .btn-outline { min-height: 44px; }
	.inpost-results .pay-option { min-height: 44px; }
}

.payment-page { display: flex; gap: 40px; align-items: flex-start; }
.payment-main { flex: 1 1 auto; min-width: 0; }
.payment-summary { flex: 0 0 300px; }
.payment-summary:empty { display: none; }
.payment-summary .cart-brief { box-shadow: none; }
.payment-why { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.payment-why:empty { display: none; }
/* opcje płatności na wspólnej osi: 10px odstępu + 16px radio + 12px przerwy = 38px do początku tekstu */
.pay-option { display: grid; grid-template-columns: 16px minmax(0, 1fr); column-gap: 12px; align-items: center; margin: 0; padding: 15px 10px; border-top: 1px solid var(--line); font-weight: 400; cursor: pointer; }
.pay-option:hover { background: var(--bg-soft); }
.pay-option:has(input:checked) { background: var(--bg-soft); box-shadow: inset 3px 0 0 var(--blue-light); }
.pay-option input { grid-column: 1; margin: 0; }
.pay-option .pay-title, .pay-group legend { font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--text); }
.pay-option .pay-title { grid-column: 2; margin: 0; }
.pay-option .pay-desc { grid-column: 2; display: block; font-style: normal; color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.pay-group { min-width: 0; margin: 0; padding: 15px 10px 15px 38px; border: 0; border-top: 1px solid var(--line); }
.pay-group legend { float: left; width: 100%; margin: 0 0 12px; padding: 0; border: 0; }
.pay-types-grid { clear: both; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pay-type { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border: 1px solid var(--line); font-weight: 400; font-size: 13px; text-align: center; cursor: pointer; margin: 0; }
.pay-type img { max-width: 80px; height: 32px; object-fit: contain; }
.pay-type input { margin: 0; }
.pay-type:has(input:checked) { border-color: var(--blue-light); box-shadow: 0 0 0 2px var(--blue-light) inset; }
.coupon-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 15px 38px; }
.coupon-row .form-control { width: 220px; }

@media screen and (max-width: 767px) {
	.checkout-steps { font-size: 12px; }
	.cart-table thead { display: none; }
	.cart-table, .cart-table tbody, .cart-table tr { display: block; }
	.cart-table tr { display: grid; grid-template-columns: 70px 1fr auto; gap: 8px 12px; padding: 15px 0; border-top: 1px solid var(--line); }
	.cart-table > tbody > tr > td { display: block; border: 0; padding: 0; width: auto !important; text-align: left; }
	/* wiersz koszyka: [okładka | tytuł, autor, dostępność | ×] nad [okładka | ilość | cena] */
	.cart-table tr { grid-template-areas: "img det rm" "img qty price"; grid-template-rows: auto 1fr; }
	.cart-table .img-container { grid-area: img; align-self: start; }
	.cart-table .details-container { grid-area: det; align-self: start; min-width: 0; }
	.cart-table .remove-container { grid-area: rm; justify-self: end; align-self: start; margin: -13px -15px 0 0; } /* glif × w rogu treści, cel dotyku 44px */
	.cart-table .amount-container { grid-area: qty; align-self: end; text-align: left; }
	.cart-table .price-container { grid-area: price; align-self: end; text-align: right; }
	.cart-table .cover-price { white-space: normal; font-size: 13px; } /* dopisek o cenie okładkowej nie może rozpychać kolumny ceny */
	.form-grid { grid-template-columns: 1fr; }
	.payment-page { flex-direction: column; }
	.payment-summary { flex-basis: auto; width: 100%; }
	.checkout-nav .checkout { width: 100%; }
	.checkout-nav .checkout a, .checkout-nav .checkout button { width: 100%; text-align: center; }
}
@media screen and (max-width: 359px) {
	.cart-table tr { grid-template-columns: 60px 1fr auto; column-gap: 10px; } /* licznik ilości (128px) musi się zmieścić obok okładki */
	.cart-table .img-container img { max-width: 60px; height: auto; }
}

/* ---------- etap 3: konto, recenzje, strony tekstowe ---------- */

.account-page { max-width: 640px; }
.account-page.account-wide { max-width: 900px; }
.account-page h1, .text-page h1 { font-size: 32px; margin: 0 0 20px; }
.account-form { margin: 20px 0; }
.account-form .form-row { margin-bottom: 15px; }
.account-form .form-control { height: 42px; }
.account-form textarea.form-control { height: auto; }
.form-label { display: block; color: var(--muted); margin-bottom: 4px; }
.form-static { padding: 8px 0; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; margin: 20px 0; }
.form-actions-note { color: var(--muted); font-size: 14px; }
.account-form .field-error:empty { display: none; }

.account-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.account-tabs a { padding: 10px 20px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.account-tabs a.active { color: var(--text); border-bottom-color: var(--orange); font-weight: 700; }

.orders-list { list-style: none; padding: 0; margin: 0; }
.order-row { display: flex; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.order-no { color: var(--muted); min-width: 30px; }
.order-date { color: var(--muted); font-size: 14px; margin-left: 8px; }
.order-status { margin-top: 4px; }
.order-status a { margin-right: 12px; }
.order-info { flex: 1 1 auto; min-width: 0; }
.order-details { margin-top: 8px; }
.order-details summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); cursor: pointer; }
.order-details summary:hover, .order-details summary:focus { color: var(--orange); }
.order-details summary::-webkit-details-marker { display: none; }
/* trójkątna karetka: w prawo zwinięte, w dół rozwinięte */
.order-details summary::before { content: ''; flex: 0 0 auto; margin-right: 8px; border-left: 6px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .2s; }
.order-details[open] > summary::before { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .order-details summary::before { transition: none; } }
.order-items { list-style: none; padding: 0; margin: 0 0 10px; border-top: 1px solid var(--line); }
.order-items li { display: flex; justify-content: space-between; gap: 15px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.order-item-qty { flex: 0 0 auto; color: var(--muted); white-space: nowrap; }
/* zawartość <details> przycina kreskę „ł” wystającą poza szerokość znaku na końcu linii */
.order-item-qty, .order-summary dd { padding-right: 2px; }
.order-summary { display: grid; grid-template-columns: auto 1fr; gap: 4px 15px; margin: 0; }
.order-summary dt { font-weight: 400; color: var(--muted); }
.order-summary dd { margin: 0; text-align: right; }

.star-rating { display: flex; align-items: center; gap: 4px; font-size: 26px; }
.star-rating a { color: #e3e1d8; }
.star-rating a.on { color: #f3c400; }
.star-rating a:hover, .star-rating a:focus { text-decoration: none; outline: 0; }
.star-rating a:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 2px; }
.star-rating a.hover { color: var(--orange); }
.rating-comment { font-size: 14px; color: var(--muted); margin-left: 12px; }

.text-page h2 { font-size: 22px; margin: 30px 0 12px; }
.text-page h3 { font-size: 18px; margin: 25px 0 10px; }
.text-page table { max-width: 100%; }
.text-page img { max-width: 100%; height: auto; }
.help-topics { columns: 2; column-gap: 40px; padding-left: 18px; }
.help-topics li { margin-bottom: 8px; break-inside: avoid; }
.text-page-back { margin-top: 30px; }

@media screen and (max-width: 767px) {
	.account-page h1, .text-page h1 { font-size: 24px; }
	.help-topics { columns: 1; }
	.text-page { overflow-wrap: break-word; }
	.text-page table { display: block; overflow-x: auto; }
}

/* ---------- uzupełnienia: wydawnictwa, opisy, nagłówek ---------- */

.footer-publishers { columns: 4; column-gap: 20px; margin-bottom: 15px; }
.footer-publishers li a { color: var(--muted); }
#menu-categories .dropdown-header { column-span: all; color: var(--text); font-size: 13px; text-transform: uppercase; padding: 8px 20px 4px; }
#menu-categories .divider { column-span: all; }
.book-grid .description { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 10px 0 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.top_tools .foryou a { color: var(--orange); }
@media screen and (max-width: 767px) { .footer-publishers { columns: 2; } }
#mini-cart a { margin-left: 0; line-height: 1.4; vertical-align: baseline; }

/* ---------- karuzela polecanych (strona główna) ---------- */

/* odstęp od pasa menu: 32px nad karuzelą (navbar kończy się 20px pod linkami) */
.carousel-top-container { height: auto; margin: 12px 0 60px; }
@media screen and (min-width: 769px) and (max-width: 991px) { .carousel-top-container { margin-top: 32px; } } /* tu menu kończy się wyszukiwarką bez marginesu */
#carousel-top, #carousel-top .item { min-height: 0; }
.carousel-slide { display: flex; align-items: center; gap: 50px; min-height: 520px; padding: 40px 95px 70px 60px; } /* z prawej miejsce na strzałkę */
#carousel-top .img-container { flex: 0 0 38%; min-height: 0; text-align: center; }
#carousel-top .img-container .img-inner { min-height: 0; padding-bottom: 25px; }
#carousel-top .img-container .img-inner::before { left: 50%; transform: translateX(-50%); width: 100%; background-size: 100% 39px; }
#carousel-top .img-container img { position: relative; bottom: auto; height: 420px; max-height: none; width: auto; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
#carousel-top .details-container { flex: 1 1 auto; min-width: 0; }
#carousel-top .details-container .title { font-size: 42px; padding-right: 0; margin-top: 0; }
#carousel-top .details-container .author { margin-right: 0; }
#carousel-top .carousel-indicators { bottom: 20px; }
#carousel-top .carousel-control { top: 50%; bottom: auto; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; background: rgba(0, 0, 0, .22); color: #fff; font-size: 30px; line-height: 46px; text-shadow: none; opacity: 1; transition: background .2s; }
#carousel-top .carousel-control.left { left: 15px; }
#carousel-top .carousel-control.right { right: 15px; }
#carousel-top .carousel-control:hover, #carousel-top .carousel-control:focus { background: rgba(0, 0, 0, .45); color: #fff; }

@media screen and (max-width: 991px) {
	.carousel-slide { gap: 25px; padding: 30px 75px 60px; min-height: 0; }
	#carousel-top .details-container .title { font-size: 30px; }
	#carousel-top .img-container img { height: 320px; }
}

@media screen and (max-width: 768px) {
	.carousel-top-container { margin: 0 -15px 30px; padding-bottom: 0; }
	/* okładka dalej od górnej krawędzi i bliżej tekstu, hasło dalej od kropek (wysokość planszy bez zmian) */
	.carousel-slide { flex-direction: column; gap: 22px; text-align: center; padding: 36px 15px 62px; }
	#carousel-top .img-container .img-inner { padding-bottom: 0; } /* miejsce na cień, którego w tym wariancie nie ma */
	#carousel-top .img-container img { height: 260px; }
	#carousel-top .details-container .title { font-size: 24px; margin: 0; }
	#carousel-top .carousel-indicators { bottom: 10px; }
	#carousel-top .carousel-control { display: none; }
	/* kropki: odstęp i niewidoczny obszar dotyku ~32px wokół każdej (same kropki zostają małe) */
	#carousel-top .carousel-indicators li { position: relative; margin: 0 8px; }
	#carousel-top .carousel-indicators li::after { content: ''; position: absolute; inset: -11px -9px; }
	#carousel-top { touch-action: pan-y; } /* poziomy gest obsługuje theme.js, pionowy przewija stronę */
}

/* ---------- karuzela: plansze z hasłem i leadem, przełamane tłem z rozmytej okładki ---------- */

#carousel-top .item { overflow: hidden; } /* bez position: Bootstrap ustawia absolute dla .next/.prev w trakcie przejścia */
#carousel-top .slide-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
#carousel-top .slide-bg::before { content: ''; position: absolute; inset: -60px; background: var(--cover) center / cover no-repeat; }
#carousel-top .carousel-slide { position: relative; z-index: 1; }
#carousel-top .slide-kicker { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin-bottom: 8px; }
#carousel-top .slide-hook { font-size: 20px; line-height: 1.35; margin: 18px 0 0; }
#carousel-top .slide-lead { font-size: 15px; line-height: 1.6; margin: 10px 0 0; max-width: 560px; }
#carousel-top .slide-hook:empty, #carousel-top .slide-lead:empty { display: none; }
#carousel-top .details-container .title { font-size: 38px; }
#carousel-top .details-container .author { padding-bottom: 0; border-bottom: 0; }

/* akcenty: pseudolosowe, ale stałe dla książki (MOOD = id % 4) */
#carousel-top .mood-0 { --accent: #f29a00; --cut-a: 44%; --cut-b: 32%; }
#carousel-top .mood-1 { --accent: #2e9cc9; --cut-a: 34%; --cut-b: 44%; }
#carousel-top .mood-2 { --accent: #b8436b; --cut-a: 42%; --cut-b: 30%; }
#carousel-top .mood-3 { --accent: #42413d; --cut-a: 38%; --cut-b: 26%; }

/* v2 "Przełamanie": ukośnie ucięty pas rozmytej okładki + apla z hasłem */
.carousel-v2 #carousel-top .slide-bg { clip-path: polygon(0 0, var(--cut-a) 0, var(--cut-b) 100%, 0 100%); }
.carousel-v2 #carousel-top .slide-bg::before { filter: blur(26px) saturate(1.5) brightness(.85); }
.carousel-v2 #carousel-top .slide-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, .25)); }
.carousel-v2 #carousel-top .img-container .img-inner::before { display: none; }
.carousel-v2 #carousel-top .img-container img { box-shadow: 0 18px 40px rgba(0, 0, 0, .4); }
.carousel-v2 #carousel-top .slide-kicker { color: var(--accent); }
.carousel-v2 #carousel-top .slide-hook { display: inline-block; background: var(--accent); color: #fff; font-weight: 700; font-size: 18px; padding: 10px 16px; transform: rotate(-1.2deg); box-shadow: 4px 4px 0 rgba(0, 0, 0, .08); }
.carousel-v2 #carousel-top .mood-1 .slide-hook, .carousel-v2 #carousel-top .mood-3 .slide-hook { transform: rotate(1deg); }
.carousel-v2 #carousel-top .slide-lead { color: var(--muted); }
.carousel-v2 #carousel-top .slide-hook:empty, .carousel-v2 #carousel-top .slide-lead:empty { display: none; }


@media screen and (max-width: 768px) {
	#carousel-top .slide-lead, #carousel-top .slide-kicker { display: none; }
	#carousel-top .slide-hook { font-size: 16px; margin-top: 8px; }
	.carousel-v2 #carousel-top .slide-bg { clip-path: polygon(0 0, 100% 0, 100% 45%, 0 60%); }
}

/* banery w karuzeli: desktop 2440x1110 (stała wysokość 555 px, boki mogą być przycięte), telefon 1080x1080 */
#carousel-top .carousel-banner a, #carousel-top .carousel-banner picture { display: block; }
#carousel-top .carousel-banner img { display: block; width: 100%; height: 555px; object-fit: cover; object-position: center; }

@media screen and (max-width: 768px) {
	#carousel-top .carousel-banner img { height: auto; aspect-ratio: 1 / 1; }
}

/* ---------- nagłówek: menu konta, koszyk bez separatora ---------- */

.top_tools .cart { border-right: 0; padding-right: 0; }
.top_tools .account-menu { position: relative; }
.top_tools .account-menu > a { color: var(--muted); cursor: pointer; }
.top_tools .account-menu > a .fa { margin-left: 4px; }
.top_tools .account-menu .dropdown-menu { left: 0; min-width: 200px; margin-top: 8px; border-radius: 0; border-color: var(--line); box-shadow: 0 8px 20px rgba(0, 0, 0, .12); text-align: left; }
.top_tools .account-menu .dropdown-menu { display: none; }
.top_tools .account-menu.open .dropdown-menu { display: block; }
.top_tools .account-menu .dropdown-menu > li { display: block; }
.top_tools .account-menu .dropdown-menu > li > a { display: block; padding: 8px 18px; color: var(--text); line-height: 1.4; }
.top_tools .account-menu .dropdown-menu > li > a:hover { background: var(--bg-soft); color: var(--orange); }
.top_tools .account-menu ~ .login { display: none; }

/* listy bez sortowania i stronicowania (nowości, zapowiedzi, polecane, dla Ciebie) - bez paska z licznikiem */
.list-toolbar:not(:has(select)):has(.list-pagination:empty), .list-toolbar-bottom:has(.list-pagination:empty) { display: none; }

/* ---------- menu mobilne: panel nad treścią ---------- */

@media screen and (max-width: 768px) {
	/* main.css przesuwa nagłówek (left: 15px), a Bootstrap rozszerza .navbar-header poza kontener */
	.navbar { position: relative; left: auto; right: auto; }
	.navbar > .container-fluid > .navbar-header { margin-left: 0; margin-right: 0; }
	/* panel menu nad treścią strony; --menu-top ustawia theme.js przy otwieraniu (dolna krawędź nagłówka) */
	#main-nav.navbar-collapse { overscroll-behavior: contain; position: fixed; top: var(--menu-top, 70px); left: 0; right: 0; z-index: 1100; margin: 0; padding: 0; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0, 0, 0, .18); max-height: calc(100vh - var(--menu-top, 70px)); overflow-y: auto; }
	#main-nav.navbar-collapse::before { display: none !important; }
	#main-nav.in, #main-nav.collapsing { display: flex !important; flex-direction: column; }
	#main-nav .menu_search { order: 1; display: flex; flex-direction: column; align-items: stretch; width: 100%; }
	#main-nav .menu_search > * { width: 100%; max-width: none; }
	#main-nav .top_tools { order: 2; }

	#main-nav .site_search_container { order: -1; flex: none; padding: 12px 15px; border-bottom: 1px solid var(--line); }
	#main-nav .navbar-nav { margin: 0; float: none; }
	#main-nav .navbar-nav > li { float: none; text-align: left; border-bottom: 1px solid var(--line); padding: 0; }
	#main-nav .navbar-nav > li > a { padding: 14px 20px; font-size: 17px; }
	#main-nav .navbar-nav > li.home { display: none; }
	#main-nav #menu-categories .dropdown-menu { position: static; float: none; box-shadow: none; border: 0; background: var(--bg-soft); padding: 4px 0; }
	#main-nav #menu-categories .dropdown-menu > li > a { padding: 8px 32px; }
	#main-nav #menu-categories .dropdown-header { padding: 10px 32px 4px; }

	#main-nav .top_tools { display: block; margin: 0; padding: 8px 0 12px; background: var(--bg-soft); text-align: left; }
	#main-nav .top_tools > div { display: block; padding: 0; margin: 0; border: 0; }
	#main-nav .top_tools .account-menu ~ .login { display: none; }
	#main-nav .top_tools > div > a { display: block; padding: 10px 20px; }
	#main-nav .top_tools .cart { display: none; }
	#main-nav .top_tools .account-menu > a { color: var(--text); pointer-events: none; }
	#main-nav .top_tools .account-menu > a .fa { display: none; }
	#main-nav .top_tools .account-menu .dropdown-menu { display: block; position: static; float: none; margin: 0; box-shadow: none; border: 0; background: none; padding: 0; }
	#main-nav .top_tools .account-menu .dropdown-menu > li > a { padding: 10px 20px 10px 32px; }
	#main-nav .top_tools .account-menu .divider { display: none; }
}

/* autor w osobnej linii - bez kreski przed nazwiskiem (main.css dorysowuje ją w kilku miejscach) */
.author::before { content: none !important; display: none !important; }

/* plansza karuzeli jest w całości linkiem do strony książki */
#carousel-top a.carousel-slide { color: inherit; text-decoration: none; cursor: pointer; }
#carousel-top a.carousel-slide .title { color: var(--text); }

/* ---------- elementy UI jako wektory (zamiast PNG z main.css) ---------- */

:root {
	--icon-home: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 16'%3E%3Cpath d='M9 .8.6 8h2.3v7.2h4.6v-4.6h3v4.6h4.6V8h2.3z'/%3E%3C/svg%3E");
	--icon-book: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 15'%3E%3Cpath d='M0 2.2C2.6 1 5.2 1.1 7.3 2.6v11.9C5.2 13 2.6 12.9 0 14.1zM16 2.2C13.4 1 10.8 1.1 8.7 2.6v11.9c2.1-1.5 4.7-1.6 7.3-.4z'/%3E%3C/svg%3E");
}

/* ikona domku w menu (niebieska, po najechaniu pomarańczowa - jak w sprite'cie projektu) */
.navbar ul li.home a span { display: none; }
.navbar ul li.home a::before, .navbar ul li.home a:hover::before { opacity: 1; width: 18px; height: 16px; background: currentColor; -webkit-mask: var(--icon-home) center / contain no-repeat; mask: var(--icon-home) center / contain no-repeat; vertical-align: -2px; }

/* ikona książki przy „Przeczytaj darmowy fragment” */
.product-top-container .details-container .read-excerpt { padding-left: 25px; }
.product-top-container .details-container .read-excerpt a::before { width: 16px; height: 15px; background: var(--blue-light); -webkit-mask: var(--icon-book) center / contain no-repeat; mask: var(--icon-book) center / contain no-repeat; }
.product-top-container .details-container .read-excerpt a:hover::before { background: var(--orange); }

/* cień pod okładką: gradient zamiast cover_shadow.png */
.product-top-container .img-container .img-inner::before, #carousel-top .img-container .img-inner::before { background: radial-gradient(ellipse at center, rgba(0, 0, 0, .28) 0, rgba(0, 0, 0, .12) 35%, rgba(0, 0, 0, 0) 70%) no-repeat; background-size: 100% 100%; }

/* tekstura papieru (szum + ukośny splot) jako JPEG 2x: wcześniej SVG z filtrem feTurbulence, którego Safari
   potrafił nie wyrenderować (czarne albo puste tło do wyczyszczenia cache); kolor pod spodem do czasu wczytania */
.carousel-top-container, .bottom-container .freeshipping-container { background: #f2f1ed url(images/texture.jpg) 0 0 / 240px 240px repeat; }

/* paginacja: nad listą tylko dolna linia, pod listą tylko górna */
.list-toolbar { border-top: 0; }
.list-toolbar.list-toolbar-bottom { border-top: 1px solid var(--line); border-bottom: 0; }

/* nagłówek mobilny: logo po lewej, koszyk i hamburger po prawej, wyśrodkowane w pionie */
@media screen and (max-width: 768px) {
	.navbar > .container-fluid > .navbar-header { display: flex; align-items: center; gap: 6px; }
	.navbar-header::before, .navbar-header::after { display: none; }
	.navbar-header .navbar-brand { order: -1; margin-right: auto; flex: 0 1 auto; min-width: 0; } /* na wąskich ekranach zwęża się logo, nie przyciski */
	.navbar-header .navbar-cart-button, .navbar-header .navbar-toggle { float: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0; padding: 0; }
	.navbar-header .navbar-cart-button { font-size: 22px; line-height: 1; }
	/* main.css wciska glif w pudełko 16x16, więc ikona wylewała się w dół; podkreślenie z Bootstrapa dawało artefakt na hover */
	.navbar-header .navbar-cart-button i { display: block; width: auto; height: auto; line-height: 1; }
	.navbar-header .navbar-cart-button:hover, .navbar-header .navbar-cart-button:focus { text-decoration: none; color: var(--orange); outline: 0; }
	/* liczba pozycji w koszyku nad ikoną; pusty koszyk = pusty span */
	.navbar-header .navbar-cart-button { position: relative; }
	.navbar-header .navbar-cart-button .cart-badge { position: absolute; top: 2px; left: 22px; min-width: 20px; height: 20px; padding: 0 5px; border: 2px solid #fff; border-radius: 10px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; }
	.navbar-header .navbar-cart-button .cart-badge:empty { display: none; }
	.navbar-header .navbar-toggle { flex-direction: column; border-right: 0; }
	.navbar-header .navbar-toggle .icon-bar { width: 22px; }
	.navbar-header .navbar-toggle .icon-bar + .icon-bar { margin-top: 5px; }
}

/* strzałki karuzeli: korekta optyczna - szewron „cięży” w stronę otwarcia, więc przesuwamy go ~1.5px w stronę grotu
   (zmierzone na zrzucie 3x: glif geometrycznie w środku ±0.3px, 0.5px za nisko) */
#carousel-top .carousel-control .fa { display: inline-block; }
#carousel-top .carousel-control.left .fa { transform: translate(-1.7px, -.5px); }
#carousel-top .carousel-control.right .fa { transform: translate(1.8px, -.5px); }

/* strona książki: okładka 380px wysokości z miękkim cieniem pod nią (elipsa liczona od szerokości okładki) */
.product-top-container .img-container .img-inner { display: inline-block; position: relative; padding-bottom: 28px; max-width: 100%; } /* main.css: 320px/220px - ściskało obrazy o innych proporcjach */
.product-top-container .img-container #mainProductImage { height: auto; max-height: 380px; width: auto; max-width: 100%; /* proporcje zawsze z obrazu; źródła mają 570px, więc okładki dochodzą do 380px */ position: relative; bottom: auto; z-index: 1; /* main.css: bottom: 20px (dla absolute) */ box-shadow: 0 14px 28px rgba(0, 0, 0, .22); }
.product-top-container .img-container .img-inner::before, .product-top .img-container .img-inner::before { display: block; left: 50%; bottom: 0; width: 150%; height: 36px; transform: translateX(-50%); background: radial-gradient(ellipse at center, rgba(0, 0, 0, .32) 0, rgba(0, 0, 0, .14) 38%, rgba(0, 0, 0, 0) 70%) no-repeat; background-size: 100% 100%; }
@media screen and (max-width: 768px) {
	/* bez cienia pod okładką; cenę i przycisk zapewnia przypięty pasek (.buy-bar), więc okładka może być większa */
	.product-top-container .img-container #mainProductImage { max-height: 340px; }
	.product-top-container .img-container .img-inner { padding-bottom: 0; }
	.product-top-container .img-container .img-inner::before { display: none; }
	/* przypięty pasek zakupu (theme.js) */
	.buy-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; display: flex; align-items: center; gap: 15px; padding: 10px 15px calc(10px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -4px 16px rgba(0, 0, 0, .12); }
	.buy-bar[hidden] { display: none; }
	.buy-bar-price { flex: 1 1 auto; min-width: 0; line-height: 1.1; }
	.buy-bar-price .current-price { font-size: 22px; }
	.buy-bar .btn-cart { flex: 0 0 auto; min-height: 44px; padding: 10px 18px; }
	body.has-buy-bar { padding-bottom: 70px; }
	.product-top .img-container .img-inner { max-width: 100%; }
}
/* góra okładki = góra liter tytułu obok (h1: 10px marginesu + ~10px odstępu z wysokości linii; zmierzone na zrzucie) */
@media screen and (min-width: 992px) {
	.product-top-container .img-container .img-inner { margin-top: 20px; }
}

/* ---------- nagłówek desktop: logo i menu w jednym rzędzie flex (main.css na floatach łamał menu przy 992-1199px) ---------- */

@media screen and (min-width: 769px) {
	.navbar > .container-fluid { display: flex; align-items: flex-start; }
	.navbar > .container-fluid::before, .navbar > .container-fluid::after { display: none; }
	/* logotyp 128x74 wyśrodkowany między górnymi linkami (top 20px) a dołem menu (107px), z oddechem dookoła */
	.navbar > .container-fluid > .navbar-header { flex: 0 0 auto; float: none; }
	.navbar > .container-fluid > .navbar-header .navbar-brand { padding: 27px 15px 20px; }
	/* margin-left: dodatkowy odstęp między logo a menu (z domkiem) */
	.navbar > .container-fluid > #main-nav { flex: 1 1 auto; min-width: 0; float: none; margin-left: 16px; }
	.menu_search .navbar-nav { display: flex; flex: 0 0 auto; flex-wrap: nowrap; float: none; margin: 0; } /* menu nie kurczy się - zwęża się wyszukiwarka */
	.menu_search .navbar-nav > li { float: none; flex: 0 0 auto; }
	.menu_search .navbar-nav > li > a { white-space: nowrap; }
	/* stały odstęp logo-domek 48px: main.css zmienia padding li i margines domku na swoich progach */
	.navbar-default .menu_search .navbar-nav > li { padding: 0 2px; }
	.navbar-default .menu_search .navbar-nav > li.home { margin-left: 0; }
	.navbar-default .menu_search .navbar-nav > li.home > a { padding-left: 15px; }
	.site_search_container { flex: 0 1 260px; min-width: 170px; margin-left: auto; }
}

@media screen and (min-width: 769px) and (max-width: 1199px) {
	.navbar-default .navbar-nav > li > a { padding: 10px 9px; font-size: 15px; }
}

@media screen and (min-width: 992px) and (max-width: 1099px) {
	.navbar-default .navbar-nav > li > a { padding: 10px 7px; font-size: 14px; }
}

@media screen and (min-width: 769px) and (max-width: 991px) {
	.navbar-default .navbar-nav > li > a { padding: 10px 7px; font-size: 14px; }
	.menu_search { flex-wrap: wrap; }
	.site_search_container { flex: 1 1 100%; max-width: none; }
}
