/* map.html only — custom Fields Family Farmz statewide store locator. */
.map-page-section { padding-top: 56px; }
.map-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.map-intro-copy { max-width: 720px; }
.map-intro h2 { margin: 7px 0 8px; font-size: clamp(30px, 4vw, 46px); }
.map-intro p { margin: 0; color: var(--muted); line-height: 1.65; }
.map-kicker {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.map-stat-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.map-stat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(157,0,255,.28);
  border-radius: 999px;
  background: rgba(157,0,255,.08);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.map-stat strong { color: #fff; }
.locator-shell {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  min-height: 720px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px;
  background: #100d16;
  box-shadow: 0 30px 80px rgba(0,0,0,.42), 0 0 0 1px rgba(157,0,255,.07) inset;
}
.locator-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(circle at 20% 0%, rgba(157,0,255,.13), transparent 34%),
    linear-gradient(180deg, #181220, #100d16);
}
.locator-sidebar-head { padding: 20px 18px 15px; border-bottom: 1px solid rgba(255,255,255,.08); }
.locator-sidebar-head h3 { margin: 0 0 5px; font-size: 19px; }
.locator-sidebar-head p { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.map-search-wrap { position: relative; }
.map-search-wrap::before {
  content: "⌕";
  position: absolute;
  left: 13px;
  top: 50%;
  translate: 0 -50%;
  color: var(--purple-2);
  font-size: 18px;
  pointer-events: none;
}
#map-store-search {
  width: 100%;
  min-height: 44px;
  padding: 10px 38px 10px 37px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 13px;
  outline: none;
  background: rgba(255,255,255,.045);
  color: #fff;
  font: inherit;
  font-size: 13px;
}
#map-store-search:focus { border-color: rgba(157,0,255,.7); box-shadow: 0 0 0 3px rgba(157,0,255,.14); }
#map-store-search::placeholder { color: #80788c; }
.map-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  translate: 0 -50%;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}
.map-search-clear.visible { opacity: 1; pointer-events: auto; }
.map-search-clear:hover { color: #fff; background: rgba(255,255,255,.07); }
.map-region-row { display: flex; gap: 6px; overflow-x: auto; padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,.07); scrollbar-width: none; }
.map-region-row::-webkit-scrollbar { display: none; }
.map-region-button {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  color: var(--ink-soft);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.map-region-button:hover,
.map-region-button.active { border-color: rgba(157,0,255,.55); background: rgba(157,0,255,.16); color: #fff; }
.map-cluster-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-bottom: 1px solid rgba(99,255,63,.18);
  background: linear-gradient(100deg, rgba(99,255,63,.1), rgba(157,0,255,.1));
  color: var(--ink-soft);
  font-size: 11px;
}
.map-cluster-context[hidden] { display: none; }
.map-cluster-context strong { color: var(--green); }
.map-cluster-context button {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(157,0,255,.38);
  border-radius: 999px;
  background: rgba(157,0,255,.12);
  color: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.map-cluster-context button:hover { border-color: var(--purple-2); background: rgba(157,0,255,.24); }
.map-store-list {
  flex: 1;
  min-height: 0;
  max-height: 590px;
  overflow-y: auto;
  padding: 8px;
  scrollbar-color: rgba(157,0,255,.38) transparent;
}
.map-store-item {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) 18px;
  gap: 11px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.map-store-item:hover { background: rgba(255,255,255,.045); transform: translateX(2px); }
.map-store-item.active { border-color: rgba(157,0,255,.48); background: linear-gradient(100deg, rgba(157,0,255,.17), rgba(157,0,255,.04)); }
.map-store-logo {
  width: 48px;
  height: 48px;
  padding: 3px;
  object-fit: contain;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: radial-gradient(circle, rgba(255,255,255,.22), rgba(255,255,255,.055));
}
.map-store-copy { min-width: 0; }
.map-store-name { display: block; overflow: hidden; color: #fff; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.map-store-address { display: -webkit-box; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.map-store-arrow { color: var(--purple-2); font-size: 18px; opacity: .7; }
.map-list-empty { padding: 40px 22px; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.6; }
.map-stage { position: relative; min-width: 0; min-height: 720px; overflow: hidden; background: #17121f; }
#fff-map { position: absolute; inset: 0; }
.map-loading,
.map-key-panel {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(157,0,255,.2), transparent 30%),
    radial-gradient(circle at 80% 12%, rgba(99,255,63,.08), transparent 24%),
    linear-gradient(145deg, #191321, #0d0b12 72%);
}
.map-loading { color: var(--muted); font-size: 13px; }
.map-key-panel[hidden], .map-loading[hidden] { display: none; }
.map-key-card {
  width: min(520px, 100%);
  padding: 30px;
  border: 1px solid rgba(157,0,255,.34);
  border-radius: 24px;
  background: rgba(18,14,25,.88);
  box-shadow: 0 25px 70px rgba(0,0,0,.5), 0 0 40px rgba(157,0,255,.08) inset;
  text-align: center;
  backdrop-filter: blur(14px);
}
.map-key-marker { width: 74px; height: auto; margin-bottom: 12px; filter: drop-shadow(0 12px 24px rgba(0,0,0,.45)); }
.map-key-card h3 { margin: 0 0 8px; font-size: 24px; }
.map-key-card p { margin: 0 auto 14px; max-width: 410px; color: var(--ink-soft); font-size: 13px; line-height: 1.65; }
.map-key-card code { display: block; padding: 10px 12px; overflow-wrap: anywhere; border-radius: 10px; background: #0b0910; color: var(--green); font-size: 12px; }
.map-key-card small { display: block; margin-top: 12px; color: var(--muted); line-height: 1.5; }
.map-region-controls {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  pointer-events: none;
}
.map-region-controls button {
  pointer-events: auto;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 11px;
  background: rgba(18,14,25,.88);
  box-shadow: 0 8px 22px rgba(0,0,0,.28);
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.map-region-controls button:hover { border-color: rgba(157,0,255,.7); background: rgba(32,21,45,.94); }
.map-powered-note {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 24px;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
  background: rgba(15,12,20,.75);
  color: rgba(255,255,255,.72);
  font-size: 10px;
  pointer-events: none;
  backdrop-filter: blur(8px);
}
.map-info-card { width: 340px; max-width: calc(100vw - 72px); padding: 4px 2px 2px; color: #f8f7fa; font-family: Inter, system-ui, sans-serif; }
.map-info-head { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 12px; align-items: center; }
.map-info-logo { width: 58px; height: 58px; padding: 4px; object-fit: contain; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: radial-gradient(circle, rgba(255,255,255,.25), rgba(255,255,255,.06)); }
.map-info-card h3 { margin: 0; color: #fff; font-size: 17px; line-height: 1.2; }
.map-info-city { display: block; margin-top: 4px; color: #9c93a8; font-size: 12px; }
.map-info-address { margin: 14px 0 8px; color: #d5d0da; font-size: 12px; line-height: 1.5; }
.map-info-approx { display: inline-flex; margin-bottom: 8px; padding: 4px 7px; border-radius: 999px; background: rgba(157,0,255,.14); color: #d7a7ff; font-size: 10px; font-weight: 800; }
.map-info-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.map-info-actions a { padding: 9px 10px; border-radius: 10px; text-align: center; text-decoration: none; font-size: 11px; font-weight: 800; }
.map-info-phone { grid-column: 1 / -1; border: 1px solid rgba(99,255,63,.35); color: var(--green); background: rgba(99,255,63,.06); }
.map-info-directions { border: 1px solid rgba(157,0,255,.42); color: #e3b9ff; background: rgba(157,0,255,.09); }
.map-info-visit { color: #fff; background: linear-gradient(135deg, var(--purple), #6e00c7); }
#fff-map .gm-style-iw-c { max-height: none !important; padding: 15px !important; border: 1px solid rgba(157,0,255,.32); border-radius: 18px !important; background: #17121f !important; box-shadow: 0 20px 60px rgba(0,0,0,.48) !important; }
#fff-map .gm-style-iw-d { max-height: none !important; overflow: hidden !important; }
#fff-map .gm-style-iw-tc::after { background: #17121f !important; }
#fff-map button.gm-ui-hover-effect { filter: invert(1); opacity: .65 !important; }
.map-mobile-info-overlay { display: none; }
.map-mobile-info-overlay[hidden] { display: none !important; }
.map-footnote { margin: 14px 3px 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.map-footnote strong { color: var(--ink-soft); }
@media (max-width: 900px) {
  .map-intro { align-items: start; flex-direction: column; }
  .map-stat-row { justify-content: flex-start; }
  .locator-shell { display: flex; flex-direction: column-reverse; }
  .locator-sidebar { border-top: 1px solid rgba(255,255,255,.08); border-right: 0; }
  .map-stage { min-height: 560px; }
  .map-store-list { max-height: 430px; }
}
@media (max-width: 600px) {
  .map-page-section { padding-top: 38px; }
  .locator-shell { border-radius: 18px; }
  .map-stage { min-height: 500px; }
  .map-region-controls { display: none; }
  .map-key-card { padding: 23px 18px; }
  .map-powered-note { display: none; }
  .map-mobile-info-overlay:not([hidden]) {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 8px;
    background: rgba(5,4,8,.58);
    backdrop-filter: blur(3px);
  }
  .map-mobile-info-panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    padding: 18px 14px 14px;
    border: 1px solid rgba(157,0,255,.48);
    border-radius: 20px;
    background: #17121f;
    box-shadow: 0 24px 80px rgba(0,0,0,.72);
  }
  .map-mobile-info-close {
    position: absolute;
    z-index: 1;
    top: 8px;
    right: 9px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    background: rgba(9,7,12,.82);
    color: #fff;
    font: 700 24px/1 system-ui, sans-serif;
    cursor: pointer;
  }
  .map-mobile-info-body { width: 100%; overflow: hidden; }
  #fff-map .gm-style-iw-c {
    width: calc(100vw - 48px) !important;
    max-width: calc(100vw - 48px) !important;
    max-height: none !important;
    padding: 10px !important;
  }
  #fff-map .gm-style-iw-d {
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    overflow: hidden !important;
  }
  .map-info-card { width: 100%; min-width: 0; max-width: none; padding: 2px; }
  .map-info-head { grid-template-columns: 64px minmax(0,1fr); padding-right: 42px; }
  .map-info-logo { width: 64px; height: 64px; }
  .map-info-card h3 { font-size: 18px; }
  .map-info-address { font-size: 13px; }
  .map-info-actions { grid-template-columns: 1fr; }
  .map-info-phone { grid-column: auto; }
  .map-info-actions a { width: 100%; padding: 11px 12px; font-size: 12px; }
}
