/* =========================================================
   Sprawdzono Ranking
   Wszystko pod prefiksem .rk, żeby nie kolidowało z motywem
   ========================================================= */

.rk,
.rk *,
.rk *::before,
.rk *::after {
	box-sizing: border-box;
}

.rk {
	--rk-accent: #0f766e;
	--rk-cta: #ff6b00;
	--rk-cta-text: #fff;
	--rk-1: #d4a017;
	--rk-2: #8e9196;
	--rk-3: #b0764a;
	--rk-card: #fff;
	--rk-text: #1a1a1a;
	--rk-radius: 14px;
	--rk-muted: #6b7280;
	--rk-line: rgba(0, 0, 0, .09);
	--rk-soft: rgba(0, 0, 0, .028);
	--rk-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .18);

	color: var(--rk-text);
	font-size: 16px;
	line-height: 1.6;
	scroll-behavior: smooth;
}

.rk img {
	max-width: 100%;
	height: auto;
	display: block;
}

.rk a {
	text-decoration: none;
}

/* ---------------------------------------------------------
   TABELA
   --------------------------------------------------------- */

.rk-table-wrap {
	margin: 0 0 2.5rem;
}

.rk-table__title {
	font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem);
	line-height: 1.25;
	margin: 0 0 1rem;
	font-weight: 700;
	letter-spacing: -.01em;
}

.rk-table__scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--rk-line);
	border-radius: var(--rk-radius);
	background: var(--rk-card);
	box-shadow: var(--rk-shadow);
}

.rk-table {
	width: 100%;
	min-width: 760px;
	border-collapse: separate;
	border-spacing: 0;
	margin: 0;
	background: transparent;
	font-size: .95rem;
}

.rk-table thead th {
	background: transparent;
	color: var(--rk-muted);
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .07em;
	text-transform: uppercase;
	text-align: left;
	padding: 1rem 1rem .7rem;
	border: 0;
	border-bottom: 1px solid var(--rk-line);
	white-space: nowrap;
}

.rk-table .rk-th--place {
	width: 116px;
}

.rk-table .rk-th--rating {
	width: 150px;
}

.rk-table .rk-th--cta {
	width: 190px;
}

.rk-table tbody tr {
	background: var(--rk-card);
	transition: background .15s ease;
}

.rk-table tbody tr:hover {
	background: var(--rk-soft);
}

.rk-table td {
	padding: 1rem;
	vertical-align: middle;
	border: 0;
	border-bottom: 1px solid var(--rk-line);
	background: transparent;
}

.rk-table tbody tr:last-child td {
	border-bottom: 0;
}

/* wyróżnione miejsca 1-3 */
.rk-row--top td {
	background: color-mix(in srgb, var(--rk-place) 5%, transparent);
}

.rk-row--top .rk-td--place {
	box-shadow: inset 4px 0 0 0 var(--rk-place);
}

.rk-row--top1 td {
	background: color-mix(in srgb, var(--rk-place) 9%, transparent);
}

/* fallback dla przeglądarek bez color-mix */
@supports not (background: color-mix(in srgb, red 5%, transparent)) {
	.rk-row--top td {
		background: rgba(0, 0, 0, .022);
	}
	.rk-row--top1 td {
		background: rgba(0, 0, 0, .04);
	}
}

.rk-place {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--rk-place);
	color: #fff;
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1;
	flex: none;
}

.rk-row:not(.rk-row--top) .rk-place {
	background: transparent;
	color: var(--rk-muted);
	border: 1px solid var(--rk-line);
	font-weight: 600;
}

.rk-chip {
	display: inline-block;
	padding: .22rem .6rem;
	border-radius: 999px;
	background: var(--rk-place);
	color: #fff;
	font-size: .68rem;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: .04em;
	text-transform: uppercase;
	white-space: normal;
	max-width: 100%;
}

