/*
Theme Name:   E-Bike Trends
Theme URI:    https://e-biketrends.com
Description:  Magazine child theme for GeneratePress — e-bike buying guides with affiliate product components.
Author:       E-Bike Trends
Template:     generatepress
Version:      2.0.0
License:      GPL-2.0-or-later
Text Domain:  ebikes-child
*/

/* ==========================================================================
   Design tokens

   --brand  lime: nav, categories, accents
   --cta    amber: Amazon actions only
   Light magazine base — no auto dark mode (production brand is light).
   ========================================================================== */

:root {
	--paper:      #ffffff;
	--surface:    #f3f5f1;
	--sunk:       #e8ebe4;
	--ink:        #1a1f24;
	--ink-2:      #4a535c;
	--ink-3:      #6f7a84;
	--rule:       #dde2d8;
	--rule-soft:  #eef1ea;

	--brand:      #8bcf2e;
	--brand-deep: #5f9a14;
	--brand-ink:  #1a1f24;
	--brand-wash: #eef8d9;

	--cta:        #e07a14;
	--cta-deep:   #b85f0c;
	--cta-wash:   #fdf0e3;

	--good:       #2e6f4e;
	--warn:       #9a5b08;
	--stop:       #a3302a;

	--shadow-sm:  0 1px 2px rgba(26, 31, 36, .06);
	--shadow-md:  0 8px 28px -12px rgba(26, 31, 36, .28);

	--radius:     6px;
	--radius-sm:  4px;

	--wrap:       1180px;
	--measure:    700px;

	--font-ui:    "Outfit", "Avenir Next", "Segoe UI", sans-serif;
	--font-body:  "DM Sans", "Helvetica Neue", Arial, sans-serif;

	--ticker-h:   36px;
}

/* ==========================================================================
   Base
   ========================================================================== */

body {
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

.site-content,
.container,
.inside-article,
.ebk-home {
	max-width: var(--wrap);
}

h1, h2, h3, h4, h5, h6,
.entry-title {
	font-family: var(--font-ui);
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.15;
	color: var(--ink);
	text-wrap: balance;
}

h1, .entry-title { font-size: clamp(1.85rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin-top: 2em; }
h3 { font-size: 1.2rem; margin-top: 1.6em; }

a {
	color: var(--brand-deep);
	text-underline-offset: 2px;
}
a:hover, a:focus { color: var(--ink); }

:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
}

.ebk-specs, .ebk-table, .ebk-stat, table {
	font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Trending ticker
   ========================================================================== */

.ebk-ticker {
	background: var(--ink);
	color: #fff;
	font-family: var(--font-ui);
	height: var(--ticker-h);
	overflow: hidden;
}

.ebk-ticker__inner {
	display: flex;
	align-items: stretch;
	max-width: var(--wrap);
	margin: 0 auto;
	height: 100%;
}

.ebk-ticker__label {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	background: var(--brand);
	color: var(--brand-ink);
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
	padding: 0 14px;
	white-space: nowrap;
}

.ebk-ticker__track-wrap {
	flex: 1;
	overflow: hidden;
	mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 24px), transparent);
}

.ebk-ticker__track {
	display: flex;
	align-items: center;
	gap: 2.5rem;
	list-style: none;
	margin: 0;
	padding: 0 16px;
	height: 100%;
	width: max-content;
	animation: ebk-ticker-scroll 45s linear infinite;
}

.ebk-ticker__track:hover { animation-play-state: paused; }

.ebk-ticker__track a {
	color: #e8ebe6;
	text-decoration: none;
	font-size: .82rem;
	font-weight: 500;
	white-space: nowrap;
}
.ebk-ticker__track a:hover { color: var(--brand); }

@keyframes ebk-ticker-scroll {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

/* ==========================================================================
   Header / nav
   ========================================================================== */

.site-header {
	background: var(--paper);
	border-bottom: 1px solid var(--rule);
	box-shadow: none;
}

.site-header::after { display: none; }

.main-navigation,
.main-navigation .main-nav ul li a {
	background: transparent;
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: .8rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ink);
}

.main-navigation .main-nav ul li a:hover {
	color: var(--brand-deep);
	background: transparent;
}

.main-navigation .main-nav ul li[class*="current-menu-"] > a {
	background: var(--brand);
	color: var(--brand-ink);
}

.site-branding .site-title,
.site-branding .main-title a {
	font-family: var(--font-ui);
	font-weight: 800;
	letter-spacing: -.03em;
	color: var(--ink);
	font-size: 1.45rem;
}

.site-logo img,
.custom-logo {
	max-height: 44px;
	width: auto;
}

