/*
Theme Name: Felsborg
Theme URI: https://felsborg.com
Author: Felsborg
Description: A clean, lightweight theme for Felsborg — retail and wholesale of ventilation system products. Includes a configurable front page (hero, retail/wholesale split, product categories, benefits, wholesale call-to-action), WooCommerce support, a responsive menu and Customizer settings for contact details.
Version: 1.0.0
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: felsborg
Tags: business, e-commerce, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* ---------- Tokens ---------- */
:root {
	--fb-ink: #14212b;
	--fb-ink-soft: #3c4c58;
	--fb-muted: #6b7a86;
	--fb-line: #dde3e8;
	--fb-bg: #ffffff;
	--fb-bg-alt: #f2f5f7;
	--fb-navy: #0f2a3d;
	--fb-navy-2: #16384f;
	--fb-accent: #1f8fb3;
	--fb-accent-dark: #16708d;
	--fb-accent-soft: #e3f2f7;
	--fb-radius: 6px;
	--fb-wrap: 1200px;
	--fb-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--fb-shadow: 0 1px 2px rgba(15, 42, 61, .06), 0 8px 24px rgba(15, 42, 61, .06);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--fb-font);
	font-size: 17px;
	line-height: 1.65;
	color: var(--fb-ink);
	background: var(--fb-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--fb-accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--fb-navy); }
h1, h2, h3, h4 { line-height: 1.2; color: var(--fb-navy); margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; }
hr { border: 0; border-top: 1px solid var(--fb-line); margin: 2rem 0; }
:focus-visible { outline: 3px solid var(--fb-accent); outline-offset: 2px; }

.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 !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto;
	z-index: 1000; background: #fff; padding: .6rem 1rem; border-radius: var(--fb-radius);
}