/* pasek z etykietą nad logo marki */
.rk-flag {
	display: inline-block;
	margin: 0 0 .5rem;
	padding: .28rem .6rem;
	border-radius: 4px;
	background: var(--rk-place);
	color: #fff;
	font-size: .67rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: .06em;
	text-transform: uppercase;
	white-space: nowrap;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rk-flag--muted {
	background: transparent;
	color: var(--rk-muted);
	border: 1px solid var(--rk-line);
	font-weight: 600;
	letter-spacing: .03em;
}

.rk-td--place {
	white-space: nowrap;
}

.rk-td--photo {
	width: 104px;
}

.rk-thumb {
	display: block;
	width: 84px;
	height: 84px;
	border-radius: calc(var(--rk-radius) - 6px);
	overflow: hidden;
	background: #fff;
}

.rk-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.rk-brand {
	display: block;
	margin-bottom: .35rem;
}

.rk-brand img {
	max-height: 20px;
	width: auto;
	max-width: 92px;
	object-fit: contain;
	opacity: .85;
}

.rk-name {
	display: block;
	color: inherit;
	font-weight: 650;
	font-size: 1rem;
	line-height: 1.35;
	text-decoration: none;
}

.rk-name:hover {
	color: var(--rk-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.rk-mini-pros {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: .85rem;
	color: var(--rk-muted);
}

.rk-mini-pros li {
	position: relative;
	padding-left: 1.05rem;
	margin: 0 0 .2rem;
	line-height: 1.45;
}

.rk-mini-pros li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .5em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--rk-accent);
	opacity: .55;
}

.rk-td--cta {
	text-align: right;
}

.rk-link-more {
	display: block;
	margin-top: .5rem;
	font-size: .78rem;
	color: var(--rk-muted);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.rk-link-more:hover {
	color: var(--rk-accent);
}

/* ---------------------------------------------------------
   GWIAZDKI
   --------------------------------------------------------- */

.rk-stars {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	line-height: 0;
	white-space: nowrap;
}

.rk-stars__bg,
.rk-stars__fg {
	display: block;
	line-height: 0;
}

.rk-stars__bg svg,
.rk-stars__fg svg {
	width: 16px;
	height: 16px;
	display: inline-block;
}

.rk-stars__bg svg {
	fill: rgba(0, 0, 0, .13);
}

.rk-stars__fg {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.rk-stars__fg svg {
	fill: #f5a524;
}

.rk-stars__num {
	display: inline-block;
	margin-left: .45rem;
	vertical-align: middle;
	font-weight: 700;
	font-size: .92rem;
}

.rk-stars__max {
	font-weight: 500;
	color: var(--rk-muted);
	font-size: .8em;
}

/* ---------------------------------------------------------
   PRZYCISKI
   --------------------------------------------------------- */

.rk-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4rem;
	padding: .7rem 1.05rem;
	border-radius: calc(var(--rk-radius) - 5px);
	font-size: .88rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform .12s ease, filter .15s ease, background .15s ease;
}

.rk-btn:hover {
	transform: translateY(-1px);
}

.rk-btn--cta {
	background: var(--rk-cta);
	color: var(--rk-cta-text);
	width: 100%;
	box-shadow: 0 2px 10px -3px var(--rk-cta);
}

.rk-btn--cta:hover {
	filter: brightness(1.06);
	color: var(--rk-cta-text);
}

.rk-btn--ghost {
	background: transparent;
	color: var(--rk-accent);
	border-color: color-mix(in srgb, var(--rk-accent) 35%, transparent);
	width: 100%;
}

@supports not (border-color: color-mix(in srgb, red 35%, transparent)) {
	.rk-btn--ghost {
		border-color: var(--rk-line);
	}
}

.rk-btn--ghost:hover {
	background: var(--rk-soft);
	color: var(--rk-accent);
}

.rk-btn--link {
	background: transparent;
	color: var(--rk-muted);
	padding: .4rem 0;
	font-weight: 600;
	font-size: .84rem;
	text-decoration: underline;
	text-underline-offset: 3px;
	width: 100%;
}

.rk-btn--link:hover {
	color: var(--rk-accent);
}

/* ---------------------------------------------------------
   KARTY PRODUKTÓW
   --------------------------------------------------------- */

.rk-products {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	margin: 0 0 2.5rem;
}

.rk-card {
	scroll-margin-top: 110px;
	background: var(--rk-card);
	border: 1px solid var(--rk-line);
	border-radius: var(--rk-radius);
	box-shadow: var(--rk-shadow);
	overflow: hidden;
}

.rk-card--top {
	border-color: color-mix(in srgb, var(--rk-place) 45%, transparent);
	box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 14px 40px -18px color-mix(in srgb, var(--rk-place) 55%, transparent);
}

@supports not (border-color: color-mix(in srgb, red 45%, transparent)) {
	.rk-card--top {
		border-color: var(--rk-place);
	}
}

.rk-card__head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .6rem;
	padding: .75rem 1.5rem;
	background: var(--rk-place);
	color: #fff;
}

.rk-card:not(.rk-card--top) .rk-card__head {
	background: var(--rk-soft);
	color: var(--rk-muted);
	border-bottom: 1px solid var(--rk-line);
}

.rk-card__place {
	font-weight: 800;
	font-size: .95rem;
	letter-spacing: .01em;
}

.rk-card__head .rk-chip {
	margin-top: 0;
	background: rgba(255, 255, 255, .22);
	color: #fff;
	backdrop-filter: blur(2px);
}

.rk-card:not(.rk-card--top) .rk-card__head .rk-chip {
	background: transparent;
	border: 1px solid var(--rk-line);
	color: var(--rk-muted);
}

.rk-card__body {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 2rem;
	padding: 1.75rem 1.5rem;
}

.rk-card__media {
	display: flex;
	flex-direction: column;
	gap: .85rem;
	align-items: stretch;
}

.rk-card__photo {
	margin: 0;
	aspect-ratio: 1 / 1;
	border-radius: calc(var(--rk-radius) - 4px);
	background: #fff;
	border: 1px solid var(--rk-line);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: .75rem;
}

.rk-card__photo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.rk-card__rating {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .3rem;
	padding: .55rem;
	border-radius: calc(var(--rk-radius) - 6px);
	background: var(--rk-soft);
}

.rk-card__actions {
	display: flex;
	flex-direction: column;
	gap: .5rem;
}

.rk-card__brand {
	margin-bottom: .6rem;
}

.rk-card__brand img {
	max-height: 26px;
	width: auto;
	max-width: 130px;
	object-fit: contain;
	opacity: .9;
}

.rk-card__title {
	margin: 0 0 .7rem;
	font-size: clamp(1.2rem, 1rem + .9vw, 1.6rem);
	line-height: 1.25;
	font-weight: 750;
	letter-spacing: -.01em;
}

.rk-card__lead {
	margin: 0 0 1.25rem;
	color: #333;
}

.rk-card__lead p {
	margin: 0 0 .75rem;
}

.rk-card__lead p:last-child {
	margin-bottom: 0;
}

/* zalety / wady */

.rk-prosandcons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin: 0 0 1.35rem;
}

