/* Map stage, brand-tinted Leaflet tiles, markers and popups */
.map-stage { position: relative; min-height: 690px; overflow: hidden; border: 1px solid rgba(141,111,77,.24); border-radius: 20px; background: var(--ivory); box-shadow: 0 14px 36px rgba(108,16,10,.06); }
.interactive-map { position: absolute; z-index: 1; background: var(--ivory); inset: 0; }
.map-fallback { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; margin: 0; padding: 30px; background: var(--ivory); color: var(--muted); text-align: center; }
.map-fallback[hidden] { display: none; }
.map-controls { position: absolute; z-index: 500; top: 16px; right: 16px; left: 58px; display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; }
.map-control { min-height: 38px; padding: 0 13px; border: 1px solid rgba(141,111,77,.34); border-radius: 999px; background: rgba(244,241,225,.96); box-shadow: 0 5px 16px rgba(108,16,10,.1); color: var(--wine); cursor: pointer; font-size: .64rem; font-weight: var(--fw-strong); pointer-events: auto; transition: border-color .2s ease, background .2s ease, color .2s ease; }
.map-control:hover, .map-control:focus-visible { border-color: var(--wine); background: var(--wine); color: var(--on-wine); }
.map-expand { margin-left: auto; }
.map-expand span { margin-left: 4px; }

.leaflet-brand-base-pane { filter: sepia(.42) saturate(.52) brightness(1.04) contrast(.88); }
.leaflet-brand-labels-pane { filter: sepia(.38) saturate(.62) contrast(.92); opacity: .64; }
.leaflet-container { color: var(--ink); font-family: var(--sans); }
.leaflet-control-zoom { overflow: hidden; border: 1px solid rgba(141,111,77,.34) !important; border-radius: 10px !important; box-shadow: 0 5px 16px rgba(108,16,10,.1) !important; }
.leaflet-control-zoom a { border-color: rgba(141,111,77,.22) !important; background: rgba(244,241,225,.96) !important; color: var(--wine) !important; }
.leaflet-control-attribution { background: rgba(244,241,225,.88) !important; color: var(--muted); font-size: 9px; }
.leaflet-control-attribution a { color: var(--wine); }

.brand-map-icon { border: 0; background: transparent; }
.brand-map-marker { display: flex; width: 160px; align-items: center; flex-direction: column; transform: translateY(-2px); }
.brand-map-pin { position: relative; display: grid; width: 28px; height: 28px; place-items: center; border: 5px solid var(--paper); border-radius: 50% 50% 50% 0; background: var(--wine); box-shadow: 0 5px 15px rgba(108,16,10,.24); transform: rotate(-45deg); transition: transform .2s ease, border-color .2s ease; }
.brand-map-pin::after { width: 6px; height: 6px; border-radius: 50%; background: var(--paper); content: ""; }
.brand-map-name { margin-top: 7px; padding: 5px 9px; border: 1px solid rgba(141,111,77,.24); border-radius: 999px; background: rgba(244,241,225,.96); box-shadow: 0 4px 12px rgba(108,16,10,.1); color: var(--wine); font-size: .6rem; font-weight: var(--fw-strong); line-height: 1.25; white-space: nowrap; }
.brand-map-marker.is-active .brand-map-pin { border-color: var(--accent); transform: rotate(-45deg) scale(1.16); }
.brand-map-marker.is-active .brand-map-name { border-color: var(--wine); background: var(--wine); color: var(--on-wine); }

.location-map-popup .leaflet-popup-content-wrapper { overflow: hidden; border: 1px solid rgba(141,111,77,.24); border-radius: 14px; background: var(--paper); box-shadow: 0 14px 34px rgba(108,16,10,.16); color: var(--ink); }
.location-map-popup .leaflet-popup-content { width: 240px !important; margin: 0; }
.location-map-popup .leaflet-popup-tip { background: var(--paper); }
.map-popup-card { padding: 18px; }
.map-popup-card h3 { margin: 0 0 6px; color: var(--wine); font-family: var(--serif); font-size: 1.3rem; font-weight: var(--fw-title); line-height: 1.15; }
.map-popup-card p { margin: 0; color: var(--muted); font-size: .68rem; line-height: 1.55; }
.map-popup-actions { display: flex; align-items: center; gap: 8px; margin-top: 15px; }
.map-popup-actions a { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--wine); border-radius: 999px; color: var(--wine); font-size: .6rem; font-weight: var(--fw-strong); }
.map-popup-actions a:first-child { background: var(--wine); color: var(--on-wine); }
.map-popup-actions a:hover, .map-popup-actions a:focus-visible { border-color: var(--wine-dark); background: var(--wine-dark); color: var(--on-wine); }

@media (max-width: 1100px) {
  .map-stage { min-height: 650px; }
}

@media (max-width: 800px) {
  .map-stage { min-height: 500px; }
}

@media (max-width: 560px) {
  .map-stage { min-height: 420px; border-radius: 15px; }
  .map-controls { top: 10px; right: 10px; left: 50px; gap: 6px; }
  .map-control { min-height: 34px; padding-inline: 10px; font-size: .56rem; }
  .brand-map-marker { width: 130px; }
  .brand-map-name { padding: 4px 7px; font-size: .52rem; }
}
