body {
  background-color: #fef6f8;
}
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes compass-rotate {
  0% {
    transform: rotate(-20deg);
  }
  50% {
    transform: rotate(20deg);
  }
  100% {
    transform: rotate(-20deg);
  }
}
.compass-animation {
  animation: compass-rotate 3s ease-in-out infinite;
  transform-origin: center;
}

/* Hide scrollbar for the carousel */
.hide-scrollbar {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}
.hide-scrollbar::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

/* Smooth scroll behavior */
.beer-scroll-container {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 0;
  margin: 0;
}

/* Carousel navigation buttons */
.carousel-nav {
  opacity: 0;
  transform: translateY(-50%) scale(0.9);
  transition: all 0.2s ease-in-out;
}

.carousel-nav[style*="not-allowed"] {
  opacity: 0.3 !important;
}

#beer-carousel {
  padding: 0 3rem;
}

#beer-carousel:hover .carousel-nav:not([style*="not-allowed"]) {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.beer-card {
  margin: 20px 0px;
  scroll-snap-align: start;
  margin-right: 1.5rem;
}

.beer-card:last-child {
  margin-right: 0;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
  .beer-card {
    text-align: center;
    width: 100% !important; /* Show 2.5 cards */
    margin-right: 0.75rem;
  }

  .beer-card img {
    object-fit: cover;
  }

  .beer-card .p-4 {
    padding: 0.75rem !important;
  }

  .beer-card h3 {
    /* Brand */
    font-size: 0.875rem !important; /* Tailwind sm */
    line-height: 1.25rem !important;
    margin-bottom: 0.125rem !important;
  }
  .beer-card p.text-sm {
    /* Name */
    font-size: 0.75rem !important; /* Tailwind xs */
    line-height: 1rem !important;
    margin-bottom: 0.125rem !important;
  }
  .beer-card .text-xs {
    /* Location text & icon container */
    font-size: 0.65rem !important; /* smaller than xs */
    line-height: 0.875rem !important;
    margin-top: 0.125rem !important;
  }
  .beer-card .text-xs i.fas {
    /* Location icon specifically */
    width: 0.65rem !important;
    height: 0.65rem !important;
    margin-right: 0.25rem !important;
  }
  .beer-card button {
    /* Details button */
    padding: 0.25rem 0.75rem !important; /* py-1 px-3 */
    font-size: 0.75rem !important; /* Tailwind xs */
    margin-top: 0.125rem !important; /* Align with first line of text (approx) */
    flex-shrink: 0 !important; /* Prevent button from shrinking */
  }
  .beer-card .p-4 > .flex {
    display: block;
    /* Container of text block and button */
    align-items: flex-start !important; /* Align items to the top */
  }
  .beer-card .p-4 > .flex > div:first-child {
    /* The text block */
    flex-grow: 1 !important;
    min-width: 0 !important; /* Allow text block to shrink if needed, works with truncate/wrap */
  }

  #beer-carousel {
    padding: 0 1rem;
  }

  .carousel-nav {
    padding: 0.5rem;
  }

  .carousel-nav svg {
    width: 1rem;
    height: 1rem;
  }
}

