/* ===========================================================
   Community Home Guide V2 — directory/dashboard/admin styles.
   Layered on top of site.css (same design tokens); loaded only
   on the pages that need it (browse, listing, category,
   dashboard, admin) so the marketing pages stay untouched.
   =========================================================== */

/* ---------- breadcrumb ---------- */
.listing-breadcrumb { font-size: 0.85rem; color: var(--muted-soft); margin-bottom: 14px; }
.listing-breadcrumb a { color: var(--pine-deep); }
.listing-breadcrumb a:hover { text-decoration: underline; }

/* ---------- listing hero ---------- */
.listing-hero { background: var(--fog); padding: 48px 0 36px; }
.listing-hero h1 { margin-bottom: 6px; }
.listing-also-cats { font-size: 0.88rem; color: var(--muted); margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- listing detail layout ---------- */
.listing-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: start; }
.listing-section { margin-bottom: 28px; }
.listing-section h2, .listing-section h3 { margin-bottom: 10px; }
.listing-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 28px; }
.listing-gallery-item { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; }
.listing-gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.listing-sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 90px; }
.listing-sidebar .card h3 { font-size: 1rem; margin-bottom: 12px; }
.listing-contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 0.94rem; }
.listing-contact-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); }
.listing-contact-list svg { flex: none; margin-top: 2px; color: var(--pine); }
.hours-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.hours-table td { padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.hours-table td.day { color: var(--timber); font-weight: 600; width: 40%; }
.hours-table td.hours { color: var(--muted); }

/* ---------- listing cards (browse / category grids) ---------- */
.listing-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.listing-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--pine); }
.listing-card-img { aspect-ratio: 16/10; background: var(--fog); }
.listing-card-img img { width: 100%; height: 100%; object-fit: cover; }
.listing-card-img--placeholder { display: flex; align-items: center; justify-content: center; }
.listing-card-body { padding: 18px 20px 20px; }
.listing-card-body h3 { font-size: 1.02rem; margin-bottom: 4px; display: flex; align-items: center; flex-wrap: wrap; }
.listing-card-meta { font-size: 0.85rem; color: var(--muted-soft); margin-bottom: 8px; }
.listing-card-desc { font-size: 0.9rem; margin: 0; }

/* ---------- browse filter bar ---------- */
.browse-filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px; display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.browse-filters input, .browse-filters select { flex: 1 1 200px; min-width: 0; }
.browse-filters button { flex: none; }
.browse-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.browse-meta-count { font-size: 0.92rem; color: var(--muted); }
.browse-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.browse-pagination button { min-width: 42px; padding: 10px; border-radius: 9px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-family: var(--font-display); font-weight: 600; }
.browse-pagination button.is-active { background: var(--rust); border-color: var(--rust); color: #fff; }
.browse-pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.browse-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.category-pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.category-pill { font-size: 0.85rem; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
.category-pill.is-active { background: var(--pine); border-color: var(--pine); color: #fff; }

/* ---------- claim modal ---------- */
.claim-modal { position: fixed; inset: 0; background: rgba(35, 32, 27, 0.55); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.claim-modal[hidden] { display: none; }
.claim-modal-inner { max-width: 420px; width: 100%; position: relative; box-shadow: var(--shadow); }
.claim-modal-close { position: absolute; top: 14px; right: 14px; background: none; border: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); }
.claim-modal h3 { margin-bottom: 10px; }
.claim-modal .form-field { margin-bottom: 14px; }
.claim-modal .notice { margin-bottom: 16px; font-size: 0.85rem; padding: 14px 16px; }

/* ---------- owner dashboard ---------- */
.dashboard-shell { max-width: 880px; margin: 0 auto; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 12px; }
.dashboard-header .badge { margin-top: 4px; }
.dashboard-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin: 16px 0; }
.dashboard-photo { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 1; border: 1px solid var(--line); }
.dashboard-photo img { width: 100%; height: 100%; object-fit: cover; }
.dashboard-photo button { position: absolute; top: 6px; right: 6px; background: rgba(35,32,27,0.65); color: #fff; border: none; border-radius: 999px; width: 24px; height: 24px; cursor: pointer; font-size: 0.9rem; line-height: 1; }
.dashboard-photo-upload { border: 2px dashed var(--line); border-radius: 10px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); font-size: 0.82rem; text-align: center; padding: 8px; }
.dashboard-photo-upload:hover { border-color: var(--pine); color: var(--pine); }
.gate-card { max-width: 480px; margin: 90px auto; text-align: center; }

/* ---------- admin ---------- */
.admin-shell { max-width: 1080px; margin: 0 auto; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-tabs button { font-family: var(--font-display); font-weight: 600; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.admin-tabs button.is-active { background: var(--timber); border-color: var(--timber); color: #fff; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.admin-table th { text-align: left; font-family: var(--font-display); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted-soft); padding: 8px 10px; border-bottom: 2px solid var(--line); }
.admin-table td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.admin-status { font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 3px 9px; border-radius: 999px; }
.admin-status.draft { background: var(--rust-pale); color: var(--rust-deep); }
.admin-status.sent { background: var(--pine-pale); color: var(--pine-deep); }
.admin-status.used { background: #e4e9f7; color: #34449b; }
.admin-status.expired { background: var(--fog); color: var(--muted); }
.admin-invite-picker { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-invite-picker input, .admin-invite-picker select { flex: 1 1 200px; }
.admin-listing-pick-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 16px; }
.admin-listing-pick-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); font-size: 0.9rem; }
.admin-listing-pick-row:last-child { border-bottom: none; }
.admin-draft-preview { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-top: 6px; background: var(--paper); font-size: 0.88rem; }
.admin-draft-preview iframe { width: 100%; border: none; height: 220px; background: #fff; border-radius: 8px; }

@media (max-width: 880px) {
  .listing-layout { grid-template-columns: 1fr; }
  .listing-sidebar { position: static; }
  .listing-gallery { grid-template-columns: repeat(2, 1fr); }
  .listing-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .listing-card-grid { grid-template-columns: 1fr; }
  .listing-gallery { grid-template-columns: 1fr; }
}
