/*
Theme Name: Riderslead
Theme URI: https://riderslead.co.uk
Author: Riderslead
Description: Premium UK cycling-computer storefront. Dark hero, light product areas, one accent colour, photography first.
Version: 1.2.1
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: riderslead
*/

/* ---------------------------------------------------------------- tokens */
:root {
	--ink: #0e1116;
	--ink-2: #171c24;
	--ink-3: #2b323d;
	--muted: #6b7480;
	--line: #e5e3df;
	--paper: #ffffff;
	--bone: #f7f6f4;
	--brand: #e8362d;
	--brand-deep: #c22a22;
	--brand-soft: #fdeceb;
	--r-sm: 8px;
	--r-md: 14px;
	--r-lg: 22px;
	--ease: cubic-bezier(.2, .7, .3, 1);
	--dur: .28s;
	--shell: 1240px;
	--font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--font-display: 'Space Grotesk', var(--font);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -.02em;
	margin: 0 0 .5em;
}

.shell { width: min(100% - 40px, var(--shell)); margin-inline: auto; }
@media (max-width: 640px) { .shell { width: calc(100% - 32px); } }

.eyebrow {
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 14px;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 54px;
	padding: 0 30px;
	border: 0;
	border-radius: 999px;
	background: var(--brand);
	color: #fff;
	font-size: .9375rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { background: var(--brand-deep); transform: translateY(-1px); }
.btn--ghost { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.1); transform: translateY(-1px); }
.btn--dark { background: var(--ink); }
.btn--dark:hover { background: var(--ink-2); }

/* ------------------------------------------------------------- ticker */
.ticker {
	background: var(--ink);
	color: rgba(255,255,255,.82);
	font-size: .75rem;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	overflow: hidden;
	padding: 9px 0;
}
.ticker__track { display: flex; gap: 40px; width: max-content; animation: ticker 38s linear infinite; }
.ticker span { white-space: nowrap; }
.ticker span::after { content: '·'; margin-left: 40px; opacity: .45; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }

/* ------------------------------------------------------------- header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 60;
	background: rgba(255,255,255,.92);
	backdrop-filter: saturate(160%) blur(12px);
	border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -.03em; }
.brand__logo { height: 38px; width: auto; }
@media (max-width: 900px) { .brand__logo { height: 30px; } }
.nav { display: flex; gap: 26px; margin-left: 8px; }
.nav a { text-decoration: none; font-size: .9375rem; font-weight: 500; color: var(--ink-3); transition: color var(--dur) var(--ease); }
.nav a:hover { color: var(--ink); }
.header__actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); text-decoration: none; position: relative; }
.icon-btn:hover { background: var(--bone); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.cart-count { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .625rem; font-weight: 700; display: grid; place-items: center; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
	.nav { display: none; }
	.nav-toggle { display: grid; }
	.site-header__inner { height: 64px; gap: 14px; }
}

.mobile-nav { position: fixed; inset: 0; z-index: 80; background: var(--ink); color: #fff; padding: 26px; display: none; }
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: block; padding: 16px 0; font-family: var(--font-display); font-size: 1.5rem; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.12); }
.mobile-nav__close { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: none; color: #fff; font-size: 1.2rem; }

/* --------------------------------------------------------------- hero */
.hero {
	position: relative;
	min-height: clamp(520px, 64vh, 660px);
	display: flex;
	align-items: flex-end;
	background: var(--ink);
	color: #fff;
	overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: .62; }
.hero::after {
	content: '';
	position: absolute; inset: 0;
	background: linear-gradient(90deg, rgba(14,17,22,.94) 0%, rgba(14,17,22,.72) 42%, rgba(14,17,22,.25) 100%),
		linear-gradient(0deg, rgba(14,17,22,.9) 0%, rgba(14,17,22,0) 55%);
}
.hero__inner { position: relative; z-index: 2; padding: 0 0 76px; max-width: 640px; }
.hero .eyebrow { color: rgba(255,255,255,.7); }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.4rem); margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: rgba(255,255,255,.5); }
.hero p { font-size: 1.0625rem; color: rgba(255,255,255,.78); max-width: 46ch; margin: 0 0 30px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* The hero photograph is a wide cinematic frame; on phones it runs as a banner
   above the copy instead of behind it, so it is never blown up and softened. */
@media (max-width: 760px) {
	.hero { display: block; min-height: 0; }
	.hero__media { position: relative; height: 264px; }
	.hero__media img { opacity: .95; }
	.hero__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14,17,22,.9) 0%, rgba(14,17,22,0) 62%); }
	.hero::after { display: none; }
	.hero__inner { padding: 26px 0 46px; max-width: none; }
	.hero h1 { font-size: clamp(2.1rem, 10vw, 2.8rem); }
}

