/* Buyer listings page */
.page-buyer-listings {
  background: var(--cream);
}

.page-buyer-listings .container {
  width: 100%;
}

.page-buyer-listings .filter-bar__left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.buyer-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 30px 0 24px;
  background:
    radial-gradient(circle at 82% 18%, rgba(221,184,90,.2), transparent 30%),
    linear-gradient(135deg,#FFFFFF 0%,#F8F7F4 52%,#EEF2FA 100%);
  border-bottom: 1px solid rgba(11,42,91,.08);
}

.buyer-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11,42,91,.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(11,42,91,.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(90deg,#000 0%, transparent 72%);
  mask-image: linear-gradient(90deg,#000 0%, transparent 72%);
  pointer-events: none;
}

.buyer-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 70px;
  z-index: -1;
  background: linear-gradient(180deg,rgba(248,247,244,0),#F8F7F4);
  pointer-events: none;
}

.buyer-hero .container {
  position: relative;
  z-index: 1;
}

body.has-topbar.page-buyer-listings .buyer-hero {
  padding-top: calc(var(--header-h) + 30px);
}

.buyer-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: end;
  margin-top: 18px;
}

.buyer-hero__label {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.buyer-hero h1 {
  max-width: 940px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(1.95rem, 3vw, 2.9rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
}

.buyer-hero h1 em {
  color: var(--gold);
  font-weight: 700;
}

.buyer-hero__copy > p:last-child {
  max-width: 680px;
  margin-top: 12px;
  color: var(--slate);
  font-size: .94rem;
  line-height: 1.65;
}

.buyer-hero__stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 520px;
}

.buyer-hero__stats span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid rgba(11,42,91,.1);
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 10px 28px rgba(11,42,91,.08);
  color: var(--slate);
  font-size: .76rem;
  white-space: nowrap;
}

.buyer-hero__stats strong {
  margin-right: 5px;
  color: var(--navy);
}

.buyer-search {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(210px, .65fr) 138px;
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid rgba(11,42,91,.12);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 12px 36px rgba(11,42,91,.08);
}

.buyer-search label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  border-right: 1px solid rgba(11,42,91,.1);
}

.buyer-search svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke: var(--slate);
}

.buyer-search input,
.buyer-search select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: .86rem;
}

.buyer-search input::placeholder {
  color: rgba(74,101,128,.72);
}

.buyer-search button {
  min-width: 0;
  background: var(--navy);
  color: var(--white);
  font-size: .84rem;
  font-weight: 800;
  transition: var(--transition);
}

.buyer-search button:hover {
  background: var(--gold);
  color: var(--navy);
}

.buyer-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  color: var(--slate);
  font-size: .82rem;
}

.buyer-hero__tags a {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 12px;
  border: 1px solid rgba(11,42,91,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: var(--slate);
  transition: var(--transition);
}

.buyer-hero__tags a:hover {
  border-color: rgba(200,155,60,.45);
  color: var(--navy);
  transform: translateY(-1px);
}

.buyer-main {
  padding-top: 24px;
}

.buyer-results {
  min-width: 0;
  max-width: 100%;
}

.buyer-view-note {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.buyer-view-note span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid rgba(11,42,91,.1);
  border-radius: 999px;
  background: var(--white);
  color: var(--slate);
  font-size: .72rem;
  font-weight: 700;
}

.buyer-range-fill {
  inset: 0;
}

.buyer-mandate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  width: 100%;
  max-width: 100%;
  gap: 18px;
  margin-top: 16px;
}

.buyer-mandate-card[hidden] {
  display: none !important;
}

.buyer-mandate-card {
  --mandate-color: var(--navy);
  --mandate-soft: rgba(11,42,91,.1);
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(11,42,91,.12);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #f9fbff 100%);
  box-shadow: 0 14px 34px rgba(11,42,91,.1);
  flex-direction: column;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.buyer-mandate-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 92% 12%, var(--mandate-soft), transparent 31%),
    linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.72) 52%, rgba(255,255,255,0));
}

.buyer-mandate-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--mandate-color) 42%, white);
  box-shadow: 0 20px 44px rgba(11,42,91,.14);
}

