/* ==========================================================================
   SWANSTAYS LUXURY DUAL-THEME DESIGN SYSTEM (v2.2)
   Dark Mode: Deep Obsidian & Royal Velvet | Light Mode: Crisp White & Haute Rose
   Complete Responsive UI/UX Across Mobile, Tablet & Desktop (Zero Overflow)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root, [data-theme="light"] {
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* WHITE & PINK (HAUTE ROSE) PALETTE - DEFAULT THEME */
  --bg-dark: #FDF9FA;              /* Warm porcelain blush */
  --bg-secondary: #F8EDF1;         /* Soft rose petal */
  --bg-card: #FFFFFF;              /* Crisp white */
  --bg-card-hover: #FFF1F5;        /* Tinted blush elevation */
  --bg-glass: rgba(255, 255, 255, 0.94);
  --bg-input: #FFF4F7;
  --bg-pill: rgba(225, 29, 72, 0.08);

  --text-white: #24111B;           /* Deep velvet berry */
  --text-cream: #4A3340;           /* Warm plum charcoal */
  --text-muted: #856B7A;           /* Muted rose taupe */
  --text-inverse: #FFFFFF;

  --accent-gold: #BE185D;          /* Deep Haute Rose */
  --accent-gold-hover: #9D174D;
  --accent-primary: #E11D48;       /* Vibrant rose */
  --accent-velvet: #DB2777;        /* Pink rose */
  --accent-velvet-dark: #9D174D;
  --accent-glow: rgba(225, 29, 72, 0.20);
  --accent-gold-glow: rgba(190, 24, 93, 0.22);

  --border-subtle: rgba(225, 29, 72, 0.16);
  --border-strong: rgba(225, 29, 72, 0.35);

  --emerald: #059669;
  --emerald-bg: rgba(5, 150, 105, 0.12);

  --shadow-luxury: 0 16px 36px -10px rgba(225, 29, 72, 0.12), 0 0 20px 0 rgba(0, 0, 0, 0.04);
  --shadow-card: 0 8px 24px -6px rgba(136, 19, 55, 0.08);

  --btn-primary-bg: linear-gradient(135deg, #E11D48 0%, #D4AF37 100%);
  --btn-primary-text: #FFFFFF;
}

[data-theme="dark"] {
  /* DARK & VELVET PALETTE */
  --bg-dark: #0D0A14;              /* Deep velvet night */
  --bg-secondary: #140E20;         /* Midnight plum */
  --bg-card: #181226;              /* Royal velvet card */
  --bg-card-hover: #221836;        /* Velvet elevation */
  --bg-glass: rgba(24, 18, 38, 0.90);
  --bg-input: #1C142C;
  --bg-pill: rgba(168, 85, 247, 0.12);

  --text-white: #FCFAFF;
  --text-cream: #EDE6F7;
  --text-muted: #9E94B0;
  --text-inverse: #0D0A14;

  --accent-gold: #D4AF37;          /* Royal champagne */
  --accent-gold-hover: #E5C358;
  --accent-primary: #D4AF37;
  --accent-velvet: #A855F7;        /* Velvet violet */
  --accent-velvet-dark: #7E22CE;
  --accent-glow: rgba(168, 85, 247, 0.25);
  --accent-gold-glow: rgba(212, 175, 55, 0.25);

  --border-subtle: rgba(168, 85, 247, 0.18);
  --border-strong: rgba(212, 175, 55, 0.40);

  --emerald: #10B981;
  --emerald-bg: rgba(16, 185, 129, 0.14);

  --shadow-luxury: 0 16px 36px -10px rgba(0, 0, 0, 0.65), 0 0 24px 0 rgba(168, 85, 247, 0.08);
  --shadow-card: 0 8px 24px -6px rgba(0, 0, 0, 0.5);

  --btn-primary-bg: linear-gradient(135deg, #D4AF37 0%, #A855F7 100%);
  --btn-primary-text: #0D0A14;
}

/* Global Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-cream);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
}

h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  color: var(--text-white);
  letter-spacing: -0.01em;
  font-weight: 500;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Glassmorphism Bar & Containers */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle);
  transition: background 0.35s ease, border-color 0.35s ease;
}

