/* Merchant directory — ported from the TUS CMS "TUS Nova" theme (archive-merchant), in this site's colours and fonts.
   Markup: pages/merchant-directory.php + inc/merchant-directory.php ([tus_merchant_directory]). */

.tus-md, .tus-md-hero, .tus-md-sec {
    --md-ink: var(--tus-ink, #003532); --md-ink-2: #34444E; --md-muted: #65737B;
    --md-line: #E1E8E9; --md-line-2: #CDD7D9; --md-surface: #FFFFFF; --md-paper: var(--tus-bg, #F3F3F3); --md-paper-2: #EAF0F0;
    --md-brand: #1FAFA6; --md-brand-ink: #0A5F5A; --md-brand-soft: #DCF2EE;
    --md-sun-soft: #FFF1C2; --md-sun-ink: #6A4C00;
    --md-shadow: 0 1px 2px rgba(15, 28, 36, .05), 0 12px 32px -16px rgba(15, 28, 36, .22);
    --md-r: 22px; --md-r-lg: 32px; --md-ease: cubic-bezier(.2, .7, .2, 1);
    font-family: var(--f-ui, "Montserrat", system-ui, sans-serif);
}
.tus-md *, .tus-md-hero *, .tus-md-sec * { box-sizing: border-box; }
.tus-md-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.tus-md-sec { padding: clamp(56px, 7vw, 112px) 0; }
.tus-md-sec--tight { padding: clamp(24px, 3.5vw, 48px) 0; }
.tus-md__ic { flex: none; display: block; }

/* ---------- hero ---------- */
.tus-md-hero { padding: clamp(24px, 3vw, 40px) 0 clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--md-line);
    background-image: linear-gradient(rgba(15, 28, 36, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 28, 36, .05) 1px, transparent 1px); background-size: 56px 56px; }
.tus-md-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 clamp(22px, 3vw, 40px); padding: 0; font-size: .86rem; font-weight: 700; color: var(--md-muted); }
.tus-md-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--md-line-2); }
.tus-md-crumbs a { color: inherit; text-decoration: none; }
.tus-md-crumbs a:hover { color: var(--md-ink); }
.tus-md-crumbs [aria-current] { color: var(--md-ink-2); }
.tus-md-hero__row { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.tus-md-kicker { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--md-brand-ink); }
.tus-md-kicker::before { content: ""; width: 24px; height: 2px; border-radius: 2px; background: currentColor; }
.tus-md-kicker--light { color: inherit; opacity: .8; }
.tus-md-hero__title { margin: 0; font-family: var(--f-head, "Rubik", sans-serif); font-size: clamp(2.2rem, 1.2rem + 3.6vw, 4.3rem); font-weight: 700; line-height: 1.02; letter-spacing: -.03em; color: var(--md-ink); max-width: 22ch; text-wrap: balance; }
.tus-md-hero__lede { margin: 18px 0 0; max-width: 62ch; font-size: clamp(1.05rem, 1rem + .3vw, 1.22rem); line-height: 1.6; color: var(--md-ink-2); }
.tus-md-stat { display: flex; flex-direction: column; padding: 20px 26px; border: 1px solid var(--md-line); border-radius: var(--md-r); background: var(--md-surface); box-shadow: var(--md-shadow); }
.tus-md-stat b { font-family: var(--f-head, "Rubik", sans-serif); font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem); font-weight: 700; letter-spacing: -.03em; line-height: 1; color: var(--md-brand-ink); }
.tus-md-stat span { margin-top: 6px; font-size: .88rem; font-weight: 700; color: var(--md-muted); }

