/* ==========================================================================
   Landing Page — Quick Actions, Featured Carousel & Geo Banner
   ========================================================================== */

/* --- Quick Search Redirect --- */
.quick-search-form .form-control {
  border-radius: 0.5rem 0 0 0.5rem;
  font-size: 1.05rem;
  padding: 0.6rem 1rem;
  border: 2px solid var(--md-border);
  transition: border-color 0.2s ease;
}

/* --- Swap landing note (shared visual style without importing about.css) --- */
.landing-bottom-note {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 680px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.875rem;
  line-height: 1.45;
  white-space: normal;
  background: rgba(33, 29, 25, 0.12);
  color: var(--earthy-text-muted, #6f655d);
}

[data-theme="dark"] .landing-bottom-note {
  background: rgba(255, 255, 255, 0.09);
  color: #d1c4b8;
}
.quick-search-form .form-control:focus {
  border-color: var(--earthy-primary);
  box-shadow: 0 0 0 0.15rem rgba(138, 120, 105, 0.2);
}
.quick-search-form .btn {
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.6rem 1.25rem;
  font-size: 1.05rem;
}

.quick-search-input {
  background-color: var(--md-surface);
  color: var(--md-on-surface);
}

.quick-search-submit {
  background-color: var(--earthy-primary);
}

.quick-search-submit:hover,
.quick-search-submit:focus {
  background-color: var(--earthy-primary-hover);
}

/* --- Quick Action Buttons --- */
.quick-actions {
  padding: 0.25rem 0;
}
.quick-action-btn {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1.2rem;
  border-radius: 2rem;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
  background: var(--md-surface);
  color: var(--md-on-surface) !important;
  border: 1px solid var(--md-border);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.quick-action-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  background: var(--md-background-solid);
  border-color: var(--earthy-primary);
  color: var(--earthy-primary) !important;
}

[data-theme="dark"] .quick-action-btn {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .quick-action-btn:hover {
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Subtle color hints for icons inside buttons */
.quick-action-btn .fa-car,
.quick-action-btn .fa-motorcycle,
.quick-action-btn .fa-exchange-alt,
.quick-action-btn .fa-bullhorn,
.quick-action-btn .fa-sliders-h {
  color: var(--earthy-primary);
}

.quick-action-btn:hover i {
  color: inherit;
}

.quick-search-group .btn-primary {
  background-color: var(--earthy-primary) !important;
  color: #fff;
}

.quick-search-group .btn-primary:hover {
  background-color: var(--earthy-primary-hover) !important;
}

/* --- Geo Banner --- */


#btn-use-my-location {
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
}

.landing-geo-text {
  color: var(--earthy-text-muted);
}

.landing-geo-icon {
  color: var(--earthy-primary);
}

.landing-geo-btn {
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid var(--earthy-primary);
}

.landing-geo-btn--primary {
  background: var(--earthy-primary);
  color: #fff;
}

.landing-geo-btn--primary:hover,
.landing-geo-btn--primary:focus {
  background: var(--earthy-primary-hover);
  border-color: var(--earthy-primary-hover);
  color: #fff;
}

.landing-geo-btn--secondary {
  background: transparent;
  color: var(--earthy-primary);
}

.landing-geo-btn--secondary:hover,
.landing-geo-btn--secondary:focus {
  background: var(--earthy-primary);
  border-color: var(--earthy-primary);
  color: #fff;
}

/* --- Featured Carousel --- */
.featured-carousel-wrapper {
  position: relative;
  padding: 0 44px; /* space for nav buttons */
}

.featured-carousel {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 1rem;
  padding: 0.5rem 0 1rem;
  cursor: grab;
  user-select: none;
  /* Firefox scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--md-border) var(--md-surface);
}

/* Webkit scrollbar — visible but subtle */
.featured-carousel::-webkit-scrollbar {
  height: 6px;
}
.featured-carousel::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}
.featured-carousel::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-radius: 3px;
}
.featured-carousel::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Dragging state */
.featured-carousel.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}
.featured-carousel.is-dragging a {
  pointer-events: none; /* prevent link clicks while dragging */
}

.featured-carousel-item {
  flex: 0 0 280px;
  min-width: 280px;
  scroll-snap-align: start;
}

/* ---- Override card component Bootstrap grid classes inside carousel ---- */
.featured-carousel-item > [class*="col-"],
.featured-carousel-item .col-12,
.featured-carousel-item .col-md-6,
.featured-carousel-item .col-xl-4,
.featured-carousel-item .col-xxl-3 {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-bottom: 0 !important;
}

/* ---- Equal-height cards in carousel ---- */
.featured-carousel {
  align-items: stretch;
}
.featured-carousel-item {
  display: flex;
  flex-direction: column;
}
/* The col-* wrapper from _listing_card.html / _wanted_card.html */
.featured-carousel-item > [class*="col-"] {
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
}
/* The <a> link wrapper must also stretch */
.featured-carousel-item .card-link-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.featured-carousel-item .card {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.featured-carousel-item .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Hover lift effect */
.featured-carousel-item .card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.featured-carousel-item .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* --- Carousel Navigation Buttons --- */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--md-border);
  background: var(--md-surface);
  color: var(--md-on-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
  padding: 0;
  font-size: 1rem;
}

.carousel-nav-btn:hover:not(:disabled) {
  background: var(--md-background);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  color: var(--earthy-primary);
}

.carousel-nav-btn:disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

.carousel-prev {
  left: 0;
}

.carousel-next {
  right: 0;
}

/* --- Feature Icons --- */
.feature-icon {
  width: 64px;
  height: 64px;
}

/* --- Stats Section --- */
.stat-item h2 {
  font-weight: 800;
}

/* --- View-all buttons in carousel sections --- */
.landing-view-all-btn {
  border-radius: 999px;
  border: 1px solid var(--earthy-primary);
  color: var(--earthy-primary);
  background: transparent;
  font-weight: 650;
  padding-inline: 1rem;
}

.landing-view-all-btn:hover,
.landing-view-all-btn:focus {
  background: var(--earthy-primary);
  border-color: var(--earthy-primary);
  color: #fff;
}

/* --- Section backgrounds to match About-style visual rhythm --- */
/* .landing-section--hero {
  background: #efefef;
} */

.landing-section--geo {
  background: var(--earthy-surface-2);
}

.landing-section--featured-listings {
  background: var(--earthy-surface-1);
}

.landing-section--featured-wanted {
  background: #efe8de;
}

.landing-section--cta {
  border-top: 1px solid rgba(42, 37, 32, 0.08);
}

.landing-section-icon {
  color: var(--earthy-primary);
}

/* --- Minimalist stats section (earthy) --- */
.landing-stats-section {
  background: var(--earthy-surface-3);
  color: var(--earthy-text);
}

.landing-section-title {
  font-size: clamp(1.95rem, 4.2vw, 3rem);
  font-weight: 760;
  letter-spacing: -0.02em;
}

.landing-section-subtitle {
  color: var(--earthy-text-muted);
  font-size: 0.95rem;
}

