/*
 * CCShop Comparison — front-end styles (no build step).
 */

:root {
	--color-bg: #f6f7fb;
	--color-surface: #ffffff;
	--color-text: #1a1d26;
	--color-muted: #5c6475;
	--color-accent: #1e6bff;
	--color-accent-contrast: #ffffff;
	--radius: 10px;
	--shadow: 0 8px 24px rgba(20, 30, 60, 0.08);
	--container: 1120px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
}

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

body {
	margin: 0;
	font-family: var(--font);
	color: var(--color-text);
	background: var(--color-bg);
	line-height: 1.55;
}

a {
	color: var(--color-accent);
	text-decoration-thickness: 1px;
}

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

.container {
	width: min(100% - 2rem, var(--container));
	margin-inline: auto;
}

.site-header {
	background: var(--color-surface);
	border-bottom: 1px solid #e6e8ef;
	position: sticky;
	top: 0;
	z-index: 20;
}

.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.85rem 0;
}

.site-title {
	font-weight: 700;
	font-size: 1.15rem;
	color: inherit;
	text-decoration: none;
}

.site-tagline {
	margin: 0.15rem 0 0;
	font-size: 0.85rem;
	color: var(--color-muted);
}

.primary-nav .menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-nav a {
	text-decoration: none;
	font-weight: 500;
	color: var(--color-text);
}

.hero {
	background: linear-gradient(135deg, #101828, #1e3a8a);
	color: #fff;
	padding: 2.5rem 0 3rem;
}

.hero__inner {
	max-width: 720px;
}

.hero__title {
	font-size: clamp(1.75rem, 4vw, 2.35rem);
	line-height: 1.2;
	margin: 0 0 0.75rem;
}

.hero__sub {
	margin: 0 0 1.25rem;
	opacity: 0.92;
}

.hero__search {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.hero__search input[type="search"] {
	flex: 1 1 220px;
	padding: 0.85rem 1rem;
	border-radius: var(--radius);
	border: none;
	font: inherit;
}

.section {
	padding: 2.25rem 0;
}

.section-title {
	font-size: 1.35rem;
	margin: 0 0 0.75rem;
}

.section-lead {
	color: var(--color-muted);
	margin: 0 0 1.25rem;
}

.section-cta {
	margin-top: 1.5rem;
}

.category-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.chip {
	display: inline-flex;
	padding: 0.45rem 0.85rem;
	border-radius: 999px;
	background: var(--color-surface);
	box-shadow: var(--shadow);
	color: inherit;
	text-decoration: none;
	font-weight: 500;
	font-size: 0.95rem;
}

.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1.25rem;
	padding: 1rem 0 2.5rem;
}

.product-card {
	background: var(--color-surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.product-card__media img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
}

.product-card__placeholder {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	background: #e9ecf5;
}

.product-card__body {
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	flex: 1;
}

.product-card__title {
	font-size: 1.05rem;
	margin: 0;
}

.product-card__title a {
	color: inherit;
	text-decoration: none;
}

.product-card__meta {
	margin: 0;
	color: var(--color-muted);
	font-size: 0.9rem;
}

.product-card__price {
	margin: 0;
	font-weight: 700;
}

.product-card__offers {
	margin: 0;
	font-size: 0.9rem;
}

.page-header {
	padding: 1.75rem 0 0.5rem;
}

.page-title {
	margin: 0;
	font-size: 1.6rem;
}

.inline-search {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1rem;
}

.inline-search input[type="search"] {
	flex: 1 1 220px;
	padding: 0.65rem 0.85rem;
	border-radius: 8px;
	border: 1px solid #d5d9e6;
	font: inherit;
}

.toolbar {
	background: var(--color-surface);
	border-bottom: 1px solid #e6e8ef;
	padding: 1rem 0;
}

.toolbar__count {
	margin: 0 auto 0.75rem;
	width: min(100% - 2rem, var(--container));
	font-weight: 600;
}

.toolbar__form {
	width: min(100% - 2rem, var(--container));
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 0.65rem;
	align-items: end;
}

.field__label {
	display: block;
	font-size: 0.8rem;
	color: var(--color-muted);
	margin-bottom: 0.2rem;
}

.field select,
.field input {
	width: 100%;
	padding: 0.55rem 0.6rem;
	border-radius: 8px;
	border: 1px solid #d5d9e6;
	font: inherit;
	background: #fff;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.65rem 1rem;
	border-radius: 8px;
	border: none;
	background: var(--color-accent);
	color: var(--color-accent-contrast);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}

.button--ghost {
	background: transparent;
	color: var(--color-accent);
	border: 1px solid #c9d6ff;
}

.button--small {
	padding: 0.45rem 0.75rem;
	font-size: 0.9rem;
}

.pagination {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin: 1rem 0 2.5rem;
	list-style: none;
	padding: 0;
}

.product-single__hero {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	padding: 1.5rem 0 0;
}

@media (min-width: 880px) {
	.product-single__hero {
		grid-template-columns: 1fr 1.1fr;
		align-items: start;
	}
}

.product-facts {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.35rem 1rem;
	margin: 1rem 0;
}

.product-facts dt {
	font-weight: 600;
	color: var(--color-muted);
}

.product-facts dd {
	margin: 0;
}

.prose {
	max-width: 760px;
}

.lead {
	font-size: 1.05rem;
}

.best-offer {
	margin: 2rem 0;
	padding: 1.25rem;
	border-radius: var(--radius);
	background: #ecfdf3;
	border: 1px solid #bbf7d0;
}

.best-offer__price {
	font-size: 1.75rem;
	font-weight: 800;
	margin: 0 0 0.35rem;
}

.best-offer__merchant {
	margin: 0;
	font-weight: 600;
}

.best-offer__stock {
	margin: 0.25rem 0 0.75rem;
	color: var(--color-muted);
}

.compare-table-section {
	margin-bottom: 3rem;
}

.table-responsive {
	overflow-x: auto;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	background: var(--color-surface);
}

.compare-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 720px;
	font-size: 0.95rem;
}

.compare-table th,
.compare-table td {
	padding: 0.75rem 0.85rem;
	border-bottom: 1px solid #edf0f7;
	text-align: left;
	vertical-align: middle;
}

.compare-table thead th {
	background: #f3f5fb;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--color-muted);
}

.compare-table tr.is-best {
	background: #f0fdf4;
}

.site-footer {
	background: #0f172a;
	color: #e5e7eb;
	margin-top: 3rem;
	padding: 2rem 0 1rem;
}

.site-footer a {
	color: #dbeafe;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

@media (min-width: 720px) {
	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.footer-heading {
	font-size: 1rem;
	margin: 0 0 0.75rem;
}

.menu--footer {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.35rem;
}

.site-info {
	text-align: center;
	font-size: 0.85rem;
	color: #94a3b8;
	margin: 1.5rem 0 0;
}

.contact-grid {
	display: grid;
	gap: 1.5rem;
	padding: 1rem 0 2.5rem;
}

@media (min-width: 800px) {
	.contact-grid {
		grid-template-columns: 0.9fr 1.1fr;
	}
}

.contact-card {
	background: var(--color-surface);
	padding: 1.25rem;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.no-results {
	padding: 3rem 0;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	left: 1rem;
	top: 1rem;
	z-index: 100;
	background: #000;
	color: #fff;
	padding: 0.5rem 1rem;
	clip: auto;
	width: auto;
	height: auto;
}

.notice {
	padding: 1rem;
	background: #fff7ed;
	border: 1px solid #fed7aa;
	border-radius: var(--radius);
}
