/**
 * Design System Tokens & Core Primitives — TanieKupowanie
 * Reproduced 1:1 from Google Stitch (Warm Pastel Whimsy + Storefront + Legal).
 *
 * @package TanieKupowanie
 */

:root {
	/* Brand Palette */
	--tk-coral: #f87158;
	--tk-coral-hover: #e45c43;
	--tk-coral-alt: #ff5e57;
	--tk-coral-soft: #fdeced;
	--tk-coral-tint: #fff5f6;

	--tk-yellow: #f9be33;
	--tk-yellow-bright: #ffbe2e;
	--tk-yellow-soft: #fffdf0;
	--tk-yellow-pastel: #fef5d8;
	--tk-yellow-text: #422904;

	--tk-navy: #1b2a4a;
	--tk-slate-900: #0f172a;
	--tk-slate-800: #1e293b;
	--tk-slate-700: #334155;
	--tk-slate-600: #475569;
	--tk-slate-500: #64748b;
	--tk-slate-400: #94a3b8;
	--tk-slate-300: #cbd5e1;
	--tk-slate-200: #e2e8f0;
	--tk-slate-100: #f1f5f9;
	--tk-slate-50: #f8fafc;

	--tk-sky: #e4f3fa;
	--tk-sky-deep: #00b4d8;
	--tk-sky-hover: #0077b6;
	--tk-mint: #dcf5ea;
	--tk-emerald: #10b981;
	--tk-emerald-dark: #059669;
	--tk-emerald-soft: #ecfdf5;
	--tk-klarna: #ffb3c7;

	--tk-cream: #faf8f5;
	--tk-surface-warm: #fdf8f5;
	--tk-surface-hero: #fefbf6;
	--tk-border-warm: #efece6;

	/* Legal / Regulamin Palette */
	--tk-legal-primary: #b41d26;
	--tk-legal-primary-hover: #d7383c;
	--tk-legal-coral-subtle: #fff0f0;
	--tk-legal-error: #ba1a1a;
	--tk-legal-error-bg: #ffdad6;
	--tk-legal-error-text: #93000a;
	--tk-legal-tertiary: #006947;

	/* Typography */
	--tk-font-display: 'Quicksand', 'Nunito Sans', system-ui, -apple-system, sans-serif;
	--tk-font-body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

	/* Radii */
	--tk-radius-sm: 0.5rem;
	--tk-radius-md: 0.75rem;
	--tk-radius-lg: 1rem;
	--tk-radius-xl: 1.5rem;
	--tk-radius-2xl: 1.75rem;
	--tk-radius-full: 9999px;

	/* Shadows */
	--tk-shadow-2xs: 0 1px 2px rgba(15, 23, 42, 0.04);
	--tk-shadow-xs: 0 2px 6px rgba(15, 23, 42, 0.05);
	--tk-shadow-card: 0 4px 16px rgba(0, 0, 0, 0.04);
	--tk-shadow-soft: 0 8px 24px -4px rgba(248, 113, 88, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
	--tk-shadow-hover: 0 12px 28px -4px rgba(248, 113, 88, 0.16), 0 6px 16px -2px rgba(0, 0, 0, 0.06);
	--tk-shadow-cta: 0 10px 25px -4px rgba(248, 113, 88, 0.35);
	--tk-shadow-active-pill: 0 0 0 3px var(--tk-coral), 0 6px 16px -2px rgba(248, 113, 88, 0.28);

	/* Layout */
	--tk-container-max: 1280px;
	--tk-gutter: 1rem;
}

/* Safe Box Sizing & Typography Baseline */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
	overflow-x: hidden;
	max-width: 100%;
}

body {
	margin: 0;
	font-family: var(--tk-font-body);
	color: var(--tk-slate-700);
	background-color: #ffffff;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
	max-width: 100%;
}

body.woocommerce-shop,
body.tax-product_cat,
body.tax-product_tag,
body.single-product,
body.woocommerce-cart,
body.woocommerce-checkout,
body.page-template-template-regulamin {
	background-color: var(--tk-cream);
}

h1, h2, h3, h4, h5, h6,
.tk-font-round {
	font-family: var(--tk-font-display);
	color: var(--tk-navy);
	margin-top: 0;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

button {
	font-family: inherit;
	cursor: pointer;
}

/* Container & Utilities */
.tk-container {
	width: 100%;
	max-width: var(--tk-container-max);
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
}

@media (min-width: 640px) {
	.tk-container {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
	}
}

@media (min-width: 1024px) {
	.tk-container {
		padding-left: 2rem;
		padding-right: 2rem;
	}
}

.tk-sr-only,
.screen-reader-text,
.tk-skip-link {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.tk-skip-link:focus {
	position: fixed;
	top: 1rem;
	left: 1rem;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.65rem 1.15rem;
	overflow: visible;
	clip: auto;
	clip-path: none;
	white-space: normal;
	z-index: 100000;
	background: var(--tk-navy);
	color: #ffffff;
	font-weight: 700;
	font-size: 0.875rem;
	border-radius: var(--tk-radius-full);
	box-shadow: var(--tk-shadow-hover);
}

.tk-hidden {
	display: none !important;
}

/* Inline SVG Sizing */
.tk-svg-icon {
	display: inline-block;
	width: 1.125rem;
	height: 1.125rem;
	flex-shrink: 0;
	vertical-align: middle;
}

.tk-icon-xs {
	width: 0.75rem;
	height: 0.75rem;
}

.tk-icon-sm {
	width: 0.9375rem;
	height: 0.9375rem;
}

.tk-icon-lg {
	width: 1.375rem;
	height: 1.375rem;
}

/* Star Ratings */
.tk-stars {
	display: inline-flex;
	align-items: center;
	gap: 0.125rem;
	color: #fbbf24;
}

.tk-stars .tk-star {
	width: 0.8125rem;
	height: 0.8125rem;
}

.tk-stars .tk-star.is-empty {
	color: var(--tk-slate-200);
}

/* Shared Button Styles */
.tk-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border: 0;
	border-radius: var(--tk-radius-full);
	font-weight: 700;
	line-height: 1.25;
	transition: transform 0.18s ease, background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
	text-decoration: none;
}

.tk-btn:active {
	transform: scale(0.97);
}

.tk-btn--primary {
	background-color: var(--tk-coral);
	color: #ffffff;
	padding: 0.85rem 1.75rem;
	font-size: 0.9375rem;
	box-shadow: 0 8px 20px -4px rgba(248, 113, 88, 0.4);
}

.tk-btn--primary:hover {
	background-color: var(--tk-coral-hover);
	color: #ffffff;
	box-shadow: 0 12px 24px -4px rgba(248, 113, 88, 0.5);
}

.tk-btn--sm {
	padding: 0.55rem 1rem;
	font-size: 0.75rem;
}

.tk-btn--white {
	background-color: #ffffff;
	color: var(--tk-slate-800);
	border: 1px solid var(--tk-slate-200);
	padding: 0.55rem 1rem;
	font-size: 0.75rem;
	box-shadow: var(--tk-shadow-2xs);
}

.tk-btn--white:hover {
	background-color: var(--tk-slate-50);
	color: var(--tk-coral);
}

/* Pulse dot */
@keyframes tkPulse {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.55;
		transform: scale(0.92);
	}
}

.tk-pulse-dot {
	width: 0.625rem;
	height: 0.625rem;
	border-radius: 9999px;
	background-color: var(--tk-emerald);
	display: inline-block;
	animation: tkPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Klarna Badge */
.tk-klarna-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: var(--tk-klarna);
	color: #111827;
	font-family: var(--tk-font-display);
	font-weight: 800;
	border-radius: 0.625rem;
	padding: 0.35rem 0.75rem;
	letter-spacing: -0.02em;
	line-height: 1;
}

/* Hide scrollbars nicely in horizontal tracks */
.tk-no-scrollbar::-webkit-scrollbar {
	display: none;
}
.tk-no-scrollbar {
	-ms-overflow-style: none;
	scrollbar-width: none;
}

/* WordPress Default Gallery/Content Helpers */
.tk-page-content-wrap {
	padding: 2.5rem 0 4rem;
}

.tk-article-card {
	background: #ffffff;
	border: 1px solid var(--tk-slate-100);
	border-radius: 1.5rem;
	padding: 2rem;
	box-shadow: var(--tk-shadow-card);
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.skip-link:focus {
	position: fixed;
	top: 0.75rem;
	left: 0.75rem;
	width: auto;
	height: auto;
	padding: 0.625rem 1rem;
	background: var(--tk-navy);
	color: #ffffff;
	border-radius: 0.75rem;
	font-weight: 700;
	z-index: 99999;
}

/* Respect Admin Bar Sticky Offset */
body.admin-bar .tk-site-header {
	top: 32px;
}
@media (min-width: 601px) and (max-width: 782px) {
	body.admin-bar .tk-site-header {
		top: 46px;
	}
}
@media (max-width: 600px) {
	body.admin-bar .tk-site-header {
		top: 0;
	}
}
