/* ==========================================================================
   Farmers Gate theme
   ========================================================================== */

:root {
	--fg-green: #0E4D2C;
	--fg-green-dark: #093820;
	--fg-orange: #F28A1A;
	--fg-orange-dark: #D9760C;
	--fg-leaf: #6DB33F;
	--fg-field: #3E8E2B;
	--fg-cream: #FFF7E8;
	--fg-mist: #F5F7F2;
	--fg-ink: #1B1F1C;
	--fg-muted: #4F5A52;
	--fg-line: #DDE3D7;
	--fg-radius: 14px;
	--fg-content: 760px;
	--fg-wide: 1280px;
	--fg-gutter: clamp(20px, 4vw, 40px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--fg-ink);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--fg-green); text-underline-offset: 3px; }
a:hover { color: var(--fg-green-dark); }

:focus-visible { outline: 3px solid var(--fg-orange); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6 { line-height: 1.15; color: var(--fg-green); letter-spacing: -0.01em; margin: 1.6em 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.35rem; }
p, ul, ol { margin: 0 0 1.1em; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px;
	overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; z-index: 100000;
	top: 8px; left: 8px; padding: 12px 18px; background: #fff; color: var(--fg-green); font-weight: 700; border-radius: 8px;
}

/* Layout */
.fg-container { width: 100%; max-width: calc(var(--fg-wide) + 2 * var(--fg-gutter)); margin: 0 auto; padding-left: var(--fg-gutter); padding-right: var(--fg-gutter); }
.fg-container--narrow { max-width: calc(var(--fg-content) + 2 * var(--fg-gutter)); }
.fg-section { padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(40px, 6vw, 72px); }
.fg-main { display: block; min-height: 50vh; }

/* Content area: normal blocks at reading width, wide and full blocks break out */
.fg-content { padding-left: var(--fg-gutter); padding-right: var(--fg-gutter); }
.fg-content > * { max-width: var(--fg-content); margin-left: auto; margin-right: auto; }
.fg-content > .alignwide { max-width: var(--fg-wide); }
.fg-content > .alignfull { max-width: none; margin-left: calc(-1 * var(--fg-gutter)); margin-right: calc(-1 * var(--fg-gutter)); }
.fg-content > :first-child { margin-top: 0; }
.fg-content--full { padding-left: 0; padding-right: 0; }
.fg-content--full > .alignfull { margin-left: 0; margin-right: 0; }
.fg-content--full > :not(.alignfull) { padding-left: var(--fg-gutter); padding-right: var(--fg-gutter); box-sizing: content-box; }
.fg-content--full > .alignwide { max-width: var(--fg-wide); }
.fg-content .alignleft { float: left; margin: .3em 1.5em 1em 0; }
.fg-content .alignright { float: right; margin: .3em 0 1em 1.5em; }

/* Pagelayer rows manage their own width: let them span the content area */
.fg-content > .pagelayer-row, .fg-content > .pagelayer-content, .fg-content > [class*="pagelayer-"] { max-width: none; }
.fg-content--full > [class*="pagelayer-"] { padding-left: 0; padding-right: 0; box-sizing: border-box; }

/* Buttons */
.fg-button,
.wp-element-button,
.wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 22px; border-radius: 10px; border: 2px solid var(--fg-green);
	background: var(--fg-green); color: #fff; font: 600 1rem/1.2 "Outfit", sans-serif;
	text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.fg-button:hover, .wp-block-button__link:hover { background: var(--fg-green-dark); border-color: var(--fg-green-dark); color: #fff; }
.fg-button--accent, .is-style-accent .wp-block-button__link { background: var(--fg-orange); border-color: var(--fg-orange); color: var(--fg-ink); }
.fg-button--accent:hover, .is-style-accent .wp-block-button__link:hover { background: var(--fg-orange-dark); border-color: var(--fg-orange-dark); color: var(--fg-ink); }
.is-style-outline .wp-block-button__link { background: transparent; color: inherit; border-color: currentColor; }
.is-style-outline .wp-block-button__link:hover { background: rgba(255,255,255,.12); color: inherit; }

/* Header */
.fg-header { background: #fff; border-bottom: 1px solid var(--fg-line); position: sticky; top: 0; z-index: 1000; }
.admin-bar .fg-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .fg-header { top: 0; position: relative; } }
.fg-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 80px; }
.fg-header__brand { flex: none; }
.fg-logo, .custom-logo-link { display: block; line-height: 0; }
.fg-logo img { width: auto; height: 46px; }
.custom-logo { width: auto; max-height: 56px; }
.fg-nav { display: flex; align-items: center; gap: 28px; }
.fg-menu, .fg-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 26px; }
.fg-menu li, .fg-nav .menu li { margin: 0; position: relative; }
.fg-menu a, .fg-nav .menu a { color: var(--fg-ink); text-decoration: none; font-weight: 500; font-size: 1rem; padding: 8px 0; display: inline-block; }
.fg-menu a:hover, .fg-menu .current-menu-item > a, .fg-menu .current_page_item > a { color: var(--fg-green); box-shadow: inset 0 -2px 0 var(--fg-orange); }
.fg-menu .current-menu-item > a[href*="#"]:not(:hover) { color: var(--fg-ink); box-shadow: none; }
.fg-menu .sub-menu { list-style: none; margin: 0; padding: 8px 0; position: absolute; top: 100%; left: -12px; min-width: 220px; background: #fff; border: 1px solid var(--fg-line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.08); display: none; }
.fg-menu li:hover > .sub-menu, .fg-menu li:focus-within > .sub-menu { display: block; }
.fg-menu .sub-menu a { display: block; padding: 8px 16px; }
.fg-nav__actions { display: flex; align-items: center; gap: 14px; }
.fg-cart { position: relative; display: inline-flex; color: var(--fg-green); padding: 8px; }
.fg-cart__count { position: absolute; top: 0; right: -2px; background: var(--fg-orange); color: var(--fg-ink); font-size: .7rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.fg-menu-toggle { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--fg-line); border-radius: 10px; background: #fff; color: var(--fg-green); font: 600 1rem "Outfit", sans-serif; cursor: pointer; }
.fg-menu-toggle__close { display: none; }
.fg-menu-toggle[aria-expanded="true"] .fg-menu-toggle__open { display: none; }
.fg-menu-toggle[aria-expanded="true"] .fg-menu-toggle__close { display: inline; }

@media (max-width: 1000px) {
	.fg-header__inner { min-height: 68px; }
	.fg-logo img { height: 38px; }
	.fg-menu-toggle { display: inline-flex; }
	.fg-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--fg-line); box-shadow: 0 12px 24px rgba(0,0,0,.08); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--fg-gutter) 20px; }
	.fg-nav.is-open { display: flex; }
	.fg-menu, .fg-nav .menu { flex-direction: column; align-items: stretch; gap: 0; }
	.fg-menu a, .fg-nav .menu a { display: block; padding: 14px 0; border-bottom: 1px solid var(--fg-mist); font-size: 1.1rem; }
	.fg-menu a:hover, .fg-menu .current-menu-item > a { box-shadow: none; }
	.fg-menu .sub-menu { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 0 16px; }
	.fg-nav__actions { padding-top: 16px; }
	.fg-nav__actions .fg-button { flex: 1; }
}
@media (max-width: 420px) { .fg-logo img { height: 32px; } .fg-menu-toggle span { display: none; } }

