/* LendIt — Professional marketplace UI */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --text: #222;
  --text-secondary: #484848;
  --text-light: #717171;
  --accent: #0066ff;
  --accent-hover: #0052cc;
  --bg: #fff;
  --bg-page: #fff;
  --bg-alt: #f7f7f7;
  --border: #ddd;
  --border-light: #ebebeb;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 4px 16px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-elevated: 0 6px 20px rgba(0,0,0,0.12);
  --success: #008a05;
  --danger: #c13515;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 100px;
  --max-width: 1280px;
  --nav-height: 142px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 68px;
}

a {
  color: var(--text);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ---- LAYOUT ---- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

/* ---- NAV ---- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  padding: 0 40px;
}
.site-nav .container {
  display: flex;
  flex-direction: column;
  max-width: none;
  overflow: visible; /* needed for dropdowns on desktop */
}
.nav-row-2-hidden .search-compact {
  display: none !important;
}

/* Top row: logo, search, links — search centered */
/* Row 1: logo + category tabs + links */
.nav-row-1 {
  display: flex;
  align-items: center;
  height: 68px;
  width: 100%;
  gap: 20px;
  box-shadow: 0 1px 0 0 var(--border-light);
  margin-left: -40px;
  margin-right: -40px;
  padding-left: 40px;
  padding-right: 40px;
  width: calc(100% + 80px);
}
.nav-row-1 .nav-cat-tabs {
  flex: 1;
  justify-content: center;
}
.nav-row-1 .nav-links {
  flex-shrink: 0;
}

/* Row 2: search bar */
.nav-row-2 {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 40px;
  background: #f0f3ff;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
  transform-origin: top center;
}
.nav-row-2.nav-row-2-hidden {
  opacity: 0;
  transform: translateY(-8px);
  max-height: 0;
  padding: 0;
  pointer-events: none;
  overflow: hidden;
}
.nav-row-2.nav-row-2-visible {
  opacity: 1;
  transform: translateY(0);
  max-height: 100px;
  padding: 20px 40px;
}
.nav-row-2 .search-pill {
  max-width: 820px;
  width: 100%;
}

/* Row 3: mobile-only category tabs — hidden on desktop */
.nav-row-3 {
  display: none;
}

/* Legacy — keep for any leftover references */
.nav-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 68px;
  width: 100%;
}
.site-nav .logo {
  font-weight: 800;
  font-size: 26px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.8px;
  flex-shrink: 0;
  justify-self: start;
}
.site-nav .logo:hover { text-decoration: none; opacity: 0.85; }

/* Segmented search pill */
.search-pill {
  display: flex;
  align-items: center;
  width: 720px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  height: 64px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s;
  justify-self: center;
  position: relative;
}
.search-pill:focus-within {
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  border-color: var(--border);
}
.search-seg {
  display: flex;
  flex-direction: column;
  padding: 10px 28px;
  min-width: 0;
  flex: 1;
}
.search-seg-what { flex: 1.4; }
.search-seg-where { flex: 1; }
.search-seg-when { flex: 1.2; position: relative; }
.search-seg label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text);
  line-height: 1;
  margin-bottom: 3px;
}
.search-seg input[type="text"] {
  border: none;
  outline: none;
  font-size: 15px;
  font-family: var(--font);
  color: var(--text-secondary);
  background: transparent;
  padding: 0;
  width: 100%;
  line-height: 1.3;
}
.search-seg input[type="text"]::placeholder { color: var(--text-light); }
/* When field — readonly text that opens date popover */
.search-seg-when input[type="text"] {
  cursor: pointer;
}
/* Calendar date picker */
.date-popover {
  display: none;
  position: absolute;
  top: calc(100% + 16px);
  right: -120px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.06);
  padding: 28px;
  z-index: 200;
  width: 640px;
}
.date-popover.open { display: block; }

/* Selection mode tabs */
.dp-mode-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  background: var(--bg-alt);
  border-radius: var(--radius-pill);
  padding: 3px;
  width: fit-content;
}
.dp-mode-tab {
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.15s;
}
.dp-mode-tab.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* Selection summary */
.dp-selection {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.dp-sel-box {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.dp-sel-box.active {
  border-color: var(--text);
}
.dp-sel-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 2px;
}
.dp-sel-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.dp-sel-value.empty {
  color: var(--text-light);
}

/* Calendar grid — two months side by side */
.dp-calendars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}
.dp-month {
  user-select: none;
}
.dp-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dp-month-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.1px;
}
.dp-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.1s;
  color: var(--text);
}
.dp-nav-btn:hover { background: var(--bg-alt); }
.dp-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.dp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 4px;
}
.dp-weekday {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  padding: 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.dp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}
.dp-day {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 400;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.1s;
  font-family: var(--font);
  color: var(--text);
  position: relative;
}
.dp-day:hover:not(.dp-day-disabled):not(.dp-day-empty) {
  background: var(--bg-alt);
}
.dp-day-today {
  font-weight: 700;
}
.dp-day-disabled {
  color: var(--border);
  cursor: default;
}
.dp-day-empty {
  cursor: default;
}
.dp-day-selected {
  background: var(--text) !important;
  color: #fff !important;
  font-weight: 600;
}
.dp-day-in-range {
  background: var(--bg-alt) !important;
  border-radius: 0;
}
.dp-day-range-start {
  border-radius: 50% 0 0 50% !important;
}
.dp-day-range-end {
  border-radius: 0 50% 50% 0 !important;
}

/* Quick select presets */
.dp-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.dp-preset {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.dp-preset:hover {
  border-color: var(--text);
  color: var(--text);
}
.dp-preset.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

/* Footer actions */
.dp-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}
.dp-clear {
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  color: var(--text);
  padding: 8px 0;
}
.dp-clear:hover { color: var(--text-light); }
.dp-apply {
  padding: 10px 24px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s;
}
.dp-apply:hover { background: #333; }
.search-divider {
  width: 1px;
  height: 32px;
  background: var(--border-light);
  flex-shrink: 0;
}
.search-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 8px;
  transition: background 0.15s;
}
.search-btn:hover { background: var(--accent-hover); }
.search-btn svg { width: 16px; height: 16px; }

/* Slim nav (homepage — cat tabs inline with logo) */
.nav-top-slim {
  display: flex !important;
  height: 56px;
  gap: 16px;
}
.nav-top-slim .nav-links {
  justify-self: auto;
  flex-shrink: 0;
}
.site-nav:has(.nav-top-slim) {
  height: 56px;
}

/* Inline category tabs in nav row */
.nav-cat-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav-cat-tabs::-webkit-scrollbar { display: none; }
.nav-cat-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav-cat-tab:hover {
  background: var(--bg-alt);
  color: var(--text);
}
.nav-cat-tab-active {
  background: var(--accent);
  color: #fff;
}
.nav-cat-tab-active:hover {
  background: var(--accent-hover);
  color: #fff;
}
.nav-cat-icon {
  display: flex;
  align-items: center;
}
.nav-cat-icon svg {
  width: 22px;
  height: 22px;
}

/* ---- HERO SEARCH SECTION (homepage) ---- */
.hero-search-section {
  position: relative;
  padding: 40px 0 16px;
  overflow: visible;
  z-index: 95;
}
.hero-search-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #f0f3ff 0%, #fff 100%);
  z-index: 0;
}
.hero-search-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Large hero search pill */
.hero-search-pill {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  overflow: visible;
}
.hero-s-seg {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 32px;
  flex: 1;
  min-width: 0;
}
.hero-s-seg label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text);
  margin-bottom: 2px;
}
.hero-s-seg input {
  border: none;
  outline: none;
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
  width: 100%;
}
.hero-s-seg input::placeholder {
  color: var(--text-light);
}
.hero-s-what { flex: 1.4; }
.hero-s-divider {
  width: 1px;
  background: var(--border-light);
  margin: 12px 0;
  flex-shrink: 0;
}
.hero-s-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}
.hero-s-btn:hover {
  background: var(--accent-hover);
}

@media (max-width: 768px) {
  .hero-search-section {
    padding: 20px 0 28px;
  }
  .hero-search-pill {
    flex-direction: column;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  }
  .hero-s-seg {
    padding: 16px 20px;
  }
  .hero-s-seg input {
    font-size: 16px;
  }
  .hero-s-divider {
    width: auto;
    height: 1px;
    margin: 0 16px;
  }
  .hero-s-btn {
    border-radius: 0 0 20px 20px;
    justify-content: center;
    padding: 18px;
    font-size: 16px;
  }
}

/* ---- HERO SEARCH (legacy) ---- */

/* Hero search card — no box, just inline */
.hero-search-card {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  overflow: visible;
  color: var(--text);
}

/* Hero category tabs */
.hero-cat-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 4px;
  scrollbar-width: none;
  padding: 0 8px;
  justify-content: center;
}
.hero-cat-tabs::-webkit-scrollbar { display: none; }
.hero-cat-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 20px 12px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.hero-cat-tab:hover {
  color: var(--text);
}
.hero-cat-tab-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.hero-cat-tab-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-cat-tab-icon svg {
  width: 24px;
  height: 24px;
}

/* Hero search fields */
.hero-search-fields {
  display: flex;
  align-items: stretch;
  padding: 6px 6px 6px 16px;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  position: relative;
  z-index: 10;
}
/* Hidden on desktop — only visible on mobile */
.hero-search-compact-mobile {
  display: none;
}
.hero-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  flex: 1;
  border-right: 1px solid var(--border-light);
  min-width: 0;
}
.hero-field:first-child {
  padding-left: 0;
}
.hero-field:last-of-type {
  border-right: none;
}
.hero-field svg {
  flex-shrink: 0;
  color: var(--text-light);
}
.hero-field-inner {
  flex: 1;
  min-width: 0;
}
.hero-field-inner label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text);
  margin-bottom: 2px;
}
.hero-field-inner input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
}
.hero-field-inner input::placeholder {
  color: var(--text-light);
}
.hero-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}
.hero-search-btn:hover {
  background: var(--accent-hover);
}

/* Mobile hero adjustments */
@media (max-width: 768px) {
  .hero-bg {
    padding: 28px 0 36px;
  }
  .hero-headline {
    font-size: 1.4rem;
  }
  .hero-search-fields {
    flex-direction: column;
    padding: 16px 20px 20px;
    gap: 0;
    border-radius: 20px;
  }
  .hero-field {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding: 16px 4px;
  }
  .hero-field:last-of-type {
    border-bottom: none;
  }
  .hero-search-btn {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    padding: 18px;
    border-radius: 14px;
    font-size: 16px;
  }
  .hero-search-btn span { display: inline; }
}

/* ---- Suggestion dropdowns ---- */
.suggest-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 260px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated);
  z-index: 300;
  padding: 8px 0;
  max-height: 340px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.suggest-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.suggest-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  padding: 10px 16px 8px;
}
.suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.1s;
}
.suggest-item:hover {
  background: var(--bg-alt);
}
.suggest-icon {
  font-size: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: 8px;
  flex-shrink: 0;
}
.suggest-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.suggest-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.suggest-sub {
  font-size: 13px;
  color: var(--text-light);
}
.suggest-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
}

/* Mobile compact search bar */
.search-compact {
  display: none;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  color: var(--text-light);
  font-size: 14px;
  overflow: hidden;
  white-space: nowrap;
}
.search-compact span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.1s;
  white-space: nowrap;
  color: var(--text-secondary);
  text-decoration: none;
}
.nav-links a:hover {
  background: var(--bg-alt);
  color: var(--text);
  text-decoration: none;
}
.nav-links a.active {
  font-weight: 600;
  color: var(--text);
}
.nav-post {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 10px 20px !important;
  border-radius: 8px !important;
  transition: background 0.15s !important;
}
.nav-post:hover {
  background: var(--accent-hover) !important;
  color: #fff !important;
}
.nav-account {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  flex-shrink: 0;
  border-radius: 50% !important;
  border: 1px solid var(--border) !important;
  color: var(--text-light) !important;
  background: transparent !important;
  transition: border-color 0.15s, color 0.15s;
}
.nav-account:hover {
  border-color: var(--text);
  color: var(--text);
}
.nav-account[aria-current="page"] {
  border-color: var(--accent);
  color: var(--accent);
}

/* Bottom row: category tabs — always visible */
.cat-tabs {
  display: flex;
  gap: 28px;
  height: 48px;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  text-decoration: none;
  color: var(--text-light);
  flex-shrink: 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  opacity: 0.7;
}
.cat-tab:hover {
  color: var(--text);
  border-color: var(--border);
  opacity: 1;
  text-decoration: none;
}
.cat-tab-active {
  color: var(--text);
  border-color: var(--text);
  opacity: 1;
}
.cat-tab-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-tab-icon svg {
  width: 24px;
  height: 24px;
}
.cat-tab span {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* Mobile search overlay */
.search-mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 300;
}
.search-mobile-overlay.open {
  display: block;
}
.smo-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  animation: smo-fade-in 0.2s ease;
}
@keyframes smo-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.smo-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  padding: 20px 24px 32px;
  animation: smo-slide-up 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes smo-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.smo-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.smo-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.smo-close:hover { background: var(--bg-alt); }
.smo-title {
  font-size: 16px;
  font-weight: 600;
}
.smo-field {
  margin-bottom: 20px;
}
.smo-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.smo-field input[type="text"],
.smo-field input[type="date"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  font-family: var(--font);
  outline: none;
  background: var(--bg);
  -webkit-appearance: none;
}
.smo-field input:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--text);
}
.smo-date-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}
.smo-date-sep {
  color: var(--text-light);
  font-size: 16px;
}
.smo-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  margin-top: 8px;
}
.smo-search-btn:hover { background: var(--accent-hover); }
.smo-search-btn svg { stroke: #fff; }

/* ---- SECTION HEADERS ---- */

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-header h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
.section-header a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: underline;
}
.section-header a:hover { color: var(--text-light); }

/* ---- LISTING CARDS GRID ---- */

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px 28px;
}
.listing-card {
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: opacity 0.15s;
}
.listing-card:hover {
  opacity: 0.88;
  text-decoration: none;
  color: var(--text);
}
.card-thumb {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  position: relative;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-icon {
  color: #b0b0b0;
  width: 48px;
  height: 48px;
}
.card-icon svg {
  width: 100%;
  height: 100%;
}
.card-body {
  padding: 14px 2px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-title {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-price {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.1px;
}
.card-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-light);
}
.card-meta {
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ---- LISTING DETAIL (PDP) ---- */

/* Back button — text link on desktop, floating circle on mobile */
#listing-content {
  position: relative;
}
.pdp-back-bar {
  padding: 16px 0 0;
}
.pdp-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 0;
  font-family: inherit;
  transition: color 0.15s;
}
.pdp-back-btn:hover {
  color: var(--text);
}
.pdp-back-btn svg {
  flex-shrink: 0;
}
.pdp-back-btn-text {
  display: inline;
}

@media (max-width: 768px) {
  .pdp-back-bar {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    padding: 0;
  }
  .pdp-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    justify-content: center;
    padding: 0;
    gap: 0;
    color: var(--text);
  }
  .pdp-back-btn:hover {
    background: #fff;
  }
  .pdp-back-btn-text {
    display: none;
  }
}

.pdp-layout {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 8px 48px;
  padding: 24px 0 80px;
  align-items: start;
  position: relative;
}
/* Mobile-only title block — hidden on desktop */
.pdp-mobile-title {
  display: none;
}

/* Gallery */
/* Carousel — hidden on desktop, visible on mobile */
.pdp-carousel {
  display: none;
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
}
.pdp-carousel-track {
  display: flex;
  transition: transform 0.3s ease;
}
.pdp-carousel-slide {
  flex: 0 0 100%;
  aspect-ratio: 4/3;
}
.pdp-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pdp-carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.pdp-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.pdp-carousel-dot.active {
  background: #fff;
  transform: scale(1.25);
}
.pdp-carousel-counter {
  display: none;
}
.pdp-gallery {
  margin-bottom: 32px;
}
.pdp-gallery-main {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  max-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  transition: box-shadow 0.3s;
}
.pdp-gallery-main:hover {
  box-shadow: var(--shadow-card);
}
.pdp-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.pdp-gallery-main:hover img {
  transform: scale(1.02);
}
.pdp-gallery-placeholder {
  color: #ccc;
  aspect-ratio: 3/2;
  max-height: 280px;
  background: linear-gradient(145deg, #f5f7fa 0%, #e8ecf2 100%);
  border: 2px dashed #d5dbe5;
  flex-direction: column;
  gap: 14px;
}
.pdp-gallery-placeholder .listing-hero-icon {
  padding: 20px;
  background: rgba(255,255,255,0.7);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.pdp-gallery-placeholder-text {
  font-size: 13px;
  color: #8a95a5;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.listing-hero-icon {
  color: #c8ccd0;
  width: 56px;
  height: 56px;
  opacity: 0.8;
}
.listing-hero-icon svg {
  width: 100%;
  height: 100%;
}
.pdp-gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.pdp-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 75px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: var(--bg-alt);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pdp-thumb:hover {
  border-color: var(--border);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.pdp-thumb-active {
  border-color: var(--accent);
}

/* Header / title area */
.pdp-header {
  margin-bottom: 8px;
}
.pdp-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 0 12px;
  line-height: 1.2;
}
.pdp-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-light);
}
.pdp-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}
.pdp-badge-condition {
  background: #eef2ff;
  border-color: var(--accent);
  color: var(--accent);
}
.pdp-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.pdp-meta-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-light);
}
.pdp-meta-text svg {
  flex-shrink: 0;
}

/* Sections below the fold */
.pdp-section {
  padding: 28px 0;
  border-top: 1px solid var(--border-light);
}
.pdp-section:first-of-type {
  margin-top: 8px;
}
.pdp-section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.2px;
}
.pdp-section-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-line;
  margin: 0;
}

/* Includes pills */
.pdp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pdp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  font-size: 14px;
  color: var(--text);
}

/* Pickup card */
.pdp-pickup-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--text-secondary);
}

/* Availability */
.pdp-avail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pdp-avail-range {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  width: fit-content;
}

/* Reviews */
.pdp-reviews {
  margin-top: 12px;
}
.pdp-reviews .pdp-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
}
.pdp-reviews-stars {
  font-size: 15px;
  letter-spacing: 1px;
}
.pdp-reviews-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  margin-left: auto;
}
.pdp-review {
  padding: 20px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  margin-bottom: 12px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.pdp-review:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
}
.pdp-review:last-child {
  margin-bottom: 0;
}
.pdp-review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.pdp-review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.pdp-review-avatar[data-hue="1"] { background: #4f46e5; }
.pdp-review-avatar[data-hue="2"] { background: #0891b2; }
.pdp-review-avatar[data-hue="3"] { background: #059669; }
.pdp-review-avatar[data-hue="4"] { background: #d97706; }
.pdp-review-avatar[data-hue="5"] { background: #dc2626; }
.pdp-review-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pdp-review-meta strong {
  font-size: 14px;
  font-weight: 600;
}
.pdp-review-meta span {
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pdp-review-date {
  color: var(--text-light);
  font-size: 12px;
}
.pdp-review-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
}

/* Review form */
.pdp-review-form {
  margin-top: 24px;
  padding: 20px;
  background: var(--surface, #f8f9fa);
  border-radius: 12px;
}
.pdp-review-form h4 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
}
.pdp-review-stars-input {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}
.review-star {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #d1d5db;
  padding: 0 2px;
  transition: color 0.1s;
  line-height: 1;
}
.review-star-filled,
.review-star:hover,
.review-star-hover {
  color: #f59e0b;
}
.pdp-review-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  box-sizing: border-box;
  margin-bottom: 12px;
}
.pdp-review-textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.pdp-review-submit {
  height: 40px;
  padding: 0 24px;
  font-size: 14px;
}
.pdp-review-form-error {
  color: var(--danger, #dc2626);
  font-size: 13px;
  margin-bottom: 8px;
  min-height: 0;
}

/* Owner edit button (shown when viewing own listing) */
.pdp-owner-edit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  background: var(--bg-alt, #f3f4f6);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  box-sizing: border-box;
}
.pdp-owner-edit-btn:hover {
  background: var(--border-color);
  border-color: var(--text-light);
  text-decoration: none;
}
.pdp-owner-edit-btn svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* Owner card below fold */
.pdp-owner-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}
.pdp-owner-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pdp-owner-card-info strong {
  font-size: 16px;
  font-weight: 600;
}
.pdp-owner-card-info span {
  font-size: 13px;
  color: var(--text-light);
}

/* PDP grid columns — left side content blocks */
.pdp-col-gallery,
.pdp-col-owner,
.pdp-col-desc,
.pdp-col-reviews {
  grid-column: 1;
  min-width: 0;
}

/* Sidebar — fixed on desktop */
.pdp-sidebar {
  grid-column: 2;
  grid-row: 1 / -1;
  position: fixed;
  right: calc((100vw - var(--max-width)) / 2 + 40px);
  top: 92px;
  width: 440px;
  padding: 28px 32px;
  max-height: calc(100vh - 108px);
  overflow-y: hidden;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  z-index: 1;
}

/* Sidebar title */
.pdp-sidebar-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin-bottom: 12px;
  color: var(--text);
}

/* Sidebar badges / meta */
.pdp-sidebar-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.pdp-sidebar-badges .pdp-badge {
  background: transparent;
  border-color: var(--border);
  font-size: 11px;
  padding: 3px 10px;
  color: var(--text-light);
}
.pdp-sidebar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}
.pdp-sidebar-meta .pdp-badge {
  background: var(--bg-alt);
  border-color: var(--border-light);
  font-size: 11px;
  padding: 4px 12px;
  color: var(--text-secondary);
  transition: background 0.15s, border-color 0.15s;
}
.pdp-sidebar-meta .pdp-badge:hover {
  background: #eee;
  border-color: var(--border);
}
.pdp-sidebar-meta .pdp-badge-condition {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--accent);
}
.pdp-sidebar-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.pdp-sidebar-meta-loc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-light);
}
.pdp-sidebar-location {
  display: none;
}

/* Sidebar price block */
.pdp-sidebar-price-block {
  background: linear-gradient(135deg, #fafbff 0%, #f5f7ff 100%);
  border: 1px solid #e4e8f4;
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.pdp-sidebar-price {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1.2px;
  margin-bottom: 6px;
  line-height: 1;
  color: var(--text);
}
.pdp-sidebar-price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-light);
  letter-spacing: 0;
}
.pdp-sidebar-detail {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pdp-sidebar-detail svg {
  flex-shrink: 0;
  opacity: 0.6;
}

/* Description section (left side) */
.pdp-description .pdp-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Sidebar description */
.pdp-sidebar-desc {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}
.pdp-sidebar-desc-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.pdp-sidebar-desc-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* Sidebar availability — pill-style dates */
.pdp-sidebar-avail {
  margin-bottom: 0;
  padding-bottom: 18px;
  margin-bottom: 18px;
  background: transparent;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border-light);
}
.pdp-sidebar-avail-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-light);
  margin-bottom: 10px;
}
.pdp-sidebar-avail-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pdp-sidebar-avail-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: #f0f7ff;
  border: 1px solid #d4e5ff;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: #0052cc;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.pdp-sidebar-avail-pill:hover {
  background: #e1efff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,102,255,0.1);
}
.pdp-sidebar-avail-pill svg {
  flex-shrink: 0;
  color: #4d94ff;
}
/* Legacy avail range (fallback) */
.pdp-sidebar-avail-range {
  font-size: 14px;
  color: var(--text);
  padding: 4px 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pdp-sidebar-avail-range svg {
  flex-shrink: 0;
  color: var(--text-light);
}

/* Sidebar includes — pills */
.pdp-sidebar-includes {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 0;
  padding-bottom: 18px;
  margin-bottom: 18px;
  line-height: 1.5;
  border-bottom: 1px solid var(--border-light);
}
.pdp-sidebar-includes-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-light);
  display: block;
  margin-bottom: 10px;
}
.pdp-sidebar-includes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pdp-sidebar-includes-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.15s, border-color 0.15s;
}
.pdp-sidebar-includes-pill:hover {
  background: #eee;
  border-color: var(--border);
}
.pdp-sidebar-includes-pill svg {
  color: var(--success);
  flex-shrink: 0;
}

.pdp-sidebar-divider {
  display: none;
}

/* CTA button area */
.pdp-sidebar-cta {
  padding: 4px 0 20px;
  text-align: center;
}
button.pdp-sidebar-btn,
a.pdp-sidebar-btn {
  margin: 0;
  font-size: 16px;
  height: auto;
  line-height: 1.1;
  padding: 18px 0;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(0, 102, 255, 0.3);
  letter-spacing: 0.3px;
}
.pdp-sidebar-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}
.pdp-sidebar-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.2);
}

/* Owner section — trust card */
.pdp-sidebar-owner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-top: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}
.pdp-sidebar-owner:hover {
  box-shadow: var(--shadow-card);
  border-color: var(--border);
}
.pdp-owner-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
  position: relative;
}
.pdp-owner-avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 20px;
}
.pdp-owner-verified {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  border: 2.5px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdp-owner-verified svg {
  width: 10px;
  height: 10px;
  color: #fff;
}
.pdp-owner-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.pdp-owner-details strong {
  font-size: 15px;
  font-weight: 600;
}
.pdp-owner-details span {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.3;
}
.pdp-owner-response {
  font-size: 11px;
  color: var(--success);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pdp-owner-arrow {
  color: var(--text-light);
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity 0.15s, transform 0.15s;
}
.pdp-sidebar-owner:hover .pdp-owner-arrow {
  opacity: 0.7;
  transform: translateX(2px);
}

/* Mobile fixed bottom rent bar */
.pdp-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}
.pdp-mobile-bar-price {
  font-size: 15px;
  color: var(--text);
}
.pdp-mobile-bar-price strong {
  font-size: 20px;
  font-weight: 700;
}
.pdp-mobile-bar-btn {
  flex-shrink: 0;
  width: auto;
  padding: 0 28px;
  height: 46px;
  line-height: 46px;
  font-size: 15px;
}

/* ---- Rental request modal ---- */
.rent-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  align-items: center;
  justify-content: center;
}
.rent-modal.open {
  display: flex;
}
.rent-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  animation: smo-fade-in 0.2s ease;
}
.rent-modal-panel {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  width: 460px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: rent-modal-in 0.25s ease;
}
@keyframes rent-modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.rent-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
}
.rent-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.rent-modal-close:hover {
  background: var(--bg-alt);
  color: var(--text);
}
.rent-modal-title {
  font-size: 16px;
  font-weight: 600;
}
.rent-modal-body {
  padding: 24px;
}
.rent-modal-listing {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}
.rent-modal-listing strong {
  font-size: 15px;
  font-weight: 600;
}
.rent-modal-listing span {
  font-size: 13px;
  color: var(--text-light);
}
.rent-modal-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.rent-modal-field {
  margin-bottom: 16px;
}
.rent-modal-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text);
  margin-bottom: 6px;
}
.rent-modal-field label span {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-light);
}
.rent-modal-field input[type="date"],
.rent-modal-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.rent-modal-field input[type="date"]:focus,
.rent-modal-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,102,255,0.1);
}
.rent-modal-field textarea {
  resize: vertical;
  min-height: 80px;
}
.rent-modal-hint {
  font-size: 12px;
  color: var(--text-light);
  margin: -8px 0 16px;
}
.rent-modal-summary {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.rent-modal-summary-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-light);
  margin-bottom: 12px;
}
.rent-modal-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 4px 0;
}
.rent-modal-total {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px solid var(--border-light);
}
.rent-modal-error {
  font-size: 13px;
  color: var(--danger);
  min-height: 18px;
  margin-bottom: 8px;
}
button.rent-modal-submit,
a.rent-modal-submit {
  width: 100%;
  height: auto;
  line-height: 1.1;
  padding: 18px 0;
  font-size: 16px;
}
.rent-modal-success {
  padding: 48px 24px 32px;
  text-align: center;
}
.rent-modal-success-icon {
  margin-bottom: 16px;
}
.rent-modal-success h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}
.rent-modal-success p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 24px;
}
/* Negotiate / Make an offer */
.rent-modal-negotiate {
  margin-bottom: 16px;
}
.rent-negotiate-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  padding: 8px 0;
}
.rent-negotiate-toggle svg {
  transition: transform 0.2s ease;
}
.rent-negotiate-toggle.rent-negotiate-open svg {
  transform: rotate(180deg);
}
.rent-negotiate-body {
  margin-top: 12px;
}
.rent-negotiate-hint {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 10px;
}
.rent-negotiate-hint strong {
  color: var(--text);
}
.rent-negotiate-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  background: var(--bg);
  transition: border-color 0.15s;
}
.rent-negotiate-input-wrap:focus-within {
  border-color: var(--primary);
}
.rent-negotiate-prefix {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-right: 4px;
}
.rent-negotiate-suffix {
  font-size: 14px;
  color: var(--text-light);
  margin-left: 4px;
}
.rent-negotiate-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 18px;
  font-weight: 600;
  padding: 12px 0;
  width: 80px;
  -moz-appearance: textfield;
}
.rent-negotiate-input::-webkit-outer-spin-button,
.rent-negotiate-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
@media (max-width: 768px) {
  .rent-modal {
    align-items: flex-end;
  }
  .rent-modal-panel {
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    animation: smo-slide-up 0.25s ease;
  }
}