.wrap { width: 100%; max-width: var(--fb-wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section--alt { background: var(--fb-bg-alt); }
.section__head { max-width: 680px; margin-bottom: 40px; }
.section__head p { color: var(--fb-ink-soft); font-size: 1.05rem; }
.eyebrow {
	display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
	text-transform: uppercase; color: var(--fb-accent-dark); margin-bottom: .7rem;
}

/* ---------- Buttons ---------- */
.button, .wp-block-button__link, button, input[type="submit"] {
	display: inline-flex; align-items: center; gap: .5rem;
	font: 600 .98rem/1 var(--fb-font);
	padding: .95rem 1.4rem; border-radius: var(--fb-radius);
	border: 2px solid var(--fb-accent); background: var(--fb-accent); color: #fff;
	text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.button svg { width: 18px; height: 18px; flex: none; }
.button:hover, button:hover, input[type="submit"]:hover { background: var(--fb-accent-dark); border-color: var(--fb-accent-dark); color: #fff; }
.button--ghost { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.button--ghost:hover { background: #fff; border-color: #fff; color: var(--fb-navy); }
.button--outline { background: transparent; color: var(--fb-accent-dark); }
.button--outline:hover { background: var(--fb-accent); color: #fff; }

/* ---------- Forms ---------- */
input[type="text"], input[type="email"], input[type="search"], input[type="tel"],
input[type="url"], input[type="password"], input[type="number"], textarea, select {
	width: 100%; font: inherit; color: var(--fb-ink);
	padding: .7rem .85rem; border: 1px solid var(--fb-line); border-radius: var(--fb-radius); background: #fff;
}
input:focus, textarea:focus, select:focus { border-color: var(--fb-accent); outline: none; box-shadow: 0 0 0 3px var(--fb-accent-soft); }

/* ---------- Top bar ---------- */
.topbar { background: var(--fb-navy); color: #c9d6df; font-size: .85rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 38px; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.topbar__contact { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.topbar__contact span, .topbar__contact a { display: inline-flex; align-items: center; gap: .4rem; }
.topbar svg { width: 15px; height: 15px; opacity: .8; }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--fb-line); position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.site-branding { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.site-branding .custom-logo { max-height: 48px; width: auto; }
.site-title { font-size: 1.45rem; font-weight: 800; letter-spacing: .02em; color: var(--fb-navy); margin: 0; text-transform: uppercase; }
.site-title a { color: inherit; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; flex: none; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; align-items: center; }
.main-nav li { position: relative; }
.main-nav a {
	display: block; padding: .6rem .85rem; color: var(--fb-ink); text-decoration: none;
	font-weight: 600; font-size: .95rem; border-radius: var(--fb-radius);
}
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { color: var(--fb-accent-dark); background: var(--fb-accent-soft); }
.main-nav .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 220px; display: none; flex-direction: column; align-items: stretch;
	background: #fff; border: 1px solid var(--fb-line); border-radius: var(--fb-radius); box-shadow: var(--fb-shadow); padding: .4rem;
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.main-nav .sub-menu .sub-menu { top: 0; left: 100%; }

.header-actions { display: flex; align-items: center; gap: .6rem; }
.header-cart { position: relative; display: inline-flex; padding: .5rem; color: var(--fb-navy); }
.header-cart svg { width: 24px; height: 24px; }
.header-cart__count {
	position: absolute; top: 0; right: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
	background: var(--fb-accent); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center;
}
.menu-toggle { display: none; background: transparent; border: 1px solid var(--fb-line); color: var(--fb-navy); padding: .55rem .7rem; }
.menu-toggle:hover { background: var(--fb-bg-alt); color: var(--fb-navy); border-color: var(--fb-line); }
.menu-toggle svg { width: 22px; height: 22px; }

@media (max-width: 960px) {
	.menu-toggle { display: inline-flex; }
	.header-actions .button { display: none; }
	.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--fb-line); box-shadow: var(--fb-shadow); }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; align-items: stretch; padding: .75rem 20px 1rem; gap: 0; }
	.main-nav .sub-menu { position: static; display: flex; box-shadow: none; border: 0; padding: 0 0 0 1rem; }
	.site-header { position: relative; }
	.admin-bar .site-header { top: 0; }
}

/* ---------- Hero ---------- */
.hero {
	position: relative; color: #fff; overflow: hidden;
	background: radial-gradient(1200px 500px at 85% 10%, rgba(31,143,179,.35), transparent 60%),
	            linear-gradient(135deg, var(--fb-navy) 0%, var(--fb-navy-2) 100%);
	background-size: cover; background-position: center;
}
.hero.has-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,42,61,.92) 0%, rgba(15,42,61,.65) 60%, rgba(15,42,61,.35) 100%); }
.hero__airflow { position: absolute; right: -40px; top: 50%; transform: translateY(-50%); width: 560px; max-width: 60%; opacity: .18; pointer-events: none; }
.hero .wrap { position: relative; padding-top: 104px; padding-bottom: 112px; }
.hero__content { max-width: 640px; }
.hero h1 { color: #fff; margin-bottom: .45em; }
.hero p { font-size: 1.15rem; color: #d3e0e8; max-width: 560px; }
.hero .eyebrow { color: #7fd0ea; }
.hero__actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.8rem; }
.hero__stats { display: flex; gap: 2.5rem; flex-wrap: wrap; margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.15); }
.hero__stats strong { display: block; font-size: 1.6rem; color: #fff; }
.hero__stats span { font-size: .85rem; color: #a9bcc9; }

/* ---------- Retail / Wholesale ---------- */
.channels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: -56px; position: relative; z-index: 2; }
.channel {
	background: #fff; border: 1px solid var(--fb-line); border-radius: 10px; padding: 32px; box-shadow: var(--fb-shadow);
	display: flex; flex-direction: column;
}
.channel__icon { width: 48px; height: 48px; border-radius: 10px; background: var(--fb-accent-soft); color: var(--fb-accent-dark); display: grid; place-items: center; margin-bottom: 1.1rem; }
.channel__icon svg { width: 26px; height: 26px; }
.channel ul { list-style: none; padding: 0; margin: 0 0 1.6rem; color: var(--fb-ink-soft); }
.channel li { padding-left: 1.6rem; position: relative; margin-bottom: .4rem; }
.channel li::before { content: ""; position: absolute; left: 0; top: .55em; width: .85rem; height: .45rem; border-left: 2px solid var(--fb-accent); border-bottom: 2px solid var(--fb-accent); transform: rotate(-45deg); }
.channel .button { margin-top: auto; align-self: flex-start; }
.channel--wholesale { background: var(--fb-navy); border-color: var(--fb-navy); color: #c9d6df; }
.channel--wholesale h3 { color: #fff; }
.channel--wholesale ul { color: #c9d6df; }
.channel--wholesale .channel__icon { background: rgba(255,255,255,.08); color: #7fd0ea; }

/* ---------- Categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat-card {
	display: flex; gap: 1rem; align-items: flex-start; padding: 24px; background: #fff; border: 1px solid var(--fb-line);
	border-radius: 10px; text-decoration: none; color: var(--fb-ink); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.cat-card:hover { border-color: var(--fb-accent); transform: translateY(-2px); box-shadow: var(--fb-shadow); color: var(--fb-ink); }
.cat-card__thumb { width: 56px; height: 56px; flex: none; border-radius: 8px; background: var(--fb-bg-alt); display: grid; place-items: center; color: var(--fb-accent-dark); overflow: hidden; }
.cat-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-card__thumb svg { width: 30px; height: 30px; }
.cat-card h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.cat-card p { margin: 0; font-size: .92rem; color: var(--fb-muted); }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.feature__icon { width: 44px; height: 44px; color: var(--fb-accent); margin-bottom: .9rem; }
.feature h3 { font-size: 1.05rem; }
.feature p { color: var(--fb-ink-soft); font-size: .95rem; margin: 0; }

/* ---------- CTA ---------- */
.cta { background: linear-gradient(135deg, var(--fb-accent-dark), var(--fb-accent)); color: #fff; border-radius: 12px; padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.cta h2 { color: #fff; margin-bottom: .3em; }
.cta p { margin: 0; color: #e3f2f7; max-width: 560px; }
.cta .button { background: #fff; border-color: #fff; color: var(--fb-navy); }
.cta .button:hover { background: var(--fb-navy); border-color: var(--fb-navy); color: #fff; }

/* ---------- Posts ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card { background: #fff; border: 1px solid var(--fb-line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.post-card__media { aspect-ratio: 16/10; background: var(--fb-bg-alt); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.post-card h2, .post-card h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.post-card h2 a, .post-card h3 a { color: var(--fb-navy); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--fb-accent-dark); }
.post-card p { color: var(--fb-ink-soft); font-size: .95rem; }
.entry-meta { font-size: .82rem; color: var(--fb-muted); margin-bottom: .5rem; }

/* ---------- Content pages ---------- */
.page-header { background: var(--fb-bg-alt); border-bottom: 1px solid var(--fb-line); padding: 48px 0 40px; }
.page-header h1 { margin: 0; }
.page-header p { margin: .6rem 0 0; color: var(--fb-ink-soft); }
.content-area { padding: 56px 0 72px; }
.content-area--narrow .wrap { max-width: 820px; }
.entry-content > * + * { margin-top: 0; }
.entry-content h2 { margin-top: 1.8em; }
.entry-content h3 { margin-top: 1.5em; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; margin: 0 0 1.1em; }
.entry-content blockquote { margin: 1.6em 0; padding: .4em 0 .4em 1.2em; border-left: 4px solid var(--fb-accent); color: var(--fb-ink-soft); }
.entry-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .95rem; }
.entry-content th, .entry-content td { padding: .65rem .8rem; border-bottom: 1px solid var(--fb-line); text-align: left; }
.entry-content th { background: var(--fb-bg-alt); color: var(--fb-navy); }
.post-thumbnail { margin-bottom: 2rem; border-radius: 10px; overflow: hidden; }
.alignwide { max-width: 1100px; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.aligncenter { margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: .3rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.5rem; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--fb-muted); margin-top: .4rem; }
.sticky, .bypostauthor, .gallery-caption { }

.layout-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; }
.widget { margin-bottom: 2rem; }
.widget-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: .4rem 0; border-bottom: 1px solid var(--fb-line); }

.pagination, .nav-links { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 2.5rem; }
.page-numbers { display: inline-block; padding: .5rem .85rem; border: 1px solid var(--fb-line); border-radius: var(--fb-radius); text-decoration: none; color: var(--fb-ink); }
.page-numbers.current, .page-numbers:hover { background: var(--fb-accent); border-color: var(--fb-accent); color: #fff; }
.post-navigation .nav-links { justify-content: space-between; }

.search-form { display: flex; gap: .5rem; }
.search-form label { flex: 1; }

.comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--fb-line); }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--fb-line); }

.error-404 { text-align: center; padding: 96px 0; }
.error-404 .big { font-size: 6rem; font-weight: 800; color: var(--fb-accent); line-height: 1; }

/* ---------- Footer ---------- */
.site-footer { background: var(--fb-navy); color: #a9bcc9; font-size: .93rem; }
.site-footer a { color: #d3e0e8; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-top: 64px; padding-bottom: 48px; }
.site-footer h2, .site-footer .widget-title { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; border: 0; padding: 0; }
.footer-brand .site-title { color: #fff; margin-bottom: .8rem; }
.footer-contact li { display: flex; gap: .6rem; align-items: flex-start; }
.footer-contact svg { width: 16px; height: 16px; flex: none; margin-top: .3rem; color: #7fd0ea; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; font-size: .85rem; }
.footer-bottom .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- WooCommerce ---------- */
.woocommerce ul.products { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 0 0 2rem !important; padding: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; background: #fff; border: 1px solid var(--fb-line); border-radius: 10px; padding: 16px !important; display: flex; flex-direction: column; }
.woocommerce ul.products li.product a img { border-radius: 6px; margin-bottom: .8rem; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 1rem !important; color: var(--fb-navy); }
.woocommerce ul.products li.product .price { color: var(--fb-ink) !important; font-weight: 700; }
.woocommerce ul.products li.product .button { margin-top: auto !important; justify-content: center; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit {
	background: var(--fb-accent) !important; color: #fff !important; border-radius: var(--fb-radius) !important; font-weight: 600 !important; padding: .85rem 1.2rem !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--fb-accent-dark) !important; }
.woocommerce a.button.alt, .woocommerce button.button.alt { background: var(--fb-navy) !important; }
.woocommerce span.onsale { background: var(--fb-accent) !important; min-height: auto; min-width: auto; line-height: 1; padding: .45rem .7rem; border-radius: 4px; }
.woocommerce div.product .product_title { font-size: 2rem; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--fb-navy) !important; font-size: 1.5rem !important; font-weight: 700; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { border-bottom-color: #fff; }
.woocommerce-message, .woocommerce-info { border-top-color: var(--fb-accent) !important; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--fb-accent) !important; }
.woocommerce .woocommerce-breadcrumb { font-size: .85rem; color: var(--fb-muted); margin-bottom: 1.5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.features { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.woocommerce ul.products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
	.channels { grid-template-columns: 1fr; margin-top: -40px; }
	.cat-grid, .post-grid { grid-template-columns: 1fr 1fr; }
	.layout-sidebar { grid-template-columns: 1fr; }
	.woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
	.hero__airflow { display: none; }
}
@media (max-width: 600px) {
	body { font-size: 16px; }
	.section { padding: 56px 0; }
	.hero .wrap { padding-top: 72px; padding-bottom: 88px; }
	.cat-grid, .post-grid, .features, .footer-grid { grid-template-columns: 1fr; }
	.channel, .cta { padding: 28px; }
	.topbar__hours { display: none; }
	.woocommerce ul.products { grid-template-columns: 1fr 1fr; gap: 12px; }
}