.rk-pros,
.rk-cons {
	padding: 1rem 1.1rem;
	border-radius: calc(var(--rk-radius) - 5px);
	border: 1px solid var(--rk-line);
}

.rk-pros {
	background: rgba(22, 163, 74, .05);
	border-color: rgba(22, 163, 74, .22);
}

.rk-cons {
	background: rgba(220, 38, 38, .04);
	border-color: rgba(220, 38, 38, .18);
}

.rk-prosandcons__title {
	margin: 0 0 .6rem;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
}

.rk-pros .rk-prosandcons__title {
	color: #15803d;
}

.rk-cons .rk-prosandcons__title {
	color: #b91c1c;
}

.rk-prosandcons ul {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: .91rem;
}

.rk-prosandcons li {
	position: relative;
	padding-left: 1.5rem;
	margin: 0 0 .4rem;
	line-height: 1.5;
}

.rk-prosandcons li:last-child {
	margin-bottom: 0;
}

.rk-pros li::before,
.rk-cons li::before {
	position: absolute;
	left: 0;
	top: 0;
	font-weight: 700;
	line-height: 1.5;
}

.rk-pros li::before {
	content: "+";
	color: #15803d;
	font-size: 1.05em;
}

.rk-cons li::before {
	content: "\2013";
	color: #b91c1c;
	font-size: 1.05em;
}

/* parametry */

.rk-specs {
	border: 1px solid var(--rk-line);
	border-radius: calc(var(--rk-radius) - 5px);
	overflow: hidden;
}

.rk-specs__title {
	margin: 0;
	padding: .7rem 1.1rem;
	background: var(--rk-soft);
	border-bottom: 1px solid var(--rk-line);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--rk-muted);
}

.rk-specs__body {
	padding: .85rem 1.1rem;
}

.rk-specs__body ul {
	margin: 0;
	padding: 0;
	list-style: none;
	columns: 2;
	column-gap: 2rem;
	font-size: .89rem;
}

.rk-specs__body li {
	break-inside: avoid;
	padding: .3rem 0;
	border-bottom: 1px dashed var(--rk-line);
	line-height: 1.45;
}

.rk-specs__body p {
	margin: 0 0 .5rem;
	font-size: .9rem;
}

/* pełny opis */

.rk-card__full {
	padding: 0 1.5rem 1.75rem;
}

.rk-card__full h2,
.rk-card__full h3,
.rk-card__full h4 {
	margin: 1.6rem 0 .55rem;
	line-height: 1.3;
	font-weight: 700;
}

