/*
Theme Name: AgriMachEx
Version: 1.0.0
Description: Farm machinery catalogue and export enquiries.
Text Domain: agrimachex
*/
:root {
    --forest: #193b2c;
    --deep: #112a20;
    --ink: #203229;
    --muted: #52645b;
    --cream: #f7f6ef;
    --line: #dfe5db;
    --accent: #e9cd81;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font: 16px/1.55 system-ui, sans-serif; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, serif; font-weight: 600; letter-spacing: -.045em; line-height: 1.03; }
h1 { font-size: clamp(2.65rem, 6.5vw, 6.15rem); margin-bottom: 1.15rem; }
h2 { font-size: clamp(2rem, 4vw, 3.35rem); margin-bottom: 1.2rem; }
h3 { line-height: 1.2; font-size: 1.3rem; margin-bottom: .5rem; }
:focus-visible { outline: 3px solid #647e18; outline-offset: 4px; }
.wrap { width: min(1200px, calc(100% - 72px)); margin-inline: auto; }
.section { padding-block: 76px; }
.skip { position: fixed; top: 1rem; left: 1rem; z-index: 10; transform: translateY(-200%); padding: .75rem; background: white; }
.skip:focus { transform: none; }
.preview-bar { text-align: center; background: var(--deep); color: #e1e8d8; padding: 5px 12px; font-size: .75rem; }
.preview-bar span { margin-inline: 5px; }
.site-header { background: #fbfcf6; }
.nav, .footer-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.nav { min-height: 72px; }
.nav-actions, .language-nav { display: flex; align-items: center; gap: 10px; }
.language-nav { gap: 2px; padding: 3px; background: #eef2e8; border-radius: 7px; }
.language-nav a { font-size: .8rem; padding: .25rem .42rem; white-space: nowrap; }
.language-nav a[aria-current="true"] { background: var(--forest); color: #fff; border-radius: 4px; }
.catalogue-section { scroll-margin-top: 1rem; }
.catalogue-section .section { padding-block: 50px; }
.catalogue-section:nth-of-type(odd) { background: #edf1e6; }
.section-empty { margin-bottom: 0; color: var(--muted); }
.section-empty a { margin-inline-start: .35em; }
.brand { display: inline-flex; gap: 9px; align-items: center; text-decoration: none; font-size: 1.28rem; font-weight: 800; letter-spacing: -.055em; white-space: nowrap; }
.mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--accent); background: var(--forest); font-family: Georgia, serif; font-size: 1.45rem; }
.brand-accent { color: #4c6321; }
.nav .main-nav, .footer-row nav { display: flex; flex-wrap: wrap; gap: .7rem 1.15rem; }
.nav .main-nav { justify-content: center; }
.nav .main-nav a { white-space: nowrap; font-size: .9rem; }
.nav nav a, .footer-row nav a { text-decoration: none; font-weight: 650; }
.nav nav a:hover, .footer-row nav a:hover { text-decoration: underline; }
.nav .main-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .28em; }
.guide { max-width: 830px; }
.guide-content h2 { font-size: clamp(1.3rem, 2.7vw, 1.9rem); line-height: 1.22; letter-spacing: -.02em; border-top: 1px solid var(--line); padding-top: 1.2rem; margin: 1.55rem 0 .65rem; }
.guide-content h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.guide-content p { margin-bottom: .85rem; }
.guide-content a { color: var(--forest); text-underline-offset: .2em; }
.guide-cta { margin-top: 2.6rem; padding: clamp(18px, 4vw, 36px); background: #edf1e6; border-radius: 12px; }
.guide-cta h2 { font-size: clamp(1.7rem, 3.4vw, 2.55rem); margin-bottom: .55rem; }
.guide-cta .actions { align-items: center; margin-top: 1rem; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .65em; border: 1px solid transparent; border-radius: 7px; background: var(--forest); color: white; padding: .77em 1.25em; font: inherit; font-weight: 700; line-height: 1.25; text-decoration: none; cursor: pointer; }
.button:hover { background: #2b4e38; }
.button-small { font-size: .88rem; }
.hero { color: white; background: var(--forest); }
.hero-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(24px, 4vw, 60px); padding-block: 48px; }
.hero-inner { padding-block: 22px; }
.hero-media { position: relative; margin: 0; overflow: hidden; border-radius: 12px; }
.hero-media img { width: 100%; height: clamp(350px, 37vw, 535px); object-fit: cover; object-position: 72% center; }
.hero h1 { color: #fff; max-width: 10.7em; }
.eyebrow { color: #54641f; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.hero .eyebrow { color: var(--accent); }
.hero-copy { max-width: 31em; color: #edf2ea; font-size: clamp(1rem, 1.6vw, 1.15rem); }
.hero-caption { position: absolute; bottom: 12px; right: 12px; color: #f6f7f2; text-shadow: 0 0 5px #000; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero .button { color: #243319; background: var(--accent); }
.hero .button:hover { background: #f5dfa4; }
.hero .ghost { color: white; background: #1023198c; border-color: #ffffff76; }
.hero .ghost:hover { background: var(--deep); }
.power-links { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0 0 1.25rem; }
.power-links a { border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: .4rem .65rem; text-decoration: none; font-weight: 650; font-size: .9rem; }
.power-links a:hover { border-color: var(--forest); }
.home-info p { max-width: 65ch; }
.home-info p:last-child { margin-bottom: 0; }
.home-guide { background: #fafbf5; border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.section-head h2, .section-head p { margin-bottom: 0; }
.text-link { font-weight: 750; text-underline-offset: .2em; color: var(--forest); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (min-width: 1100px) {
    #featured .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    #used .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.machine { display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: white; }
.machine-image, .detail-media { display: grid; place-items: center; aspect-ratio: 16 / 10; background: linear-gradient(130deg,#e5ebd1,#cad8c4); color: #375744; text-decoration: none; font: 600 1.65rem Georgia, serif; }
.machine-image img, .detail-media img { width: 100%; height: 100%; object-fit: cover; }
.machine-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.machine-tags { color: #586a2c; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 800; margin-bottom: .55em; }
.machine h3 a { text-decoration: none; }
.machine h3 a:hover { text-decoration: underline; }
.machine p, .description { color: var(--muted); }
.machine footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; border-top: 1px solid var(--line); margin-top: auto; padding-top: .8rem; font-size: .88rem; }
.machine footer a { text-decoration: none; font-weight: 650; }
.process { background: #e9eee0; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 0; margin-bottom: 0; list-style: none; counter-reset: stage; }
.steps li { padding: 12px 0; border-top: 1px solid #a7b6a1; counter-increment: stage; }
.steps li::before { content: counter(stage, decimal-leading-zero); display: block; font-weight: 800; color: #55652a; margin-bottom: 11px; }
.steps strong, .steps span { display: block; }
.steps span { color: var(--muted); margin-top: .3em; }
.enquiry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 6%; align-items: start; scroll-margin-top: 1rem; }
.enquiry-form, .filters { display: grid; gap: 14px; padding: 23px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.enquiry-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: block; font-size: .875rem; font-weight: 700; min-width: 0; }
input, select, textarea { display: block; width: 100%; min-width: 0; padding: 10px 11px; margin-top: 4px; border: 1px solid #aebcac; border-radius: 6px; background: #fff; color: var(--ink); font: inherit; font-weight: 400; }
.wide { grid-column: 1 / -1; }
.form-note, .caption { font-size: .82rem; color: var(--muted); margin-bottom: 0; }
.message-preview { background: #edf3e4; border-radius: 8px; padding: 13px; }
.message-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.quote-notes > div { border-top: 1px solid var(--line); padding: 8px 0; }
.quote-notes dt { font-weight: 750; }
.quote-notes dd { margin-left: 0; color: var(--muted); }
.site-footer { padding-block: 40px; background: var(--deep); color: #e1e8d8; }
.site-footer p { margin: .6rem 0 0; }
.page-intro { background: var(--forest); padding-block: 53px; color: #ebf0e6; }
.page-intro h1 { color: #fff; font-size: clamp(2.5rem, 5.6vw, 4.7rem); }
.page-intro p:last-child { margin-bottom: 0; }
.page-intro .eyebrow { color: var(--accent); }
.listing { padding-block: 28px 76px; }
.filters { grid-template-columns: minmax(0, 1.35fr) repeat(4, minmax(0, 1fr)) auto; align-items: end; }
.filters .button { min-height: 44px; }
.results { margin-top: 24px; }
.empty { border: 1px solid var(--line); background: white; padding: 30px; border-radius: 12px; }
.pagination { margin-top: 28px; }
.page-numbers { display: inline-block; padding: 3px 7px; }
.detail { padding-block: 24px 72px; }
.crumb { color: var(--muted); margin-bottom: 28px; font-size: .875rem; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 34px; align-items: start; }
.detail-stage { position: relative; }
.detail-media { overflow: hidden; border-radius: 12px; background: #172a21; position: relative; }
.detail-media img { object-fit: contain; }
.photo-expand, .photo-count { position: absolute; bottom: 12px; border-radius: 6px; background: #112318df; color: white; padding: .35rem .65rem; font: 650 .82rem/1.2 system-ui, sans-serif; }
.photo-expand { left: 12px; }
.photo-count { right: 12px; pointer-events: none; }
.photo-arrow, .photo-close { position: absolute; z-index: 1; width: 42px; height: 42px; border: 1px solid #ffffff70; border-radius: 50%; background: #112318df; color: white; font: 400 1.65rem/1 system-ui, sans-serif; cursor: pointer; }
.photo-arrow { top: 50%; transform: translateY(-50%); }
.photo-prev { left: 12px; }
.photo-next { right: 12px; }
.photo-close { right: 12px; top: 12px; }
.photo-dialog { border: 0; border-radius: 12px; padding: 0; width: min(1120px, 94vw); background: #112318; overflow: hidden; }
.photo-dialog::backdrop { background: #091710dc; }
.photo-dialog img { width: 100%; height: min(82vh, 760px); object-fit: contain; }
.detail-summary .eyebrow { margin-bottom: .6rem; }
.detail-summary h1 { font-size: clamp(2.2rem, 4vw, 3.65rem); margin-bottom: .7rem; }
.detail-intro { color: var(--muted); margin-bottom: 1.3rem; }
.detail-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), 1fr)); gap: 8px; margin: 0 0 1.2rem; }
.detail-facts div { border: 1px solid var(--line); border-radius: 8px; padding: .65rem .72rem; background: #fff; }
.detail-facts dt { font-size: .8rem; color: var(--muted); }
.detail-facts dd { margin: .18rem 0 0; font-weight: 750; }
.quote-box, .detail-process { background: white; padding: clamp(16px, 2.5vw, 24px); border: 1px solid var(--line); border-radius: 12px; }
.quote-box strong { font-size: clamp(1.2rem, 2.3vw, 1.65rem); color: var(--forest); }
.quote-box p { margin: .45rem 0 1rem; color: var(--muted); }
.detail-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem .85rem; }
.detail-lower { margin-top: 40px; }
.detail-process h2 { font-size: 1.75rem; margin-bottom: .7rem; }
.detail-process ol { margin: 0 0 .9rem; padding-left: 1.3rem; }
.detail-process li + li { margin-top: .35rem; }
.specs h2 { font-size: 2.1rem; }
.specs dl { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.specs dl div { padding: 10px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.specs dl div:nth-child(odd) { background: #edf1e7; }
.specs dt { font-weight: 650; }
.specs dd { margin: 0; }
.gallery { display: flex; overflow-x: auto; gap: 7px; margin-top: 8px; padding: 4px; }
.gallery a { flex: 0 0 76px; border: 2px solid transparent; border-radius: 7px; overflow: hidden; }
.gallery a[aria-current="true"] { border-color: var(--forest); }
.gallery img { width: 100%; height: 50px; object-fit: cover; }
@media (max-width: 820px) {
    .wrap { width: calc(100% - 44px); }
    .section { padding-block: 54px; }
    .grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .enquiry, .detail-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-layout { grid-template-columns: minmax(0, 1fr); padding-block: 35px; }
    .nav { flex-wrap: wrap; gap: 8px 12px; padding-block: 10px; }
    .nav .main-nav { order: 3; width: 100%; gap: .4rem .85rem; padding-top: 5px; border-top: 1px solid var(--line); }
    .nav .main-nav a { font-size: .85rem; }
}
@media (max-width: 540px) {
    .wrap { width: calc(100% - 28px); }
    .nav { min-height: 62px; gap: 8px 12px; flex-wrap: wrap; padding-block: 10px; }
    .nav-actions { gap: 5px; }
    .nav nav { font-size: .78rem; }

    .nav .button { font-size: .78rem; padding: .65em .72em; }
    .brand { font-size: 1.08rem; gap: 5px; }
    .mark { width: 26px; height: 26px; font-size: 1.12rem; }
    .hero-inner { padding-block: 5px 0; }
    .hero-media img { height: auto; aspect-ratio: 4 / 3; }
    .grid, .enquiry-form { grid-template-columns: minmax(0, 1fr); }
    .section-head, .footer-row { align-items: flex-start; flex-direction: column; }
    .enquiry-form, .filters { padding: 15px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }


