/*
Theme Name: BestBy Group
Theme URI: https://bestbygroup.com/
Author: Best By Group
Author URI: https://bestbygroup.com/
Description: Official portal theme for the Best By family of brands (bestbyservice.com, bestbymotors.com, bestbymarket.com). Orange / white / charcoal colour scheme, SEO, AEO and GEO-ready with built-in schema markup, FAQ and brand directory.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bestbygroup
Tags: one-column, custom-menu, custom-logo, featured-images, theme-options
*/

/* ---------- Design tokens ---------- */
:root {
	--bb-orange: #ff6600;
	--bb-orange-dark: #e05500;
	--bb-orange-soft: #fff1e6;
	--bb-ink: #1f1f1f;
	--bb-text: #333333;
	--bb-muted: #6b6b6b;
	--bb-line: #e6e6e6;
	--bb-grey: #f5f5f5;
	--bb-white: #ffffff;
	--bb-radius: 14px;
	--bb-shadow: 0 6px 24px rgba(0, 0, 0, .08);
	--bb-max: 1200px;
	--bb-font: "Poppins", "Segoe UI", Arial, sans-serif;
	--bb-font-logo: "Fredoka", "Poppins", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--bb-font);
	font-size: 17px;
	line-height: 1.65;
	color: var(--bb-text);
	background: var(--bb-white);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bb-orange); text-decoration: none; }
a:hover { color: var(--bb-orange-dark); text-decoration: underline; }
h1, h2, h3, h4 { color: var(--bb-ink); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto;
	background: var(--bb-ink); color: #fff; padding: 10px 16px; border-radius: 6px;
}