.pulse-once {
  animation: pulse 0.5s ease-in-out;
}
.venue-card.selected {
  border-color: #ffab0f !important;
  box-shadow: 0 0 0 2px #ffab0f;
}
.venue-card.selected .directions-link {
  color: white !important;
  font-weight: 600;
}
.venue-card {
  transition: all 0.2s ease-in-out;
}
.venue-card.selected .beer-tag {
  background-color: #ffab0f;
  color: white;
}
.venue-card.selected .wine-tag {
  background-color: #e11d48;
  color: white;
}
.venue-card.selected .spirit-tag {
  background-color: #2563eb;
  color: white;
}
.venue-card.selected .mocktail-tag {
  background-color: #ec4899;
  color: white;
}
/* Style Google Maps info window */
.gm-style .gm-style-iw-c {
  border-radius: 8px !important;
}
.gm-style .gm-style-iw-c:focus,
.gm-style .gm-style-iw-c:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 2px #ffab0f !important;
}
.gm-style .gm-style-iw-tc::after {
  background: white !important;
}
/* Hide Google Maps attribution */
.gm-style-cc,
      .gm-style a[href^="http://maps.google.com/maps"],
      .gm-style a[href^="https://maps.google.com/maps"],
      .gm-style a[target="_blank"] {
  display: none !important;
}
/* Add hover styles for desktop */
@media (min-width: 1024px) {
  .venue-card {
    cursor: pointer;
  }
  .venue-card:hover:not(.selected) {
    border-color: #ffab0f !important;
    box-shadow: 0 0 0 1px #ffab0f;
  }
}
@media (max-width: 1023px) {
  .mobile-panel {
    display: none;
  }
  #beer-locations-list:last-child {
    margin-bottom: 300px;
  }
  #map {
    height: calc(100vh - 86px);
  }
  .lg\:w-1\/3 {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto !important;
    max-height: calc(100vh - 86px) !important;
    min-height: calc(85vh - 86px) !important;
    background: white;
    z-index: 40;
    touch-action: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .mobile-panel.lg\:w-1\/3 {
    top: 100px !important;
  }

  /* When no results, use relative positioning */
  .no-results .lg\:w-1\/3 {
    position: relative !important;
    height: auto !important;
    max-height: none !important;
    transform: none !important;
    order: 2 !important;
  }

  /* When no results, adjust map height and order */
  .no-results #map {
    position: relative !important;
    height: 250px !important;
    order: 1 !important;
  }

  /* Move mobile search into list box when no results */
  .no-results .md\:hidden.fixed.top-\[56px\] {
    position: relative !important;
    top: 0 !important;
  }

  .no-results .mobile-search-target {
    position: relative;
  }

  .no-results .mobile-search-target > .md\:hidden.fixed.top-\[56px\] > div > div {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  }

  .no-results .mobile-search-target > .md\:hidden.fixed.top-\[56px\] {
    margin: 0 !important;
  }

  /* Hide filter elements and drag handle when no results */
  .no-results #dragHandle,
  .no-results #beerDropdownBtn,
  .no-results #mobileFiltersBtn,
  .no-results #mobileSortDropdown,
  .no-results .filter-btn,
  .no-results .sort-option,
  .no-results .hidden.lg\:flex {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  /* Remove margins from containers when elements are hidden - only in list box */
  .no-results .lg\:w-1\/3 .mb-3,
  .no-results .lg\:w-1\/3 .gap-2 {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Ensure flex column layout in no-results state */
  .no-results .flex-col {
    display: flex !important;
    flex-direction: column !important;
  }
}

#dragHandle {
  position: sticky;
  top: 0;
  z-index: 41;
  background: white;
  padding: 8px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.map-container {
  height: 100vh;
  width: 100%;
}

/* Compact View Styles */
/* Apply compact padding only to non-selected cards in compact mode */
#beer-locations-list.compact-mode .venue-card:not(.selected) {
  margin-bottom: 0.5rem !important; /* space-y-2 adjustment */
}
/* Hide details on non-selected cards in compact mode */
#beer-locations-list.compact-mode .venue-card:not(.selected) .compact-hide {
  display: none;
}
/* Show compact tags only on non-selected cards in compact mode */
#beer-locations-list.compact-mode .venue-card:not(.selected) .compact-show {
  display: flex;
}
/* Ensure compact tags are hidden by default or when selected */
#beer-locations-list:not(.compact-mode) .compact-show,
#beer-locations-list.compact-mode .venue-card.selected .compact-show {
  display: none;
}

/* 
  Styles for the dynamically injected mobile search bar container to be WHITE.
  Only target the fixed positioned mobile search, not hero section searches.
*/
#mobileMainAdSearch {
  background-color: white !important;
  border-radius: 9999px !important; /* rounded-full */
  padding: 0.2rem 1rem !important; /* Vertical padding on container for alignment */
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1) !important; /* shadow-lg */
  display: flex !important;
  align-items: center !important;
}

/* Overriding the text color for the input field since the background is now white */
#mobileMainAdSearch {
  font-weight: 400;
  color: #1f2937 !important; /* text-gray-800 */
  padding: 1rem 10px !important; /* Increased vertical padding to make bar taller (py-4) */
  border: none !important;
  flex-grow: 1;
  outline: none !important;
  box-shadow: none !important;
}
#mobileMainAdSearch::placeholder {
  color: #6b7280 !important; /* text-gray-500 */
}

/* Style icons inside the container to be dark */
.md\:hidden.fixed > div:has(#mobileMainAdSearch) i {
  color: #9ca3af !important; /* text-gray-400 */
}
.md\:hidden.fixed > div:has(#mobileMainAdSearch) button:hover i {
  color: #ffab0f !important;
}