/* Title is replaced by the SVG wordmark. */
.site-header .main-title,
.site-branding .main-title {
	display: none !important;
}

.site-description { color: var(--ink-3); font-family: var(--font-body); }

/* ==========================================================================
   Magazine home
   ========================================================================== */

.home .site-content,
.blog .site-content {
	padding-top: 24px;
}

.ebk-home {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 36px;
	margin: 0 auto 48px;
	padding: 0 20px;
	width: 100%;
}

.ebk-section-title {
	font-family: var(--font-ui);
	font-size: .85rem;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--brand-deep);
	margin: 0 0 18px;
	padding: 0;
}

/* Mosaic */
.ebk-mosaic {
	display: grid;
	grid-template-columns: 1.35fr 1fr;
	gap: 10px;
	margin-bottom: 36px;
}

.ebk-mosaic__lead,
.ebk-mosaic__card {
	position: relative;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--ink);
	min-height: 0;
}

.ebk-mosaic__lead { min-height: 360px; }
.ebk-mosaic__card { min-height: 170px; }

.ebk-mosaic__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 10px;
}

.ebk-mosaic__link {
	display: block;
	position: relative;
	height: 100%;
	color: #fff;
	text-decoration: none;
}

.ebk-mosaic__img,
.ebk-mosaic__placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .45s ease;
}

.ebk-mosaic__placeholder {
	background:
		radial-gradient(ellipse at 30% 20%, rgba(139, 207, 46, .45), transparent 55%),
		linear-gradient(145deg, #2a3238, #1a1f24 55%, #0f1316);
}

.ebk-mosaic__link:hover .ebk-mosaic__img,
.ebk-mosaic__link:hover .ebk-mosaic__placeholder {
	transform: scale(1.04);
}

.ebk-mosaic__overlay {
	position: absolute;
	inset: auto 0 0 0;
	padding: 48px 18px 16px;
	background: linear-gradient(transparent, rgba(10, 12, 14, .88));
	display: flex;
	flex-direction: column;
	gap: 6px;
	z-index: 1;
}

.ebk-mosaic__meta {
	display: flex;
	gap: 10px;
	align-items: center;
	font-family: var(--font-ui);
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .04em;
	color: rgba(255, 255, 255, .75);
}

.ebk-mosaic__cat {
	background: var(--brand);
	color: var(--brand-ink);
	padding: 2px 7px;
	border-radius: 2px;
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: .65rem;
	font-weight: 800;
}

.ebk-mosaic__title {
	font-family: var(--font-ui);
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.25;
	letter-spacing: -.015em;
	color: #fff;
}

.ebk-mosaic__lead .ebk-mosaic__title { font-size: clamp(1.2rem, 2.2vw, 1.55rem); }

/* Latest list */
.ebk-latest__list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.ebk-post-card {
	display: grid;
	grid-template-columns: 160px minmax(0, 1fr);
	gap: 18px;
	padding: 18px 0;
	border-bottom: 1px solid var(--rule);
	margin: 0;
}

.ebk-post-card__thumb {
	display: block;
	border-radius: var(--radius-sm);
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--sunk);
}

.ebk-post-card__thumb img,
.ebk-post-card__ph {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .35s ease;
}

.ebk-post-card__ph {
	background: linear-gradient(135deg, var(--brand-wash), var(--sunk));
}

.ebk-post-card:hover .ebk-post-card__thumb img {
	transform: scale(1.05);
}

.ebk-post-card__cat {
	font-family: var(--font-ui);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--brand-deep);
	text-decoration: none;
}

.ebk-post-card__title {
	margin: 6px 0 8px;
	font-size: 1.15rem;
	line-height: 1.3;
}

.ebk-post-card__title a {
	color: var(--ink);
	text-decoration: none;
}
.ebk-post-card__title a:hover { color: var(--brand-deep); }

.ebk-post-card__meta {
	margin: 0;
	font-family: var(--font-ui);
	font-size: .8rem;
	color: var(--ink-3);
}

/* Sidebar widgets */
.ebk-sidebar .ebk-widget,
.ebk-widget {
	margin-bottom: 22px;
}

.ebk-widget__title {
	font-family: var(--font-ui);
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #fff;
	background: var(--ink);
	margin: 0 0 14px;
	padding: 10px 14px;
	position: relative;
}

.ebk-widget__title::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 3px;
	background: var(--brand);
}

