/* ==========================================================================
   Power Tree – frontend theme
   ========================================================================== */

:root {
	--green-900: #04361d;
	--green-800: #05532b;
	--green-700: #006a36;
	--green: #007d40;
	--green-100: #d9efe2;
	--green-50: #eef7f1;
	--amber: #e39b20;
	--amber-700: #b8770f;
	--ink: #17211c;
	--muted: #5b6a62;
	--line: #e2e8e4;
	--bg: #f4f6f5;
	--card: #ffffff;
	--radius: 14px;
	--radius-sm: 10px;
	--shadow: 0 1px 2px rgba(16, 40, 28, .06), 0 4px 16px rgba(16, 40, 28, .06);
	--shadow-lg: 0 2px 4px rgba(16, 40, 28, .06), 0 12px 32px rgba(16, 40, 28, .12);
	--container: 1200px;
	--font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-700); }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 20px;
}

.sr-only {
	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 {
	position: absolute; left: 16px; top: -60px; z-index: 100;
	background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ----- Top bar ----- */

.topbar {
	background: var(--green-900);
	color: #cfe6d8;
	font-size: 13px;
}
.topbar .container {
	display: flex;
	justify-content: flex-end;
	gap: 24px;
	min-height: 36px;
	align-items: center;
}
.topbar a { color: #cfe6d8; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: #fff; }
.topbar svg { width: 14px; height: 14px; flex: none; }

/* ----- Header ----- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: saturate(1.4) blur(8px);
	border-bottom: 1px solid var(--line);
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 76px;
}
.brand img { display: block; height: 52px; width: auto; }

.site-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-nav a {
	position: relative;
	display: block;
	padding: 10px 14px;
	font-size: 15px;
	font-weight: 500;
	color: var(--ink);
	border-radius: 8px;
	transition: color .15s, background-color .15s;
}
.site-nav a:hover { color: var(--green); background: var(--green-50); }
.site-nav a[aria-current="page"] { color: var(--green); }
.site-nav a[aria-current="page"]::after {
	content: "";
	position: absolute;
	left: 14px; right: 14px; bottom: 2px;
	height: 3px;
	border-radius: 3px;
	background: var(--amber);
}

.nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px; height: 44px;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: #fff;
	color: var(--ink);
	cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 960px) {
	.nav-toggle { display: inline-flex; }
	.brand img { height: 44px; }
	.header-inner { min-height: 64px; }
	.site-nav {
		position: absolute;
		left: 0; right: 0; top: 100%;
		background: #fff;
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow-lg);
		display: none;
	}
	.site-nav.is-open { display: block; }
	.site-nav ul {
		flex-direction: column;
		gap: 0;
		padding: 8px 12px 16px;
		max-width: var(--container);
		margin: 0 auto;
	}
	.site-nav a { padding: 14px 12px; border-radius: 8px; }
	.site-nav a[aria-current="page"] { background: var(--green-50); }
	.site-nav a[aria-current="page"]::after { left: 0; right: auto; top: 12px; bottom: 12px; width: 3px; height: auto; }
}

@media (max-width: 560px) {
	.topbar .container { justify-content: center; gap: 16px; }
	.topbar .topbar-email span { display: none; }
}

/* ----- Layout ----- */

.site-main { padding: 32px 0 56px; }

.layout {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	grid-template-areas: "sidebar content";
	gap: 28px;
	align-items: start;
}
.layout-content { grid-area: content; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; min-width: 0; }
.layout-sidebar { grid-area: sidebar; display: grid; gap: 20px; position: sticky; top: 100px; }

@media (max-width: 960px) {
	.site-main { padding: 20px 0 40px; }
	.layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "content" "sidebar"; gap: 20px; }
	.layout-content { gap: 20px; }
	.layout-sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
}

/* ----- Cards ----- */

.card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
}
.card-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 18px;
	background: var(--green);
	color: #fff;
}
.card-header h2, .card-header h3 {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.card-header svg { width: 18px; height: 18px; opacity: .85; }
.card-body { padding: 18px; }

/* ----- Sidebar widgets ----- */

.cat-group + .cat-group { margin-top: 14px; }
.cat-group-title {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--muted);
}
.cat-list { margin: 0; padding: 0; list-style: none; }
.cat-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 9px 12px;
	border-radius: 8px;
	color: var(--ink);
	font-size: 15px;
	transition: background-color .15s, color .15s;
}
.cat-list a::after {
	content: "";
	width: 7px; height: 7px;
	border-right: 2px solid currentColor;
	border-top: 2px solid currentColor;
	transform: rotate(45deg);
	opacity: .35;
}
.cat-list a:hover { background: var(--green-50); color: var(--green); }
.cat-list a[aria-current="page"] { background: var(--green-50); color: var(--green); font-weight: 600; }

