/*
 * Jaguar Import — frontend info-box styles.
 *
 * Loaded only on single produkt views when `show_infobox` is enabled
 * (lazy enqueue from Jaguar_Frontend::inject_infobox()).
 *
 * Class naming follows BEM. The plugin stays neutral: no global selectors,
 * no theme overrides. Customisation primarily via the CSS custom properties
 * declared on `.jaguar-infobox` (a child theme can redefine them).
 */

.jaguar-infobox {
	--jaguar-color-accent: #ff9800;
	--jaguar-color-accent-hover: #e68900;
	--jaguar-color-bg: #f7f7f7;
	--jaguar-color-text: #1a1a1a;
	--jaguar-color-muted: #666;
	--jaguar-color-button-text: #fff;
	--jaguar-radius: 4px;
	--jaguar-padding: 18px 22px;
	--jaguar-margin: 24px 0;

	background: var(--jaguar-color-bg);
	border-left: 4px solid var(--jaguar-color-accent);
	border-radius: var(--jaguar-radius);
	color: var(--jaguar-color-text);
	font-size: 15px;
	line-height: 1.7;
	margin: var(--jaguar-margin);
	padding: var(--jaguar-padding);
}

.jaguar-infobox__price {
	display: none;
}

.jaguar-infobox__price-value {
	display: inline-block;
}

.jaguar-infobox__price-label {
	color: var(--jaguar-color-muted);
	font-size: 13px;
	font-weight: 400;
	margin-left: 4px;
}

.jaguar-infobox__details {
	border: 0;
	border-collapse: collapse;
	margin: 8px 0 0 0;
	width: 100%;
}

.jaguar-infobox__details td {
	border: 0;
}

.jaguar-infobox__row td {
	padding: 4px 0;
	vertical-align: top;
}

.jaguar-infobox__label {
	color: var(--jaguar-color-muted);
	width: 160px;
}

.jaguar-infobox__value {
	color: var(--jaguar-color-text);
}

.jaguar-infobox__value--strong {
	font-weight: 600;
}

.jaguar-infobox__button {
	margin-top: 14px;
}

.jaguar-infobox__cta {
	background: var(--jaguar-color-accent);
	border-radius: var(--jaguar-radius);
	color: var(--jaguar-color-button-text);
	display: inline-block;
	font-weight: 600;
	padding: 12px 26px;
	text-decoration: none;
	transition: background-color 0.15s ease-in-out;
}

.jaguar-infobox__cta:hover,
.jaguar-infobox__cta:focus {
	background: var(--jaguar-color-accent-hover);
	color: var(--jaguar-color-button-text);
	text-decoration: none;
}

/* ── Shortcode [jaguar_grafika] ─────────────────────────────────────── */

.jaguar-grafika {
	text-align: center;
}

.jaguar-grafika a {
	display: block;
	cursor: zoom-in;
}

.jaguar-grafika__img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
}

/* ── Lightbox overlay ───────────────────────────────────────────────── */

.jaguar-lb-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, 0.88);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: zoom-out;
}

.jaguar-lb-overlay__img {
	max-width: 90vw;
	max-height: 90vh;
	object-fit: contain;
	display: block;
	cursor: default;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.jaguar-lb-overlay__close {
	position: absolute;
	top: 20px;
	right: 24px;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 40px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	opacity: 0.75;
}

.jaguar-lb-overlay__close:hover,
.jaguar-lb-overlay__close:focus {
	opacity: 1;
	outline: none;
}

/* ── Shortcode [jaguar_opis] ────────────────────────────────────────── */

.jaguar-opis {
	font-size: 15px;
	line-height: 1.7;
	color: #1a1a1a;
}

.jaguar-opis ul {
	padding-left: 1.2em;
	margin: 0.5em 0;
}

.jaguar-opis li {
	margin-bottom: 0.3em;
}

/* ── Archiwum produktów — siatka kart ───────────────────────────────── */

.post-type-archive-produkt #sidebar {
	display: none;
}

.post-type-archive-produkt #left-area {
	float: none;
	width: 100%;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.post-type-archive-produkt article.et_pb_post {
	margin-bottom: 0;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}

.post-type-archive-produkt article.et_pb_post:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
}

.post-type-archive-produkt article.et_pb_post .entry-featured-image-url {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	display: block;
	background: #f7f7f7;
}

.post-type-archive-produkt article.et_pb_post .entry-featured-image-url img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 16px;
}

.post-type-archive-produkt article.et_pb_post .post-content {
	padding: 10px 14px 14px;
}

.post-type-archive-produkt article.et_pb_post h2.entry-title {
	font-size: 14px;
	margin: 0;
	line-height: 1.35;
}

.post-type-archive-produkt article.et_pb_post h2.entry-title a {
	text-decoration: none;
	color: #222;
}