.ebk-recent {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ebk-recent__item {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	margin: 0;
}

.ebk-recent__thumb {
	display: block;
	width: 64px;
	height: 64px;
	border-radius: var(--radius-sm);
	overflow: hidden;
	background: var(--sunk);
}

.ebk-recent__thumb img,
.ebk-recent__ph {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ebk-recent__ph {
	background: linear-gradient(135deg, var(--brand), var(--ink));
	opacity: .35;
}

.ebk-recent__title {
	font-family: var(--font-ui);
	font-size: .88rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--ink);
	text-decoration: none;
	display: block;
}
.ebk-recent__title:hover { color: var(--brand-deep); }

.ebk-recent__date {
	display: block;
	margin-top: 4px;
	font-size: .72rem;
	color: var(--ink-3);
	font-family: var(--font-ui);
}

.ebk-browse {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ebk-browse li { margin: 0; border-bottom: 1px solid var(--rule-soft); }
.ebk-browse a {
	display: block;
	padding: 10px 0;
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: .92rem;
	color: var(--ink);
	text-decoration: none;
}
.ebk-browse a:hover { color: var(--brand-deep); }

.ebk-widget__empty {
	font-size: .9rem;
	color: var(--ink-3);
	margin: 0;
}

/* Hide GeneratePress default content loop chrome on front when we own layout */
.home.page-template-default .entry-header,
.home .site-main > article .entry-header { /* keep singles */ }

body.home .generate-columns-container,
body.home #main > .inside-article {
	display: none;
}

/* When front-page.php is used, GP still wraps — keep our grid full width */
body.home #content {
	max-width: none;
	padding: 0;
}

body.home #primary,
body.home #main {
	max-width: none;
	width: 100%;
	margin: 0;
	padding: 0;
}

body.home #right-sidebar,
body.home .sidebar {
	display: none; /* our aside is inside .ebk-home */
}

/* Empty states */
.ebk-empty {
	padding: 36px 8px 48px;
	max-width: 42ch;
}

.ebk-empty--page {
	margin: 48px auto;
	padding: 0 20px 64px;
	text-align: left;
}

.ebk-empty__kicker {
	font-family: var(--font-ui);
	font-size: .75rem;
	font-weight: 800;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--brand-deep);
	margin: 0 0 8px;
}

.ebk-empty__lead {
	font-family: var(--font-ui);
	font-size: 1.65rem;
	font-weight: 700;
	margin: 0 0 12px;
	color: var(--ink);
}

.ebk-empty p { color: var(--ink-2); margin: 0 0 14px; }

.ebk-empty__actions { margin-top: 22px; }

.ebk-btn {
	display: inline-block;
	font-family: var(--font-ui);
	font-weight: 700;
	font-size: .9rem;
	background: var(--brand);
	color: var(--brand-ink);
	text-decoration: none;
	padding: 12px 20px;
	border-radius: var(--radius-sm);
}
.ebk-btn:hover { background: var(--brand-deep); color: #fff; }

.ebk-pagination ul {
	display: flex;
	gap: 8px;
	list-style: none;
	padding: 24px 0 0;
	margin: 0;
	font-family: var(--font-ui);
}
.ebk-pagination a,
.ebk-pagination span {
	display: inline-block;
	padding: 8px 12px;
	border: 1px solid var(--rule);
	border-radius: var(--radius-sm);
	text-decoration: none;
	color: var(--ink);
	font-size: .85rem;
	font-weight: 600;
}
.ebk-pagination .current {
	background: var(--brand);
	border-color: var(--brand);
	color: var(--brand-ink);
}

/* ==========================================================================
   Article
   ========================================================================== */

.entry-content {
	max-width: var(--measure);
	font-size: 1.05rem;
}

.entry-content > p,
.entry-content > ul,
.entry-content > ol,
.entry-content > blockquote {
	max-width: var(--measure);
}

.entry-content p { margin-bottom: 1.1em; }
.entry-content li::marker { color: var(--brand); }

.entry-content blockquote {
	border-left: 3px solid var(--brand);
	background: var(--surface);
	padding: 1em 1.25em;
	margin-inline: 0;
	font-style: normal;
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.entry-meta {
	font-family: var(--font-ui);
	font-size: .82rem;
	color: var(--ink-3);
}

.ebk-wide {
	max-width: var(--wrap);
	margin-inline: calc((var(--measure) - min(var(--wrap), 100%)) / 2);
}

/* ==========================================================================
   Product components
   ========================================================================== */

.ebk-card {
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	padding: 22px;
	margin: 28px 0;
	background: var(--paper);
	box-shadow: var(--shadow-sm);
	display: grid;
	gap: 15px;
}

.ebk-card__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
}

.ebk-card__title {
	font-family: var(--font-ui);
	font-size: 1.12rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
}

.ebk-card__brand {
	font-family: var(--font-ui);
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.ebk-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ebk-specs li {
	font-family: var(--font-ui);
	font-size: .8rem;
	background: var(--surface);
	border: 1px solid var(--rule-soft);
	border-radius: var(--radius-sm);
	padding: 5px 11px;
	color: var(--ink-2);
	margin: 0;
}

.ebk-specs li b { font-weight: 700; color: var(--ink); }

.ebk-cta {
	display: inline-block;
	background: var(--cta);
	color: #fff !important;
	font-family: var(--font-ui);
	font-weight: 700;
	font-size: .95rem;
	padding: 12px 22px;
	border-radius: var(--radius-sm);
	text-decoration: none !important;
	text-align: center;
	transition: background .15s ease, transform .15s ease;
}

.ebk-cta:hover,
.ebk-cta:focus {
	background: var(--cta-deep);
	color: #fff !important;
	transform: translateY(-1px);
}

.ebk-disclosure {
	font-family: var(--font-ui);
	font-size: .82rem;
	color: var(--ink-3);
	background: var(--surface);
	border-left: 3px solid var(--brand);
	padding: 9px 14px;
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	margin: 0 0 20px;
}

.ebk-note {
	font-family: var(--font-ui);
	font-size: .85rem;
	color: var(--warn);
	margin: 0;
}

.ebk-error {
	display: inline-block;
	border: 1px dashed var(--stop);
	color: var(--stop);
	font-family: var(--font-ui);
	font-size: .85rem;
	padding: 6px 12px;
	border-radius: var(--radius-sm);
}

.ebk-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	margin: 28px 0;
	background: var(--paper);
	-webkit-overflow-scrolling: touch;
}

.ebk-table {
	width: 100%;
	min-width: 640px;
	border-collapse: collapse;
	font-family: var(--font-ui);
	font-size: .9rem;
}

.ebk-table th,
.ebk-table td {
	text-align: left;
	padding: 12px 14px;
	border-bottom: 1px solid var(--rule-soft);
	vertical-align: middle;
}

.ebk-table thead th {
	font-size: .7rem;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--ink-3);
	background: var(--sunk);
	border-bottom: 1px solid var(--rule);
	white-space: nowrap;
}