.landing-stat-item {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.landing-stat-circle {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: var(--earthy-primary);
  color: #e9e0d6;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 760;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.landing-stat-title {
  font-size: clamp(1.7rem, 3.2vw, 2rem);
  line-height: 1.08;
  font-weight: 450;
  letter-spacing: -0.01em;
  color: #18181d;
  margin-bottom: 0.8rem;
}

.landing-stat-detail {
  color: var(--earthy-text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* --- CTA section aligned with About buttons --- */
.landing-cta-section {
  background: var(--earthy-surface-1);
}

.landing-cta-title {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 760;
  letter-spacing: -0.02em;
  color: #17181d;
}

.landing-cta-lead {
  color: #2f3037;
  font-size: 1.05rem;
  max-width: 640px;
  margin-inline: auto;
}

.landing-pill-btn {
  border-radius: 999px;
  border: 1px solid transparent;
  min-width: 210px;
  font-weight: 700;
  padding: 0.78rem 1.8rem;
}

.landing-pill-btn.btn-outline-success {
  background: transparent;
  color: var(--earthy-cta-green);
  border-color: var(--earthy-cta-green);
}

.landing-pill-btn.btn-outline-success:hover,
.landing-pill-btn.btn-outline-success:focus {
  background: var(--earthy-cta-green);
  color: #fff;
  border-color: var(--earthy-cta-green);
}

.landing-pill-btn--primary {
  background: var(--earthy-primary-soft);
  color: #17181d;
}

.landing-pill-btn--primary:hover,
.landing-pill-btn--primary:focus {
  background: var(--earthy-primary-soft-hover);
  color: #17181d;
}

.landing-pill-btn--secondary {
  background: var(--earthy-secondary);
  color: #fff;
}

.landing-pill-btn--secondary:hover,
.landing-pill-btn--secondary:focus {
  background: var(--earthy-primary);
  color: #fff;
}

/* [data-theme="dark"] .landing-section--hero {
  background: #191a1f;
} */

[data-theme="dark"] .landing-section--geo {
  background: #222026;
}

[data-theme="dark"] .landing-section--featured-listings {
  background: #1c1b20;
}

[data-theme="dark"] .landing-section--featured-wanted {
  background: #212024;
}



[data-theme="dark"] .landing-geo-text {
  color: #d0c5ba;
}

[data-theme="dark"] .landing-geo-icon {
  color: #b8a99b;
}

[data-theme="dark"] .landing-geo-btn--secondary {
  color: #d0c5ba;
  border-color: var(--earthy-primary);
}

[data-theme="dark"] .landing-geo-btn--secondary:hover,
[data-theme="dark"] .landing-geo-btn--secondary:focus {
  background: var(--earthy-primary);
  color: #fff;
}

[data-theme="dark"] .landing-view-all-btn {
  border-color: #b8a99b;
  color: #d8cec3;
}

[data-theme="dark"] .landing-view-all-btn:hover,
[data-theme="dark"] .landing-view-all-btn:focus {
  border-color: #b8a99b;
  background: var(--earthy-primary);
  color: #fff;
}

[data-theme="dark"] .landing-section-icon {
  color: #b8a99b;
}

[data-theme="dark"] .landing-stats-section {
  background: #2c2621;
  color: #efe8df;
}

[data-theme="dark"] .landing-section-subtitle,
[data-theme="dark"] .landing-stat-detail {
  color: #cabfb4;
}

[data-theme="dark"] .landing-stat-circle {
  background: #6f6053;
  color: #f1e9de;
}

[data-theme="dark"] .landing-stat-title {
  color: #f1e9de;
}

/* [data-theme="dark"] .landing-cta-section {
  background: #202025;
} */

[data-theme="dark"] .landing-cta-title {
  color: #f3ece2;
}

[data-theme="dark"] .landing-cta-lead {
  color: #cbc3b8;
}

[data-theme="dark"] .landing-pill-btn--primary {
  background: var(--earthy-primary);
  color: #fff;
}

[data-theme="dark"] .landing-pill-btn--primary:hover,
[data-theme="dark"] .landing-pill-btn--primary:focus {
  background: var(--earthy-primary-hover);
  color: #fff;
}

[data-theme="dark"] .landing-pill-btn--secondary {
  background: var(--earthy-primary);
  color: #fff;
}

[data-theme="dark"] .landing-pill-btn--secondary:hover,
[data-theme="dark"] .landing-pill-btn--secondary:focus {
  background: var(--earthy-primary-hover);
  color: #fff;
}

/* --- Responsive --- */
@media (max-width: 575.98px) {
  .featured-carousel-wrapper {
    padding: 0 8px;
  }
  .featured-carousel-item {
    flex: 0 0 260px;
    min-width: 260px;
  }
  .carousel-nav-btn {
    display: none !important;
  }
  #geo-banner {
    flex-direction: column;
    gap: 0.5rem;
  }
  .quick-action-btn {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
  }
  .quick-search-form .form-control,
  .quick-search-form .btn {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .featured-carousel-wrapper {
    padding: 0 24px;
  }
  .featured-carousel-item {
    flex: 0 0 270px;
    min-width: 270px;
  }
  .carousel-nav-btn {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }
}

@media (min-width: 992px) {
  .featured-carousel-item {
    flex: 0 0 300px;
    min-width: 300px;
  }
}

/* Quick Search Group Styling */
.quick-search-group {
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid var(--md-border);
  transition: all 0.3s ease;
}

.quick-search-group:focus-within {
  box-shadow: 0 6px 20px rgba(138, 120, 105, 0.2) !important;
  border-color: var(--earthy-primary);
}

.quick-search-group .form-control {
  border-radius: 2rem 0 0 2rem;
}

.quick-search-group .btn-primary {
  border-radius: 0 2rem 2rem 0;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.quick-search-group .btn-primary:hover {
  background-color: var(--earthy-primary-hover) !important;
}

[data-theme="dark"] .quick-search-group {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}