/* Buttons & CTAs */
.btn-gold {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px var(--accent-glow);
  white-space: nowrap;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-glow);
  filter: brightness(1.08);
}

.btn-outline {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--border-strong);
  padding: 10px 20px;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-outline:hover {
  background: var(--bg-pill);
  border-color: var(--accent-primary);
  color: var(--text-white);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.theme-toggle-btn:hover {
  border-color: var(--accent-primary);
  background: var(--bg-pill);
}

/* Navigation Header */
.header-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-logo {
  height: 42px;
  width: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nav-title {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text-white);
  letter-spacing: 0.04em;
  line-height: 1.1;
  white-space: nowrap;
}

.nav-subtitle {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-primary);
  font-weight: 600;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  font-size: 0.92rem;
  color: var(--text-cream);
  cursor: pointer;
  padding: 6px 0;
  position: relative;
  transition: all 0.25s ease;
  font-weight: 500;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Mobile Hamburger Toggle */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}

/* Mobile Drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-strong);
  padding: 20px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-luxury);
  animation: slideDown 0.25s ease;
}

.mobile-nav-drawer.open {
  display: flex;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 56px 20px 36px;
  text-align: center;
  background: radial-gradient(circle at 50% 20%, var(--bg-pill) 0%, transparent 65%);
  width: 100%;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-primary);
  font-weight: 600;
  margin-bottom: 18px;
  max-width: 90%;
  text-overflow: ellipsis;
  overflow: hidden;
}

.hero-heading {
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.15;
  margin-bottom: 16px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-heading span {
  font-style: italic;
  color: var(--accent-primary);
}

.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.12rem);
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 32px;
  font-weight: 300;
  padding: 0 10px;
}

/* Luxury Filter & Search Bar */
.search-filter-bar {
  max-width: 980px;
  margin: 0 auto;
  border-radius: 9999px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-luxury);
  width: 100%;
}

.category-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-input);
  padding: 4px;
  border-radius: 9999px;
  flex-shrink: 0;
}

.tab-btn {
  padding: 8px 18px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.tab-btn.active {
  background: var(--accent-primary);
  color: var(--btn-primary-text);
  font-weight: 600;
}

.search-input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding: 0 8px;
  min-width: 180px;
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-white);
  font-size: 0.95rem;
  width: 100%;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-action-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* Section Containers */
.section-wrapper {
  max-width: 1300px;
  margin: 0 auto;
  padding: 56px 20px;
  width: 100%;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  margin-bottom: 6px;
  line-height: 1.2;
}

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

/* Listings Grid & Cards */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  width: 100%;
}

.listing-card {
  background: var(--bg-card);
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.listing-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-6px);
  box-shadow: var(--shadow-luxury);
}

.listing-image-wrapper {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.listing-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.listing-badge-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.72rem;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.listing-external-badge {
  position: absolute;
  bottom: 12px;
  left: 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  color: var(--text-cream);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.listing-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.listing-location {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-primary);
  margin-bottom: 6px;
  font-weight: 600;
}

.listing-title {
  font-size: 1.35rem;
  line-height: 1.25;
  margin-bottom: 8px;
}

.listing-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.listing-price-box {
  display: flex;
  flex-direction: column;
}

.listing-price-amount {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-white);
}

.listing-price-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.commission-pill {
  font-size: 0.7rem;
  color: var(--accent-primary);
  background: var(--bg-pill);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 3px;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  width: fit-content;
}

/* ==========================================================================
   THE SWAN GUILD (Gamification Section)
   ========================================================================== */
.guild-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 70px 20px;
  width: 100%;
}

.guild-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 26px;
  margin-top: 32px;
  width: 100%;
}

.guild-host-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.28s ease;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.guild-host-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-luxury);
}

/* Clean in-flow top bar (NEVER overlaps host name) */
.host-card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
  flex-wrap: wrap;
}

.guild-tier-chip {
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-pill);
  color: var(--accent-primary);
  border: 1px solid var(--border-subtle);
}

.host-prestige-rank {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.host-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.host-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-primary);
  flex-shrink: 0;
}

