/**
 * SalesDesk — Desk Pages CSS  (v1)
 * assets/css/desks.css
 *
 * Two pages, one stylesheet, because they are two views of the same
 * thing — a broker's desk:
 *   §1–4  /desks/            the directory (.dk-*)
 *   §5–8  /{desk-slug}/      a single storefront (.ds-*)
 *
 * The storefront's inventory section reuses browse.css (sidebar, filter
 * sheet, results toolbar) and the shared .vc card; everything else is
 * composed from public.css components. Nothing here is redeclared from
 * global.css / public-shell.css / public.css.
 *
 * Behaviour: public.js (share, wishlist, [data-autosubmit] forms) and,
 * on the storefront only, browse.js (filter sheet, grid/list toggle).
 *
 * Sections:
 *   1. Directory hero
 *   2. Directory toolbar & province chips
 *   3. Desk cards
 *   4. Directory CTA
 *   5. Storefront hero
 *   6. Storefront contact + about
 *   7. Storefront inventory head
 *   8. Storefront CTA
 *   9. Error page (404/500)
 */


/* ══════════════════════════════════════
   1. DIRECTORY HERO
   ══════════════════════════════════════ */
.dk-hero {
  position: relative;
  color: var(--on-ink);
  background: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

.dk-hero__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(45% 70% at 82% 10%, rgba(242, 107, 29, .28) 0%, transparent 70%),
    radial-gradient(50% 80% at 12% 100%, rgba(47, 124, 246, .34) 0%, transparent 70%),
    linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 100%);
}

.dk-hero__inner {
  display: grid;
  justify-items: center;
  text-align: center;
  padding-block: clamp(32px, 5vw, 64px) clamp(36px, 5vw, 68px);
}

.dk-hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--on-ink);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--r-full);
}

.dk-hero__pill i { color: var(--accent-2); }

.dk-hero__title {
  margin: 18px 0 12px;
  font-family: var(--font-d);
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.04em;
  color: #fff;
  text-wrap: balance;
}

.dk-hero__accent {
  background: linear-gradient(95deg, var(--accent-2) 0%, var(--accent) 60%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dk-hero__sub {
  max-width: 620px;
  font-size: var(--fs-lg);
  line-height: 1.6;
  color: var(--on-ink-2);
  text-wrap: pretty;
}

.dk-search {
  display: flex;
  gap: 8px;
  width: min(680px, 100%);
  margin-top: 26px;
  padding: 6px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--r-full);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.dk-search__field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.dk-search__field--select { flex: 0 1 210px; }

.dk-search__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: rgba(232, 238, 248, .6);
  pointer-events: none;
}

.dk-search__input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 40px;
  font: 500 15px/1 var(--sans);
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: var(--r-full);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.dk-search__input::placeholder { color: rgba(232, 238, 248, .5); font-weight: 400; }
.dk-search__input:focus-visible { box-shadow: 0 0 0 3px rgba(47, 124, 246, .45); }

.dk-search__select {
  cursor: pointer;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23c6d2e4' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* Native dropdown lists render on the page background, not the hero */
.dk-search__select option { color: var(--text); background: var(--white); }

.dk-search__btn { flex-shrink: 0; }

.dk-hero__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 32px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--on-ink-2);
}

.dk-hero__stats strong {
  font-family: var(--font-d);
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  margin-right: 4px;
}

@media (max-width: 640px) {
  .dk-search {
    flex-wrap: wrap;
    border-radius: var(--r-xl);
  }
  .dk-search__field,
  .dk-search__field--select { flex: 1 1 100%; }
  .dk-search__input { height: 46px; font-size: 16px; }   /* 16px: no iOS zoom */
  .dk-search__btn { width: 100%; }
  .dk-hero__stats { gap: 8px 20px; font-size: 13px; }
  .dk-hero__stats strong { font-size: 17px; }
}


/* ══════════════════════════════════════
   2. DIRECTORY TOOLBAR & PROVINCE CHIPS
   ══════════════════════════════════════ */
.dk-body { padding-bottom: 8px; }

.dk-toolbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0 10px;
  background: rgba(244, 246, 250, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.dk-toolbar__count {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  color: var(--muted);
}

.dk-toolbar__count strong { color: var(--text); }

.dk-provinces {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.dk-provinces::-webkit-scrollbar { display: none; }

.dk-provinces__n {
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  border-radius: var(--r-full);
}

.pub-chip.is-active .dk-provinces__n { color: var(--p); background: rgba(255, 255, 255, .7); }


/* ══════════════════════════════════════
   3. DESK CARDS
   ══════════════════════════════════════ */
.dk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(14px, 1.6vw, 20px);
}

.dk-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  transition: box-shadow var(--dur-3) var(--ease), transform var(--dur-3) var(--ease), border-color var(--dur-2);
}

.dk-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.dk-card:focus-within { box-shadow: 0 0 0 3px var(--p-ring), var(--shadow-md); }

.dk-card__head { display: flex; align-items: center; gap: 14px; min-width: 0; }

