/**
 * Location Landing Page Styles
 * Destination detail page: full-width grid layout with TAG filter
 */

/* ========== Layout ========== */
.bc-location-landing {
  background: #f8f9fa;
}

.bc-location-landing .bc-location-hero {
  position: relative;
  margin-bottom: 0;
  min-height: 220px;
  overflow: hidden;
}

.bc-location-landing .bc-location-hero .hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  padding: 0;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(transparent 25%, rgba(0, 0, 0, 0.6) 100%);
  color: #fff;
}

.bc-location-landing .bc-location-hero .hero-overlay .container {
  padding-bottom: 28px;
}

.bc-location-landing .bc-location-hero .hero-overlay h1 {
  font-size: 34px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  letter-spacing: 0.01em;
}

.bc-location-landing .bc-location-hero .hero-overlay .hero-subtitle {
  font-size: 15px;
  opacity: 0.9;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ========== TAG Filter Bar ========== */
.bc-location-tag-filter {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.bc-location-tag-filter .tag-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0;
  margin: 0;
  list-style: none;
}

.bc-location-tag-filter .tag-list::-webkit-scrollbar {
  display: none;
}

.bc-location-tag-filter .tag-item {
  flex-shrink: 0;
}

.bc-location-tag-filter .tag-item a {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  background: #f0f0f0;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}

.bc-location-tag-filter .tag-item a:hover {
  background: #e8e8e8;
  color: #333;
}

.bc-location-tag-filter .tag-item a.active {
  background: #b50000;
  color: #fff;
  border-color: #b50000;
}

/* ========== Product Sections ========== */
.bc-location-section {
  padding: 40px 0 16px;
}

.bc-location-section + .bc-location-section {
  border-top: 1px solid #e9ecef;
}

.bc-location-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.bc-location-section .section-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  margin: 0;
}

.bc-location-section .section-header .view-all {
  display: inline-block;
  padding: 6px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #b50000;
  background: transparent;
  border: 1.5px solid #b50000;
  border-radius: 50px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.bc-location-section .section-header .view-all:hover {
  background: #b50000;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(181, 0, 0, 0.25);
}

.bc-location-section .product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.bc-location-section .product-grid .product-grid-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ========== Card overrides for Location page ========== */
.bc-location-landing .bc-hp-card .bc-card-duration,
.bc-location-landing .bc-hp-card .bc-card-category-tag {
  display: none !important;
}

/* Normalize card title height — reserve 2 lines for consistent alignment */
.bc-location-landing .bc-hp-card .item-title {
  min-height: 40px; /* 13px font × 1.4 line-height × 2 lines ≈ 36px, rounded up */
}

/* ========== Load More ========== */
.load-more-wrap {
  text-align: center;
  padding: 28px 0 12px;
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 36px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  background: #fff;
  border: 1.5px solid #d0d0d0;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
  line-height: 1.4;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.btn-load-more .load-more-icon {
  font-size: 13px;
  transition: transform 0.25s ease;
}

.btn-load-more:hover {
  color: #b50000;
  border-color: #b50000;
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(181, 0, 0, 0.12);
}

.btn-load-more:hover .load-more-icon {
  transform: translateY(2px);
}

.btn-load-more:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-load-more:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-load-more.is-loading {
  pointer-events: none;
  color: #999;
  border-color: #d0d0d0;
}

.btn-load-more.is-loading .load-more-icon {
  display: none;
}

.btn-load-more.is-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  border: 2px solid #999;
  border-top-color: transparent;
  border-radius: 50%;
  animation: loadMoreSpin 0.6s linear infinite;
  vertical-align: middle;
}

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

.btn-load-more .remaining-count {
  font-weight: 400;
  color: #999;
  font-size: 13px;
}

/* ========== Content Section (Description + Map) ========== */
.bc-location-content-section {
  background: #fff;
  padding: 24px 0;
}

.bc-location-content-section .location-desc h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #222;
}

.bc-location-content-section .location-desc {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
}

/* ========== Trip Ideas (compact) ========== */
.bc-location-landing .section-trip-idea {
  padding: 24px 0;
  background: #fff;
  margin-top: 16px;
}

/* ========== Subscribe (compact) ========== */
.bc-location-landing .section-subscribe {
  padding: 24px 0 32px;
}

/* ========== Responsive: Tablet ========== */
@media (max-width: 991px) {
  .bc-location-section .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .bc-location-landing .bc-location-hero .hero-overlay h1 {
    font-size: 26px;
    color: #ffffff !important;
  }
}

/* ========== Responsive: Mobile ========== */
@media (max-width: 767px) {
  /* Hero */
  .bc-location-landing .bc-location-hero .hero-overlay h1 {
    font-size: 20px;
    color: #ffffff !important;
  }
  .bc-location-landing .bc-location-hero .hero-overlay .hero-subtitle {
    font-size: 13px;
    color: #ffffff !important;
  }
  .bc-location-landing .bc-location-hero .hero-overlay {
    padding: 16px 0 12px;
  }
  .bc-location-landing .bc-location-hero img {
    max-height: 200px !important;
  }

  /* TAG filter — larger tap targets, clearer visual */
  .bc-location-tag-filter {
    padding: 10px 0;
  }
  .bc-location-tag-filter .tag-list {
    gap: 8px;
    padding: 0 15px;
  }
  .bc-location-tag-filter .tag-item a {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 24px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
  }

  /* About section */
  .bc-location-content-section {
    padding: 16px 0;
  }
  .bc-location-content-section .location-desc h2 {
    font-size: 17px;
    margin-bottom: 8px;
  }
  .bc-location-content-section .location-desc {
    font-size: 13px;
    line-height: 1.6;
  }

  /* Section spacing */
  .bc-location-section {
    padding: 20px 0 12px;
  }

  /* Section header: title left, link right */
  .bc-location-section .section-header {
    margin-bottom: 12px;
    align-items: baseline;
  }
  .bc-location-section .section-header h2 {
    font-size: 16px;
    flex: 1;
    min-width: 0;
  }
  .bc-location-section .section-header .view-all {
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    color: #b50000;
    background: transparent;
    border: none;
    border-radius: 0;
    flex-shrink: 0;
  }
  .bc-location-section .section-header .view-all:hover {
    background: transparent;
    color: #900;
    box-shadow: none;
    transform: none;
  }

  /* Load more */
  .load-more-wrap {
    padding: 16px 0 4px;
  }
  .btn-load-more {
    padding: 10px 28px;
    font-size: 13px;
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  /* Product grid → horizontal scroll carousel */
  .bc-location-section .product-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    gap: 12px;
    padding-bottom: 4px;
  }
  .bc-location-section .product-grid::-webkit-scrollbar {
    display: none;
  }
  .bc-location-section .product-grid .product-grid-item {
    flex: 0 0 75%;
    max-width: 75%;
    scroll-snap-align: start;
  }

  /* Fix card inner elements to fill width */
  .bc-location-section .product-grid .product-grid-item .services-item,
  .bc-location-section .product-grid .product-grid-item .item {
    width: 100%;
  }
}