.host-meta {
  min-width: 0;
  flex: 1;
}

.host-meta h4 {
  font-size: 1.25rem;
  margin-bottom: 2px;
  word-break: break-word;
  line-height: 1.2;
}

.host-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.host-location-tag {
  font-size: 0.75rem;
  color: var(--accent-primary);
  margin-top: 4px;
  font-weight: 600;
}

.host-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--bg-dark);
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 16px;
  text-align: center;
  border: 1px solid var(--border-subtle);
}

.host-stat-item .val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.host-stat-item .lbl {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.host-badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.host-badge-chip {
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.74rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-cream);
  font-weight: 500;
}

.host-external-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.host-external-pill {
  font-size: 0.76rem;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-weight: 500;
  word-break: break-all;
}

.host-external-pill:hover {
  text-decoration: underline;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 16, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 28px;
  position: relative;
  box-shadow: var(--shadow-luxury);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close-btn:hover {
  background: var(--accent-primary);
  color: var(--btn-primary-text);
}

/* Reservation Invoice Breakdown */
.pricing-invoice-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 20px;
  margin: 16px 0;
}

.invoice-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  gap: 12px;
}

.invoice-row.highlight {
  color: var(--accent-primary);
  font-weight: 600;
}

.invoice-row.total-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text-white);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s ease;
}

.form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Footer */
.luxury-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 20px 100px; /* Generous bottom padding to clear floating widgets */
  background: var(--bg-dark);
  text-align: center;
  width: 100%;
}

.footer-quote {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-style: italic;
  color: var(--accent-primary);
  margin-bottom: 14px;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-links-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.footer-links-row a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-primary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.footer-links-row a:hover {
  filter: brightness(1.15);
}

/* ==========================================================================
   RESPONSIVE DESIGN ADAPTATIONS (Mobile, Tablet, Desktop)
   ========================================================================== */

/* Hide desktop elements on mobile */
.desktop-only {
  display: inline-flex;
}

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .header-nav {
    padding: 12px 20px;
  }
  .nav-menu {
    gap: 16px;
  }
  .listings-grid {
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 24px;
  }
  .detail-grid-layout {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
  .header-nav {
    padding: 10px 14px;
  }

  .nav-logo {
    height: 38px;
    width: 38px;
  }

  .nav-title {
    font-size: 1.25rem;
  }

  .nav-subtitle {
    font-size: 0.58rem;
    letter-spacing: 0.14em;
  }

  .nav-menu {
    display: none; /* Replaced by mobile hamburger */
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  /* Compact theme toggle on mobile */
  .theme-toggle-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .hero-section {
    padding: 36px 14px 24px;
  }

  .hero-pill {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .search-filter-bar {
    border-radius: 18px;
    flex-direction: column;
    padding: 12px;
    gap: 10px;
  }

  .category-tabs {
    width: 100%;
    justify-content: center;
  }

  .tab-btn {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .search-input-group {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
  }

  .search-action-group {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  #destination-select {
    flex: 1;
    min-width: 0;
  }

  .listings-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .listing-image-wrapper {
    height: 200px;
  }

  .section-wrapper {
    padding: 36px 14px;
  }

  .guild-section {
    padding: 50px 14px;
  }

  .guild-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .guild-host-card {
    padding: 18px;
  }

  .modal-overlay {
    padding: 8px;
  }

  .modal-container {
    padding: 22px 16px;
    border-radius: 18px;
    max-height: 94vh;
  }

  .detail-grid-layout {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .form-group-row {
    grid-template-columns: 1fr !important;
  }

  /* Stacking luxury pill links in footer on mobile */
  .footer-links-row {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .footer-links-row a {
    width: 100%;
    max-width: 300px;
    justify-content: center;
    padding: 12px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 9999px;
  }

  .footer-quote {
    padding: 0 10px;
  }

  .footer-copy {
    padding: 0 10px;
  }
}

/* Extra small mobile screens (e.g. < 400px) */
@media (max-width: 400px) {
  .theme-toggle-btn .theme-label {
    display: none;
  }
  .theme-toggle-btn {
    padding: 6px 8px;
  }
}