.contact-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.contact-list a {
	min-width: 0;
	overflow-wrap: anywhere;
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--ink);
	font-weight: 500;
	word-break: break-word;
}
.contact-list a:hover { color: var(--green); }
.contact-icon {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px; height: 36px;
	border-radius: 50%;
	background: var(--green-50);
	color: var(--green);
}
.contact-icon svg { width: 16px; height: 16px; }
.contact-label { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }

.sidebar-banner { display: block; padding: 0; }
.sidebar-banner img { display: block; width: 100%; }

/* ----- Slider ----- */

.slider {
	position: relative;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--green-900);
	box-shadow: var(--shadow);
	aspect-ratio: 870 / 255;
}
.slider-track { position: relative; height: 100%; }
.slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .7s ease, visibility .7s;
}
.slide.is-active { opacity: 1; visibility: visible; }
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; }

.slider-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px; height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	color: var(--ink);
	box-shadow: var(--shadow);
	cursor: pointer;
	opacity: 0;
	transition: opacity .2s, background-color .2s;
}
.slider:hover .slider-btn, .slider-btn:focus-visible { opacity: 1; }
.slider-btn:hover { background: #fff; }
.slider-btn svg { width: 20px; height: 20px; }
.slider-prev { left: 14px; }
.slider-next { right: 14px; }

.slider-dots {
	position: absolute;
	left: 0; right: 0; bottom: 12px;
	display: flex;
	justify-content: center;
	gap: 8px;
}
.slider-dot {
	width: 10px; height: 10px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .55);
	cursor: pointer;
	transition: width .25s, background-color .25s;
}
.slider-dot.is-active { width: 26px; background: #fff; }

@media (hover: none) { .slider-btn { opacity: 1; width: 36px; height: 36px; } }
@media (max-width: 560px) { .slider { border-radius: var(--radius-sm); } .slider-btn { display: none; } }

/* ----- Sections & product grid ----- */

.section-head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 16px;
}
.section-head h2 {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -.01em;
}
.section-head::before {
	content: "";
	width: 6px; height: 26px;
	border-radius: 3px;
	background: linear-gradient(var(--amber), var(--green));
}
.section-count {
	margin-left: auto;
	font-size: 13px;
	color: var(--muted);
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 3px 10px;
}

.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 16px;
}
@media (max-width: 560px) {
	.product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

.product-card {
	display: flex;
	flex-direction: column;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	color: var(--ink);
	transition: transform .2s, box-shadow .2s, border-color .2s;
}
.product-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-lg);
	border-color: var(--green-100);
	color: var(--ink);
}
.product-card-media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	padding: 20px;
	background: radial-gradient(circle at 50% 40%, #fff 0%, #f1f4f2 100%);
}
.product-card-media { position: relative; overflow: hidden; }
.product-card-media img {
	position: absolute;
	inset: 20px;
	width: calc(100% - 40px);
	height: calc(100% - 40px);
	object-fit: contain;
	transition: transform .3s;
}
.product-card:hover .product-card-media img { transform: scale(1.05); }
.product-card-body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 14px 14px;
	border-top: 1px solid var(--line);
}
.product-card-body { flex: 1; }
.product-card-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
.product-card-arrow {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px; height: 28px;
	border-radius: 50%;
	background: var(--green-50);
	color: var(--green);
	transition: background-color .2s, color .2s;
}
.product-card-arrow svg { width: 14px; height: 14px; }
.product-card:hover .product-card-arrow { background: var(--green); color: #fff; }

.empty-state {
	padding: 28px;
	text-align: center;
	color: var(--muted);
	background: #fff;
	border: 1px dashed var(--line);
	border-radius: var(--radius);
}

/* ----- Content pages ----- */

.page-card { padding: 32px 36px 36px; }
.page-title {
	margin: 0 0 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--line);
	font-size: 30px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -.02em;
}
.page-title small {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--amber-700);
}
.page-section + .page-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }

@media (max-width: 560px) {
	.page-card { padding: 22px 18px 24px; }
	.page-title { font-size: 24px; }
}