/* Star styles */
.star { color: #ddd; }
.star-filled { color: #111; }
.btn-primary {
  display: block;
  width: 100%;
  height: 52px;
  background: linear-gradient(to bottom, #0073ff, #0066ff);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  font-family: var(--font);
  transition: background 0.15s;
  text-decoration: none;
  line-height: 52px;
}
.btn-primary:hover {
  background: linear-gradient(to bottom, #005cd9, #004fb3);
  color: #fff;
  text-decoration: none;
}
.btn-success {
  background: var(--success) !important;
}
.btn-danger {
  background: none;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  transition: all 0.15s;
}
.btn-danger:hover {
  border-color: var(--danger);
  color: var(--danger);
}
.btn-outline {
  display: inline-block;
  padding: 0 24px;
  height: 52px;
  line-height: 50px;
  border: 1px solid var(--text);
  border-radius: 10px;
  background: var(--bg);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  color: var(--text);
  text-decoration: none;
  text-align: center;
  transition: background 0.1s;
}
.btn-outline:hover {
  background: var(--bg-alt);
  text-decoration: none;
}

.owner-block {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 14px;
}
.owner-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.owner-info strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.owner-info small {
  color: var(--text-light);
  font-size: 13px;
}

/* ---- REVIEWS ---- */

.reviews-section {
  border-top: 1px solid var(--border-light);
  padding-top: 32px;
}
.reviews-section h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 20px;
}
.review-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
}
.review-item:last-child { border-bottom: none; }
.review-header {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 15px;
  margin-bottom: 6px;
}
.review-header strong { font-weight: 600; }
.review-stars { font-size: 12px; letter-spacing: 1px; }
.star { color: #ddd; }
.star-filled { color: var(--text); }
.review-date { color: var(--text-light); font-size: 13px; }
.review-text { font-size: 15px; color: var(--text-secondary); line-height: 1.6; }

/* ---- FORMS ---- */

.form-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.form-page h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 40px;
  letter-spacing: -0.3px;
}
.form-group {
  margin-bottom: 28px;
}
.form-group label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--text);
}
.form-group textarea {
  resize: vertical;
  min-height: 140px;
}
.form-group small {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-light);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 6px;
}

/* ---- WIZARD (Post listing) ---- */
.wizard-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* Progress bar */
.wizard-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 36px;
}
.wizard-step-indicator {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  background: var(--bg-alt);
  transition: all 0.2s;
}
.wizard-step-indicator span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.wizard-step-indicator.active {
  color: var(--accent);
  background: #eef2ff;
  font-weight: 600;
}
.wizard-step-indicator.active span {
  background: var(--accent);
}
.wizard-step-indicator.completed {
  color: var(--success);
  background: #f0faf0;
}
.wizard-step-indicator.completed span {
  background: var(--success);
}

/* Step content — field wrappers */
.wiz-field {
  margin-bottom: 24px;
}
.wiz-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.wiz-label small {
  font-weight: 400;
  color: var(--text-light);
}
.wiz-required {
  color: var(--danger);
}
.wiz-input, .wiz-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--bg);
}
.wiz-input:focus, .wiz-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,102,255,0.1);
}
.wiz-textarea {
  resize: vertical;
  min-height: 120px;
}
.wiz-helper {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-light);
}
.wiz-pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wiz-cat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.wiz-cat-name {
  font-size: 12px;
  font-weight: 600;
}
.wiz-pickup-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.wiz-pickup-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.wiz-pickup-label {
  font-size: 13px;
}
.wiz-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.wiz-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 14px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.wiz-tag-remove {
  cursor: pointer;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 700;
  margin-left: 4px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font);
}
.wiz-tag-remove:hover {
  color: var(--danger);
}
.wiz-avail-range {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--bg-alt);
  border-radius: 8px;
  font-size: 14px;
  margin-top: 6px;
}
.wiz-avail-remove {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  padding: 0 4px;
}
.wiz-avail-remove:hover {
  color: var(--danger);
}

/* Step content area */
.wiz-step-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.3px;
}

/* Category card grid */
.wiz-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.wiz-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}
.wiz-cat-card:hover {
  border-color: var(--accent);
  background: #f8f9ff;
}
.wiz-cat-card.wiz-cat-active {
  border-color: var(--accent);
  background: #eef2ff;
}
.wiz-cat-card svg {
  width: 28px;
  height: 28px;
}
.wiz-cat-card span {
  font-size: 12px;
  font-weight: 600;
}

/* Condition pills */
.wiz-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.wiz-pill {
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg);
  font-family: var(--font);
  color: var(--text-secondary);
}
.wiz-pill:hover {
  border-color: var(--text);
}
.wiz-pill.wiz-pill-active {
  border-color: var(--accent);
  background: #eef2ff;
  color: var(--accent);
  font-weight: 600;
}

/* Photo upload */
.wiz-photo-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  color: var(--text-light);
  transition: border-color 0.15s;
  margin-bottom: 12px;
}
.wiz-photo-area:hover {
  border-color: var(--accent);
}
.wiz-photo-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.wiz-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-light);
}
.wiz-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wiz-thumb-x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 12px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Tag input */
.wiz-tag-wrap {
  margin-bottom: 24px;
}
.wiz-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.wiz-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text);
}
.wiz-tag-x {
  cursor: pointer;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 700;
  margin-left: 2px;
}
.wiz-tag-x:hover {
  color: var(--danger);
}

/* Pickup cards */
.wiz-pickup-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.wiz-pickup-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  color: var(--text-secondary);
}
.wiz-pickup-card:hover {
  border-color: var(--accent);
}
.wiz-pickup-card.wiz-pickup-active {
  border-color: var(--accent);
  background: #eef2ff;
  color: var(--accent);
}
.wiz-pickup-card svg {
  width: 24px;
  height: 24px;
}

/* Availability ranges list */
.wiz-avail-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wiz-avail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--bg-alt);
  border-radius: 8px;
  font-size: 14px;
}
.wiz-avail-item button {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}
.wiz-avail-item button:hover {
  color: var(--danger);
}

/* Preview card in step 3 */
.wiz-preview-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}
.wiz-preview-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-light);
}

/* Wizard navigation buttons */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}
.wiz-btn {
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.wiz-btn:hover {
  background: var(--bg-alt);
}
.wiz-btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.wiz-btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.wiz-btn-spacer {
  flex: 1;
}

@media (max-width: 600px) {
  .wizard-progress {
    flex-direction: column;
    gap: 4px;
  }
  .wiz-cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .wiz-pickup-options {
    grid-template-columns: 1fr;
  }
}

/* ---- PROFILE ---- */

/* Hero / Header */
.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 48px;
}
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 38px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.3);
  cursor: pointer;
  position: relative;
  transition: opacity 0.15s;
}
.profile-avatar:hover { opacity: 0.85; }
.profile-name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.profile-member-since {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 8px;
}
.profile-bio {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 400px;
  line-height: 1.5;
  margin-bottom: 12px;
}
.profile-location {
  font-size: 14px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  margin-bottom: 28px;
  cursor: pointer;
}
.profile-location:hover { color: var(--text); }

/* Editable profile fields */
.profile-editable {
  cursor: pointer;
  border-radius: 6px;
  padding: 2px 8px;
  margin-left: -8px;
  margin-right: -8px;
  transition: background 0.15s;
}
.profile-editable:hover {
  background: var(--bg-alt);
}
.profile-editing {
  background: var(--bg-alt);
}
.profile-edit-input {
  font-family: var(--font);
  font-size: inherit;
  font-weight: inherit;
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 6px 10px;
  width: 100%;
  max-width: 320px;
  outline: none;
  text-align: center;
  background: var(--bg);
}
.profile-edit-textarea {
  resize: vertical;
  text-align: center;
  min-height: 60px;
}
/* (avatar cursor/position added to existing .profile-avatar above would cascade, but we use specificity here) */
.avatar-color-picker {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
  padding: 10px 16px;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}
.avatar-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.avatar-swatch:hover {
  transform: scale(1.15);
}
.avatar-swatch-active {
  border-color: var(--text);
}

/* Stats Row */
.profile-stats-row {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 20px 8px;
  width: 100%;
  max-width: 520px;
}
.profile-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.profile-stat-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}
.profile-stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.profile-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* Listings Section */
.profile-listings-section {
  margin-bottom: 56px;
}
.profile-card-wrapper {
  position: relative;
}
.profile-card-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
  opacity: 0;
  backdrop-filter: blur(4px);
}
.profile-card-wrapper:hover .profile-card-delete {
  opacity: 1;
}
.profile-card-delete:hover {
  background: #fff;
  color: var(--danger);
  box-shadow: var(--shadow-card);
  transform: scale(1.08);
}

/* CTA Card */
.profile-cta-card {
  opacity: 1 !important;
}
.profile-cta-thumb {
  border: 2px dashed var(--border);
  background: transparent !important;
  color: var(--text-light);
  transition: border-color 0.15s, color 0.15s;
}
.profile-cta-card:hover .profile-cta-thumb {
  border-color: var(--accent);
  color: var(--accent);
}

/* Empty State */
.profile-empty-listings {
  display: block;
}
.profile-empty-state {
  text-align: center;
  padding: 56px 20px;
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  color: var(--text-light);
}
.profile-empty-icon {
  margin-bottom: 16px;
  color: var(--border);
}
.profile-empty-state p {
  font-size: 16px;
  margin-bottom: 20px;
  color: var(--text-light);
}

/* Reviews Section */
.profile-reviews-section {
  border-top: 1px solid var(--border-light);
  padding-top: 48px;
  margin-bottom: 56px;
}

/* Account Section */
.profile-account-section {
  border-top: 1px solid var(--border-light);
  padding: 40px 0 64px;
}
.profile-account-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}
.profile-reset-btn {
  font-size: 13px;
  height: 40px;
  padding: 0 20px;
  color: var(--text-light);
  border-color: var(--border);
}
.profile-reset-btn:hover {
  color: var(--danger);
  border-color: var(--danger);
}

/* Profile responsive */
@media (max-width: 640px) {
  .profile-hero {
    padding: 40px 0 36px;
    margin-bottom: 36px;
  }
  .profile-avatar {
    width: 80px;
    height: 80px;
    font-size: 32px;
  }
  .profile-name {
    font-size: 24px;
  }
  .profile-stats-row {
    padding: 16px 4px;
  }
  .profile-stat-value {
    font-size: 18px;
  }
  .profile-stat-label {
    font-size: 11px;
  }
  .profile-stat-divider {
    height: 28px;
  }
  .profile-card-delete {
    opacity: 1;
  }
}

/* ---- FILTER BAR (inline pills) ---- */

.filter-bar {
  display: flex;
  gap: 10px;
  padding: 14px 40px;
  flex-wrap: wrap;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 90;
  border-bottom: 1px solid var(--border-light);
  margin-left: -40px;
  margin-right: -40px;
}
.filter-pill-wrap {
  position: relative;
}
.filter-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.filter-pill:hover {
  border-color: var(--text);
}
.filter-pill-active {
  background: var(--bg-alt);
  border-color: var(--text);
  font-weight: 600;
}
/* Browse date popover — wider to fit dual calendar */
.browse-date-popover {
  min-width: 580px;
  left: 0;
}
.filter-pill svg {
  flex-shrink: 0;
}
.filter-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated);
  padding: 16px;
  z-index: 50;
  min-width: 220px;
}
.filter-dropdown.open {
  display: block;
}
.filter-dropdown-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.filter-dropdown-row label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  width: 48px;
  flex-shrink: 0;
}
.filter-dropdown-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  width: 100%;
}
.filter-dropdown-row input:focus {
  border-color: var(--text);
}
.filter-apply {
  display: block;
  width: 100%;
  padding: 10px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  margin-top: 6px;
}
.filter-apply:hover { background: #333; }
.filter-option {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.1s;
}
.filter-option:hover {
  background: var(--bg-alt);
  text-decoration: none;
  color: var(--text);
}
.filter-option.active {
  font-weight: 600;
  color: var(--text);
}

/* Subcategory chips */
.sub-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.sub-chip {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.sub-chip:hover {
  border-color: var(--text);
  color: var(--text);
}
.sub-chip-active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.sub-chip-active:hover {
  background: #333;
  color: #fff;
}
.filter-cat-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 6px;
}
.clear-filters {
  font-size: 14px;
  color: var(--text-light);
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.15s;
}
.clear-filters:hover { color: var(--text); }

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-light);
}
.results-header select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font);
  outline: none;
}

.no-results {
  padding: 80px 40px;
  text-align: center;
  color: var(--text-light);
  font-size: 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
}

/* ---- FLASH MESSAGES ---- */

.flash {
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 15px;
  margin-bottom: 20px;
  margin-top: 16px;
}
.flash-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.flash-success a { color: var(--accent); }
.flash-success svg { vertical-align: -4px; margin-right: 4px; }
.flash-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* ---- FOOTER ---- */

.site-footer {
  border-top: 1px solid var(--border-light);
  margin-top: 80px;
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-light);
  flex-wrap: wrap;
}
.footer-inner a {
  color: var(--text-secondary);
  text-decoration: none;
}
.footer-inner a:hover { text-decoration: underline; }
.footer-dot { color: var(--border); }

/* ---- RESPONSIVE ---- */