.ebk-table tbody tr:last-child td { border-bottom: 0; }
.ebk-table tbody tr:hover td { background: var(--surface); }

.ebk-table__name { font-weight: 700; color: var(--ink); min-width: 190px; }
.ebk-table__brand {
	display: block;
	font-size: .7rem;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-top: 2px;
}
.ebk-table .ebk-cta { padding: 8px 14px; font-size: .82rem; white-space: nowrap; }
.ebk-table__empty { color: var(--ink-3); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer,
.site-info {
	background: var(--ink);
	border-top: none;
	color: rgba(255, 255, 255, .72);
	font-family: var(--font-ui);
	font-size: .85rem;
}

.site-info a,
.site-footer a {
	color: var(--brand);
}

.ebk-footer-disclosure {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 20px 20px 0;
	font-size: .8rem;
	color: rgba(255, 255, 255, .55);
	text-align: center;
}

.ebk-copyright { color: rgba(255, 255, 255, .65); }

/* Hide leftover GP credit markup if a filter misses */
.copyright .gplink,
.site-info .gplink,
.copyright a[href*="generatepress"],
.site-info a[href*="generatepress"] { display: none !important; }

/* ==========================================================================
   Sticky mobile CTA
   ========================================================================== */

.ebk-sticky { display: none; }

@media (max-width: 960px) {
	.ebk-home {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.ebk-mosaic {
		grid-template-columns: 1fr;
	}

	.ebk-mosaic__lead { min-height: 280px; }

	.ebk-mosaic__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 640px) {
	body { font-size: 16px; }

	.ebk-post-card {
		grid-template-columns: 100px minmax(0, 1fr);
		gap: 12px;
	}

	.ebk-mosaic__grid { grid-template-columns: 1fr; }
	.ebk-mosaic__card { min-height: 200px; }

	.ebk-card { padding: 18px; }
	.ebk-cta { width: 100%; }

	.ebk-sticky {
		display: block;
		position: fixed;
		inset: auto 0 0 0;
		z-index: 60;
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
		background: color-mix(in srgb, var(--paper) 92%, transparent);
		backdrop-filter: blur(8px);
		border-top: 1px solid var(--rule);
		animation: ebk-sticky-in .35s ease both;
	}

	.ebk-sticky .ebk-cta { margin: 0; }
	.site-footer { padding-bottom: 76px; }
}

@keyframes ebk-sticky-in {
	from { transform: translateY(100%); opacity: 0; }
	to   { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}