/* ------------------------------------------------------------ trustbar */
.trustbar { border-bottom: 1px solid var(--line); background: var(--paper); }
.trustbar__grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; background: var(--line); }
.trustbar__item { background: var(--paper); padding: 26px 22px; display: flex; gap: 12px; align-items: flex-start; }
.trustbar__item svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--brand); stroke-width: 1.6; }
.trustbar__item strong { display: block; font-size: .875rem; font-weight: 600; }
.trustbar__item span { font-size: .8125rem; color: var(--muted); }
@media (max-width: 860px) { .trustbar__grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* ------------------------------------------------------------ sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--bone { background: var(--bone); }
.section--dark { background: var(--ink); color: #fff; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.section__head h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); margin: 0; }
.section__head h2 em { font-style: normal; color: var(--muted); }
.section__head a { font-size: .9375rem; font-weight: 600; text-decoration: none; color: var(--ink); white-space: nowrap; }
.section__head a:hover { color: var(--brand); }

/* --------------------------------------------------------- product grid */
/* WooCommerce's own float rules are dequeued; these guards keep the grid intact
   even if another plugin re-adds them. */
ul.products::before, ul.products::after,
.woocommerce ul.products::before, .woocommerce ul.products::after { content: none !important; display: none !important; }
.woocommerce ul.products li.product { float: none !important; width: auto !important; margin: 0 !important; clear: none !important; }
.woocommerce ul.products li.product a img { margin: 0 !important; box-shadow: none !important; }
.woocommerce .woocommerce-result-count { color: var(--muted); font-size: .875rem; margin: 0 0 18px; }
.woocommerce .woocommerce-ordering { margin: 0 0 22px; }
.woocommerce .woocommerce-ordering select { height: 44px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 12px; font: inherit; background: #fff; }
.woocommerce .woocommerce-products-header { display: none; }
.woocommerce nav.woocommerce-pagination ul { list-style: none; display: flex; gap: 8px; padding: 0; margin: 34px 0 0; }
.woocommerce nav.woocommerce-pagination a, .woocommerce nav.woocommerce-pagination span {
	display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px;
	border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; font-weight: 600;
}
.woocommerce nav.woocommerce-pagination span.current { background: var(--ink); color: #fff; border-color: var(--ink); }
ul.products, .product-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 22px;
}
@media (max-width: 1080px) { ul.products, .product-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 780px) { ul.products, .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; } }

ul.products li.product, .card {
	position: relative;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	overflow: hidden;
	transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
	display: flex;
	flex-direction: column;
}
ul.products li.product:hover, .card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(14,17,22,.10); }
ul.products li.product a img, .card__img img { aspect-ratio: 1 / 1; object-fit: contain; width: 100%; background: var(--bone); padding: 14px; }
ul.products li.product .woocommerce-loop-product__title, .card__title {
	font-family: var(--font);
	font-size: .9375rem;
	font-weight: 600;
	line-height: 1.35;
	margin: 0 16px 6px;
	color: var(--ink);
}
.card__brand, ul.products li.product .rl-brand {
	display: block;
	margin: 16px 16px 4px;
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted);
}
ul.products li.product .price, .card__price { margin: auto 16px 16px; font-size: 1rem; font-weight: 700; }
ul.products li.product .price, ul.products li.product .price .amount, ul.products li.product .price bdi,
.card__price, .card__price .amount, .card__price bdi { color: #0e1116 !important; }
ul.products li.product .price del, ul.products li.product .price del .amount, ul.products li.product .price del bdi { color: #6b7480 !important; }
ul.products li.product .price del { color: var(--muted); font-weight: 500; margin-right: 6px; }
ul.products li.product a { text-decoration: none; }
ul.products li.product .button, ul.products li.product .added_to_cart { display: none; }

/* ------------------------------------------------------- single product */
.woocommerce div.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 64px); align-items: start; padding-top: 34px; }
.woocommerce div.product .woocommerce-product-gallery { position: sticky; top: 96px; }
.woocommerce div.product .woocommerce-product-gallery img { border-radius: var(--r-md); background: var(--bone); }
.woocommerce div.product .summary { margin: 0; }
.woocommerce div.product .product_title { font-size: clamp(1.6rem, 3vw, 2.25rem); margin-bottom: 10px; }
.woocommerce div.product .summary > p.price, .woocommerce div.product .summary > span.price { display: block; font-size: 1.75rem; font-weight: 700; margin: 0 0 6px; }
.woocommerce div.product .summary .price, .woocommerce div.product .summary .price .amount,
.woocommerce div.product .summary .price bdi { color: #0e1116 !important; }
.woocommerce div.product .summary .price del, .woocommerce div.product .summary .price del bdi { color: #6b7480 !important; }
.woocommerce div.product .summary .rl-vat { font-size: .8125rem; color: var(--muted); margin: 0 0 22px; }
.woocommerce div.product form.cart { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; }
.woocommerce div.product form.cart .quantity input { height: 54px; width: 88px; text-align: center; border: 1px solid var(--line); border-radius: var(--r-sm); font: inherit; }
.woocommerce div.product form.cart .single_add_to_cart_button {
	flex: 1 1 auto; min-width: 0; height: 54px; padding: 0 28px; border: 0; border-radius: 999px;
	background: var(--brand); color: #fff; font-size: 1rem; font-weight: 600; cursor: pointer;
	transition: background-color var(--dur) var(--ease);
}
.woocommerce div.product form.cart .single_add_to_cart_button:hover { background: var(--brand-deep); }
ul.rl-assurance::before, ul.rl-assurance::after { content: none !important; display: none !important; }
.rl-assurance { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin: 0 0 24px; }
.rl-assurance li { list-style: none; background: var(--paper); padding: 16px; }
.rl-assurance strong { display: block; font-size: .8125rem; }
.rl-assurance span { font-size: .75rem; color: var(--muted); }
.woocommerce div.product .woocommerce-tabs { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 34px; }
.woocommerce div.product .woocommerce-tabs ul.tabs { list-style: none; display: flex; gap: 24px; padding: 0; margin: 0 0 22px; border-bottom: 1px solid var(--line); }
.woocommerce div.product .woocommerce-tabs ul.tabs li { padding-bottom: 12px; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { text-decoration: none; font-weight: 600; font-size: .9375rem; color: var(--muted); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--ink); box-shadow: inset 0 -2px 0 var(--brand); }
@media (max-width: 900px) {
	.woocommerce div.product { grid-template-columns: 1fr; }
	.woocommerce div.product .woocommerce-product-gallery { position: static; }
}

/* ------------------------------------------------------------- feature */
.features { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 26px; }
.features h3 { font-size: 1rem; margin: 14px 0 6px; }
.features p { font-size: .875rem; color: var(--muted); margin: 0; }
.features svg { width: 26px; height: 26px; fill: none; stroke: var(--brand); stroke-width: 1.5; }
@media (max-width: 860px) { .features { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* ----------------------------------------------------------- brand row */
.brandrow { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.brandrow a {
	position: relative; display: grid; place-items: center; min-height: 150px;
	border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-md);
	text-decoration: none; color: #fff; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700;
	transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.brandrow a span { display: block; font-family: var(--font); font-size: .75rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-top: 6px; text-align: center; }
.brandrow a:hover { border-color: var(--brand); background: rgba(232,54,45,.08); }
@media (max-width: 700px) { .brandrow { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------- faq */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.0625rem; list-style: none; display: flex; justify-content: space-between; gap: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brand); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq p { color: var(--muted); margin: 12px 0 0; }

/* -------------------------------------------------------------- footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 64px 0 0; }
.site-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0,1fr)); gap: 40px; padding-bottom: 46px; }
.footer__grid h4 { font-family: var(--font); font-size: .6875rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.45); margin: 0 0 14px; }
.footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: .875rem; }
.footer__about p { font-size: .875rem; margin: 0 0 8px; max-width: 34ch; }
.footer__logo { height: 40px; width: auto; margin-bottom: 16px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0 26px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .8125rem; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 28px; } }

/* --------------------------------------------------------- page basics */
.page-hero { border-bottom: 1px solid var(--line); padding: 46px 0 34px; }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); margin: 0; }
.page-body { padding: 42px 0 72px; }
.page-body .entry { max-width: 780px; }
.page-body h2 { font-size: 1.25rem; margin-top: 32px; }
.page-body p, .page-body li { color: #3a4049; }
.page-body a { color: var(--brand); }
.breadcrumb { font-size: .8125rem; color: var(--muted); padding: 16px 0 0; }
.breadcrumb a { text-decoration: none; color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }

.woocommerce-message, .woocommerce-info, .woocommerce-error {
	border: 1px solid var(--line); border-left: 3px solid var(--brand);
	background: var(--bone); padding: 14px 18px; border-radius: var(--r-sm); list-style: none; margin: 18px 0;
}
.woocommerce .quantity input[type=number] { font: inherit; }
.woocommerce-breadcrumb { font-size: .8125rem; color: var(--muted); padding: 18px 0 0; }
.woocommerce-breadcrumb a { text-decoration: none; color: var(--muted); }
