#scmap-container {
  height: 500px;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  background: #f9f9f9;
  position: relative;
  z-index: 1;
}
.scmap-flex { display: flex; flex-direction: row; height: 100%; }
.scmap-sidebar {
  width: 250px;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  padding: 0.7em 0.3em 0.7em 0.7em;
  box-sizing: border-box;
  overflow-y: auto;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 0.97em;
  color: #232323;
  position: relative;
  z-index: 999;
}
.scmap-maparea {
  flex: 1 1 0%;
  min-width: 0;
  min-height: 350px;
  position: relative;
}
.scmap-region-select {
  width: 100%;
  margin-bottom: 0.75em;
  padding: 0.5em;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 1em;
  box-sizing: border-box;
  position: relative;
  z-index: 1000;
}
.scmap-search {
  width: 100%;
  margin-bottom: 1em;
  padding: 0.5em;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 1em;
  box-sizing: border-box;
}
.scmap-distillery-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.96em;
  letter-spacing: 0.01em;
}
.scmap-distillery-item {
  padding: 0.38em 0.7em;
  border-radius: 5px;
  margin-bottom: 0.18em;
  cursor: pointer;
  font-size: 0.98em;
  font-weight: 500;
  color: #3d2c13;
  background: none;
  transition: background 0.18s, color 0.18s;
}
.scmap-distillery-item:hover {
  background: #f6eee2;
  color: #b08d35;
}
.scmap-distillery-item.selected {
  background: #f1e9d7;
  color: #b08d35;
  font-weight: 600;
}

/* Map area */
#scmap-map { 
  width: 100%; 
  height: 100%; 
  min-height: 400px;
  z-index: 1;
}
.leaflet-container { 
  font-family: inherit;
  z-index: 1 !important;
}

/* Ensure WordPress menus appear above map */
.leaflet-pane,
.leaflet-map-pane,
.leaflet-tile,
.leaflet-tile-pane {
  z-index: 1 !important;
}

.leaflet-control-container {
  z-index: 10 !important;
}

/* WordPress navigation menu fixes */
.wp-admin-bar,
#wpadminbar {
  z-index: 99999 !important;
}

.main-navigation ul.sub-menu,
.main-navigation ul.children,
.main-navigation .mega-menu,
.navigation ul.sub-menu,
.navigation ul.children,
.nav-menu .sub-menu,
.nav-menu .children,
.menu .sub-menu,
.menu .children,
.site-navigation .sub-menu,
.site-navigation .children,
.primary-navigation .sub-menu,
.primary-navigation .children,
.secondary-navigation .sub-menu,
.secondary-navigation .children {
  z-index: 9999 !important;
  position: relative;
}

/* Common dropdown menu selectors */
.dropdown-menu,
.sub-menu,
.children,
.mega-menu,
.nav-dropdown,
.menu-dropdown {
  z-index: 9999 !important;
}

/* Custom whisky glass icon */
.scmap-whisky-icon { 
  background: none !important; 
  border: none !important; 
}

.scmap-icon-img {
  width: 36px;
  height: 36px;
  display: block;
  transform-origin: bottom center;
}

.scmap-bounce .scmap-icon-img {
  animation: scmap-bounce 0.7s infinite alternate cubic-bezier(.5,1.5,.5,1);
}

@keyframes scmap-bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-16px); }
}

/* Drawer styles */
.scmap-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4,0,0.2,1);
}

.scmap-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.scmap-drawer-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

.scmap-drawer-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 20px 20px 0 0;
  height: 95vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}

.scmap-drawer.open .scmap-drawer-content {
  transform: translateY(0);
}

/* Pull indicator for mobile */
.scmap-drawer-content::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  z-index: 1000;
}

@keyframes scmap-slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes scmap-slideDown {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}
.scmap-drawer-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  color: #666;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  z-index: 1100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.scmap-drawer-close:hover {
  color: #333;
  background: rgba(255, 255, 255, 1);
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.scmap-drawer-close svg {
  width: 20px;
  height: 20px;
}
.scmap-drawer-header {
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  flex-shrink: 0;
}

