/* CM Farm Fresh — storefront design system (no external fonts, no inline styles: CSP-safe) */
:root {
  --green-900: #12311d;
  --green-800: #17402a;
  --green-700: #1f5132;
  --green-600: #2b6b43;
  --green-100: #dcebe0;
  --green-50: #eff6f1;
  --red-700: #a52a21;
  --red-600: #c8372d;
  --red-100: #fbe3e0;
  --gold: #e9b949;
  --cream: #fbf7f0;
  --paper: #ffffff;
  --ink: #1b2420;
  --muted: #5d6a62;
  --line: #e7e0d2;
  --shadow: 0 1px 2px rgba(20, 40, 28, .06), 0 8px 24px rgba(20, 40, 28, .08);
  --radius: 14px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--font-body); color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-underline-offset: 3px; }
a:hover { color: var(--green-900); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; color: var(--green-900); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--green-900); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(860px, 100% - 32px); margin-inline: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden, [hidden] { display: none !important; }

/* header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(251, 247, 240, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green-700); }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: .02em; text-transform: uppercase; }
.brand-tag { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; }
.nav a:hover { background: var(--green-50); }
.nav a[aria-current="page"] { background: var(--green-100); color: var(--green-900); }
.nav .btn { margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; font-size: 1.4rem; cursor: pointer; color: var(--green-900); }
.user-chip { display: flex; align-items: center; gap: 8px; }
.inline-form { display: inline; margin: 0; }
.link-btn { background: none; border: 0; padding: 8px 12px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; border-radius: 999px; }
.link-btn:hover { background: var(--green-50); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; border: 2px solid transparent; font: 700 1rem var(--font-body); cursor: pointer; text-decoration: none; transition: transform .12s, background .15s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red-600); color: #fff; box-shadow: 0 6px 16px rgba(200, 55, 45, .28); }
.btn-primary:hover { background: var(--red-700); color: #fff; }
.btn-green { background: var(--green-700); color: #fff; }
.btn-green:hover { background: var(--green-900); color: #fff; }
.btn-outline { background: transparent; border-color: var(--green-700); color: var(--green-700); }
.btn-outline:hover { background: var(--green-50); }
.btn-light { background: #fff; color: var(--green-900); }
.btn-light:hover { background: var(--green-50); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn[disabled], .btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(233, 185, 73, .25), transparent 60%), linear-gradient(135deg, var(--green-900), var(--green-700)); color: #fff; overflow: hidden; }
.hero h1 { color: #fff; }
.hero-grid { display: grid; gap: 40px; padding: 56px 0 64px; align-items: center; grid-template-columns: 1.05fr .95fr; }
.hero .eyebrow { display: inline-block; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 800; color: var(--gold); margin-bottom: 14px; }
.hero p.lead { font-size: 1.15rem; color: #d7e7dc; max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-art { position: relative; }
.hero-art img { border-radius: 24px; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.hero-badges li { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); padding: 6px 14px; border-radius: 999px; font-size: .88rem; font-weight: 600; }

/* sections */
.section { padding: 64px 0; }
.section.alt { background: var(--paper); border-block: 1px solid var(--line); }
.section.tint { background: var(--green-50); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head p { color: var(--muted); }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card.flat { box-shadow: none; }
.feature .icon { width: 52px; height: 52px; border-radius: 14px; background: var(--green-100); display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 14px; }

/* prices */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.price-card { display: flex; align-items: center; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.price-card .ico { font-size: 1.8rem; width: 52px; height: 52px; display: grid; place-items: center; background: var(--red-100); border-radius: 14px; flex: none; }
.price-card .lbl { font-size: .85rem; color: var(--muted); }
.price-card .val { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; color: var(--green-900); }

/* product / quick buy cards */
.qb-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.qb-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.qb-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.qb-body h3 { margin-bottom: 2px; }
.qb-price { color: var(--muted); margin-bottom: 14px; }
.qb-price strong { color: var(--green-700); font-size: 1.15rem; }
.qb-result { margin: 12px 0 16px; padding: 10px 12px; background: var(--green-50); border-radius: 10px; font-size: .95rem; }
.qb-body .btn { margin-top: auto; }
.tag-out { display: inline-block; background: #eee; color: #555; font-size: .75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }

/* forms */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; color: var(--ink); }
.req { color: var(--red-600); }
.input, select.input, textarea.input { width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; font: inherit; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 4px rgba(43, 107, 67, .15); }
.input.error { border-color: var(--red-600); }
textarea.input { resize: vertical; min-height: 96px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.err { font-size: .85rem; color: var(--red-700); margin-top: 4px; font-weight: 600; }
.input-prefix { display: flex; }
.input-prefix span { display: grid; place-items: center; padding: 0 14px; background: var(--green-50); border: 2px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; color: var(--muted); font-weight: 600; }
.input-prefix .input { border-radius: 0 12px 12px 0; }
.form-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 16px; border-radius: 12px; margin-bottom: 18px; border: 1px solid; font-weight: 500; }
.alert-ok { background: #e8f5ec; border-color: #b9dcc4; color: #1d5b33; }
.alert-warn { background: #fff4de; border-color: #f1d9a3; color: #7a5200; }
.alert-bad { background: var(--red-100); border-color: #f0b7b1; color: var(--red-700); }

/* page header */
.page-head { background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: #fff; padding: 42px 0; }
.page-head h1 { color: #fff; margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-head p { color: #cfe3d6; margin: 8px 0 0; }
.page-body { padding: 40px 0 64px; }
.prose h2 { font-size: 1.45rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.crumbs { font-size: .85rem; color: #cfe3d6; margin-bottom: 10px; }
.crumbs a { color: #fff; }

/* faq */
details.faq { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin-bottom: 12px; }
details.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--green-700); }
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--muted); padding-bottom: 14px; margin: 0; }

/* table (customer) */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.table th { text-align: left; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
table.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* badges */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.badge-ok { background: #dff3e5; color: #17663a; }
.badge-warn { background: #fdf0cd; color: #8a5d00; }
.badge-bad { background: var(--red-100); color: var(--red-700); }
.badge-info { background: #dcebfb; color: #1b4f8f; }
.badge-muted { background: #ececec; color: #555; }

/* orders (customer) */
.order-card { margin-bottom: 16px; }
.order-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.order-line { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.order-line img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.order-line .grow { flex: 1; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 22px 0 0; }
.pg { padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; font-weight: 600; color: var(--ink); }
.pg.current { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.pg.disabled { opacity: .45; }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; background: var(--green-50); padding: 5px; border-radius: 999px; }
.tab { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 999px; font: 700 .95rem var(--font-body); cursor: pointer; color: var(--muted); }
.tab[aria-selected="true"] { background: #fff; color: var(--green-900); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.auth-card { max-width: 460px; margin: 0 auto; }
.success-box { border: 2px dashed var(--red-600); background: #fff7f6; border-radius: 16px; padding: 18px; margin: 20px 0; }
.success-box .num { font-family: var(--font-display); font-size: 2.4rem; letter-spacing: .08em; font-weight: 800; color: var(--green-900); }
.check { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; background: var(--green-700); color: #fff; display: grid; place-items: center; font-size: 2.4rem; }
.cta-band { background: linear-gradient(135deg, var(--red-700), var(--red-600)); color: #fff; border-radius: 24px; padding: 40px 28px; text-align: center; }
.cta-band h2 { color: #fff; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 14px; margin-bottom: 20px; }
.contact-list .ico { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--green-100); display: grid; place-items: center; font-size: 1.2rem; }

/* footer */
.site-footer { background: var(--green-900); color: #c9ddd0; padding: 52px 0 24px; margin-top: 0; }
.site-footer h3 { color: #fff; font-size: 1.05rem; }
.site-footer a { color: #e5f0e8; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 2fr 1fr 1fr; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 34px; padding-top: 20px; font-size: .85rem; text-align: center; }

/* mobile bottom nav */
.mobile-nav { display: none; }

/* toast */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(420px, 92vw); pointer-events: none; }
.toast { background: #25302a; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; animation: pop .2s ease-out; }
.toast.ok { background: var(--green-700); }
.toast.bad { background: var(--red-700); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* quick-buy checkout modal */
.qb-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.qb-backdrop { position: absolute; inset: 0; background: rgba(10, 24, 16, .55); }
.qb-sheet { position: relative; background: #fff; width: 100%; max-width: 560px; max-height: 94vh; overflow-y: auto; overscroll-behavior: contain; border-radius: 22px 22px 0 0; padding: 22px 22px max(22px, env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); }
.qb-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.qb-head h3 { margin: 0; }
.qb-x { background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--muted); width: 40px; height: 40px; border-radius: 50%; }
.qb-x:hover { background: var(--green-50); }
.qb-steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 18px; font-size: .85rem; }
.qb-steps li { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.qb-steps .n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #e6e6e6; font-weight: 800; }
.qb-steps li.on { color: var(--ink); font-weight: 700; }
.qb-steps li.on .n, .qb-steps li.done .n { background: var(--red-600); color: #fff; }
.qb-order { display: flex; justify-content: space-between; gap: 12px; background: var(--green-50); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-size: .92rem; }
.qb-order .tot { text-align: right; }
.qb-order .tot strong { font-size: 1.2rem; display: block; }
.qb-sticky { position: sticky; bottom: -22px; margin: 16px -22px -22px; padding: 12px 22px max(14px, env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 16px rgba(0, 0, 0, .05); }
.qb-pay { text-align: center; max-width: 380px; margin: 0 auto; }
.qb-pay .amt { font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; color: var(--green-900); }
.upi-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.upi-app { border: 2px solid var(--line); background: #fff; padding: 14px 8px; border-radius: 14px; font: 700 .92rem var(--font-body); cursor: pointer; }
.upi-app.phonepe { background: #5f259f; border-color: #5f259f; color: #fff; }
.upi-app.paytm { background: #00baf2; border-color: #00baf2; color: #fff; }
.qr-box img { width: 100%; max-width: 260px; margin: 0 auto; border: 1px solid var(--line); border-radius: 14px; }
.only-mobile { display: none; }
.drop { display: block; border: 2px dashed #e2a29b; background: #fff8f7; border-radius: 16px; padding: 18px; cursor: pointer; text-align: center; }
.drop input { display: none; }
.drop img { max-height: 260px; margin: 0 auto 8px; border-radius: 10px; border: 1px solid var(--line); }
.progress { height: 8px; background: #e6e6e6; border-radius: 99px; overflow: hidden; margin-top: 12px; }
.progress > div { height: 100%; width: 5%; background: var(--red-600); transition: width .2s; }
body.modal-open { overflow: hidden; }

/* responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding: 36px 0 44px; }
  .grid-3, .price-grid, .footer-grid { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: repeat(3, 1fr); }
  .price-card { flex-direction: column; text-align: center; padding: 12px 6px; gap: 6px; }
  .price-card .ico { width: 40px; height: 40px; font-size: 1.3rem; }
  .price-card .val { font-size: 1.15rem; }
  .price-card .lbl { font-size: .72rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--cream); padding: 12px 16px 18px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a, .nav .link-btn { padding: 12px 14px; }
  .only-mobile { display: block; }
  .only-desktop { display: none; }
  .mobile-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .mobile-nav a { text-align: center; padding: 8px 4px 6px; font-size: .72rem; font-weight: 700; text-decoration: none; color: var(--muted); }
  .mobile-nav a span { display: block; font-size: 1.3rem; line-height: 1.2; }
  .mobile-nav a[aria-current="page"] { color: var(--red-600); }
  body { padding-bottom: 62px; }
  .section { padding: 44px 0; }
}
@media (min-width: 640px) {
  .qb-modal { align-items: center; }
  .qb-sheet { border-radius: 22px; }
}
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .mobile-nav, .toasts { display: none; } }

/* misc helpers added after first pass */
.grid-gap { margin-top: 20px; }
.contact-grid { grid-template-columns: 1fr 1.6fr; align-items: start; }
.plain-list { list-style: none; padding: 0; margin: 0 0 16px; }
.qr-box { margin-top: 14px; }
.qb-sheet h4 { margin-bottom: 4px; }
.qb-pay .link-btn { display: block; margin-top: 4px; }
.order-meta { color: var(--muted); font-size: .85rem; }
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .qr-box[data-mobile-hidden]:not(.show) { display: none; }
}
.hero-grid > *, .grid > *, .footer-grid > *, .form-row > * { min-width: 0; }
.hero-badges { max-width: 100%; }
.price-grid-auto { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* Service hours */
.announce { background: #17402a; color: #fff; font-size: .9rem; text-align: center; padding: 7px 0; }
.announce .container { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.announce .sep { opacity: .5; }
.hours-banner { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; margin: 14px 0 0; }
.hours-banner span { background: #e8f3ec; color: #17402a; border: 1px solid #bfdcca; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .92rem; }
.hours-banner.in-modal { margin: 0 0 12px; }
.hours-banner.in-modal span { font-size: .8rem; padding: 4px 10px; }
.hours-chip { font-weight: 600; }
@media (max-width: 480px) { .announce { font-size: .8rem; } .announce .sep { display: none; } }

/* Live prices: two cards per row on phones and small tablets (placed last so it beats .price-grid-auto) */
@media (max-width: 900px) {
  .price-grid, .price-grid-auto { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .price-card { padding: 14px 8px; }
  .price-card .lbl { font-size: .78rem; }
  .price-card .val { font-size: 1.3rem; }
}