.rk-card__full h3 {
	font-size: 1.12rem;
}

.rk-card__full h4 {
	font-size: 1rem;
}

.rk-card__full > :first-child {
	margin-top: 0;
}

.rk-card__full p {
	margin: 0 0 .9rem;
}

.rk-card__full ul,
.rk-card__full ol {
	margin: 0 0 1rem 1.15rem;
	padding: 0;
}

.rk-card__full li {
	margin-bottom: .3rem;
}

.rk-card__full img {
	border-radius: calc(var(--rk-radius) - 6px);
	margin: .5rem 0 1rem;
}

/* ---------------------------------------------------------
   RESPONSYWNOŚĆ
   --------------------------------------------------------- */

@media (max-width: 1024px) {
	.rk-card__body {
		grid-template-columns: 230px 1fr;
		gap: 1.5rem;
	}
	.rk-specs__body ul {
		columns: 1;
	}
}

@media (max-width: 782px) {
	.rk-card__body {
		grid-template-columns: 1fr;
		padding: 1.25rem;
		gap: 1.25rem;
	}
	.rk-card__media {
		flex-direction: column;
	}
	.rk-card__photo {
		max-width: 320px;
		margin: 0 auto;
		width: 100%;
	}
	.rk-card__actions {
		max-width: 420px;
		width: 100%;
		margin: 0 auto;
	}
	.rk-prosandcons {
		grid-template-columns: 1fr;
	}
	.rk-card__full {
		padding: 0 1.25rem 1.5rem;
	}
	.rk-card__head {
		padding: .7rem 1.25rem;
	}
}

/* tabela zamienia się w listę kart */
@media (max-width: 860px) {
	.rk-table__scroll {
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
		overflow: visible;
	}

	.rk-table,
	.rk-table tbody,
	.rk-table tr,
	.rk-table td {
		display: block;
		width: 100%;
		min-width: 0;
	}

	.rk-table thead {
		display: none;
	}

	.rk-table tbody tr {
		position: relative;
		display: grid;
		grid-template-columns: 92px 1fr;
		grid-template-areas:
			"photo name"
			"photo rating"
			"pros pros"
			"cta cta";
		gap: .2rem .9rem;
		align-items: start;
		margin: 0 0 .85rem;
		padding: 1rem;
		padding-top: 1rem;
		border: 1px solid var(--rk-line);
		border-radius: var(--rk-radius);
		background: var(--rk-card);
		box-shadow: var(--rk-shadow);
	}

	.rk-table tbody tr.rk-row--top {
		border-color: var(--rk-place);
	}

	.rk-table td {
		padding: 0;
		border: 0;
		background: transparent !important;
	}

	.rk-td--place {
		position: absolute;
		top: -15px;
		left: 1rem;
		box-shadow: none !important;
		width: auto;
	}

	.rk-table tbody tr {
		margin-top: 1.5rem;
	}

	.rk-place {
		width: 32px;
		height: 32px;
		font-size: .92rem;
		border: 3px solid var(--rk-card);
	}

	.rk-row:not(.rk-row--top) .rk-place {
		background: var(--rk-card);
	}

	.rk-td--photo {
		grid-area: photo;
		width: auto;
	}

	.rk-thumb {
		width: 92px;
		height: 92px;
	}

	.rk-td--name {
		grid-area: name;
		padding-top: .3rem;
	}

	.rk-td--rating {
		grid-area: rating;
		padding-top: .35rem !important;
	}

	.rk-td--pros {
		grid-area: pros;
		padding-top: .7rem !important;
	}

	.rk-td--cta {
		grid-area: cta;
		text-align: left;
		padding-top: .85rem !important;
		display: flex !important;
		align-items: center;
		gap: 1rem;
	}

	.rk-td--cta .rk-btn--cta {
		width: auto;
		flex: 1 1 auto;
	}

	.rk-link-more {
		margin-top: 0;
		white-space: nowrap;
	}
}

@media (max-width: 420px) {
	.rk-table tbody tr {
		grid-template-columns: 72px 1fr;
	}
	.rk-thumb {
		width: 72px;
		height: 72px;
	}
	.rk-td--cta {
		flex-direction: column;
		align-items: stretch;
		gap: .5rem;
	}
	.rk-td--cta .rk-btn--cta {
		width: 100%;
	}
	.rk-link-more {
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rk,
	.rk * {
		scroll-behavior: auto;
		transition: none !important;
	}
	.rk-btn:hover {
		transform: none;
	}
}
