/* ============================================================
   LetaLife – site.css
   Public-facing design system
   ============================================================ */

/* ---- Design tokens ---- */
:root {
  --ll-blue-900:  #1e3a8a;
  --ll-blue-700:  #1d4ed8;
  --ll-blue-500:  #3b82f6;
  --ll-blue-200:  #bfdbfe;
  --ll-blue-100:  #dbeafe;
  --ll-blue-50:   #eff6ff;

  --ll-amber-600: #d97706;
  --ll-amber-500: #f59e0b;
  --ll-amber-100: #fef3c7;

  --ll-green-700: #15803d;
  --ll-green-600: #16a34a;
  --ll-green-100: #dcfce7;
  --ll-green-50:  #f0fdf4;

  --ll-red-700:   #b91c1c;
  --ll-red-600:   #dc2626;
  --ll-red-100:   #fee2e2;
  --ll-red-50:    #fef2f2;

  --ll-violet-100: #ede9fe;
  --ll-violet-800: #5b21b6;

  --ll-slate-900: #0f172a;
  --ll-slate-800: #1e293b;
  --ll-slate-700: #334155;
  --ll-slate-600: #475569;
  --ll-slate-500: #64748b;
  --ll-slate-400: #94a3b8;
  --ll-slate-300: #cbd5e1;
  --ll-slate-200: #e2e8f0;
  --ll-slate-100: #f1f5f9;
  --ll-slate-50:  #f8fafc;

  --ll-bg:      var(--ll-slate-100);
  --ll-surface: #ffffff;
  --ll-border:  var(--ll-slate-200);
  --ll-text:    var(--ll-slate-900);
  --ll-muted:   var(--ll-slate-500);

  --ll-r-xs:  0.25rem;
  --ll-r-sm:  0.375rem;
  --ll-r:     0.625rem;
  --ll-r-lg:  1rem;
  --ll-r-xl:  1.25rem;
  --ll-r-2xl: 1.75rem;

  --ll-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --ll-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.07), 0 1px 2px -1px rgb(0 0 0 / 0.07);
  --ll-shadow:    0 4px 12px -2px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --ll-shadow-md: 0 8px 20px -4px rgb(0 0 0 / 0.10), 0 4px 8px -4px rgb(0 0 0 / 0.08);
  --ll-shadow-lg: 0 16px 40px -8px rgb(0 0 0 / 0.14), 0 8px 16px -8px rgb(0 0 0 / 0.10);
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
  background: var(--ll-bg);
  color: var(--ll-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ll-blue-700); text-decoration: none; }
a:hover { color: var(--ll-blue-900); text-decoration: underline; }


/* ---- Navbar ---- */
.ll-navbar {
  background: var(--ll-surface);
  border-bottom: 1px solid var(--ll-border);
  box-shadow: var(--ll-shadow-xs);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.ll-navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}
.ll-brand {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--ll-blue-900);
  text-decoration: none;
}
.ll-brand:hover { color: var(--ll-blue-700); text-decoration: none; }
.ll-brand-dot { color: var(--ll-amber-500); }

.ll-nav-links { display: flex; align-items: center; gap: 0.5rem; }

.ll-nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ll-slate-600);
  padding: 0.4rem 0.75rem;
  border-radius: var(--ll-r-sm);
  text-decoration: none;
  transition: color 0.12s, background 0.12s;
}
.ll-nav-link:hover {
  color: var(--ll-blue-700);
  background: var(--ll-blue-50);
  text-decoration: none;
}
.ll-nav-link.dropdown-toggle::after { vertical-align: 0.15em; }
.ll-navbar .dropdown-menu {
  border: 1px solid var(--ll-border);
  border-radius: var(--ll-r);
  box-shadow: var(--ll-shadow-md);
  padding: 0.35rem 0;
  min-width: 180px;
}
.ll-navbar .dropdown-item {
  font-size: 0.875rem;
  color: var(--ll-slate-700);
  padding: 0.45rem 1rem;
}
.ll-navbar .dropdown-item:hover {
  background: var(--ll-blue-50);
  color: var(--ll-blue-700);
}

.ll-nav-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.6rem;
  background: var(--ll-slate-50);
  border: 1px solid var(--ll-slate-200);
  border-radius: var(--ll-r-sm);
  font-size: 0.8rem;
}
.ll-nav-email {
  color: var(--ll-slate-600);
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ll-nav-signout {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  color: var(--ll-slate-400);
  cursor: pointer;
  transition: color 0.12s;
}
.ll-nav-signout:hover { color: var(--ll-slate-700); }

.btn-place-ad {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--ll-blue-700);
  color: #fff !important;
  border: none;
  border-radius: var(--ll-r-sm);
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.12s, transform 0.1s, box-shadow 0.12s;
  box-shadow: 0 1px 3px rgb(29 78 216 / 0.3);
}
.btn-place-ad:hover {
  background: var(--ll-blue-900);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgb(29 78 216 / 0.35);
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--ll-blue-700);
  color: #fff !important;
  border: none;
  border-radius: var(--ll-r);
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.12s, transform 0.1s, box-shadow 0.12s;
  box-shadow: 0 2px 6px rgb(29 78 216 / 0.3);
}
.btn-cta:hover {
  background: var(--ll-blue-900);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgb(29 78 216 / 0.35);
}


/* ---- Hero ---- */
.ll-hero {
  background: linear-gradient(130deg, var(--ll-blue-900) 0%, var(--ll-blue-700) 60%, #2563eb 100%);
  border-radius: var(--ll-r-xl);
  padding: 3.5rem 2.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.ll-hero::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 55%;
  height: 200%;
  background: rgba(255,255,255,0.045);
  border-radius: 50%;
  pointer-events: none;
}
.ll-hero h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}
.ll-hero .hero-sub {
  font-size: 1.05rem;
  opacity: 0.82;
  margin-bottom: 2rem;
  max-width: 480px;
}


/* ---- Search box (hero) ---- */
.ll-search-wrap { position: relative; max-width: 540px; }

.ll-search-input {
  width: 100%;
  height: 3.1rem;
  font-size: 1rem;
  padding: 0 1.1rem;
  border: 2px solid transparent;
  border-radius: var(--ll-r);
  box-shadow: 0 3px 16px rgb(0 0 0 / 0.18);
  outline: none;
  transition: border-color 0.15s;
}
.ll-search-input:focus {
  border-color: var(--ll-amber-500);
}
.ll-search-hint { font-size: 0.8rem; opacity: 0.65; margin-top: 0.5rem; }

.ll-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--ll-surface);
  border: 1px solid var(--ll-border);
  border-radius: var(--ll-r);
  box-shadow: var(--ll-shadow-lg);
  z-index: 500;
  max-height: 340px;
  overflow-y: auto;
  display: none;
}
.ll-search-results .s-item {
  display: block;
  padding: 0.7rem 1rem;
  color: var(--ll-text);
  text-decoration: none;
  border-bottom: 1px solid var(--ll-border);
  font-size: 0.9rem;
  transition: background 0.1s;
}
.ll-search-results .s-item:last-child { border-bottom: none; }
.ll-search-results .s-item:hover,
.ll-search-results .s-item.active {
  background: var(--ll-blue-50);
  color: var(--ll-blue-700);
}
.ll-search-results .s-item .s-county { font-size: 0.78rem; color: var(--ll-muted); margin-left: 0.35rem; }


/* ---- Ad card grid ---- */
.ad-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: start;   /* don't stretch rows — each card only as tall as its content */
}
@media (max-width: 900px) {
  .ad-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .ad-card-grid { grid-template-columns: 1fr; }
}

/* ---- Ad card ---- */
.ad-card {
  display: flex;
  flex-direction: column;
  background: var(--ll-surface);
  border: 1px solid var(--ll-border);
  border-radius: var(--ll-r-lg);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: box-shadow 0.18s, transform 0.15s;
  box-shadow: var(--ll-shadow-sm);
}
.ad-card:hover {
  box-shadow: var(--ll-shadow-md);
  transform: translateY(-3px);
  text-decoration: none;
  color: inherit;
}
.ad-card.is-elevated {
  box-shadow: 0 0 0 2px var(--ll-amber-500), var(--ll-shadow-sm);
}
.ad-card.is-elevated:hover {
  box-shadow: 0 0 0 2px var(--ll-amber-500), var(--ll-shadow-md);
}