@media (max-width: 768px) {

  /* -- Global -- */
  body {
    font-size: 14px;
    padding-top: 114px;
  }
  .container {
    padding: 0 16px;
  }

  /* -- Nav -- */
  .site-nav {
    padding: 0;
  }
  .nav-row-1 {
    flex-wrap: nowrap;
    height: 56px;
    gap: 0;
    padding: 0 10px 0 16px;
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
    box-shadow: none;
    border-bottom: 1px solid var(--border-light);
  }
  .site-nav .logo {
    font-size: 22px;
    flex-shrink: 0;
    padding: 0;
  }
  /* Hide category tabs from row-1 on mobile — they move below search */
  .nav-row-1 .nav-cat-tabs {
    display: none !important;
  }
  .nav-links {
    gap: 4px;
    flex-shrink: 0;
    margin-left: auto;
    padding-right: 0;
    margin-right: 0;
  }
  .nav-links a:not(.nav-post):not(.nav-account):not(.nav-messages) {
    display: none;
  }
  .nav-post {
    padding: 10px 18px !important;
    font-size: 14px !important;
    min-height: 42px;
    display: inline-flex !important;
    align-items: center;
    border-radius: var(--radius-pill) !important;
  }
  .nav-account {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px;
    min-height: 42px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    border: 1px solid var(--border) !important;
  }
  .nav-account svg {
    width: 22px;
    height: 22px;
  }

  /* Nav search row — compact on mobile, placed below categories */
  .nav-row-2 {
    padding: 4px 12px;
    border-bottom: none;
    order: 3;
  }
  .nav-row-2.nav-row-2-visible {
    padding: 4px 12px;
    max-height: 52px;
  }
  /* Reorder nav rows: row-1 (logo), row-3 (categories), row-2 (search) */
  .site-nav .container {
    display: flex;
    flex-direction: column;
  }
  .nav-row-1 { order: 1; }
  .nav-row-3 { order: 2; }
  .nav-row-2 { order: 3; }

  /* Nav search — hide desktop, show mobile compact */
  .search-pill {
    display: none !important;
  }
  .search-compact {
    display: flex;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 14px;
    border-radius: var(--radius-pill);
    gap: 8px;
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    color: var(--text-light);
  }
  .search-compact svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  /* Category tabs — separate scrollable row below search in nav */
  .nav-cat-tabs {
    display: flex !important;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 6px 12px 8px;
    border-top: none;
    mask-image: linear-gradient(to right, #000 88%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent 100%);
  }
  .nav-cat-tabs::-webkit-scrollbar { display: none; }
  .nav-cat-tab {
    padding: 8px 14px;
    font-size: 13px;
    gap: 6px;
    flex-shrink: 0;
    flex-direction: row;
    border-radius: var(--radius-pill);
    min-height: 38px;
    border-bottom: none;
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    text-decoration: none;
  }
  .nav-cat-tab:hover {
    text-decoration: none;
    background: var(--bg-alt);
  }
  .nav-cat-tab-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: none;
    font-weight: 600;
  }
  .nav-cat-tab-active .nav-cat-icon svg {
    stroke: #fff;
  }
  .nav-cat-tab-active:hover {
    background: var(--accent);
    color: #fff;
  }
  .nav-cat-icon svg {
    width: 16px;
    height: 16px;
  }
  .nav-cat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
  }

  /* Row 3: mobile category tabs — shown below search */
  .nav-row-3 {
    display: block;
    border-top: 1px solid var(--border-light);
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
  }
  .nav-row-3 .nav-cat-tabs-mobile {
    display: flex !important;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 16px 10px;
    mask-image: linear-gradient(to right, #000 88%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent 100%);
  }
  .nav-row-3 .nav-cat-tabs-mobile::-webkit-scrollbar { display: none; }

  /* Category tabs — used in hero/browse, not in nav */
  .cat-tabs {
    gap: 20px;
  }

  /* Legacy nav-top fallback */
  .nav-top {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 56px;
  }

  /* -- Hero Search -- */
  .hero-search-section {
    padding: 10px 0 4px;
  }
  .hero-search-content {
    padding: 0 12px;
  }
  .hero-search-compact-mobile {
    display: none !important;
  }
  .hero-search-fields {
    flex-direction: column;
    padding: 12px 16px 14px;
    gap: 0;
    border-radius: 16px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  }
  .hero-field {
    padding: 10px 2px;
    min-height: 44px;
    gap: 10px;
  }
  .hero-field svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }
  .hero-field-inner label {
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
  }
  .hero-field-inner input {
    font-size: 15px;
    padding: 2px 0;
  }
  .hero-search-btn {
    padding: 14px;
    font-size: 15px;
    min-height: 46px;
    margin-top: 4px;
    border-radius: 12px;
  }
  .hero-cat-tabs {
    padding: 0 4px;
    justify-content: flex-start;
  }
  .hero-cat-tab {
    padding: 10px 12px 8px;
    font-size: 11px;
    min-height: 40px;
  }
  .hero-headline {
    font-size: 1.2rem;
    margin-bottom: 12px;
  }

  /* -- Mobile Search Overlay -- */
  .smo-panel {
    padding: 28px 24px 40px;
    border-radius: 24px 24px 0 0;
  }
  .smo-close {
    width: 44px;
    height: 44px;
  }
  .smo-title {
    font-size: 20px;
  }
  .smo-header {
    margin-bottom: 32px;
  }
  .smo-field {
    margin-bottom: 28px;
  }
  .smo-field label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
  }
  .smo-field input[type="text"],
  .smo-field input[type="date"] {
    padding: 16px 18px;
    font-size: 16px;
    border-radius: 14px;
    min-height: 52px;
  }
  .smo-search-btn {
    padding: 18px;
    font-size: 16px;
    border-radius: 14px;
    min-height: 56px;
    margin-top: 16px;
  }

  /* -- Section Headers -- */
  .section-header {
    margin-top: 16px !important;
    margin-bottom: 16px;
  }
  .section-header h2 {
    font-size: 20px;
    letter-spacing: -0.2px;
  }
  .section-header a {
    font-size: 14px;
  }

  /* -- Listing Cards Grid -- */
  .listings-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .card-thumb {
    aspect-ratio: 4/3;
    border-radius: var(--radius);
  }
  .card-body {
    padding: 12px 4px 4px;
    gap: 6px;
  }
  .card-title {
    font-size: 15px;
    -webkit-line-clamp: 2;
    line-height: 1.45;
  }
  .card-price {
    font-size: 17px;
  }
  .card-meta {
    font-size: 13px;
    margin-top: 2px;
  }

  /* -- Browse Page -- */
  .browse-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .filters-panel {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
  }
  .filters-panel h3 {
    margin-top: 0;
  }

  /* Filter bar — horizontal scroll on mobile */
  .filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 16px;
    gap: 8px;
    margin-left: -16px;
    margin-right: -16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-cat-title {
    font-size: 18px;
    flex-shrink: 0;
  }
  .filter-divider {
    height: 24px;
    margin: 0 4px;
    flex-shrink: 0;
  }
  .filter-pill {
    padding: 10px 16px;
    font-size: 13px;
    flex-shrink: 0;
    min-height: 44px;
  }
  .sub-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-shrink: 0;
  }
  .sub-chips::-webkit-scrollbar { display: none; }
  .sub-chip {
    flex-shrink: 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
  }
  .filter-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 20px 20px 0 0;
    min-width: 100%;
    padding: 24px 20px 32px;
    z-index: 200;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    animation: smo-slide-up 0.2s ease;
  }
  .filter-option {
    padding: 14px 16px;
    font-size: 15px;
    min-height: 44px;
  }
  .filter-dropdown-row input {
    padding: 14px 16px;
    font-size: 16px;
    min-height: 48px;
  }
  .filter-apply {
    padding: 14px;
    font-size: 15px;
    min-height: 48px;
    margin-top: 12px;
  }
  .clear-filters {
    flex-shrink: 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .results-header {
    margin-bottom: 16px;
    font-size: 13px;
  }
  .no-results {
    padding: 60px 20px;
    font-size: 15px;
  }

  /* -- PDP Layout -- */
  .pdp-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 0 100px;
  }
  /* PDP grid columns — stack single-column: gallery → title → sidebar → owner → reviews */
  .pdp-col-gallery { order: 1; }
  .pdp-mobile-title { order: 2; display: block; grid-column: 1; padding: 8px 0 0; }
  .pdp-col-desc { order: 3; }
  .pdp-sidebar { order: 4; grid-column: 1; grid-row: auto; }
  .pdp-col-owner { order: 5; }
  .pdp-col-reviews { order: 6; }
  /* Hide the title/meta inside sidebar on mobile since it's in the mobile-title block */
  .pdp-sidebar > .pdp-sidebar-title,
  .pdp-sidebar > .pdp-sidebar-meta { display: none; }
  /* Hide sidebar CTA on mobile — the fixed bottom bar handles it (except for owners) */
  .pdp-sidebar-cta:not(.pdp-sidebar-cta-owner) { display: none; }
  .pdp-col-gallery,
  .pdp-col-owner,
  .pdp-col-desc,
  .pdp-col-reviews {
    grid-column: 1;
  }
  .pdp-sidebar {
    position: static;
    width: 100%;
    max-height: none;
    overflow-y: visible;
    right: auto;
    background: none;
    padding: 0 4px;
    border-radius: 0;
    border: none;
    box-shadow: none;
    z-index: auto;
  }

  /* PDP Gallery */
  .pdp-gallery {
    margin-bottom: 8px;
    margin-left: -16px;
    margin-right: -16px;
  }
  .pdp-carousel {
    display: block;
  }
  .pdp-gallery-main-desktop,
  .pdp-gallery-thumbs {
    display: none !important;
  }
  .pdp-gallery-main {
    max-height: 280px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .pdp-gallery-placeholder {
    max-height: 200px;
    aspect-ratio: 16/9;
  }
  .pdp-carousel-counter {
    display: block;
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
  }

  /* PDP Sidebar on mobile */
  .pdp-sidebar-title {
    font-size: 22px;
    margin-bottom: 12px;
    line-height: 1.3;
  }
  .pdp-sidebar-meta {
    margin-bottom: 18px;
    padding-bottom: 18px;
    gap: 8px;
  }
  .pdp-sidebar-price-block {
    padding: 18px 20px;
    margin-bottom: 18px;
    border-radius: 14px;
  }
  .pdp-sidebar-price {
    font-size: 28px;
    letter-spacing: -0.8px;
  }
  .pdp-sidebar-price span {
    font-size: 14px;
  }
  .pdp-sidebar-detail {
    font-size: 13px;
  }
  .pdp-sidebar-avail {
    padding-bottom: 16px;
    margin-bottom: 16px;
  }
  .pdp-sidebar-avail-pill {
    padding: 10px 16px;
    font-size: 13px;
    min-height: 44px;
  }
  .pdp-sidebar-includes {
    padding-bottom: 16px;
    margin-bottom: 16px;
  }
  .pdp-sidebar-cta {
    padding: 4px 0 20px;
  }
  button.pdp-sidebar-btn,
  a.pdp-sidebar-btn {
    padding: 16px 0;
    font-size: 16px;
    min-height: 52px;
    border-radius: 12px;
  }
  .pdp-sidebar-owner {
    padding: 16px 18px;
    gap: 14px;
    border-radius: 14px;
  }
  .pdp-owner-avatar {
    width: 48px;
    height: 48px;
    font-size: 17px;
  }

  /* PDP sections */
  .pdp-section {
    padding: 16px 0;
  }
  /* Tighten "About this rental" when it follows the mobile title block */
  .pdp-col-desc .pdp-description {
    padding-top: 0;
    border-top: none;
  }
  .pdp-col-desc .pdp-description .pdp-section-title {
    margin-top: 0;
  }
  /* Tighten mobile title block — remove extra spacing below badges */
  .pdp-mobile-title {
    padding-bottom: 0;
    margin-bottom: 0;
  }
  .pdp-mobile-title .pdp-sidebar-meta {
    padding-bottom: 4px;
    margin-bottom: 0;
    border-bottom: none;
  }
  .pdp-section-title {
    font-size: 18px;
    margin-bottom: 14px;
  }
  .pdp-section-text {
    font-size: 14px;
    line-height: 1.7;
  }
  .pdp-description .pdp-section-title {
    font-size: 17px;
  }
  .pdp-title {
    font-size: 22px;
    line-height: 1.3;
  }

  /* PDP reviews */
  .pdp-reviews .pdp-section-title {
    font-size: 17px;
    gap: 8px;
  }
  .pdp-review {
    padding: 18px;
    margin-bottom: 12px;
    border-radius: 14px;
  }
  .pdp-review-header {
    gap: 12px;
    margin-bottom: 10px;
  }
  .pdp-review-avatar {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  .pdp-review-text {
    font-size: 14px;
    line-height: 1.65;
  }

  /* PDP Mobile Bottom Bar — only shown when .pdp-mobile-bar-visible is added by JS */
  .pdp-mobile-bar.pdp-mobile-bar-visible {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 999 !important;
    background: var(--bg) !important;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(0,0,0,0.10);
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: hidden;
    box-sizing: border-box;
  }
  /* Hide the modal's own submit button on mobile — the sticky bar handles it */
  .rent-modal-submit {
    display: none !important;
  }
  .pdp-mobile-bar-price {
    font-size: 14px;
  }
  .pdp-mobile-bar-price strong {
    font-size: 19px;
  }
  .pdp-mobile-bar-btn {
    height: 48px;
    line-height: 48px;
    padding: 0 24px;
    font-size: 15px;
    border-radius: 12px;
    min-height: 48px;
    flex: 1 1 auto;
    min-width: 0;
  }

  /* -- Rent Modal -- */
  .rent-modal-panel {
    border-radius: 20px 20px 0 0;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
  }
  .rent-modal-header {
    padding: 14px 20px;
    gap: 12px;
    flex-shrink: 0;
  }
  .rent-modal-close {
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
  }
  .rent-modal-title {
    font-size: 18px;
  }
  .rent-modal-body {
    padding: 16px 20px 90px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 0 1 auto;
  }
  .rent-modal-listing {
    margin-bottom: 16px;
  }
  .rent-modal-listing strong {
    font-size: 16px;
  }
  .rent-modal-dates {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .rent-modal-field {
    margin-bottom: 14px;
  }
  .rent-modal-field label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
  }
  .rent-modal-field input[type="date"],
  .rent-modal-field textarea {
    padding: 14px 16px;
    font-size: 16px;
    min-height: 48px;
    border-radius: 12px;
  }
  .rent-modal-field textarea {
    min-height: 64px;
    rows: 2;
  }
  button.rent-modal-submit,
  a.rent-modal-submit {
    padding: 16px 0;
    font-size: 16px;
    min-height: 52px;
    border-radius: 12px;
  }
  .rent-modal-summary {
    padding: 16px;
    border-radius: 12px;
  }
  .rent-modal-success {
    padding: 48px 24px 32px;
  }

  /* -- Form elements (post page) -- */
  .form-row {
    grid-template-columns: 1fr;
  }
  .form-page {
    padding: 28px 16px 60px;
  }
  .form-page h1 {
    font-size: 24px;
    margin-bottom: 28px;
  }
  .form-group {
    margin-bottom: 24px;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 16px 18px;
    font-size: 16px;
    border-radius: 12px;
    min-height: 52px;
  }

  /* -- Profile Page -- */
  .profile-hero {
    padding: 32px 0 28px;
    margin-bottom: 28px;
  }
  .profile-avatar {
    width: 80px;
    height: 80px;
    font-size: 30px;
    margin-bottom: 18px;
  }
  .profile-name {
    font-size: 24px;
  }
  .profile-bio {
    font-size: 15px;
    max-width: 100%;
    padding: 0 20px;
    line-height: 1.6;
  }
  .profile-member-since {
    font-size: 13px;
  }
  .profile-location {
    font-size: 14px;
    margin-bottom: 24px;
  }
  .profile-stats-row {
    padding: 18px 8px;
    max-width: 100%;
    border-radius: var(--radius);
    gap: 0;
  }
  .profile-stat-value {
    font-size: 20px;
  }
  .profile-stat-label {
    font-size: 11px;
  }
  .profile-stat-divider {
    height: 32px;
  }
  .profile-listings-section {
    margin-bottom: 40px;
  }
  .profile-reviews-section {
    padding-top: 32px;
    margin-bottom: 40px;
  }
  .profile-account-section {
    padding: 32px 0 56px;
  }
  .profile-card-delete {
    opacity: 1;
  }
  .profile-edit-input {
    max-width: 100%;
    font-size: 16px;
    min-height: 48px;
  }
  .profile-empty-state {
    padding: 48px 20px;
  }

  /* -- Post/Wizard Page -- */
  .wizard-page {
    padding: 24px 16px 60px;
  }
  .wizard-progress {
    gap: 4px;
    margin-bottom: 24px;
  }
  .wizard-step-indicator {
    font-size: 0;
    padding: 10px 12px;
    justify-content: center;
  }
  .wizard-step-indicator span {
    font-size: 12px;
  }
  .wizard-step-indicator.active {
    font-size: 12px;
  }
  .wiz-field {
    margin-bottom: 28px;
  }
  .wiz-input, .wiz-textarea {
    padding: 16px 18px;
    font-size: 16px;
    border-radius: 12px;
    min-height: 52px;
  }
  .wiz-cat-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .wiz-pickup-options {
    grid-template-columns: 1fr;
  }
  .wiz-btn {
    min-height: 52px;
    font-size: 16px;
    border-radius: 12px;
  }

  /* -- Footer -- */
  .site-footer {
    margin-top: 48px;
    padding: 24px 0 calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .footer-inner {
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    text-align: center;
  }
  .footer-dot {
    display: none;
  }

  /* -- Typography scale-down -- */
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 17px; }

  /* -- Global touch targets -- */
  .btn-primary,
  .btn-outline {
    min-height: 52px;
    font-size: 16px;
    border-radius: 12px;
  }

  /* -- Flash messages -- */
  .flash {
    font-size: 14px;
    padding: 14px 18px;
    border-radius: 12px;
  }

  /* -- Date popover (calendar) -- full-screen sheet on mobile */
  .date-popover {
    position: fixed;
    top: 113px; /* clear the fixed nav */
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 0;
    padding: 16px;
    padding-bottom: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain; /* prevent scroll bleeding to page */
    -webkit-overflow-scrolling: touch;
    animation: smo-slide-up 0.25s ease;
    z-index: 9999;
  }
  .dp-calendars {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .dp-day {
    height: 44px;
    font-size: 14px;
  }
  .dp-presets {
    gap: 6px;
  }
  .dp-preset {
    padding: 10px 14px;
    font-size: 13px;
    min-height: 40px;
  }
  .dp-footer {
    position: sticky;
    bottom: 0;
    background: var(--bg);
    padding: 12px 16px 16px;
    margin: 0 -16px;
    border-top: 1px solid var(--border-light);
    z-index: 1;
  }
  .dp-apply {
    min-height: 48px;
    font-size: 15px;
  }
  .browse-date-popover {
    min-width: 100%;
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 24px 24px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    animation: smo-slide-up 0.25s ease;
  }
}

/* ============================
   Auth Modal & Nav Auth
   ============================ */

/* Nav login button */
.nav-login-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: var(--font);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-login-btn:hover { background: var(--accent-hover); }
.nav-login-icon { display: none; }

.nav-auth-area {
  display: flex;
  align-items: center;
  margin-left: 8px;
  min-width: 70px;
  min-height: 36px;
}
.nav-auth-area:not(.nav-auth-ready) {
  opacity: 0;
}
.nav-auth-area.nav-auth-ready {
  opacity: 1;
}

/* Nav user avatar */
.nav-user-menu { position: relative; }
.nav-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--border-light);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.15s;
  font-family: var(--font);
  line-height: 1;
}
.nav-user-avatar:hover { box-shadow: 0 0 0 3px rgba(0,102,255,0.15); }