.post-type-archive-produkt article.et_pb_post h2.entry-title a:hover {
	color: #ff9800;
}

/* ukryj wszystko poniżej tytułu */
.post-type-archive-produkt article.et_pb_post .post-meta,
.post-type-archive-produkt article.et_pb_post .post-content-inner,
.post-type-archive-produkt article.et_pb_post .read-more-button,
.post-type-archive-produkt article.et_pb_post .page-links,
.post-type-archive-produkt article.et_pb_post .post-navigation {
	display: none;
}

@media (max-width: 980px) {
	.post-type-archive-produkt #left-area {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}
}

@media (max-width: 640px) {
	.post-type-archive-produkt #left-area {
		grid-template-columns: 1fr;
		gap: 12px;
	}
}

/* ═══════════════════════════════════════════════════════════════════════
   Shortcode [jaguar_podobne] — produkty z tej samej kategorii
   ═══════════════════════════════════════════════════════════════════════ */

/* ── sekcja ─── */

.jaguar-podobne {
	margin: 48px 0 32px;
}

/* ── nagłówek z dekoracyjną linią ─── */

.jaguar-podobne__naglowek {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #888;
	margin: 0 0 24px;
}

.jaguar-podobne__naglowek::before,
.jaguar-podobne__naglowek::after {
	content: '';
	flex: 1;
	height: 1px;
	background: #e0e0e0;
}

.jaguar-podobne__naglowek::before {
	flex: 0 0 24px;
}

.jaguar-podobne__kategoria {
	color: #ff9800;
	font-weight: 800;
}

/* ── siatka ─── */

.jaguar-podobne__siatka {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(var(--jag-cols, 4), 1fr);
}

/* ── karta ─── */

.jaguar-podobne__karta {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	background: #fff;
	border: 1px solid #ebebeb;
	border-radius: 8px;
	overflow: hidden;
	transition: box-shadow 0.22s ease, transform 0.18s ease, border-color 0.18s ease;
}

.jaguar-podobne__karta:hover {
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.11);
	transform: translateY(-3px);
	border-color: #ddd;
	text-decoration: none;
	color: inherit;
}

/* ── miniatura z hover-overlay ─── */

.jaguar-podobne__miniatura {
	position: relative;
	aspect-ratio: 4 / 3;
	background: #fff;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.jaguar-podobne__img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 14px;
	display: block;
	transition: transform 0.28s ease;
}

.jaguar-podobne__karta:hover .jaguar-podobne__img {
	transform: scale(1.06);
}

/* overlay "Zobacz" pojawia się na hover */
.jaguar-podobne__miniatura::after {
	content: 'Zobacz';
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 152, 0, 0.82);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.jaguar-podobne__karta:hover .jaguar-podobne__miniatura::after {
	opacity: 1;
}

/* placeholder gdy brak zdjęcia */
.jaguar-podobne__miniatura--brak {
	font-size: 40px;
	color: #d0d0d0;
}

/* ── tytuł ─── */

