/* Akins Fresh Market — look borrowed from the WebDIGI design (ecrs-customer-app/website/site.css):
   deep green + lime, warm cream ground, Fraunces headings, Figtree body, pill buttons. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --main: #194a3b;
  --main2: #0f3a2e;
  --hi: #DCF073;
  --sale: #C93A2B;
  --bg: #F7F5F0;
  --card: #fff;
  --ink: #0a1c24;
  --muted: #5f625f;
  --line: #E6E2D9;
  --pad: clamp(16px, 5vw, 64px);
}

html { scroll-behavior: smooth; }
body { font-family: Figtree, "Avenir Next", system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
button, select { font: inherit; color: inherit; }
.serif { font-family: Fraunces, Georgia, serif; }

/* Utility strip */
.util { background: var(--main2); color: #cfe0d8; font-size: 13px; display: flex; justify-content: space-between; gap: 16px; padding: 9px var(--pad); flex-wrap: wrap; }
.util b { color: #fff; font-weight: 600; }
.util a { color: var(--hi); text-decoration: none; font-weight: 600; }

/* Header */
.nav { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.nav-inner { display: flex; align-items: center; gap: 36px; padding: 14px var(--pad); max-width: 1440px; margin: 0 auto; }
.nav-logo { flex: 0 0 auto; }
.nav-logo img { height: 46px; width: auto; max-width: none; }
.nav-links { display: flex; gap: 28px; list-style: none; font-weight: 600; font-size: 15px; }
.nav-links a { text-decoration: none; padding: 6px 0; white-space: nowrap; }
.nav-links a.active { box-shadow: inset 0 -3px 0 var(--main); }
.nav-links a:hover { color: var(--main); }
.nav .sp { flex: 1; }
.mobile-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s, opacity .2s; }
.mobile-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Buttons */
.btn { border-radius: 999px; padding: 12px 22px; font-weight: 700; font-size: 15px; border: 0; display: inline-flex; gap: 8px; align-items: center; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn.main { background: var(--main); color: #fff; }
.btn.hi { background: var(--hi); color: var(--main2); }
.btn.ghost { border: 1.5px solid var(--line); color: var(--ink); background: var(--card); }
.btn.ghost-dark { border: 1.5px solid #4d7c6b; color: #fff; background: transparent; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }

/* Layout */
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--pad); }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--main); }
.sechd { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 56px 0 18px; flex-wrap: wrap; }
h2.s { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: clamp(26px, 3vw, 32px); line-height: 1.1; }
.asof { font-size: 14px; color: var(--muted); }

/* Hero */
.hero { margin-top: 28px; border-radius: 24px; overflow: hidden; color: #fff; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 24px;
  background: radial-gradient(ellipse at 15% 25%, #2f6b56 0, transparent 55%), linear-gradient(110deg, #0f3a2e, #1d4a3c); }
.hero .ht { padding: clamp(28px, 4vw, 56px); }
.hero .eyebrow { color: var(--hi); }
.hero h1 { font-family: Fraunces, Georgia, serif; font-weight: 500; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.04; margin: 12px 0 14px; }
.hero p { color: #dfe9e4; font-size: 17px; max-width: 46ch; margin-bottom: 24px; }
.hero .acts { display: flex; gap: 12px; flex-wrap: wrap; }
.adpeek { align-self: stretch; display: flex; align-items: center; justify-content: center; padding: 28px 28px 0; position: relative; min-height: 320px; }
.adpeek a { display: block; width: min(340px, 100%); transform: rotate(2deg) translateY(16px); border-radius: 14px 14px 0 0; overflow: hidden; background: #fff; box-shadow: 0 18px 50px rgba(0,0,0,.35); transition: transform .25s; text-decoration: none; }
.adpeek a:hover { transform: rotate(0deg) translateY(4px); }
.adpeek canvas { display: block; width: 100%; height: auto; }
.adpeek .ph { aspect-ratio: 8.5/11; display: grid; place-items: center; color: var(--main); font-weight: 700; background: #f1efe9; }
.adpeek .tag { position: absolute; top: 18px; right: 22px; background: var(--hi); color: var(--main2); font-weight: 800; font-size: 13px; border-radius: 999px; padding: 6px 12px; transform: rotate(4deg); box-shadow: 0 6px 16px rgba(0,0,0,.25); }

/* Quick tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--main); transform: translateY(-2px); }
.tile .k { width: 38px; height: 38px; border-radius: 50%; background: #eef3d4; color: var(--main); display: grid; place-items: center; font-weight: 800; margin-bottom: 6px; }
.tile b { font-size: 17px; }
.tile span { color: var(--muted); font-size: 14.5px; }

/* Store cards */
.stores-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
@media (min-width: 1280px) { .stores-grid { grid-template-columns: repeat(5, 1fr); gap: 14px; } .store-card { padding: 20px 18px 18px; } .store-detail .lbl { display: none; } .store-card h3 { font-size: 22px; } }
.store-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px 22px 20px; display: flex; flex-direction: column; }
.store-card .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.store-card .banner { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--main); }
.store-card h3 { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 24px; margin: 4px 0 12px; }
.store-detail { display: flex; gap: 10px; font-size: 14.5px; margin-bottom: 6px; color: #2c3a3f; }
.store-detail .lbl { width: 46px; flex: 0 0 46px; color: var(--muted); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; }
.store-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 14px; flex-wrap: wrap; }
.store-actions .btn { padding: 9px 16px; font-size: 14px; }
.chip-open { font-family: Figtree, "Avenir Next", system-ui, sans-serif; display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; letter-spacing: 0; text-transform: none; }
.chip-open.yes { background: #eef3d4; color: var(--main); }
.chip-open.no { background: #f1efe9; color: var(--muted); }

/* Story band */
.story { margin-top: 56px; border-radius: 24px; background: linear-gradient(120deg, var(--main2), var(--main) 60%, #2a664e); color: #fff; padding: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: auto 1fr; gap: 12px 40px; align-items: center; }
.story .yr { font-family: Fraunces, Georgia, serif; font-size: clamp(56px, 8vw, 96px); line-height: 1; color: var(--hi); font-weight: 500; }
.story h2 { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.15; margin-bottom: 8px; }
.story p { color: #cfe0d8; font-size: 16px; max-width: 62ch; }

/* Page header (inner pages) */
.page-header { padding: 44px var(--pad) 8px; max-width: 1440px; margin: 0 auto; }
.page-header h1 { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: clamp(34px, 4vw, 48px); line-height: 1.05; margin-top: 8px; }
.page-header p { color: var(--muted); font-size: 17px; margin-top: 8px; }
.section { padding: 24px 0 64px; }
.section-inner { max-width: 1440px; margin: 0 auto; padding: 0 var(--pad); }

/* Weekly ad viewer */
.ad-frame-wrapper { background: var(--card); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.ad-frame-header { display: flex; align-items: center; gap: 14px 20px; padding: 18px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ad-frame-header h3 { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 22px; }
.ad-date { background: #eef3d4; color: var(--main); font-weight: 700; font-size: 13.5px; border-radius: 999px; padding: 4px 12px; }
.ad-store-pick { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.ad-store-pick select { border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px; background: var(--bg); font-weight: 600; cursor: pointer; }
.ad-frame-actions { display: flex; gap: 8px; margin-left: auto; }
.ad-action-btn { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 16px; background: var(--card); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; }
.ad-action-btn:hover { border-color: var(--main); color: var(--main); }
.ad-placeholder { padding: 80px 24px; text-align: center; color: var(--muted); }
.ad-placeholder .icon-lg { font-size: 40px; margin-bottom: 12px; }

/* Footer */
.footer { background: var(--main2); color: #cfe0d8; margin-top: 72px; }
.footer-inner { max-width: 1440px; margin: 0 auto; padding: 40px var(--pad); display: flex; gap: 24px 48px; align-items: center; flex-wrap: wrap; }
.footer-logo img { height: 44px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; list-style: none; font-weight: 600; }
.footer-links a { text-decoration: none; color: #fff; }
.footer-links a:hover { color: var(--hi); }
.footer-text { margin-left: auto; font-size: 13.5px; }

/* Phone */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .adpeek { min-height: 0; padding-top: 0; }
  .adpeek a { width: min(280px, 80%); }
  .tiles { grid-template-columns: 1fr; }
  .story { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .nav-inner { gap: 16px; }
  .nav-logo img { height: 38px; }
  .mobile-toggle { display: block; margin-left: auto; }
  .nav .sp, .nav .nav-cta { display: none; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--card); flex-direction: column; gap: 0; border-bottom: 1px solid var(--line); padding: 8px var(--pad) 16px; }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; }
  .nav-links a.active { box-shadow: none; color: var(--main); }
  .util .hide-sm { display: none; }
  .ad-frame-actions { margin-left: 0; }
  .footer-text { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .tile, .adpeek a { transition: none; }
  .btn:hover, .tile:hover { transform: none; }
  .adpeek a, .adpeek a:hover { transform: none; }
}

/* Member-savings link band (weekly ad page) */
.savings-band { display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap; margin: 8px auto 0; max-width: 1440px; padding: 16px 22px; border-radius: 18px; background: var(--hi); color: var(--main2); text-decoration: none; }
.savings-band .savings-k { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 22px; }
.savings-band .savings-t { font-weight: 600; flex: 1 1 220px; }
.savings-band:hover .btn { transform: translateY(-1px); }

/* Shopper app legal and help pages (app-privacy, app-terms, app-support) */
.legal { max-width: 46rem; margin: 0 auto; padding: 0 var(--pad); font-size: 17px; line-height: 1.6; }
.legal h2 { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: clamp(22px, 2.4vw, 26px); line-height: 1.2; margin: 36px 0 10px; }
.legal h3 { font-size: 17px; font-weight: 700; margin: 20px 0 6px; }
.legal p, .legal ul, .legal ol { margin: 0 0 14px; }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--main); font-weight: 600; }
.legal .dated { color: var(--muted); font-size: 15px; }
.legal .box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin: 0 0 16px; }
.legal .box p:last-child, .legal .box ul:last-child { margin-bottom: 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 15.5px; background: var(--card); border: 1px solid var(--line); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal th { background: #efece4; font-weight: 700; }
.legal .phones { list-style: none; padding: 0; }
.legal .phones li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
@media (max-width: 600px) {
  .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; }
  .legal thead { display: none; }
  .legal tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .legal td { border: 0; padding: 4px 12px; }
  .legal td:first-child { font-weight: 700; padding-top: 10px; }
}