/* Coloured type banner */
.ad-card-banner {
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.ad-card-banner.type-to_let {
  background: linear-gradient(120deg, var(--ll-blue-900) 0%, var(--ll-blue-700) 100%);
  color: #fff;
}
.ad-card-banner.type-wanted {
  background: linear-gradient(120deg, #5b21b6 0%, #7c3aed 100%);
  color: #fff;
}
.ad-card-banner.type-exchange {
  background: linear-gradient(120deg, var(--ll-green-700) 0%, #16a34a 100%);
  color: #fff;
}
.ad-card-type-label {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.92;
}
.ad-card-icon {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}
.ad-card-date-banner {
  font-size: 0.68rem;
  opacity: 0.7;
  white-space: nowrap;
}

/* Card body */
.ad-card-body {
  padding: 0.85rem 1rem 0.7rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.ad-card-title {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--ll-slate-900);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ad-card-desc {
  font-size: 0.82rem;
  color: var(--ll-slate-500);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card footer */
.ad-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--ll-border);
  background: var(--ll-slate-50);
  font-size: 0.75rem;
  color: var(--ll-muted);
  min-height: 2rem;
}
.ad-card-footer-left { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }

/* Legacy list-style (manage page etc) — kept for non-grid contexts */
.ad-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.2rem;
}
.ad-card-date { font-size: 0.775rem; color: var(--ll-muted); white-space: nowrap; flex-shrink: 0; }
.ad-card-meta { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.4rem; flex-wrap: wrap; }


/* ---- Badges ---- */
.ll-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  padding: 0.18em 0.6em;
  border-radius: 99px;
  white-space: nowrap;
}
.badge-to-let   { background: var(--ll-blue-100);   color: var(--ll-blue-900); }
.badge-wanted   { background: var(--ll-violet-100);  color: var(--ll-violet-800); }
.badge-exchange { background: var(--ll-green-100);   color: var(--ll-green-700); }
.badge-elevated { background: var(--ll-amber-100);   color: #78350f; }

.status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2em 0.65em;
  border-radius: var(--ll-r-sm);
}
.status-pending   { background: #fef9c3; color: #713f12; }
.status-approved  { background: var(--ll-green-100); color: #14532d; }
.status-rejected  { background: var(--ll-red-100);   color: #7f1d1d; }
.status-expired   { background: var(--ll-slate-100); color: var(--ll-slate-600); }
.status-hidden    { background: #fce7f3;              color: #831843; }
.status-withdrawn { background: var(--ll-slate-100); color: var(--ll-slate-600); }


/* ---- Surface cards ---- */
.ll-card {
  background: var(--ll-surface);
  border: 1px solid var(--ll-border);
  border-radius: var(--ll-r-lg);
  box-shadow: var(--ll-shadow-sm);
  overflow: hidden;
}
.ll-card-body { padding: 1.35rem 1.5rem; }
.ll-card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--ll-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ll-section-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ll-muted);
  margin-bottom: 0.75rem;
}


/* ---- Forms ---- */
.form-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ll-slate-700);
  margin-bottom: 0.3rem;
}
.form-control, .form-select {
  border-color: var(--ll-slate-300);
  border-radius: var(--ll-r-sm);
  font-size: 0.9375rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--ll-blue-500);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.15);
  outline: none;
}
.form-text { font-size: 0.8rem; color: var(--ll-muted); margin-top: 0.3rem; }
.is-invalid { border-color: var(--ll-red-600) !important; }
.invalid-feedback { font-size: 0.8rem; color: var(--ll-red-600); }