.jaguar-podobne__tytul {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.45;
	color: #222;
	margin: 0;
	padding: 10px 14px 14px;
	text-align: center;

	/* max 2 linie z wielokropkiem */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.jaguar-podobne__karta:hover .jaguar-podobne__tytul {
	color: #ff9800;
}

/* ── responsive ─── */

/* ── stopka: licznik + paginacja ─── */

.jaguar-podobne__stopka {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #ebebeb;
	flex-wrap: wrap;
}

.jaguar-podobne__licznik {
	font-size: 13px;
	color: #888;
	margin: 0;
}

.jaguar-podobne__licznik strong {
	color: #333;
	font-weight: 700;
}

.jaguar-podobne__paginacja {
	display: flex;
	align-items: center;
	gap: 10px;
}

.jaguar-podobne__nav {
	display: inline-block;
	padding: 6px 16px;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
	font-family: inherit;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
	background: #f5f5f5;
	color: #333;
	border: 1px solid #e0e0e0;
	cursor: pointer;
	line-height: 1.5;
}

.jaguar-podobne__nav:hover:not(:disabled) {
	background: #ff9800;
	color: #fff;
	border-color: #ff9800;
	text-decoration: none;
}

.jaguar-podobne__nav--off,
.jaguar-podobne__nav:disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

.jaguar-podobne__strona {
	font-size: 13px;
	color: #666;
	white-space: nowrap;
}

@media (max-width: 767px) {
	.jaguar-podobne__siatka {
		--jag-cols: 3;
		gap: 12px;
	}
}

@media (max-width: 480px) {
	.jaguar-podobne__siatka {
		--jag-cols: 2;
		gap: 10px;
	}

	.jaguar-podobne__naglowek {
		font-size: 11px;
	}
}

/* ═══════════════════════════════════════════════════════════════════════
   [katalog_kategorie] — lista kategorii A-Z
   ═══════════════════════════════════════════════════════════════════════ */

.katalog-kategorie {
	font-size: 14px;
}

.katalog-kategorie__wszystkie {
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 2px solid #ebebeb;
}

.katalog-kategorie__wszystkie .katalog-kategorie__link {
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.katalog-kategorie__grupa {
	margin-bottom: 12px;
}

.katalog-kategorie__litera {
	display: block;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #bbb;
	margin-bottom: 4px;
	padding-left: 2px;
}

.katalog-kategorie__lista {
	list-style: none;
	margin: 0;
	padding: 0;
}

.katalog-kategorie__item {
	margin: 0;
}

.katalog-kategorie__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 5px 8px;
	border-radius: 4px;
	text-decoration: none;
	color: #333;
	transition: background 0.12s ease, color 0.12s ease;
	line-height: 1.4;
}

.katalog-kategorie__link:hover {
	background: #fff5e6;
	color: #ff9800;
	text-decoration: none;
}

.katalog-kategorie__link--aktywna {
	background: #ff9800;
	color: #fff !important;
	font-weight: 600;
}

.katalog-kategorie__link--aktywna:hover {
	background: #e68900;
	color: #fff;
}

.katalog-kategorie__nazwa {
	flex: 1;
}

.katalog-kategorie__count {
	font-size: 11px;
	font-weight: 700;
	color: inherit;
	opacity: 0.65;
	margin-left: 6px;
	white-space: nowrap;
}

.katalog-kategorie__link--aktywna .katalog-kategorie__count {
	opacity: 0.85;
}

/* ═══════════════════════════════════════════════════════════════════════
   [katalog_produkty] — nagłówek siatki
   ═══════════════════════════════════════════════════════════════════════ */

.katalog-produkty__naglowek {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid #ebebeb;
}

.katalog-produkty__tytul {
	font-size: 18px;
	font-weight: 700;
	color: #222;
	margin: 0;
}

.katalog-produkty__liczba {
	font-size: 13px;
	color: #999;
}

.katalog-produkty__pusty {
	color: #888;
	font-size: 14px;
	padding: 24px 0;
}

/* ── [katalog_szukaj] ──────────────────────────────────────────────────── */

.jaguar-szukaj {
	width: 100%;
	max-width: 640px;
	margin: 0 auto;
}

.jaguar-szukaj__pole {
	position: relative;
	display: flex;
	align-items: center;
}

.jaguar-szukaj__input {
	width: 100%;
	padding: 12px 44px 12px 18px;
	font-size: 16px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	outline: none;
	transition: border-color 0.2s;
	background: #fff;
	color: #1a1a1a;
}

.jaguar-szukaj__input:focus {
	border-color: #ff9800;
}

.jaguar-szukaj__input::placeholder {
	color: #aaa;
}

.jaguar-szukaj__spinner {
	display: none;
	position: absolute;
	right: 14px;
	width: 18px;
	height: 18px;
	border: 2px solid #e0e0e0;
	border-top-color: #ff9800;
	border-radius: 50%;
	animation: jag-spin 0.7s linear infinite;
	pointer-events: none;
}

@keyframes jag-spin {
	to { transform: rotate(360deg); }
}

.jaguar-szukaj__wyniki {
	display: none;
	margin-top: 16px;
}

.jaguar-szukaj__podsumowanie {
	font-size: 13px;
	color: #666;
	margin: 0 0 10px;
}

.jaguar-szukaj__brak {
	font-size: 14px;
	color: #999;
	padding: 16px 0;
	text-align: center;
}

.jaguar-szukaj__lista {
	list-style: none !important;
	margin: 8px 0 0 !important;
	padding: 0 !important;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.jaguar-szukaj__pozycja {
	list-style: none !important;
	border-bottom: 1px solid #f0f0f0;
	margin: 0 !important;
	padding: 0 !important;
}

.jaguar-szukaj__pozycja::before,
.jaguar-szukaj__pozycja::marker {
	display: none !important;
	content: none !important;
}

.jaguar-szukaj__pozycja:last-child {
	border-bottom: none;
}

.jaguar-szukaj__kat-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 9px 14px;
	text-decoration: none;
	color: #1a1a1a;
	transition: background 0.15s;
	line-height: 1.3;
}

.jaguar-szukaj__kat-link:hover {
	background: #fff8f0;
	color: #ff9800;
}

.jaguar-szukaj__kat-nazwa {
	font-size: 14px;
	flex: 1 1 auto;
	min-width: 0;
}

.jaguar-szukaj__kat-count {
	flex: 0 0 auto;
	font-size: 12px;
	color: #888;
	background: #f3f3f3;
	border-radius: 20px;
	padding: 2px 9px;
	min-width: 32px;
	text-align: center;
	white-space: nowrap;
}