/* ---------- filter bar ---------- */
.tus-md__filter { position: sticky; top: calc(var(--header-h, 90px) + 20px);   /* stuck: search box 32px under the header (20px + the 12px padding) */ z-index: 20; display: flex; align-items: center; gap: 12px;
    margin: 0 -12px 24px; padding: 12px; border-radius: var(--md-r); background: color-mix(in srgb, var(--md-paper) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tus-md__search { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; height: 48px; min-width: 0; padding: 0 8px 0 18px; border: 1px solid var(--md-line-2); border-radius: 999px; background: var(--md-surface); color: var(--md-muted); transition: border-color .2s, box-shadow .2s; }
.tus-md__search:focus-within { border-color: var(--md-brand); box-shadow: 0 0 0 4px var(--md-brand-soft); }
.tus-md__search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; outline: none; box-shadow: none; font: 600 1rem var(--f-ui, sans-serif); color: var(--md-ink); }
.tus-md__search input::placeholder { color: var(--md-muted); }
.tus-md__search input::-webkit-search-cancel-button { cursor: pointer; }
.tus-md__select { position: relative; flex: 0 0 300px; color: var(--md-muted); }
.tus-md__select select { width: 100%; height: 48px; margin: 0; padding: 0 44px 0 18px; border: 1px solid var(--md-line-2); border-radius: 999px; background: var(--md-surface);
    font: 700 .95rem var(--f-ui, sans-serif); color: var(--md-ink); cursor: pointer; -webkit-appearance: none; appearance: none; transition: border-color .2s, box-shadow .2s; }
.tus-md__select select:hover { border-color: var(--md-ink); }
.tus-md__select select:focus { outline: none; border-color: var(--md-brand); box-shadow: 0 0 0 4px var(--md-brand-soft); }
.tus-md__select .tus-md__ic { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.tus-md__go-btn { height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--md-ink); color: #fff; font: 700 .95rem var(--f-ui, sans-serif); cursor: pointer; }
.tus-md__count { min-width: 36px; padding: 4px 10px; border-radius: 999px; background: var(--md-paper-2); color: var(--md-ink); font-size: .82rem; font-weight: 800; text-align: center; }

/* ---------- category groups ---------- */
.tus-md__group { scroll-margin-top: calc(var(--header-h, 90px) + 96px); }
.tus-md__group + .tus-md__group { margin-top: clamp(36px, 4vw, 56px); }
.tus-md__group[hidden] { display: none; }
.tus-md__gtitle { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--md-line);
    font-family: var(--f-head, "Rubik", sans-serif); font-size: clamp(1.3rem, 1.1rem + .7vw, 1.7rem); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; color: var(--md-ink); }
.tus-md__gtitle small { min-width: 32px; padding: 3px 10px; border-radius: 999px; background: var(--md-brand-soft); color: var(--md-brand-ink); font: 800 .8rem/1.4 var(--f-ui, sans-serif); text-align: center; letter-spacing: 0; }

/* ---------- cards ---------- */
.tus-md__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.tus-md__card { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px 14px 14px; border: 1px solid var(--md-line); border-radius: 20px; background: var(--md-surface);
    color: var(--md-ink); text-decoration: none; transition: border-color .2s, box-shadow .25s, transform .25s var(--md-ease); }
.tus-md__card:hover { border-color: var(--md-brand); box-shadow: var(--md-shadow); transform: translateY(-2px); }
.tus-md__card[hidden] { display: none; }
.tus-md__logo { flex: none; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: #fff; border: 1px solid var(--md-line); overflow: hidden; }
.tus-md__logo img { max-width: 82%; max-height: 82%; width: auto; height: auto; object-fit: contain; }
.tus-md__logo--mono { border: 0; background: hsl(var(--h) 62% 91%); color: hsl(var(--h) 60% 26%); font-weight: 800; font-size: 1.08rem; letter-spacing: .02em; }
.tus-md__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tus-md__card h3 { margin: 0; font-family: var(--f-ui, sans-serif); font-size: .98rem; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; color: var(--md-ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tus-md__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tus-md__tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--md-brand-soft); color: var(--md-brand-ink); white-space: nowrap; }
.tus-md__tag--sun { background: var(--md-sun-soft); color: var(--md-sun-ink); }
.tus-md__tag--line { background: transparent; border: 1px solid var(--md-line-2); color: var(--md-muted); }
.tus-md__go { flex: none; color: var(--md-muted); opacity: 0; transform: translate(-4px, 4px); transition: opacity .2s, transform .2s; }
.tus-md__card:hover .tus-md__go { opacity: 1; transform: none; color: var(--md-brand-ink); }
.tus-md__empty { margin: 0; padding: 28px; border: 1.5px dashed var(--md-line-2); border-radius: var(--md-r); color: var(--md-muted); text-align: center; }
.tus-md__group + .tus-md__empty:not([hidden]) { margin-top: 12px; }

/* ---------- "become a merchant" band ---------- */
.tus-md-band { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: clamp(28px, 5vw, 60px); border-radius: var(--md-r-lg);
    background: linear-gradient(135deg, #2CC2B8, #15A098); color: #062724; }
.tus-md-band::after { content: ""; position: absolute; right: -60px; bottom: -120px; width: 320px; aspect-ratio: 1; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); box-shadow: 0 0 0 46px rgba(255, 255, 255, .08); pointer-events: none; }
.tus-md-band > * { position: relative; z-index: 1; }
.tus-md-band__title { margin: 0; font-family: var(--f-head, "Rubik", sans-serif); font-size: clamp(1.9rem, 1.15rem + 2.5vw, 3.2rem); font-weight: 700; line-height: 1.06; letter-spacing: -.03em; color: inherit; }
.tus-md-band p { margin: 12px 0 0; max-width: 58ch; opacity: .85; }
.tus-md-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 24px; border-radius: 999px; background: #0F1C24; color: #fff;
    font: 700 .98rem/1 var(--f-ui, sans-serif); text-decoration: none; white-space: nowrap; transition: background .2s, color .2s, transform .2s var(--md-ease); }
.tus-md-btn:hover { background: #fff; color: #0F1C24; }
.tus-md-btn .tus-md__ic { transition: transform .25s var(--md-ease); }
.tus-md-btn:hover .tus-md__ic { transform: translateX(3px); }
.tus-md-btn:active { transform: scale(.98); }


:focus-visible:is(.tus-md__card, .tus-md-btn, .tus-md-crumbs a) { outline: 2.5px solid var(--md-brand); outline-offset: 3px; }

@media (max-width: 960px) {
    .tus-md-hero__row { grid-template-columns: 1fr; }
    .tus-md-stat { justify-self: start; }
    .tus-md-band { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 720px) {
    .tus-md__grid { grid-template-columns: 1fr; }
    .tus-md__filter { margin: 0 0 20px; padding: 12px 0 10px; border-radius: 0; }
    .tus-md__select { flex-basis: 44%; }
    .tus-md__select select { padding: 0 34px 0 14px; font-size: .86rem; }
    .tus-md__select .tus-md__ic { right: 12px; }
    .tus-md__search { padding-left: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .tus-md__card, .tus-md__go, .tus-md-btn, .tus-md-btn .tus-md__ic { transition: none; }
    .tus-md__card:hover { transform: none; }
}