.is-react-native-app .hide-app {
  display: none;
}

.is-react-native-app #hero-section {
  height: 100vh;
  padding-top: 0;
  padding-bottom: 20vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

@media (max-width: 1023px) {
  .panel-collapsed {
    transform: translateY(calc(100% - 100px)); /* Adjust 100px to handle height */
  }
}

/* --- New Styles for Explore Directories Section --- */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  width: 100%;
}

.category-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
}

.category-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.category-card:hover::before {
  opacity: 1;
}

.category-card .icon-container {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.category-card:hover .icon-container {
  transform: scale(1.1);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.category-card .icon-container.beer {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  border: 2px solid #fbbf24;
}

.category-card:hover .icon-container.beer {
  border-color: #f59e0b;
  box-shadow: 0 12px 24px rgba(251, 191, 36, 0.4);
}

.category-card .icon-container.wine {
  background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
  color: white;
  border: 2px solid #ec4899;
}

.category-card:hover .icon-container.wine {
  border-color: #be185d;
  box-shadow: 0 12px 24px rgba(236, 72, 153, 0.4);
}

.category-card .icon-container.spirits {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border: 2px solid #3b82f6;
}

.category-card:hover .icon-container.spirits {
  border-color: #1d4ed8;
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.4);
}

.category-card .icon-container.mocktails {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  border: 2px solid #8b5cf6;
}

.category-card:hover .icon-container.mocktails {
  border-color: #7c3aed;
  box-shadow: 0 12px 24px rgba(139, 92, 246, 0.4);
}

.category-card .category-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: 0.025em;
  transition: all 0.3s ease;
}

.category-card .beer-title {
  color: #92400e;
}

.category-card:hover .beer-title {
  color: #f59e0b;
}

.category-card .wine-title {
  color: #9f1239;
}

.category-card:hover .wine-title {
  color: #ec4899;
}

.category-card .spirits-title {
  color: #1e40af;
}

.category-card:hover .spirits-title {
  color: #3b82f6;
}

.category-card .mocktails-title {
  color: #6b21a8;
}

.category-card:hover .mocktails-title {
  color: #8b5cf6;
}

@media (max-width: 768px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .category-card {
    padding: 1.5rem 1rem;
    border-radius: 16px;
  }

  .category-card .icon-container {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    border-radius: 16px;
  }

  .category-card .category-title {
    font-size: 1rem;
    line-height: 1.25rem;
  }
}

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .category-card {
    padding: 1.25rem 0.75rem;
  }

  .category-card .icon-container {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .category-card .category-title {
    font-size: 0.875rem;
  }
}

/* Crown shimmer animation */
@keyframes crownShimmer {
  0% {
    color: #9ca3af; /* gray-400 */
    text-shadow: none;
    transform: scale(1);
  }
  25% {
    color: #f59e0b; /* amber-500 gold */
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
    transform: scale(1.2);
  }
  75% {
    color: #f59e0b; /* amber-500 gold */
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.8);
    transform: scale(1.2);
  }
  100% {
    color: #9ca3af; /* gray-400 */
    text-shadow: none;
    transform: scale(1);
  }
}

.crown-shimmer {
  animation: crownShimmer 2.5s ease-in-out;
}

/* Desktop hero section vertical centering */
@media (min-width: 768px) {
  #hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  #hero-section .relative.z-30 {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #hero-section .max-w-5xl {
    width: 100%;
  }
}

/* Desktop nav expansion after search */
@media (min-width: 1024px) {
  nav .max-w-7xl.mx-auto {
    transition: max-width 1s ease;
  }
  body.expand-nav nav .max-w-7xl.mx-auto {
    max-width: 100% !important;
  }
}

/* Mobile hero section vertical centering */
@media (max-width: 767px) {
  #hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  #hero-section .relative.z-30 {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #hero-section .max-w-5xl {
    width: 100%;
    padding: 0 1rem;
  }

  #hero-section .max-w-2xl.mx-auto {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    padding: 0;
  }

  #hero-section .md\:hidden.space-y-3 {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  #hero-section .bg-white.rounded-2xl {
    width: 100%;
    max-width: 100%;
  }

  #hero-section #mobileFindBeer {
    width: 100%;
    max-width: 100%;
    margin-top: 0px;
  }
}