/* User dropdown */
.nav-user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated);
  z-index: 1000;
  overflow: hidden;
}
.nav-user-dropdown.open { display: block; }
.nav-user-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-user-info strong {
  font-size: 14px;
  color: var(--text);
}
.nav-user-info span {
  font-size: 13px;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-user-dropdown-divider {
  height: 1px;
  background: var(--border-light);
}
.nav-user-dropdown-item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  transition: background 0.1s;
}
.nav-user-dropdown-item:hover { background: var(--bg-alt); }
.nav-user-signout { color: var(--danger); }

/* Auth overlay */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: auth-fade-in 0.2s ease;
  padding: 16px;
}
@keyframes auth-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Auth modal card */
.auth-modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
  width: 100%;
  max-width: 420px;
  padding: 32px;
  position: relative;
  animation: auth-slide-up 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes auth-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  padding: 4px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-close:hover { background: var(--bg-alt); color: var(--text); }

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}
.auth-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.auth-header p {
  font-size: 14px;
  color: var(--text-light);
}

/* Auth tabs */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  background: var(--bg);
  border: none;
  cursor: pointer;
  color: var(--text-light);
  transition: background 0.15s, color 0.15s;
  font-family: var(--font);
}
.auth-tab:hover { background: var(--bg-alt); }
.auth-tab.active {
  background: var(--accent);
  color: #fff;
}

