:root {
  --app-header-height: 72px;
  --bg-primary: #ffffff;
  --bg-secondary: #f9f9f9;
  --bg-dialog: #ffffff;
  --bg-input: #ffffff;
  --text-primary: #213547;
  --text-secondary: #64748b;
  --border-color: #e5e7eb;
  --border-color-light: rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.2);
  color-scheme: light;
}

body.map-page {
  margin: 0;
  min-width: 320px;
  background: #fff;
  color: var(--text-primary);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

body.map-page .crumbs {
  margin: 0 auto 10px;
  max-width: 980px;
  font-size: 13px;
  color: #6b7280;
  text-align: left;
}

body.map-page .crumbs a {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none;
}

.home-top-hero-wrapper {
  background: linear-gradient(180deg, #fdfbf7 0%, #f7f1e8 100%);
  border-bottom: 1px solid #ebdcd0;
  padding: 20px 20px 24px;
}

.home-hero-actions-section,
.home-visual-portal-wrap {
  max-width: 1320px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.home-hero-actions-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 14px;
  row-gap: 8px;
  text-align: center;
}

.home-hero-actions-section > nav.crumbs,
.home-hero-actions-section > .home-hero-badge {
  flex: 1 1 100%;
  order: 0;
}

.page-heading-logo {
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  margin: 0;
  object-fit: contain;
  order: 1;
}

.home-hero-actions-section > h1 {
  flex: 0 1 auto;
  order: 2;
  margin: 0;
}

.home-hero-actions-section > :not(.page-heading-logo):not(h1):not(nav.crumbs):not(.home-hero-badge) {
  flex: 1 1 100%;
  order: 3;
}

.home-hero-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(114, 47, 55, 0.08);
  color: #722f37;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  margin-bottom: 8px;
  border: 1px solid rgba(114, 47, 55, 0.18);
}

.home-hero-title {
  font-size: clamp(1.25rem, 3.2vw + 0.85rem, 2.125rem);
  font-weight: 700;
  color: #2c1a1d;
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.home-hero-subtitle,
.home-hero-lede,
.home-hero-lede-link,
.home-hero-proof {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.home-hero-subtitle {
  font-size: clamp(14px, 1.4vw, 16px);
  color: #5c5552;
  margin: 0 auto 10px;
  line-height: 1.45;
}

.home-hero-lede {
  font-size: clamp(14px, 1.35vw, 16px);
  color: #3f3a37;
  margin: 0 auto 8px;
  line-height: 1.55;
}

.home-hero-lede-link,
.home-hero-proof {
  font-size: clamp(13px, 1.2vw, 14px);
  margin: 0 auto 12px;
  line-height: 1.5;
}

.home-hero-proof { color: #635853; margin-bottom: 18px; }
.home-hero-lede-link a,
.home-hero-proof a { color: #722f37; font-weight: 650; }
.home-hero-proof strong { color: #2c1a1d; }

.home-action-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  text-align: left;
}

.home-action-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #ebdcd0;
  padding: 18px 20px;
  box-shadow: 0 3px 14px rgba(74, 30, 36, 0.05);
  display: flex;
  flex-direction: column;
}

.home-action-card.home-card-primary {
  background: linear-gradient(145deg, #ffffff 0%, #fffbf2 100%);
  border: 2px solid #dfa732;
  box-shadow: 0 4px 18px rgba(212, 160, 23, 0.12);
}

.home-card-icon-wrap {
  font-size: 24px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #faf3ec;
  border-radius: 10px;
  margin-bottom: 12px;
}

.home-card-primary .home-card-icon-wrap { background: #fef4dc; }

.home-action-card h2 {
  font-size: 18px;
  font-weight: 700;
  color: #2c1a1d;
  margin: 0 0 6px;
}

.home-action-card p {
  color: #635853;
  font-size: 13.5px;
  line-height: 1.45;
  margin: 0 0 14px;
  flex-grow: 1;
}

.home-card-actions { display: flex; flex-direction: column; gap: 8px; }

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  cursor: pointer;
}

.home-btn-gold {
  background: linear-gradient(135deg, #d4a017 0%, #b8860b 100%);
  color: #fff;
}

.home-btn-primary { background: #722f37; color: #fff; }
.home-btn-secondary { background: #394b59; color: #fff; }

.home-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  background: #fff;
  color: #722f37;
  border: 2px solid #722f37;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
}

.home-link-subtle {
  font-size: 12.5px;
  color: #722f37;
  font-weight: 600;
  text-align: center;
}

#dw-map-section-anchor {
  height: 0;
  scroll-margin-top: var(--app-header-height, 72px);
}

.map-page-container {
  position: relative;
  display: flex;
  height: calc(100vh - var(--app-header-height, 72px));
  min-height: calc(100vh - var(--app-header-height, 72px));
  width: 100%;
  background: var(--bg-primary);
  border-bottom: 2px solid #ebdcd0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.map-sidebar-slot {
  flex-shrink: 0;
  overflow: hidden;
  box-sizing: border-box;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
}

.map-sidebar-slot.is-open { width: 380px; min-width: 380px; }
.map-sidebar-slot.is-collapsed { display: none; }

.map-sidebar {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 16px 0;
}

.map-card {
  margin: 0 0 12px;
  padding: 16px;
  background: var(--bg-dialog);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  min-width: 0;
}

.map-card h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.map-search-grid {
  display: grid;
  grid-template-columns: minmax(148px, max-content) minmax(0, 1fr);
  row-gap: 4px;
  column-gap: 8px;
  align-items: center;
  font-size: 12px;
}

.map-type-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  font-size: 12px;
}

.map-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  font-weight: 700;
  white-space: nowrap;
}

.map-sidebar input[type="text"],
.map-sidebar select {
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.3;
  height: 28px;
  box-sizing: border-box;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text-primary);
  min-width: 0;
  width: 100%;
}

.map-filter-check {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: var(--text-primary);
}

.map-filter-span { grid-column: 1 / span 2; }

.map-filters-on {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #92400e;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-radius: 999px;
  padding: 3px 8px;
}

.map-style-grid,
.map-legend {
  display: grid;
  grid-template-columns: minmax(0, 120px) 1fr;
  row-gap: 8px;
  column-gap: 10px;
  align-items: center;
  font-size: 12px;
}

.map-legend {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.map-legend-item { display: flex; align-items: center; gap: 8px; }

.map-load-error {
  margin: 8px 0 0;
  color: #991b1b;
  font-size: 12px;
  line-height: 1.4;
}

.map-sidebar-toggle-handle {
  position: absolute;
  top: 50%;
  z-index: 920;
  width: 22px;
  height: 72px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border-color);
  background: var(--bg-dialog);
  color: #667eea;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}

.map-sidebar-toggle-handle.is-open {
  left: 380px;
  transform: translate(-100%, -50%);
  border-radius: 10px 0 0 10px;
  border-right: none;
}

.map-sidebar-toggle-handle.is-collapsed {
  left: 0;
  transform: translateY(-50%);
  border-radius: 0 10px 10px 0;
  border-left: none;
}

.map-sidebar-toggle-grip { display: flex; flex-direction: column; gap: 3px; margin-right: 2px; }
.map-sidebar-toggle-grip span {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

.map-canvas {
  flex: 1;
  position: relative;
  min-width: 0;
  height: 100%;
  background: #eef2f7;
  z-index: 1;
}

#winery-map,
.map-canvas .leaflet-container {
  height: 100%;
  width: 100%;
  background: #eef2f7;
}

.leaflet-tooltip.dw-label {
  background: var(--bg-dialog);
  color: var(--text-primary);
  border: 1px solid var(--border-color-light);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  padding: 4px 8px;
}

.business-details-panel {
  width: 340px;
  max-width: 100%;
  background: #fff;
  padding: 12px 10px 12px 12px;
  overflow-y: auto;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1100;
  height: 100%;
  box-shadow: -4px 0 6px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.business-details-panel h2 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
}

.detail-grid {
  display: grid;
  grid-template-columns: 100px 1fr;
  row-gap: 4px;
  column-gap: 8px;
  align-items: center;
  font-size: 11px;
}

.detail-grid .k { text-align: right; font-weight: 700; }
.detail-photo {
  width: 100%;
  height: 206px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  background: transparent;
}

.hours-grid {
  display: grid;
  grid-template-columns: 80px 1fr;
  row-gap: 3px;
  column-gap: 8px;
  font-size: 11px;
}

.discount-chip {
  padding: 8px 12px;
  background: #f0f9ff;
  border-radius: 6px;
  border: 1px solid #bae6fd;
}

.reserve-btn {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

.dw-tooltip-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9ca3af;
  font-size: 14px;
  line-height: 1;
  cursor: help;
}

.dw-tooltip-icon-bubble {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: max-content;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
}

.dw-tooltip-icon:hover .dw-tooltip-icon-bubble,
.dw-tooltip-icon:focus-visible .dw-tooltip-icon-bubble { display: block; }

#seo-links {
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  background: #fdfbf7;
  color: #2b2b2b;
  border-top: 1px solid #ebdcd0;
}

.home-regions-section { margin-bottom: 64px; }
.home-section-header { text-align: center; margin-bottom: 36px; }
.home-section-eyebrow {
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 700;
  color: #6b4f08;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.home-section-header h2 {
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 800;
  color: #2c1a1d;
  margin: 0 0 10px;
}
.home-section-header p {
  font-size: 16px;
  color: #635853;
  max-width: 680px;
  margin: 0 auto;
}

.home-regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
}

.home-region-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #ebdcd0;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.home-region-img-wrap { position: relative; height: 200px; background: #3a2e2b; overflow: hidden; }
.home-region-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.home-region-overlay {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
}
.home-region-count,
.home-region-state {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}
.home-region-count { background: rgba(0, 0, 0, 0.75); color: #fff; }
.home-region-state { background: rgba(255, 255, 255, 0.9); color: #2c1a1d; font-weight: 600; }
.home-region-content { padding: 22px 20px; display: flex; flex-direction: column; flex-grow: 1; }
.home-region-content h3 { margin: 0 0 8px; font-size: 20px; color: #2c1a1d; }
.home-region-content p { color: #635853; font-size: 14px; line-height: 1.5; margin: 0 0 20px; flex-grow: 1; }
.home-region-links { display: flex; gap: 12px; }
.home-region-btn-guide,
.home-region-btn-map {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration: none;
}
.home-region-btn-guide { background: #faf3ec; color: #722f37; border: 1px solid #e2cec0; }
.home-region-btn-map { background: #722f37; color: #fff; }
.home-regions-footer { text-align: center; margin-top: 36px; }

.home-why-section {
  background: #fff;
  border-radius: 20px;
  border: 1px solid #ebdcd0;
  padding: 48px 36px;
  margin-bottom: 64px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}
.home-why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  margin-top: 36px;
}
.home-why-icon {
  font-size: 28px;
  width: 50px;
  height: 50px;
  background: #faf3ec;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.home-why-card h3 { margin: 0 0 8px; font-size: 18px; color: #2c1a1d; }
.home-why-card p { margin: 0; color: #635853; font-size: 14px; line-height: 1.55; }

.home-seo-archive-section { border-top: 1px solid #ebdcd0; padding-top: 48px; }
.home-seo-archive-header { text-align: center; margin-bottom: 32px; }
.home-seo-archive-header h2 { margin: 0 0 8px; font-size: 24px; color: #2c1a1d; }
.home-seo-archive-header p { margin: 0; color: #635853; }
.home-faq-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 36px;
  margin-bottom: 48px;
}
.home-faq-col h3 {
  font-size: 18px;
  color: #722f37;
  border-bottom: 2px solid #ebdcd0;
  padding-bottom: 8px;
  margin: 0 0 16px;
}
.faq-q { margin: 16px 0 6px; font-size: 15px; color: #2c1a1d; }
.home-faq-col p { margin: 0 0 16px; color: #554b46; line-height: 1.6; }
.home-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  background: #f6efe8;
  border-radius: 16px;
  padding: 32px 28px;
  margin-bottom: 40px;
}
.home-directory-col h3 { margin: 0 0 14px; font-size: 16px; color: #2c1a1d; }
.home-directory-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.home-directory-col a { color: #722f37; font-weight: 600; }
.home-trust { margin-top: 24px; padding-top: 20px; border-top: 1px solid #e5e7eb; color: #374151; font-size: 14px; line-height: 1.7; }
.home-trust p { margin: 0 0 12px; }
.page-updated { margin: 0 0 28px; color: #4b5563; font-size: 13px; }

.instructions-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 16px;
}
.instructions-overlay.is-open { display: flex; }
.instructions-dialog {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.instructions-dialog h2 { margin: 0; font-size: 22px; color: #0f172a; }
.instructions-step {
  padding: 16px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-left: 4px solid #d97706;
  border-radius: 8px;
  margin-top: 16px;
  display: flex;
  gap: 12px;
}
.instructions-num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #d97706;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: none;
}

@media (max-width: 1100px) {
  .home-action-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .map-sidebar-slot.is-open { width: 320px; min-width: 320px; }
  .map-sidebar-toggle-handle.is-open { left: 320px; }
}

@media (max-width: 768px) {
  .home-action-cards-grid,
  .home-regions-grid,
  .home-why-grid,
  .home-directory-grid,
  .home-faq-container { grid-template-columns: 1fr; }
  .home-why-section { padding: 32px 20px; }
  .home-directory-grid { padding: 24px 18px; }
  .page-heading-logo { width: 76px; height: 76px; flex-basis: 76px; }
  .map-page-container {
    height: calc(100vh - var(--app-header-height, 72px));
    min-height: 420px;
  }
  .map-sidebar-slot.is-open {
    position: fixed;
    left: 0;
    top: var(--app-header-height, 72px);
    width: 100%;
    min-width: 0;
    height: calc(100vh - var(--app-header-height, 72px));
    z-index: 900;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  }
  .map-sidebar-toggle-handle { z-index: 930; }
  .map-sidebar-toggle-handle.is-open {
    left: 100%;
    transform: translate(-100%, -50%);
  }
  .business-details-panel {
    position: fixed;
    right: 0;
    top: var(--app-header-height, 72px);
    width: 100%;
    height: calc(100vh - var(--app-header-height, 72px));
    z-index: 950;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
