.spk {
	--spk-accent: #42255D;
	--spk-text: #8E3B8E;
	--spk-ink: #26262A;
	--spk-muted: #6B6B76;
	--spk-line: #ECECF1;
	--spk-stripe: #F6F6F9;
	--spk-shadow: 0 4px 12px rgba(0, 0, 0, .08);
	--spk-radius: 14px;
	width: 100%;
	color: var(--spk-ink);
}

/* Nawigacja: przełączniki w stylu strony głównej */
.spk-nav {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	padding: 4px 2px 6px;
	margin: 0 0 18px;
}
.spk-nav::-webkit-scrollbar { display: none; }

/* Wysoka specyficzność + !important, bo motyw nadpisuje style <button> (różowe tło) */
.spk .spk-nav button.spk-tab {
	flex: 0 0 auto;
	-webkit-appearance: none;
	appearance: none;
	margin: 0 !important;
	padding: 12px 26px !important;
	min-height: 0 !important;
	border: 2px solid var(--spk-accent) !important;
	border-radius: 20px !important;
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	color: var(--spk-accent) !important;
	font-family: inherit;
	font-weight: 600 !important;
	font-size: 16px !important;
	line-height: 1.2 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	text-decoration: none !important;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .2s, color .2s, transform .2s;
}
.spk .spk-nav button.spk-tab:hover {
	background: rgba(66, 37, 93, .06) !important;
	color: var(--spk-accent) !important;
}
.spk .spk-nav button.spk-tab.is-active,
.spk .spk-nav button.spk-tab.is-active:hover,
.spk .spk-nav button.spk-tab.is-active:focus {
	border-color: transparent !important;
	background: linear-gradient(90deg, var(--spk-accent) 0%, var(--spk-text) 100%) !important;
	color: #fff !important;
}
.spk .spk-nav button.spk-tab:focus { outline: none; }
.spk .spk-nav button.spk-tab:focus-visible { outline: 2px solid var(--spk-accent) !important; outline-offset: 3px; }

/* Panel */
.spk-panel {
	background: #fff;
	border-radius: 24px;
	padding: 44px 50px 50px;
	animation: spk-in .25s ease;
}
.spk-panel[hidden] { display: none; }
@keyframes spk-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Treść z edytora */
.spk-richtext { font-size: 17px; line-height: 1.65; }
.spk-richtext > :first-child { margin-top: 0; }
.spk-richtext > :last-child { margin-bottom: 0; }
.spk-richtext ul { padding-left: 1.2em; }
.spk-richtext li { margin: 0 0 .55em; }
.spk-richtext li::marker { color: var(--spk-accent); }
.spk-richtext img { max-width: 100%; height: auto; border-radius: 10px; }

/* Specyfikacja (tabela atrybutów WooCommerce) */
.spk-panel--spec table.shop_attributes,
.spk-panel--spec .woocommerce-product-attributes {
	width: 100%;
	border: 0;
	border-collapse: collapse;
	margin: 0;
	font-size: 16px;
}
.spk-panel--spec .shop_attributes tr:nth-child(odd) th,
.spk-panel--spec .shop_attributes tr:nth-child(odd) td { background: var(--spk-stripe); }
.spk-panel--spec .shop_attributes th,
.spk-panel--spec .shop_attributes td {
	border: 0;
	padding: 11px 16px;
	text-align: left;
	vertical-align: top;
	font-weight: 400;
	background: transparent;
}
.spk-panel--spec .shop_attributes th { width: 40%; color: var(--spk-ink); }
.spk-panel--spec .shop_attributes td { color: var(--spk-muted); }
.spk-panel--spec .shop_attributes td p { margin: 0; padding: 0; }
.spk-spec-extra { margin-top: 28px; font-size: 16px; line-height: 1.6; }

/* Informacje dodatkowe */
.spk-info p, .spk-info a { color: var(--spk-ink); font-size: 14px; }
.spk-info i { margin: 10px; color: var(--spk-accent); }
.spk-info h2 { display: none; }

/* Instrukcja obsługi */
.spk-manual {
	max-width: 520px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 22px;
}
.spk-manual__doc {
	position: relative;
	display: block;
	padding: 28px 28px 0;
	border-radius: var(--spk-radius);
	background: linear-gradient(160deg, #F4F0F8 0%, #ECE6F2 100%);
	overflow: hidden;
	text-decoration: none;
	isolation: isolate;
}
.spk-manual__doc::after {
	/* delikatne wygaszenie dołu kartki, efekt "jest tego więcej" */
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 90px;
	background: linear-gradient(to bottom, rgba(236, 230, 242, 0), #ECE6F2 85%);
	pointer-events: none;
	z-index: 2;
}
.spk-manual__sheet {
	position: relative;
	display: block;
	max-height: 560px;
	overflow: hidden;
	background: #fff;
	border-radius: 6px 6px 0 0;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 12px 32px rgba(66, 37, 93, .16);
	transform-origin: 50% 100%;
	transition: transform .35s ease, box-shadow .35s ease;
}
.spk-manual__sheet img,
.spk-manual__sheet canvas {
	display: block;
	width: 100%;
	height: auto;
}
.spk-manual__doc:hover .spk-manual__sheet {
	transform: translateY(-6px);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 20px 44px rgba(66, 37, 93, .22);
}
.spk-manual__placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	aspect-ratio: 1 / 1.414;
	color: #C9BFD5;
	font-size: 14px;
}
.spk-manual__loading { color: var(--spk-muted); }
.spk-manual__badge {
	position: absolute;
	top: 40px;
	right: 40px;
	z-index: 3;
	background: rgba(38, 38, 42, .78);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .02em;
	padding: 5px 10px;
	border-radius: 999px;
	backdrop-filter: blur(4px);
}
.spk-manual__footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	text-align: center;
}
.spk-manual__title strong { display: block; font-size: 18px; line-height: 1.3; }
.spk-manual__title > span { display: block; margin-top: 4px; font-size: 14px; color: var(--spk-muted); }

.spk-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 16px 28px;
	border-radius: 20px;
	background: linear-gradient(90deg, var(--spk-accent) 0%, var(--spk-text) 100%);
	color: #fff !important;
	font-weight: 700;
	font-size: 16px;
	text-decoration: none !important;
	transition: filter .2s, transform .2s;
}
.spk-btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.spk-btn:focus-visible { outline: 3px solid var(--spk-text); outline-offset: 3px; }

/* Mobile */
@media (max-width: 767px) {
	.spk-nav { gap: 10px; margin-bottom: 14px; }
	.spk .spk-nav button.spk-tab { padding: 10px 18px !important; font-size: 15px !important; }
	.spk-panel { border-radius: 18px; }
	.spk-panel { padding: 26px 18px 30px; }
	.spk-richtext { font-size: 16px; }
	.spk-panel--spec .shop_attributes th,
	.spk-panel--spec .shop_attributes td { padding: 10px 10px; font-size: 15px; }
	.spk-panel--spec .shop_attributes th { width: 48%; }
	.spk-manual__doc { padding: 18px 18px 0; }
	.spk-manual__sheet { max-height: 440px; }
	.spk-manual__badge { top: 28px; right: 28px; }
}

@media (prefers-reduced-motion: reduce) {
	.spk-panel { animation: none; }
	.spk-manual__sheet, .spk-btn { transition: none; }
}