/* Auth form */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.auth-field input {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,102,255,0.1);
}
.auth-field input::placeholder { color: var(--text-light); }

.auth-error {
  font-size: 13px;
  color: var(--danger);
  background: #fef2f2;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid #fecaca;
}

.auth-btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: var(--font);
}
.auth-btn-primary:hover { background: var(--accent-hover); }
.auth-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: var(--text-light);
  font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

/* Google button */
.auth-btn-google {
  width: 100%;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text);
  transition: background 0.15s, box-shadow 0.15s;
  font-family: var(--font);
}
.auth-btn-google:hover {
  background: var(--bg-alt);
  box-shadow: var(--shadow-sm);
}
.auth-btn-google:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-footer-text {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  margin-top: 20px;
}
.auth-footer-text a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.auth-footer-text a:hover { text-decoration: underline; }

/* Auth-protected page overlay (for post/profile when not logged in) */
.auth-gate {
  text-align: center;
  padding: 80px 20px;
}
.auth-gate h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.auth-gate p {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 24px;
}
.auth-gate-btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s;
}
.auth-gate-btn:hover { background: var(--accent-hover); }

/* Mobile responsive auth */
@media (max-width: 600px) {
  .auth-modal {
    max-width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    animation: auth-slide-up-mobile 0.3s ease;
    max-height: 95vh;
    padding: 24px 20px 32px;
  }
  @keyframes auth-slide-up-mobile {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .auth-overlay { align-items: flex-end; padding: 0; }
  .auth-header h2 { font-size: 20px; }
  .nav-login-btn {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px;
    padding: 0 !important;
    border-radius: 50% !important;
    background: var(--bg) !important;
    color: var(--text-light) !important;
    border: 1px solid var(--border) !important;
  }
  .nav-login-btn:hover { background: var(--bg-alt) !important; }
  .nav-login-text { display: none; }
  .nav-login-icon { display: block !important; }
  .nav-auth-area { min-width: 42px !important; margin-left: 4px !important; }
}

/* ============================
   Messaging System
   ============================ */

/* Nav messages icon */
.nav-messages {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color 0.15s;
  padding: 8px !important;
  border-radius: 50% !important;
  width: 38px;
  height: 38px;
}
.nav-messages:hover { color: var(--accent); background: var(--bg-alt); }

/* Listing page: message button */
.pdp-msg-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  width: 100% !important;
  padding: 14px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border: 1.5px solid var(--border) !important;
  color: var(--text) !important;
  background: var(--bg) !important;
}
.pdp-msg-btn:hover {
  border-color: var(--text) !important;
  background: var(--bg) !important;
}
/* Message modal (PDP) */
.msg-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: auth-fade-in 0.2s ease;
}
.msg-modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
  width: 100%;
  max-width: 440px;
  position: relative;
  animation: auth-slide-up 0.25s ease;
  overflow: hidden;
}
.msg-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}
.msg-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.msg-modal-close {
  position: absolute;
  left: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  padding: 4px;
  border-radius: 8px;
  display: flex;
  align-items: center;
}
.msg-modal-close:hover { background: var(--bg-alt); color: var(--text); }
.msg-modal-body { padding: 20px; }
.msg-modal-listing-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.msg-modal-listing-img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
}
.msg-modal-listing-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}
.msg-modal-listing-info strong {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-modal-listing-info span {
  font-size: 13px;
  color: var(--text-light);
}
.msg-modal-recipient {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text-light);
}
.msg-modal-recipient-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
.msg-modal-textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
  min-height: 100px;
}
.msg-modal-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,102,255,0.1);
}
.msg-modal-error {
  font-size: 13px;
  color: var(--danger);
  min-height: 18px;
  margin-top: 8px;
}
.msg-modal-send {
  width: 100%;
  margin-top: 8px;
  padding: 14px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
}
.msg-modal-success {
  padding: 40px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.msg-modal-success h3 {
  font-size: 20px;
  color: var(--text);
  margin-top: 8px;
}
.msg-modal-success p {
  font-size: 14px;
  color: var(--text-light);
}
.msg-modal-view-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  margin-top: 8px;
}
.msg-modal-view-link:hover { text-decoration: underline; }
.msg-modal-done {
  margin-top: 12px;
  padding: 10px 32px;
  font-size: 14px;
}
@media (max-width: 600px) {
  .msg-modal {
    max-width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    animation: auth-slide-up-mobile 0.3s ease;
  }
  .msg-modal-overlay { align-items: flex-end; padding: 0; }
}

/* Messages page — two-panel layout */
body:has(.msg-page) { overflow: hidden; padding-top: 68px !important; }
body:has(.msg-page) .site-footer { display: none; }
body:has(.msg-page) .nav-row-2 { display: none !important; }
body:has(.msg-page) .nav-row-3 { display: none !important; }
.msg-page {
  display: flex;
  height: calc(100dvh - 68px);
  max-width: var(--max-width);
  margin: 0 auto;
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  overflow: hidden;
}

/* Sidebar: conversation list */
.msg-sidebar {
  width: 360px;
  min-width: 360px;
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  min-height: 0;
}
.msg-sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}
.msg-sidebar-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.msg-convo-list {
  flex: 1;
  overflow-y: auto;
}
.msg-convo-item {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}
.msg-convo-item:hover { background: var(--bg-alt); }
.msg-convo-active { background: #f0f4ff; }
.msg-convo-active:hover { background: #f0f4ff; }

.msg-convo-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}
.msg-convo-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.msg-convo-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.msg-convo-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-convo-time {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
  margin-left: 8px;
}
.msg-convo-listing {
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-convo-preview {
  font-size: 13px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Thread panel */
.msg-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  min-width: 0;
  min-height: 0;
}
.msg-thread-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-light);
  font-size: 15px;
}
.msg-thread-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
}
.msg-back-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
}
.msg-thread-header-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.msg-thread-header-info strong {
  font-size: 15px;
  color: var(--text);
}
.msg-thread-header-info span {
  font-size: 13px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-thread-listing-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
}
.msg-thread-listing-link:hover { text-decoration: underline; }

/* Messages area */
.msg-thread-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.msg-date-sep {
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  padding: 12px 0;
}
.msg-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
}
.msg-bubble-text { white-space: pre-wrap; }
.msg-bubble-sent {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-bubble-received {
  align-self: flex-start;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 4px;
}
.msg-bubble-time {
  font-size: 11px;
  margin-top: 4px;
  opacity: 0.7;
}
.msg-bubble-sent .msg-bubble-time { text-align: right; }

/* System messages (booking accepted/rejected) */
.msg-system {
  text-align: center;
  padding: 8px 16px;
  margin: 12px auto;
  max-width: 360px;
}
.msg-system span {
  display: inline-block;
  background: var(--bg-alt);
  padding: 8px 16px;
  border-radius: 16px;
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.4;
}

/* Booking action buttons in messages */
.msg-booking-actions {
  display: flex;
  gap: 8px;
  padding: 4px 0 12px;
  max-width: 340px;
}
.msg-booking-btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}
.msg-booking-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.msg-booking-btn-accept {
  background: #008a05;
  color: #fff;
  flex: 1;
}
.msg-booking-btn-accept:hover:not(:disabled) {
  background: #006d04;
}
.msg-booking-btn-decline {
  background: var(--bg-alt);
  color: var(--text-light);
  flex: 0;
  white-space: nowrap;
}
.msg-booking-btn-decline:hover:not(:disabled) {
  background: #f0f0f0;
  color: var(--text);
}
.msg-booking-btn-pay {
  background: var(--accent);
  color: #fff;
  flex: 1;
}
.msg-booking-btn-pay:hover:not(:disabled) {
  opacity: 0.9;
}
.msg-booking-status {
  font-size: 13px;
  color: var(--text-light);
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.msg-booking-status-accepted { color: #008a05; }
.msg-booking-status-declined { color: var(--text-light); font-style: italic; }
.msg-booking-status-paid { color: #008a05; font-weight: 600; }
.msg-booking-status-paid svg { stroke: #008a05; vertical-align: -2px; }

/* Compose bar */
.msg-thread-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
  background: var(--bg);
  border-top: 1px solid var(--border-light);
}
.msg-reply-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  resize: none;
  outline: none;
  max-height: 120px;
  transition: border-color 0.15s;
}
.msg-reply-input:focus {
  border-color: var(--accent);
}
.msg-reply-send {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.msg-reply-send:hover { background: var(--accent-hover); }
.msg-reply-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* Empty state */
.msg-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  gap: 8px;
}
.msg-empty p {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.msg-empty span {
  font-size: 14px;
  color: var(--text-light);
}
.msg-empty-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.msg-empty-btn:hover { background: var(--accent-hover); }

/* Mobile responsive messages */
@media (max-width: 768px) {
  body:has(.msg-page) { padding-top: 56px !important; }
  .msg-page {
    height: calc(100dvh - 56px);
    border: none;
  }
  .msg-sidebar {
    width: 100%;
    min-width: 100%;
  }
  .msg-thread {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    background: var(--bg-alt);
  }
  .msg-thread-open .msg-thread {
    transform: translateX(0);
  }
  .msg-thread-messages {
    -webkit-overflow-scrolling: touch;
  }
  .msg-back-btn { display: flex; }
  .msg-bubble { max-width: 85%; }
}