.mandate-red { --mandate-color: #F45B64; --mandate-soft: rgba(244,91,100,.13); }
.mandate-orange { --mandate-color: #F47B2A; --mandate-soft: rgba(244,123,42,.14); }
.mandate-green { --mandate-color: #34C589; --mandate-soft: rgba(52,197,137,.14); }
.mandate-blue { --mandate-color: #2466A8; --mandate-soft: rgba(36,102,168,.14); }
.mandate-gold { --mandate-color: #C89B3C; --mandate-soft: rgba(200,155,60,.16); }
.mandate-purple { --mandate-color: #8D6AF1; --mandate-soft: rgba(141,106,241,.14); }

.buyer-card-ribbon {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 42px;
  overflow: hidden;
  background: var(--mandate-color);
  color: #fff;
}

.buyer-card-ribbon > span {
  align-self: stretch;
  background: rgba(255,255,255,.14);
}

.buyer-card-ribbon strong {
  justify-self: center;
  padding: 0 7px;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
}

.buyer-card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-right: 9px;
}

.buyer-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 10px;
  background: rgba(255,255,255,.14);
  color: #fff;
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

.buyer-card-icon:hover,
.buyer-card-icon.is-active {
  background: #fff;
  color: var(--mandate-color);
  transform: translateY(-1px);
}

.buyer-card-icon svg {
  width: 15px;
  height: 15px;
}

.buyer-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 16px 14px;
}

.buyer-card-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.buyer-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #0B2A5B;
  color: var(--gold-light);
  font-size: 0;
  box-shadow: 0 12px 24px rgba(11,42,91,.16);
}

.buyer-avatar::before {
  content: "";
  width: 25px;
  height: 25px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20viewBox%3D%270%200%2024%2024%27%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M16%2021v-2a4%204%200%200%200-4-4H6a4%204%200%200%200-4%204v2%27/%3E%3Ccircle%20cx%3D%279%27%20cy%3D%277%27%20r%3D%274%27/%3E%3Cpath%20d%3D%27M22%2021v-2a4%204%200%200%200-3-3.87%27/%3E%3Cpath%20d%3D%27M16%203.13a4%204%200%200%201%200%207.75%27/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20viewBox%3D%270%200%2024%2024%27%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M16%2021v-2a4%204%200%200%200-4-4H6a4%204%200%200%200-4%204v2%27/%3E%3Ccircle%20cx%3D%279%27%20cy%3D%277%27%20r%3D%274%27/%3E%3Cpath%20d%3D%27M22%2021v-2a4%204%200%200%200-3-3.87%27/%3E%3Cpath%20d%3D%27M16%203.13a4%204%200%200%201%200%207.75%27/%3E%3C/svg%3E") center / contain no-repeat;
}

.buyer-card-heading h2 {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: .94rem;
  font-weight: 800;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.buyer-card-details {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed rgba(74,101,128,.28);
  border-radius: 13px;
  background: rgba(255,255,255,.72);
}

.buyer-card-details p {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--slate);
  font-size: .73rem;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.buyer-card-details svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--mandate-color);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-top: 1px;
}

.buyer-card-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 10px;
  margin-top: auto;
  padding: 14px 16px;
  background: linear-gradient(135deg, #071F45, var(--navy));
  color: #fff;
}

.buyer-card-footer span {
  display: block;
  margin-bottom: 3px;
  color: rgba(255,255,255,.7);
  font-size: .62rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.buyer-card-footer strong {
  color: var(--gold-light);
  font-size: .88rem;
  font-weight: 900;
}

.buyer-card-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid rgba(221,184,90,.75);
  border-radius: 10px;
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  white-space: nowrap;
  transition: var(--transition);
}

.buyer-card-footer a:hover {
  background: var(--gold);
  color: var(--navy);
}

.buyer-pagination {
  margin-top: 28px;
}

.buyer-pagination .pg-num {
  font-weight: 800;
}

@media (max-width: 1180px) {
  .buyer-hero__grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .buyer-hero__stats {
    justify-content: flex-start;
  }

  .buyer-mandate-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}

@media (max-width: 900px) {
  .buyer-hero {
    padding-top: calc(var(--header-h) + 26px);
  }

  .buyer-search {
    grid-template-columns: 1fr;
  }

  .buyer-search label {
    border-right: 0;
    border-bottom: 1px solid rgba(11,42,91,.1);
  }

  .buyer-search button {
    min-height: 48px;
  }

  .buyer-view-note {
    display: none;
  }
}

@media (max-width: 640px) {
  .page-buyer-listings .container {
    padding-inline: 24px;
  }

  .buyer-hero {
    padding: calc(var(--header-h) + 20px) 0 20px;
  }

  .buyer-hero h1 {
    font-size: clamp(1.58rem, 7.5vw, 1.92rem);
    line-height: 1.08;
    max-width: min(100%, 330px);
  }

  .buyer-hero h1 em {
    display: block;
  }

  .buyer-hero__copy > p:last-child {
    max-width: 100%;
    font-size: .86rem;
    line-height: 1.55;
    margin-top: 9px;
    overflow-wrap: break-word;
  }

  .buyer-hero__stats {
    display: none;
  }

  .buyer-search {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    margin-top: 14px;
  }

  .buyer-search label:first-child {
    grid-column: 1 / -1;
  }

  .buyer-search label:nth-child(2) {
    border-bottom: 1px solid rgba(11,42,91,.1);
  }

  .buyer-search label {
    min-height: 44px;
    padding: 0 12px;
  }

  .buyer-search button {
    min-height: 44px;
  }

  .buyer-hero__tags {
    display: none;
  }

  .buyer-mandate-card {
    min-height: 0;
    border-radius: 18px;
  }

  .buyer-mandate-grid { grid-template-columns: 1fr; }

  .buyer-mandate-grid,
  .buyer-mandate-card,
  .page-buyer-listings .lp-toolbar {
    width: 100%;
    max-width: 100%;
  }

  .buyer-card-ribbon {
    grid-template-columns: 30px minmax(0, 1fr) 66px;
    min-height: 40px;
  }

  .buyer-card-ribbon strong {
    justify-self: start;
    font-size: .56rem;
    letter-spacing: .11em;
    text-align: left;
  }

  .buyer-card-actions {
    padding-right: 7px;
  }

  .buyer-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }

  .buyer-card-body {
    padding: 14px 14px 12px;
  }

  .buyer-card-heading {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
  }

  .buyer-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 0;
  }

  .buyer-avatar::before {
    width: 22px;
    height: 22px;
  }

  .buyer-card-heading h2 {
    font-size: .86rem;
    line-height: 1.34;
    word-break: break-word;
    -webkit-line-clamp: 4;
  }

  .buyer-card-details {
    padding: 10px;
    gap: 7px;
  }

  .buyer-card-details p {
    font-size: .68rem;
  }

  .buyer-card-footer {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
  }

  .buyer-card-footer a {
    width: 100%;
    min-width: 124px;
  }

  .page-buyer-listings .lp-toolbar {
    padding: 11px;
    gap: 10px;
  }

  .page-buyer-listings .lp-toolbar__left {
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .page-buyer-listings .lp-toolbar__count {
    min-width: 0;
    flex: 1;
    font-size: .78rem;
    line-height: 1.35;
  }
}