.dk-avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  font: 700 18px/1 var(--font-d);
  color: #fff;
  background: linear-gradient(135deg, var(--p-bright), var(--p-dark));
  border-radius: 50%;
  overflow: hidden;
}

.dk-avatar img { width: 100%; height: 100%; object-fit: cover; }

.dk-card__id { display: grid; gap: 2px; min-width: 0; }

.dk-card__name {
  font-family: var(--font-d);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--text);
}

.dk-card__link { color: inherit; }
.dk-card__link:hover { color: var(--p); }

/* Whole card is the link target; nothing else inside is interactive */
.dk-card__link::after { content: ''; position: absolute; inset: 0; }

.dk-card__broker { font-size: 13.5px; color: var(--muted); }

.dk-card__loc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--faint);
}

.dk-card__meta { display: grid; gap: 8px; justify-items: start; }

.dk-card__tagline {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text2);
}

.dk-card__preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: auto;
}

.dk-card__thumb {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: linear-gradient(160deg, #e9eef6, #dfe6f0);
}

.dk-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

.dk-card__thumb--empty {
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--border2);
}

.dk-card__stats {
  display: flex;
  align-items: center;
  gap: 6px 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

.dk-card__stats strong {
  font-family: var(--font-d);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-right: 2px;
}

.dk-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--p);
  white-space: nowrap;
}

.dk-card__cta i { font-size: 11px; transition: transform var(--dur-2) var(--ease); }
.dk-card:hover .dk-card__cta i { transform: translateX(4px); }

.dk-empty { margin-top: 4px; }
.dk-empty__btn { margin-top: 14px; }


/* ══════════════════════════════════════
   4. DIRECTORY CTA
   ══════════════════════════════════════ */
.dk-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: var(--section-y);
  padding: clamp(26px, 4vw, 48px);
  color: var(--on-ink);
  border-radius: var(--r-2xl);
  background:
    radial-gradient(60% 100% at 100% 0%, rgba(242, 107, 29, .3) 0%, transparent 60%),
    linear-gradient(150deg, var(--ink-3), var(--ink));
}

.dk-cta .pub-eyebrow { color: var(--accent-2); }

.dk-cta__title {
  font-family: var(--font-d);
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -.03em;
  color: #fff;
}

.dk-cta__sub {
  max-width: 560px;
  margin-top: 10px;
  color: var(--on-ink-2);
}

.dk-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 560px) {
  .dk-cta__actions,
  .dk-cta__actions .pub-btn { width: 100%; }
}


/* ══════════════════════════════════════
   5. STOREFRONT HERO
   ══════════════════════════════════════ */
.ds-hero {
  position: relative;
  margin-top: 14px;
  padding: clamp(24px, 3.4vw, 40px);
  color: var(--on-ink);
  border-radius: var(--r-2xl);
  overflow: hidden;
  background:
    radial-gradient(55% 90% at 100% 0%, rgba(242, 107, 29, .28) 0%, transparent 62%),
    radial-gradient(50% 90% at 0% 100%, rgba(47, 124, 246, .32) 0%, transparent 65%),
    linear-gradient(150deg, var(--ink-3) 0%, var(--ink) 75%);
}

.ds-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 24px;
}

.ds-hero__id { display: flex; align-items: center; gap: 18px; min-width: 0; }

.ds-avatar {
  display: grid;
  place-items: center;
  width: clamp(64px, 7vw, 84px);
  height: clamp(64px, 7vw, 84px);
  flex-shrink: 0;
  font: 700 26px/1 var(--font-d);
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 2px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  overflow: hidden;
}

.ds-avatar img { width: 100%; height: 100%; object-fit: cover; }

.ds-hero__name {
  font-family: var(--font-d);
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.04em;
  color: #fff;
  text-wrap: balance;
}

.ds-hero__broker {
  margin-top: 6px;
  font-size: 15px;
  color: var(--on-ink-2);
}

.ds-hero__tagline {
  max-width: 640px;
  margin-top: 18px;
  font-size: var(--fs-lg);
  line-height: 1.55;
  color: var(--on-ink-2);
}

.ds-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ds-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--on-ink);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--r-full);
}

.ds-tag i { font-size: 11px; color: var(--accent-2); }
.ds-tag--verified i { color: #6ee7a0; }

.ds-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ds-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.ds-hero__stats li {
  flex: 1 1 140px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--r-lg);
}

.ds-hero__stats strong {
  display: block;
  font: 700 22px/1.1 var(--font-d);
  letter-spacing: -.03em;
  color: #fff;
}

.ds-hero__stats span { font-size: 12.5px; color: var(--on-ink-2); }

@media (max-width: 760px) {
  .ds-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .ds-hero__actions { justify-content: flex-start; }
  .ds-hero__id { gap: 14px; }
  .ds-hero__stats li { flex-basis: calc(50% - 6px); padding: 12px 14px; }
}


/* ══════════════════════════════════════
   6. STOREFRONT CONTACT + ABOUT
   ══════════════════════════════════════ */
