/* ==========================================================================
   ELKO - listy produktów: kategoria, /sklep/, wyszukiwarka, tagi.
   Wzór: demo kategoria.html (nagłówek, pigułki, pasek sortowania, siatka, poradnik, FAQ).
   ========================================================================== */

.elko-cat .elko-section { max-width: var(--e-wrap); margin: 0 auto; padding-left: var(--e-gutter); padding-right: var(--e-gutter); }

/* ---------- nagłówek ---------- */
.elko-cat-head { position: relative; background: var(--e-soft); padding-bottom: 40px; }
.elko-cat-head .elko-section { padding-top: 40px; padding-bottom: 56px; }
.elko-cat-head::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 64px; pointer-events: none;
	background: no-repeat center/100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'%3E%3Cpath d='M0 48h1440V28c-120-18-240-24-360-12S840 44 720 36 480 6 360 10 120 34 0 26z' fill='%23fff'/%3E%3C/svg%3E");
}
.elko-cat-head .elko-crumbs { gap: 10px; font-size: 13.5px; margin-bottom: 22px; }
.elko-cat-head .elko-crumbs a { color: var(--e-muted); }
.elko-cat-head .elko-crumbs a:hover { color: var(--e-red); }
.elko-cat-head .elko-crumbs i { font-style: normal; color: var(--e-line-2); }
.elko-cat-head .elko-crumbs b { color: var(--e-ink); font-weight: 600; }
.elko-cat-head h1 { margin: 0 0 14px; font-size: 46px; line-height: 1.08; color: var(--e-ink); }
.elko-cat-head .row p { margin: 0; max-width: 620px; font-size: 17px; line-height: 1.6; color: var(--e-text); }
.elko-cat--search .elko-cat-head h1 { margin-bottom: 0; }