.bb-container { max-width: var(--bb-max); margin: 0 auto; padding: 0 20px; }
.bb-section { padding: 80px 0; }
.bb-section--grey { background: var(--bb-grey); }
.bb-section--orange { background: var(--bb-orange); color: #fff; }
.bb-section--orange h2, .bb-section--orange h3 { color: #fff; }
.bb-section__head { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.bb-section__head p { color: var(--bb-muted); font-size: 1.05rem; }
.bb-eyebrow {
	display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .12em;
	text-transform: uppercase; color: var(--bb-orange); margin-bottom: 10px;
}

/* ---------- Buttons ---------- */
.bb-btn {
	display: inline-flex; align-items: center; gap: 8px; justify-content: center;
	padding: 12px 26px; border-radius: 999px; font-weight: 600; font-size: .95rem;
	background: var(--bb-orange); color: #fff; border: 2px solid var(--bb-orange);
	transition: background .2s, color .2s, transform .2s;
}
.bb-btn:hover { background: var(--bb-orange-dark); border-color: var(--bb-orange-dark); color: #fff; text-decoration: none; transform: translateY(-1px); }
.bb-btn--outline { background: transparent; color: var(--bb-orange); }
.bb-btn--outline:hover { background: var(--bb-orange); color: #fff; }
.bb-btn--white { background: #fff; color: var(--bb-orange); border-color: #fff; }
.bb-btn--white:hover { background: var(--bb-ink); border-color: var(--bb-ink); color: #fff; }
.bb-btn--ghost { background: transparent; color: #fff; border-color: #fff; }
.bb-btn--ghost:hover { background: #fff; color: var(--bb-orange); border-color: #fff; }

/* ---------- Header ---------- */
.bb-header {
	position: sticky; top: 0; z-index: 100; background: #fff;
	border-bottom: 1px solid var(--bb-line);
}
.bb-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 20px; }
.bb-logo {
	font-family: var(--bb-font-logo); font-weight: 700; font-size: 1.9rem; letter-spacing: -.5px;
	color: var(--bb-orange); line-height: 1;
}
.bb-logo:hover { text-decoration: none; color: var(--bb-orange-dark); }
.bb-logo span { color: var(--bb-ink); }
.custom-logo { max-height: 52px; width: auto; }

.bb-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.bb-nav li { position: relative; }
.bb-nav a {
	display: block; padding: 10px 14px; color: var(--bb-ink); font-weight: 500; font-size: .95rem; border-radius: 8px;
}
.bb-nav a:hover, .bb-nav .current-menu-item > a { color: var(--bb-orange); background: var(--bb-orange-soft); text-decoration: none; }
.bb-nav .sub-menu {
	display: none; position: absolute; top: 100%; left: 0; min-width: 220px; flex-direction: column;
	background: #fff; box-shadow: var(--bb-shadow); border-radius: 10px; padding: 8px; gap: 0;
}
.bb-nav li:hover > .sub-menu, .bb-nav li:focus-within > .sub-menu { display: flex; }
.bb-nav__cta a { background: var(--bb-orange); color: #fff !important; }
.bb-nav__cta a:hover { background: var(--bb-orange-dark) !important; }

.bb-menu-toggle {
	display: none; background: none; border: 2px solid var(--bb-orange); color: var(--bb-orange);
	border-radius: 8px; padding: 8px 12px; font-weight: 600; cursor: pointer; font-family: inherit;
}

/* ---------- Hero ---------- */
.bb-hero { background: var(--bb-orange); color: #fff; padding: 90px 0 100px; text-align: center; position: relative; overflow: hidden; }
.bb-hero::after {
	content: ""; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px;
	border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.bb-hero::before {
	content: ""; position: absolute; left: -100px; top: -140px; width: 320px; height: 320px;
	border-radius: 50%; background: rgba(255, 255, 255, .06);
}
.bb-hero__logo {
	font-family: var(--bb-font-logo); font-weight: 700; color: #fff; line-height: 1;
	font-size: clamp(3rem, 10vw, 6.5rem); letter-spacing: -2px; margin: 0 0 16px;
}
.bb-hero__tagline { font-size: clamp(1.1rem, 2.4vw, 1.5rem); font-weight: 500; margin: 0 auto 26px; max-width: 760px; color: #fff; }
.bb-hero__intro { max-width: 780px; margin: 0 auto 34px; opacity: .95; }
.bb-hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }

/* ---------- Quick answer (AEO) ---------- */
.bb-answer {
	max-width: 900px; margin: -50px auto 0; position: relative; z-index: 2; background: #fff;
	border-radius: var(--bb-radius); box-shadow: var(--bb-shadow); padding: 30px 34px;
	border-left: 6px solid var(--bb-orange);
}
.bb-answer h2 { font-size: 1.3rem; margin-bottom: .4em; }
.bb-answer p:last-child { margin: 0; }

/* ---------- Brands ---------- */
.bb-brands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.bb-brand {
	background: #fff; border-radius: var(--bb-radius); overflow: hidden; box-shadow: var(--bb-shadow);
	display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; border: 1px solid var(--bb-line);
}
.bb-brand:hover { transform: translateY(-6px); box-shadow: 0 14px 34px rgba(255, 102, 0, .18); }
.bb-brand__media { aspect-ratio: 4 / 3; background: var(--bb-orange); overflow: hidden; }
.bb-brand__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.bb-brand:hover .bb-brand__media img { transform: scale(1.04); }
.bb-brand__body { padding: 24px 24px 28px; display: flex; flex-direction: column; flex: 1; }
.bb-brand__name {
	font-family: var(--bb-font-logo); font-size: 1.6rem; font-weight: 700; color: var(--bb-orange); margin: 0 0 4px;
}
.bb-brand__name span { color: var(--bb-ink); }
.bb-brand__cat { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--bb-muted); font-weight: 600; margin-bottom: 12px; }
.bb-brand__desc { color: var(--bb-text); font-size: .98rem; flex: 1; }
.bb-brand .bb-btn { align-self: flex-start; margin-top: 8px; }
.bb-brands__more { text-align: center; margin-top: 44px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Features ---------- */
.bb-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.bb-feature { background: #fff; border-radius: var(--bb-radius); padding: 28px 24px; border: 1px solid var(--bb-line); }
.bb-feature__icon {
	width: 52px; height: 52px; border-radius: 12px; background: var(--bb-orange-soft); color: var(--bb-orange);
	display: grid; place-items: center; margin-bottom: 16px;
}
.bb-feature__icon svg { width: 26px; height: 26px; }
.bb-feature p { color: var(--bb-muted); font-size: .95rem; margin: 0; }

/* ---------- Split / about ---------- */
.bb-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.bb-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.bb-stat { background: #fff; border-radius: var(--bb-radius); padding: 26px; box-shadow: var(--bb-shadow); }
.bb-stat strong { display: block; font-size: 2.2rem; color: var(--bb-orange); font-family: var(--bb-font-logo); line-height: 1.1; }
.bb-stat span { color: var(--bb-muted); font-size: .92rem; }
.bb-list { list-style: none; padding: 0; margin: 0 0 1.4em; }
.bb-list li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.bb-list li::before {
	content: ""; position: absolute; left: 0; top: 7px; width: 18px; height: 18px; border-radius: 50%;
	background: var(--bb-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* ---------- Protection band ---------- */
.bb-band { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.bb-band h2 { margin-bottom: .3em; }
.bb-band p { margin: 0; max-width: 720px; opacity: .95; }

/* ---------- Find out more cards ---------- */
.bb-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.bb-card { background: #fff; border-radius: var(--bb-radius); padding: 30px; border-top: 5px solid var(--bb-orange); box-shadow: var(--bb-shadow); display: flex; flex-direction: column; }
.bb-card p { color: var(--bb-muted); flex: 1; }
.bb-card a.bb-link { font-weight: 600; }

/* ---------- FAQ ---------- */
.bb-faq { max-width: 860px; margin: 0 auto; }
.bb-faq details { background: #fff; border: 1px solid var(--bb-line); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.bb-faq summary {
	cursor: pointer; list-style: none; padding: 20px 56px 20px 24px; font-weight: 600; color: var(--bb-ink);
	position: relative; font-size: 1.05rem;
}
.bb-faq summary::-webkit-details-marker { display: none; }
.bb-faq summary::after {
	content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
	width: 28px; height: 28px; border-radius: 50%; background: var(--bb-orange); color: #fff;
	display: grid; place-items: center; font-size: 1.2rem; line-height: 1;
}
.bb-faq details[open] summary::after { content: "–"; }
.bb-faq details[open] summary { color: var(--bb-orange); }
.bb-faq .bb-faq__a { padding: 0 24px 20px; color: var(--bb-text); }

/* ---------- Posts ---------- */
.bb-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.bb-post { background: #fff; border-radius: var(--bb-radius); overflow: hidden; border: 1px solid var(--bb-line); }
.bb-post__thumb { aspect-ratio: 16 / 9; background: var(--bb-orange-soft); }
.bb-post__thumb img { width: 100%; height: 100%; object-fit: cover; }
.bb-post__body { padding: 20px 22px 24px; }
.bb-post__date { font-size: .82rem; color: var(--bb-muted); }
.bb-post h3 a { color: var(--bb-ink); }
.bb-post h3 a:hover { color: var(--bb-orange); }

.bb-content { max-width: 820px; margin: 0 auto; padding: 60px 20px; }
.bb-content .entry-meta { color: var(--bb-muted); font-size: .9rem; margin-bottom: 20px; }
.bb-page-hero { background: var(--bb-orange); color: #fff; padding: 60px 0; text-align: center; }
.bb-page-hero h1 { color: #fff; margin: 0; }
.bb-breadcrumbs { font-size: .88rem; margin-top: 10px; opacity: .9; }
.bb-breadcrumbs a { color: #fff; text-decoration: underline; }

/* ---------- Footer ---------- */
.bb-footer { background: var(--bb-ink); color: #cfcfcf; padding: 64px 0 28px; font-size: .95rem; }
.bb-footer a { color: #cfcfcf; }
.bb-footer a:hover { color: var(--bb-orange); }
.bb-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.bb-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.bb-footer ul { list-style: none; padding: 0; margin: 0; }
.bb-footer li { margin-bottom: 8px; }
.bb-footer .bb-logo { color: var(--bb-orange); }
.bb-footer .bb-logo span { color: #fff; }
.bb-social { display: flex; gap: 10px; margin-top: 18px; }
.bb-social a {
	width: 38px; height: 38px; border-radius: 50%; background: #333; display: grid; place-items: center; color: #fff;
}
.bb-social a:hover { background: var(--bb-orange); color: #fff; }
.bb-social svg { width: 18px; height: 18px; fill: currentColor; }
.bb-footer__bottom {
	border-top: 1px solid #3a3a3a; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .88rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.bb-features { grid-template-columns: repeat(2, 1fr); }
	.bb-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
	.bb-brands, .bb-cards, .bb-posts { grid-template-columns: 1fr 1fr; }
	.bb-split { grid-template-columns: 1fr; gap: 36px; }
	.bb-menu-toggle { display: block; }
	.bb-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--bb-line); padding: 12px 20px 20px; }
	.bb-nav.is-open { display: block; }
	.bb-nav ul { flex-direction: column; }
	.bb-nav .sub-menu { position: static; display: flex; box-shadow: none; padding-left: 14px; }
}
@media (max-width: 640px) {
	body { font-size: 16px; }
	.bb-section { padding: 56px 0; }
	.bb-brands, .bb-cards, .bb-posts, .bb-features, .bb-footer__grid { grid-template-columns: 1fr; }
	.bb-hero { padding: 64px 0 86px; }
	.bb-answer { margin: -40px 16px 0; padding: 24px; }
	.bb-logo { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}