/* Rich text coming from the CMS */
.prose { color: #2c3832; overflow-wrap: break-word; }
.prose, .prose * { font-family: var(--font) !important; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.prose span[style*="font-size"] { font-size: inherit !important; }
.prose strong, .prose b { color: var(--ink); }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--ink); line-height: 1.3; margin: 1.4em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose img { border-radius: var(--radius-sm); }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose table {
	width: 100% !important;
	min-width: 520px;
	border-collapse: collapse;
	font-size: 14px;
	border: 0;
}
.prose td, .prose th {
	padding: 9px 12px !important;
	border: 1px solid var(--line);
	vertical-align: top;
}
.prose tr:first-child td { font-weight: 600; }
@media (max-width: 560px) {
	.prose, .prose [style*="justify"], .prose [align="justify"] { text-align: left !important; }
}
.table-scroll {
	margin: 1em 0;
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	-webkit-overflow-scrolling: touch;
}
.table-scroll table { margin: 0; border-style: hidden; }

/* Contact page */
.contact-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
	gap: 16px;
}
.contact-tile {
	display: flex;
	gap: 14px;
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg);
}
.contact-tile > div { min-width: 0; }
.contact-tile p, .contact-tile a { overflow-wrap: anywhere; }
.contact-tile h3 { margin: 0 0 4px; font-size: 15px; }
.contact-tile p { margin: 0; color: var(--muted); font-size: 15px; }
.contact-tile .contact-icon { width: 42px; height: 42px; background: #fff; }
.contact-tile .contact-icon svg { width: 18px; height: 18px; }

/* Product listing */
.listing { display: grid; gap: 14px; }
.listing-item {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr);
	gap: 20px;
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	transition: box-shadow .2s, border-color .2s;
}
.listing-item:hover { box-shadow: var(--shadow-lg); border-color: var(--green-100); }
.listing-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	padding: 12px;
	border-radius: var(--radius-sm);
	background: radial-gradient(circle at 50% 40%, #fff 0%, #f1f4f2 100%);
}
.listing-thumb { position: relative; overflow: hidden; }
.listing-thumb img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; }
.listing-title { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.listing-title a { color: var(--ink); }
.listing-title a:hover { color: var(--green); }
.listing-desc { font-size: 14px; color: var(--muted); }
.listing-desc p { margin: 0 0 2px; }

@media (max-width: 560px) {
	.listing-item { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 12px; }
	.listing-title { font-size: 16px; }
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
	padding: 9px 16px;
	border-radius: 999px;
	background: var(--green);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	transition: background-color .2s;
}
.btn:hover { background: var(--green-700); color: #fff; }
.btn svg { width: 14px; height: 14px; }
.btn-ghost { background: var(--green-50); color: var(--green); }
.btn-ghost:hover { background: var(--green-100); color: var(--green-700); }

/* Product detail */
.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
	font-size: 13px;
	color: var(--muted);
}
.breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--green); }

.detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.detail-media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 360px;
	aspect-ratio: 1 / 1;
	padding: 24px;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: radial-gradient(circle at 50% 40%, #fff 0%, #f1f4f2 100%);
}
.detail-media img { width: 100%; height: 100%; object-fit: contain; }

/* ----- Footer ----- */

.site-footer {
	background: var(--green-900);
	color: #b9d3c4;
	font-size: 15px;
}
.footer-top {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1.2fr;
	gap: 40px;
	padding: 48px 20px 36px;
}
.footer-brand img {
	height: 56px;
	width: auto;
	padding: 8px 12px;
	background: #fff;
	border-radius: var(--radius-sm);
}
.footer-brand p { margin: 16px 0 0; max-width: 36ch; }
.site-footer h3 {
	margin: 0 0 14px;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.footer-links { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.footer-links a { color: #b9d3c4; }
.footer-links a:hover { color: #fff; }
.footer-contact { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.footer-contact li { display: flex; gap: 10px; }
.footer-contact svg { flex: none; width: 16px; height: 16px; margin-top: 4px; color: var(--amber); }
.footer-contact a { color: #b9d3c4; word-break: break-word; }
.footer-contact a:hover { color: #fff; }
.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, .1);
	padding: 18px 0;
	font-size: 13px;
	color: #8fb3a0;
}

@media (max-width: 860px) {
	.footer-top { grid-template-columns: 1fr 1fr; gap: 28px; padding-top: 36px; }
	.footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
	.footer-top { grid-template-columns: 1fr; }
}

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