/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a7a4c;
  --primary-dark: #145e3a;
  --primary-light: #e8f5ee;
  --secondary: #f5a623;
  --secondary-dark: #d4891a;
  --text: #2d3436;
  --text-light: #636e72;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --border: #e0e0e0;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --transition: 0.3s ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.logo span {
  color: var(--secondary);
}

/* Nav */
.main-nav ul {
  display: flex;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--text);
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 2px;
}

/* Search bar in header */
.header-search {
  position: relative;
}

.header-search input {
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  font-size: 0.9rem;
  width: 220px;
  transition: border-color var(--transition), width var(--transition);
  outline: none;
  font-family: inherit;
}

.header-search input:focus {
  border-color: var(--primary);
  width: 280px;
}

.header-search .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 0.9rem;
  pointer-events: none;
}

/* Search results dropdown */
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 100;
}

.search-results.active {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  cursor: pointer;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--primary-light);
}

.search-result-item img {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.search-result-info h4 {
  font-size: 0.9rem;
  margin-bottom: 0.1rem;
}

.search-result-info small {
  color: var(--text-light);
  font-size: 0.8rem;
}

.search-no-results {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-light);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #2ecc71 50%, var(--secondary) 100%);
  color: white;
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.95;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.hero-search {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.hero-search input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3rem;
  border: none;
  border-radius: 50px;
  font-size: 1.05rem;
  box-shadow: var(--shadow-lg);
  outline: none;
  font-family: inherit;
}

.hero-search .search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1.1rem;
}

/* ===== SECTION COMMON ===== */
.section {
  padding: 4rem 1.5rem;
}

.section--alt {
  background: var(--bg-alt);
}

.section-header {
  max-width: var(--max-width);
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== CARDS GRID ===== */
.cards-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.card-body {
  padding: 1.25rem;
}

.card-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.card-location {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.card-body p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.card-distance {
  font-size: 0.8rem;
  color: var(--text-light);
}

.card-price {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

/* ===== CATEGORY CARDS (Home) ===== */
.categories-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.category-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.category-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.category-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.4;
}

/* ===== LOCAL DETAIL PAGE ===== */
.local-hero {
  position: relative;
  height: 400px;
  overflow: hidden;
}

.local-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.local-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 1.5rem 2rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
}

.local-hero-overlay h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.local-hero-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  opacity: 0.9;
  flex-wrap: wrap;
}

.local-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.local-info-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.local-description h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.local-description p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-light);
}

.local-sidebar {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 90px;
}

.local-sidebar h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.info-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.info-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.info-item strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.15rem;
}

.info-item span {
  font-size: 0.95rem;
  color: var(--text);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ===== GALLERIES ===== */
.gallery-section {
  margin-bottom: 3rem;
}

.gallery-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text);
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--primary);
  display: inline-block;
}

/* ===== SLIDESHOW ===== */
.slideshow {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.slideshow-main {
  position: relative;
  display: flex;
  align-items: center;
}

.slideshow-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
  background: #111;
}

.slideshow-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.slideshow-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: white;
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 500;
}

.slideshow-counter {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 1rem;
  backdrop-filter: blur(4px);
}

.slideshow-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  backdrop-filter: blur(4px);
}

.slideshow-arrow:hover {
  background: rgba(0,0,0,0.7);
}

.slideshow-prev {
  left: 0.75rem;
}

.slideshow-next {
  right: 0.75rem;
}

.slideshow-thumbs {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
  background: var(--card-bg);
}

.slideshow-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

.slideshow-thumb.active {
  opacity: 1;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}

.slideshow-thumb:hover {
  opacity: 0.85;
}

.slideshow-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Old grid classes kept for backward compat */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 3 / 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 0.75rem 0.75rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  font-size: 0.85rem;
  line-height: 1.3;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
}

.lightbox-caption {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 1rem;
  text-align: center;
  max-width: 600px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox-prev {
  left: 1.5rem;
}

.lightbox-next {
  right: 1.5rem;
}

/* ===== SIMILAR SECTION ===== */
.similar-section {
  background: var(--bg-alt);
  padding: 3rem 1.5rem;
}

.similar-section h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

/* ===== CATEGORY LISTING ===== */
.category-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #2ecc71 100%);
  color: white;
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.category-hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.category-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

.listing-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.listing-count {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--text-light);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  margin: 0 0.5rem;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #1a1a2e;
  color: #ccc;
  padding: 3rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-about h3,
.footer-links h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.footer-about p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #999;
}

.footer-links ul li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #999;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
  color: #666;
}

/* ===== LOADING ===== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: opacity var(--transition), transform var(--transition);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  z-index: 500;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--primary-dark);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .local-info-grid {
    grid-template-columns: 1fr;
  }

  .local-sidebar {
    position: static;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .header-search {
    display: none;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 1rem;
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav a {
    padding: 0.75rem 1rem;
  }

  .menu-toggle {
    display: block;
  }

  .local-hero {
    height: 280px;
  }

  .local-hero-overlay h1 {
    font-size: 1.8rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .section-header h2 {
    font-size: 1.6rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lightbox-nav {
    padding: 0.5rem 0.75rem;
    font-size: 1.5rem;
  }

  .slideshow-thumb {
    width: 64px;
    height: 44px;
  }

  .slideshow-arrow {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  .slideshow-caption {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 3rem 1rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .category-hero h1 {
    font-size: 1.6rem;
  }
}