/* Page header band */
.fg-page-header { background: var(--fg-cream); border-bottom: 1px solid #F1E6CF; padding: clamp(32px, 5vw, 56px) 0; }
.fg-page-header__title { margin: 0; }
.fg-page-header__intro { margin: 12px 0 0; font-size: 1.2rem; color: var(--fg-muted); max-width: 720px; }
.fg-page-header--farm { background: var(--fg-green); border-bottom: 0; }
.fg-page-header--farm .fg-page-header__title { color: #fff; }
.fg-page-header--farm .fg-eyebrow { color: #CFE0D4; }
.fg-eyebrow { margin: 0 0 8px; font-size: .85rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-field); }

/* Cards (blog/search) */
.fg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.fg-card { background: #fff; border: 1px solid var(--fg-line); border-radius: var(--fg-radius); overflow: hidden; display: flex; flex-direction: column; }
.fg-card__image img { display: block; width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.fg-card__body { padding: 20px; }
.fg-card__title { margin: 0 0 6px; font-size: 1.25rem; }
.fg-card__title a { text-decoration: none; }
.fg-meta { color: var(--fg-muted); font-size: .9rem; margin: 0 0 8px; }
.fg-featured { margin-top: 32px; }
.fg-featured img { border-radius: var(--fg-radius); display: block; }
.navigation.pagination { margin-top: 40px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; border: 1px solid var(--fg-line); border-radius: 10px; text-decoration: none; padding: 0 12px; }
.page-numbers.current { background: var(--fg-green); color: #fff; border-color: var(--fg-green); }

/* Forms (general) */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="search"], input[type="password"], input[type="number"], select, textarea {
	font: inherit; color: var(--fg-ink); background: #fff; border: 1px solid #C9D1C4; border-radius: 10px; padding: 11px 14px; min-height: 48px; width: 100%; max-width: 100%;
}
textarea { min-height: 120px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(242,138,26,.45); outline-offset: 0; border-color: var(--fg-green); }
.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form label { flex: 1; }
.search-submit { min-height: 48px; padding: 0 20px; border-radius: 10px; border: 0; background: var(--fg-green); color: #fff; font: 600 1rem "Outfit", sans-serif; cursor: pointer; }

/* Block helpers used on the home page */
.fg-hero { padding: clamp(48px, 8vw, 96px) var(--fg-gutter) !important; }
.fg-band { padding: clamp(48px, 7vw, 88px) var(--fg-gutter) !important; }
.fg-band > *, .fg-hero > * { margin-left: auto !important; margin-right: auto !important; }
.has-deep-green-background-color h1, .has-deep-green-background-color h2, .has-deep-green-background-color h3 { color: #fff; }
.has-deep-green-background-color p { color: #E4EEE7; }
.has-deep-green-background-color a:not(.wp-block-button__link) { color: #fff; }
.has-deep-green-background-color li { color: #E4EEE7; }
.has-deep-green-background-color .is-style-outline .wp-block-button__link { color: #fff; border-color: rgba(255,255,255,.7); }

/* Core block fallbacks (match WordPress defaults, in case block styles are trimmed) */
.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }
.wp-block-columns { display: flex; flex-wrap: wrap; gap: 2em; margin-bottom: 1.75em; }
.wp-block-column { flex: 1 1 0; min-width: 0; }
.wp-block-column[style*="flex-basis"] { flex-grow: 0; }
@media (max-width: 781px) { .wp-block-columns { flex-direction: column; } .wp-block-column { flex-basis: 100% !important; } }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.wp-block-group.alignwide, .wp-block-group.alignfull { box-sizing: border-box; }
.fg-content .wp-block-group > * { margin-left: auto; margin-right: auto; }
.fg-band > .wp-block-columns, .fg-band > h2, .fg-band > p, .fg-band > .wp-block-spacer { max-width: var(--fg-wide); }
.fg-step { background: #fff; border: 1px solid var(--fg-line); border-radius: var(--fg-radius); padding: 28px !important; height: 100%; }
.fg-step h3 { margin-top: 12px; }
.fg-step p:last-child { margin-bottom: 0; }
.fg-step-num { display: inline-flex !important; width: 44px; height: 44px; border-radius: 50%; background: var(--fg-orange); color: var(--fg-ink) !important; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; margin: 0 !important; }
.fg-tick-list { list-style: none; padding: 0 !important; }
.fg-tick-list li { position: relative; padding-left: 34px; margin-bottom: 12px; }
.fg-tick-list li::before { content: ""; position: absolute; left: 0; top: .2em; width: 22px; height: 22px; border-radius: 50%; background: var(--fg-leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; }
.fg-plan { background: #fff; border: 1px solid var(--fg-line); border-radius: var(--fg-radius); padding: 32px !important; height: 100%; }
.fg-plan--featured { border: 2px solid var(--fg-green); }
.fg-plan h3 { margin-top: 0; }
.wp-block-columns.fg-equal > .wp-block-column { display: flex; flex-direction: column; }
.fg-plan > .wp-block-buttons { margin-top: auto; padding-top: 8px; }
.fgm-chips__sep:first-child { display: none; }

/* Farmers Gate Map plugin: match the brand */
.fgm, body .fgm { --fgm-green: #0E4D2C; --fgm-green-dark: #093820; --fgm-accent: #F28A1A; --fgm-ink: #1B1F1C; }
body .fgm .fgm-btn--accent:hover { background: #D9760C; border-color: #D9760C; }
.fgm .fgm-btn--accent:hover { background: var(--fg-orange-dark); }
.fg-content .fgm-map-wrap { margin-top: 0; }
.fgm-search__title { font-family: "Outfit", sans-serif; }

/* Footer */
.fg-footer { background: var(--fg-green); color: #D8E6DC; margin-top: 0; }
.fg-footer a { color: #fff; text-decoration: none; }
.fg-footer a:hover { text-decoration: underline; }
.fg-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 48px; }
.fg-footer__about .fg-logo img { height: 40px; }
.fg-footer__tagline { color: #fff; font-weight: 600; margin: 16px 0 8px; }
.fg-footer__about p { max-width: 420px; }
.fg-footer__heading { color: #fff; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; margin: 6px 0 14px; }
.fg-footer ul { list-style: none; margin: 0; padding: 0; }
.fg-footer li { margin: 0 0 10px; }
.fg-social { display: flex; gap: 10px; margin-top: 18px !important; }
.fg-social a { display: inline-flex; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.1); align-items: center; justify-content: center; }
.fg-social a:hover { background: rgba(255,255,255,.2); }
.fg-footer__bottom { border-top: 1px solid rgba(255,255,255,.14); background: var(--fg-green-dark); }
.fg-footer__bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 18px; padding-bottom: 18px; font-size: .9rem; }
.fg-footer__legal { margin: 0; }
.fg-credit { display: inline-flex; align-items: center; gap: 10px; color: #D8E6DC !important; }
.fg-credit:hover { text-decoration: none !important; opacity: .9; }
.fg-credit img { height: 22px; width: auto; display: block; }
@media (max-width: 900px) { .fg-footer__grid { grid-template-columns: 1fr 1fr; } .fg-footer__about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .fg-footer__grid { grid-template-columns: 1fr; gap: 28px; } .fg-footer__bottom-inner { flex-direction: column; align-items: flex-start; } }

/* Comments */
.fg-comments { border-top: 1px solid var(--fg-line); padding-top: 32px; }
.fg-comment-list { padding-left: 0; list-style: none; }

/* Blank canvas */
.fg-canvas .fg-content--full > :not(.alignfull) { padding-left: 0; padding-right: 0; }

/* Form controls don't inherit fonts by default */
button, input, select, textarea { font-family: inherit; }