.elko-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.elko-chips > * {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 9px 16px 9px 12px; border-radius: var(--e-pill);
	border: 1px solid var(--e-line); background: #fff;
	font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--e-ink); text-decoration: none;
	transition: border-color .2s, color .2s;
}
.elko-chips > a:hover { border-color: var(--e-line-2); color: var(--e-red); }
.elko-chips svg, .elko-chips img { width: 18px; height: 18px; flex: 0 0 auto; }
.elko-chips svg { color: var(--e-red); }
.elko-chips img { object-fit: contain; }
.elko-chips > b { background: var(--e-red); border-color: var(--e-red); color: #fff; font-weight: 600; }
.elko-chips > b svg { color: #fff; }

/* ---------- pasek: liczba + sortowanie ---------- */
.elko-cat-grid .elko-section { padding-top: 40px; padding-bottom: var(--e-section); }
.elko-cat-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.elko-cat-count { font-size: 14.5px; color: var(--e-muted); }
.elko-sortform { display: flex; align-items: center; gap: 10px; margin: 0; }
.elko-sortform label { margin: 0; font-size: 14.5px; font-weight: 400; color: var(--e-muted); }
.elko-sortform select {
	appearance: none; -webkit-appearance: none; width: auto; min-height: 44px; padding: 10px 40px 10px 14px;
	border: 1px solid var(--e-line); border-radius: var(--e-r-s); box-shadow: none; cursor: pointer;
	font-size: 14.5px; font-weight: 500; color: var(--e-ink);
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2318181b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
}
.elko-sortform select:hover, .elko-sortform select:focus { border-color: var(--e-line-2); outline: 0; }
.elko-sortform select:focus-visible { outline: 2px solid var(--e-red); outline-offset: 2px; }

/* ---------- paginacja ---------- */
.elko-pager { margin-top: 48px; }
.elko-pager ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.elko-pager .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px;
	border: 1px solid var(--e-line); border-radius: var(--e-r-s); background: #fff;
	font-size: 15px; font-weight: 600; color: var(--e-ink); text-decoration: none; transition: border-color .2s, color .2s;
}
.elko-pager a.page-numbers:hover { border-color: var(--e-line-2); color: var(--e-red); }
.elko-pager .page-numbers.current { background: var(--e-red); border-color: var(--e-red); color: #fff; }
.elko-pager .page-numbers.dots { border-color: transparent; background: none; min-width: 24px; padding: 0; }
.elko-pager .page-numbers svg { width: 20px; height: 20px; }
.elko-pager .page-numbers svg.prev { transform: scaleX(-1); }

/* ---------- stan pusty ---------- */
.elko-empty { max-width: 640px; margin: 24px auto 0; padding: 40px 0 8px; text-align: center; }
.elko-empty p { margin: 14px 0 0; font-size: 17px; color: var(--e-text); }
.elko-empty-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.elko-empty-cats a {
	display: inline-block; padding: 9px 16px; border: 1px solid var(--e-line); border-radius: var(--e-pill);
	font-size: 14px; font-weight: 500; color: var(--e-ink); transition: border-color .2s, color .2s;
}
.elko-empty-cats a:hover { border-color: var(--e-line-2); color: var(--e-red); }
.elko-empty .elko-btns { justify-content: center; margin-top: 28px; }

/* ---------- poradnik (opis SEO w kartach) ---------- */
.elko-cat-guide { background: var(--e-soft); }
.elko-cat-guide .elko-section { padding-top: var(--e-section); padding-bottom: var(--e-section); }
.elko-cat-guide .elko-lead { max-width: 780px; margin: 16px 0 0; font-size: 17px; color: var(--e-muted); }
.elko-cat-guide .elko-lead a { text-decoration: underline; text-underline-offset: 3px; }
.elko-cat-guide .elko-prose { max-width: 820px; }
.elko-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; grid-auto-flow: dense; margin-top: 40px; }
.elko-guide-card { min-width: 0; padding: 30px; border: 1px solid var(--e-line); border-radius: var(--e-r-l); background: #fff; }
.elko-guide-card.wide { grid-column: 1 / -1; }
.elko-guide-card h3 { margin: 0 0 12px; font-size: 20px; line-height: 1.2; color: var(--e-ink); }
.elko-guide-card p, .elko-guide-card li { font-size: 14.5px; line-height: 1.7; color: var(--e-text); }
.elko-guide-card p { margin: 0 0 10px; }
.elko-guide-card ul, .elko-guide-card ol { margin: 0 0 10px; padding-left: 1.3em; }
.elko-guide-card a { text-decoration: underline; text-underline-offset: 3px; }
.elko-guide-card > :last-child { margin-bottom: 0; }
.elko-guide-card strong, .elko-guide-card b { font-weight: 600; color: var(--e-ink); }
.elko-guide-card.has-photo { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.elko-guide-card.has-photo .tx { padding: 28px 30px 30px; }
.elko-guide-ph img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.elko-tablewrap { margin: 16px 0 0; overflow-x: auto; border: 1px solid var(--e-line); border-radius: var(--e-r-m); }
.elko-guide-card table { width: 100%; margin: 0; border-collapse: collapse; font-size: 14px; }
.elko-guide-card th, .elko-guide-card td { padding: 11px 14px; border: 0; border-bottom: 1px solid var(--e-line); text-align: left; vertical-align: top; }
.elko-guide-card tr:last-child td { border-bottom: 0; }
.elko-guide-card tr:first-child th, .elko-guide-card tr:first-child td { background: var(--e-soft); font-weight: 600; color: var(--e-ink); }

/* ---------- FAQ + „Nie ma tu odpowiedzi?” ---------- */
.elko-cat-faq .elko-section { padding-top: var(--e-section); padding-bottom: var(--e-section); }
.elko-faq3 > .elko-h2 { margin: 0 0 32px; }
.elko-q { border-bottom: 1px solid var(--e-line); }
.elko-q:first-child { border-top: 1px solid var(--e-line); }
.elko-q summary {
	display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0;
	font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--e-ink); cursor: pointer; list-style: none; transition: color .2s;
}
.elko-q summary::-webkit-details-marker { display: none; }
.elko-q summary:hover { color: var(--e-red); }
.elko-q .pl { flex: 0 0 auto; color: var(--e-red); transition: transform .25s var(--e-ease); }
.elko-q .pl svg { width: 24px; height: 24px; stroke-width: 3.4; }
.elko-q[open] .pl { transform: rotate(45deg); }
.elko-q .a { padding: 0 48px 24px 0; }
.elko-q .a p { margin: 0; font-size: 15.5px; line-height: 1.7; color: var(--e-text); }

.elko-ask2 {
	display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 16px 18px; margin-top: 40px; padding: 24px;
	border: 1px solid var(--e-sand); border-radius: var(--e-r-xl); background: var(--e-cream);
}
.elko-ask2 .ic, .elko-ask2 .ic svg { display: block; width: 64px; height: 64px; overflow: visible; }
.elko-ask2 .tx b { display: block; margin: 0 0 4px; font-size: 19px; color: var(--e-ink); }
.elko-ask2 .tx p { margin: 0; font-size: 15px; color: var(--e-text); }
.elko-ask2 .bt { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; }
.elko-ask2 .elko-btn { width: 100%; min-height: 46px; white-space: nowrap; }

@media (min-width: 900px) {
	.elko-faq3 {
		display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.5fr); grid-template-rows: min-content 1fr;
		grid-template-areas: "h r" "a r"; column-gap: 80px; align-items: start;
	}
	.elko-faq3 > .elko-h2 { grid-area: h; margin-bottom: 28px; }
	.elko-faq3 > .r { grid-area: r; }
	.elko-faq3 > .elko-ask2 { grid-area: a; margin: 0; position: sticky; top: calc(var(--e-header-h) + 30px); }
}

/* ---------- responsywność ---------- */
@media (max-width: 900px) {
	.elko-guide-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
	.elko-cat-head { padding-bottom: 24px; }
	.elko-cat-head .elko-section { padding-top: 24px; padding-bottom: 40px; }
	.elko-cat-head::after { height: 40px; }
	.elko-cat-head h1 { font-size: 32px; }
	.elko-cat-head .row p { font-size: 15.5px; }
	.elko-chips { flex-wrap: nowrap; overflow-x: auto; margin: 20px calc(var(--e-gutter) * -1) 0; padding: 0 var(--e-gutter) 2px; scrollbar-width: none; }
	.elko-chips::-webkit-scrollbar { display: none; }
	.elko-chips > * { flex: 0 0 auto; }
	.elko-cat-grid .elko-section { padding-top: 24px; }
	.elko-cat-bar { margin-bottom: 16px; }
	.elko-sortform { gap: 6px; }
	.elko-sortform label { font-size: 13.5px; }
	.elko-sortform select { min-height: 40px; padding: 8px 34px 8px 12px; font-size: 13.5px; }
	.elko-pager { margin-top: 32px; }
	.elko-pager .page-numbers { min-width: 40px; height: 40px; padding: 0 10px; }
	.elko-guide-card { padding: 20px; }
	.elko-guide-card.has-photo { padding: 0; }
	.elko-guide-card.has-photo .tx { padding: 20px; }
	.elko-cat-guide .elko-lead { font-size: 16px; }
	.elko-q summary { padding: 18px 0; }
	.elko-q .a { padding-right: 0; padding-bottom: 20px; }
	.elko-q .a p { font-size: 15.5px; }
	.elko-ask2 .bt { gap: 8px; }
}