.ds-about {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.ds-about--split { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }

.ds-panel {
  padding: 20px 22px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}

.ds-panel__title {
  margin-bottom: 10px;
  font-family: var(--font-d);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
}

.ds-panel__text {
  color: var(--text2);
  line-height: 1.75;
  white-space: pre-line;
}

.ds-panel__text.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

.ds-steps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.ds-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text2);
}

.ds-steps__n {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  font: 700 13px/1 var(--font-d);
  color: var(--p);
  background: var(--p-light);
  border-radius: 50%;
}

.ds-contact { display: grid; gap: 10px; align-content: start; }

.ds-contact__row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text2);
}

.ds-contact__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  color: var(--p);
  background: var(--p-light);
  border-radius: var(--r-md);
}

.ds-contact__actions { display: grid; gap: 8px; margin-top: 4px; }

.ds-trust {
  display: grid;
  gap: 6px;
  margin: 6px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
  font-size: 12.5px;
  color: var(--muted);
}

.ds-trust li { display: flex; align-items: center; gap: 8px; }
.ds-trust i { width: 14px; text-align: center; color: var(--green); }

@media (max-width: 860px) {
  .ds-about--split { grid-template-columns: minmax(0, 1fr); }
}


/* ══════════════════════════════════════
   7. STOREFRONT INVENTORY HEAD
   ══════════════════════════════════════ */
.ds-inventory { padding-top: clamp(24px, 3vw, 40px); }

.ds-inventory__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ds-inventory__title {
  font-family: var(--font-d);
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--text);
}

.ds-inventory__sub { margin-top: 4px; color: var(--muted); }


/* ══════════════════════════════════════
   8. STOREFRONT CTA
   ══════════════════════════════════════ */
.ds-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: clamp(32px, 4vw, 56px);
  padding: clamp(22px, 3vw, 36px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
}

.ds-cta__title {
  font-family: var(--font-d);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--text);
}

.ds-cta__sub { margin-top: 6px; color: var(--muted); }

@media (max-width: 560px) {
  .ds-cta { text-align: left; }
  .ds-cta .pub-btn { width: 100%; }
}


/* ══════════════════════════════════════
   9. ERROR PAGE (404 / 500 — broker/404.php)
   ══════════════════════════════════════ */
.err {
  max-width: 720px;
  margin-inline: auto;
  padding-block: clamp(36px, 7vw, 88px);
  text-align: center;
}

.err__code {
  display: block;
  font: 800 clamp(72px, 14vw, 132px)/1 var(--font-d);
  letter-spacing: -.06em;
  background: linear-gradient(180deg, var(--border2), var(--border));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.err__title {
  margin-top: 6px;
  font-family: var(--font-d);
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--text);
}

.err__sub {
  max-width: 480px;
  margin: 10px auto 0;
  color: var(--muted);
  text-wrap: pretty;
}

.err__path {
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text2);
  background: var(--bg);
  border-radius: var(--r-sm);
  overflow-wrap: anywhere;
}

.err__search {
  position: relative;
  display: flex;
  gap: 6px;
  width: min(520px, 100%);
  margin: 26px auto 0;
  padding: 5px 5px 5px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.err__search-icon { align-self: center; color: var(--muted); font-size: 13px; }

.err__search-input {
  flex: 1;
  min-width: 0;
  font: 500 15px/1 var(--sans);
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
}

.err__search .typeahead-box { top: calc(100% + 8px); }

.err__links {
  display: grid;
  gap: 10px;
  width: min(520px, 100%);
  margin: 26px auto 0;
  text-align: left;
}

.err__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--text);
  transition: border-color var(--dur-1), box-shadow var(--dur-2), transform var(--dur-2) var(--ease);
}

.err__link:hover { border-color: var(--p-b); box-shadow: var(--shadow-sm); transform: translateX(3px); }

.err__link > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.err__link strong { font-weight: 600; }
.err__link span span { font-size: 13px; color: var(--muted); }
.err__link > i { color: var(--p); font-size: 12px; }

.err__link-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--p);
  background: var(--p-light);
  border-radius: var(--r-md);
}

@media (max-width: 560px) {
  .err__search { flex-wrap: wrap; border-radius: var(--r-xl); padding: 10px; }
  .err__search-icon { display: none; }
  .err__search-input { flex: 1 1 100%; height: 42px; font-size: 16px; padding-inline: 8px; }
  .err__search-btn { width: 100%; }
}


/* ══════════════════════════════════════
   SHORT VIEWPORTS (landscape phones)
   ══════════════════════════════════════ */
@media (max-height: 520px) and (orientation: landscape) {
  .err { padding-block: 24px 32px; }
  .err__code { font-size: clamp(56px, 9vw, 80px); }
  .err__links { margin-top: 18px; }

  .ds-hero__grid,
  .dk-hero { padding-block: 22px; }
}

/* Touch: the desk cards' inline links sit in dense rows */
@media (pointer: coarse) {
  .dk-card__visit,
  .ds-about__link { padding-block: 8px; }
}