.scmap-drawer-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d1d0d;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.scmap-drawer-region {
  font-size: 1rem;
  color: #b08d35;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.scmap-drawer-founded {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

.scmap-drawer-main {
  padding: 1rem 1.5rem 1.5rem 1.5rem;
  overflow-y: auto;
  flex: 1;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.scmap-drawer-desc {
  color: #4d3c1b;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  text-align: left;
}
.scmap-whiskies-header {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d1d0d;
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.scmap-whiskies-grid {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (min-width: 600px) {
  .scmap-whiskies-grid {
    -ms-grid-columns: 1fr 1fr;
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .scmap-whiskies-grid {
    -ms-grid-columns: 1fr 1fr 1fr;
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.scmap-whisky-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
}

.scmap-whisky-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #b08d35;
  transform: translateY(-2px);
}

.scmap-whisky-card-content {
  padding: 0.7rem;
  height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.scmap-whisky-img-box {
  width: 100%;
  height: 180px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid #e5e5e5;
}

.scmap-whisky-img-link {
  display: block;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}

.scmap-whisky-img {
  max-width: 150px;
  max-height: 170px;
  object-fit: contain;
  transition: transform 0.2s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  z-index: 2;
}

.scmap-whisky-card:hover .scmap-whisky-img {
  transform: scale(1.1);
}

.scmap-whisky-img-link:hover .scmap-whisky-img {
  transform: scale(1.15);
}

.scmap-whisky-img-box:hover {
  background: #ffffff;
}
.scmap-whisky-name {
  font-size: 1rem;
  font-weight: 600;
  color: #2d1d0d;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}
.scmap-whisky-content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.scmap-whisky-desc {
  color: #666;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 1rem;
  height: 5.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}
.scmap-whisky-buy {
  display: inline-block;
  width: 100%;
  padding: 0.75rem 0.5rem;
  background: #b08d35;
  color: #fff;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scmap-whisky-buy:hover {
  background: #9a7a2e;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(176, 141, 53, 0.3);
}

.scmap-drawer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  color: #b08d35;
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border: 1px solid #b08d35;
  border-radius: 4px;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  font-size: 0.85rem;
}

.scmap-drawer-link:hover {
  background: #b08d35;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(176, 141, 53, 0.3);
}

.scmap-drawer-link svg {
  width: 14px;
  height: 14px;
}

.scmap-affiliate-disclaimer {
  background: #f8f6f1;
  border: 1px solid #e6d7c0;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: #666;
  text-align: center;
  font-style: italic;
  line-height: 1.3;
}
@media (max-width: 900px) {
  #scmap-container, .scmap-flex { flex-direction: column; height: auto; }
  #scmap-container { height: auto; min-height: 450px; }
  .scmap-sidebar { width: 100%; border-right: none; border-bottom: 1px solid #e0e0e0; }
  .scmap-maparea { min-height: 280px; }
  
  /* Hide distillery list on mobile, keep search/region controls */
  #scmap-distillery-list-container {
    display: none;
  }
  
  /* Reduce sidebar padding since no list is shown */
  .scmap-sidebar {
    padding: 0.5rem 0.7rem;
  }
  
  /* Show results counter on mobile */
  .scmap-results-counter {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
    text-align: center;
    font-style: italic;
  }
}

@media (max-width: 600px) {
  #scmap-container { height: auto; min-height: 350px; }
  .scmap-sidebar { padding: 0.5rem; }
  .scmap-maparea { min-height: 200px; }
  
  .scmap-drawer-content {
    max-height: 90vh;
    min-height: 60vh;
  }
  
  .scmap-drawer-header {
    padding: 1.5rem 1rem 1rem 1rem;
  }
  
  .scmap-drawer-main {
    padding: 1rem;
  }
  
  .scmap-whiskies-grid {
    grid-template-columns: 1fr;
  }
  
  .scmap-drawer-title {
    font-size: 1.3rem;
  }
}

/* Zoom Instructions */
.scmap-zoom-instructions {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  z-index: 1000;
  pointer-events: none;
  opacity: 1;
  transition: opacity 2s ease-in-out;
}

.scmap-zoom-instructions:before {
  content: '⌨️ ';
  margin-right: 4px;
}

/* Results counter - hidden by default, shown on mobile */
.scmap-results-counter {
  display: none;
}

/* Custom Whisky-Themed Zoom Controls */
.scmap-custom-zoom-controls {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scmap-zoom-btn {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #b08d35;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.scmap-zoom-btn:hover {
  background: #b08d35;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(176, 141, 53, 0.3);
}

.scmap-zoom-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(176, 141, 53, 0.4);
}

.scmap-zoom-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.scmap-zoom-label {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.scmap-zoom-in:hover .scmap-zoom-label,
.scmap-zoom-out:hover .scmap-zoom-label {
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Whisky glass animations */
.scmap-zoom-btn:hover {
  animation: whiskyGlow 0.3s ease-in-out;
}

@keyframes whiskyGlow {
  0% { 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); 
  }
  50% { 
    box-shadow: 0 4px 16px rgba(176, 141, 53, 0.4), 0 0 0 2px rgba(176, 141, 53, 0.2); 
  }
  100% { 
    box-shadow: 0 4px 12px rgba(176, 141, 53, 0.3); 
  }
}

/* Home button special styling */
.scmap-zoom-home {
  border-color: #2c5aa0;
  margin-top: 4px;
}

.scmap-zoom-home:hover {
  background: #2c5aa0;
  border-color: #2c5aa0;
  box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

.scmap-zoom-home:hover {
  animation: scotlandGlow 0.3s ease-in-out;
}

@keyframes scotlandGlow {
  0% { 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); 
  }
  50% { 
    box-shadow: 0 4px 16px rgba(44, 90, 160, 0.4), 0 0 0 2px rgba(44, 90, 160, 0.2); 
  }
  100% { 
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3); 
  }
}

/* Mobile adjustments for zoom controls */
@media (max-width: 600px) {
  .scmap-custom-zoom-controls {
    top: 5px;
    left: 5px;
  }
  
  .scmap-zoom-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  
  .scmap-zoom-label {
    font-size: 12px;
    bottom: 1px;
    right: 2px;
  }
}