/* ---- Flash messages ---- */
.ll-flash {
  border-radius: var(--ll-r);
  padding: 0.875rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.ll-flash-success { background: var(--ll-green-50);  border: 1px solid #bbf7d0; color: var(--ll-green-700); }
.ll-flash-danger  { background: var(--ll-red-50);    border: 1px solid #fca5a5; color: var(--ll-red-700); }
.ll-flash-warning { background: var(--ll-amber-100); border: 1px solid #fde68a; color: #78350f; }
.ll-flash-info    { background: var(--ll-blue-50);   border: 1px solid var(--ll-blue-200); color: var(--ll-blue-900); }


/* ---- Ad detail ---- */
.ad-detail-card {
  background: var(--ll-surface);
  border: 1px solid var(--ll-border);
  border-radius: var(--ll-r-lg);
  padding: 2rem;
  box-shadow: var(--ll-shadow-sm);
  margin-bottom: 1.5rem;
}
.ad-detail-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
  color: var(--ll-slate-900);
}
.ad-full-desc {
  font-size: 0.95rem;
  line-height: 1.85;
  white-space: pre-wrap;
  color: var(--ll-slate-700);
}
.contact-box {
  background: var(--ll-green-50);
  border: 1px solid #bbf7d0;
  border-radius: var(--ll-r);
  padding: 1.25rem 1.5rem;
}
.feature-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.feature-badge {
  display: inline-flex;
  align-items: center;
  background: var(--ll-slate-100);
  color: var(--ll-slate-700);
  border: 1px solid var(--ll-slate-200);
  border-radius: var(--ll-r-sm);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.2em 0.65em;
}


/* ---- Manage link box ---- */
.manage-link-box {
  background: var(--ll-blue-50);
  border: 1px solid var(--ll-blue-200);
  border-radius: var(--ll-r);
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
}
.manage-link-url {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.8rem;
  word-break: break-all;
  color: var(--ll-blue-700);
  background: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: var(--ll-r-sm);
  border: 1px solid var(--ll-blue-200);
  display: block;
  margin: 0.5rem 0;
}


/* ---- Radius panel ---- */
.radius-panel {
  background: var(--ll-surface);
  border: 1px solid var(--ll-border);
  border-radius: var(--ll-r-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--ll-shadow-xs);
}


/* ---- Empty state ---- */
.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--ll-muted); }
.empty-state-icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.4; display: block; }
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--ll-slate-600); margin-bottom: 0.25rem; }


/* ---- Section headings ---- */
.ll-section-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ll-muted);
  margin-bottom: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ll-border);
}


/* ---- Pending page ---- */
.pending-card {
  background: var(--ll-surface);
  border: 1px solid var(--ll-border);
  border-radius: var(--ll-r-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: var(--ll-shadow);
}
.pending-icon { font-size: 3rem; margin-bottom: 1rem; display: block; }


/* ---- Town grid ---- */
.town-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.4rem; }
.town-link {
  display: block;
  padding: 0.45rem 0.75rem;
  background: var(--ll-surface);
  border: 1px solid var(--ll-border);
  border-radius: var(--ll-r-sm);
  color: var(--ll-slate-700);
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.12s;
  box-shadow: var(--ll-shadow-xs);
  line-height: 1.3;
}
.town-link:hover {
  background: var(--ll-blue-50);
  border-color: var(--ll-blue-200);
  color: var(--ll-blue-700);
  text-decoration: none;
  transform: translateX(2px);
}
.town-link-county { font-size: 0.75rem; color: var(--ll-muted); display: block; }


/* ---- Footer ---- */
.ll-footer {
  background: var(--ll-slate-900);
  color: var(--ll-slate-400);
  padding: 2.5rem 0 2rem;
  margin-top: 5rem;
}
.ll-footer-brand { font-size: 1.25rem; font-weight: 900; letter-spacing: -0.04em; color: #fff; }
.ll-footer-brand .dot { color: var(--ll-amber-500); }
.ll-footer a { color: var(--ll-slate-400); text-decoration: none; }
.ll-footer a:hover { color: #fff; }
.ll-footer-tagline { font-size: 0.85rem; margin-top: 0.25rem; }
.ll-footer-copy { font-size: 0.8rem; color: var(--ll-slate-600); margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--ll-slate-800); }


/* ---- Hamburger button ---- */
.ll-burger {
  background: none;
  border: 1px solid var(--ll-slate-200);
  border-radius: var(--ll-r-sm);
  color: var(--ll-slate-700);
  padding: 0.35rem 0.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.12s, border-color 0.12s;
}
.ll-burger:hover {
  background: var(--ll-slate-100);
  border-color: var(--ll-slate-300);
}

/* ---- Mobile off-canvas ---- */
.ll-offcanvas {
  width: 300px !important;
}
.ll-offcanvas .offcanvas-header {
  border-bottom: 1px solid var(--ll-border);
  padding: 1rem 1.25rem;
}
.ll-offcanvas .offcanvas-body {
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Mobile nav links */
.ll-mobile-nav {
  flex: 1;
  padding: 0.5rem 0;
}
.ll-mobile-nav a,
.ll-mobile-group > a {
  display: block;
  padding: 0.75rem 1.25rem;
  color: var(--ll-slate-800);
  font-size: 0.975rem;
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.ll-mobile-nav a:hover,
.ll-mobile-group > a:hover {
  background: var(--ll-blue-50);
  border-left-color: var(--ll-blue-500);
  color: var(--ll-blue-700);
}

/* Sub-pages indented under their parent */
.ll-mobile-children {
  background: var(--ll-slate-50);
  border-top: 1px solid var(--ll-border);
  border-bottom: 1px solid var(--ll-border);
  margin-bottom: 0.25rem;
}
.ll-mobile-children a {
  padding-left: 2rem;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--ll-slate-600);
}
.ll-mobile-children a::before {
  content: '└ ';
  opacity: 0.4;
  font-size: 0.8em;
}

/* Bottom of offcanvas */
.ll-mobile-footer {
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid var(--ll-border);
}
.ll-mobile-footer .btn-place-ad { width: 100%; justify-content: center; }
.ll-mobile-signout {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  color: var(--ll-slate-400);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: color 0.12s;
}
.ll-mobile-signout:hover { color: var(--ll-slate-700); }


/* ---- Responsive ---- */
@media (max-width: 575px) {
  .ll-hero { padding: 2.25rem 1.25rem; border-radius: var(--ll-r-lg); margin-bottom: 1.5rem; }
  .ll-hero h1 { font-size: 1.75rem; }
  .ad-detail-card { padding: 1.25rem; }
  .pending-card { padding: 1.75rem 1.25rem; }
  .town-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* ================================================================
   PHOTOS — public ad gallery & upload zone
   ================================================================ */

/* Public ad gallery */
.ad-photo-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.ad-photo-thumb {
  display: block;
  width: 160px;
  height: 120px;
  border-radius: var(--ll-r-sm);
  overflow: hidden;
  border: 1px solid var(--ll-border);
  flex-shrink: 0;
}
.ad-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.18s ease;
}
.ad-photo-thumb:hover img { transform: scale(1.04); }

/* Photo management grid (edit page) */
.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.photo-tile {
  position: relative;
  width: 150px;
  border-radius: var(--ll-r-sm);
  overflow: hidden;
  border: 1px solid var(--ll-border);
  background: #f8fafc;
}
.photo-tile img {
  width: 150px;
  height: 110px;
  object-fit: cover;
  display: block;
}
.photo-tile-status {
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  padding: 0.2rem 0.4rem;
}
.status-approved { background: #dcfce7; color: #15803d; }
.status-pending  { background: #fef9c3; color: #92400e; }

.photo-tile-actions {
  display: flex;
  gap: 0.3rem;
  padding: 0.35rem;
  background: #f1f5f9;
  justify-content: center;
}
.btn-xs {
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 0.25rem;
}

/* Drop zone */
.photo-dropzone {
  border: 2px dashed var(--ll-border);
  border-radius: var(--ll-r-sm);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #f8fafc;
}
.photo-dropzone:hover,
.photo-dropzone.dragover {
  border-color: var(--ll-blue-500);
  background: var(--ll-blue-50);
}
.photo-dropzone-inner {
  text-align: center;
  padding: 1rem;
  font-size: 0.88rem;
  color: var(--ll-muted);
}
.photo-dropzone-icon { font-size: 1.75rem; margin-bottom: 0.25rem; }
.photo-dropzone-inner a { color: var(--ll-blue-600); text-decoration: underline; cursor: pointer; }
.photo-upload-progress {
  text-align: center;
  padding: 1rem;
  font-size: 0.88rem;
  color: var(--ll-blue-600);
  font-style: italic;
}

@media (max-width: 540px) {
  .ad-photo-thumb { width: 120px; height: 88px; }
  .photo-tile { width: 130px; }
  .photo-tile img { width: 130px; height: 95px; }
}
