/* ==========================================================================
   Brand pages (/brand?name=… and /brands) — builds on home.css tokens (.yh)
   ========================================================================== */
.bd-page { padding: 28px 0 88px; min-height: 60vh; }
.bd-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; font-size: 14px; color: var(--yh-muted); }
.bd-crumbs a { color: var(--yh-muted); }
.bd-crumbs a:hover { color: var(--yh-orange); }
.bd-crumbs i { font-size: 9px; opacity: .6; }
.bd-crumbs span { color: var(--yh-ink); font-weight: 600; }

.bd-tag {
    display: inline-block; padding: 4px 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--yh-orange-dark); background: var(--yh-orange-soft); border-radius: 999px;
}

/* ---------- Single brand: hero ---------- */
.bd-hero {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center;
    padding: 44px; background: #fff; border: 1px solid var(--yh-line); border-radius: 32px;
    background-image: radial-gradient(60% 80% at 100% 0%, rgba(245, 196, 0, .14), transparent 70%), radial-gradient(50% 70% at 0% 100%, rgba(232, 98, 10, .08), transparent 70%);
}
.bd-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; border-radius: 20px; margin-bottom: 18px;
    font-family: var(--yh-font-head); font-size: 24px; font-weight: 700;
}
.bd-mark--xl { width: 140px; height: 140px; border-radius: 40px; font-size: 52px; margin: 0; }
.bd-hero-copy .bd-tag { margin-left: 12px; vertical-align: 30px; }
.bd-hero h1 { font-size: clamp(36px, 4.6vw, 60px); font-weight: 700; line-height: 1.02; margin: 0; }
.bd-hero p { margin-top: 14px; font-size: 17px; line-height: 1.6; color: var(--yh-muted); max-width: 520px; }
.bd-hero-stats { margin-top: 26px; display: flex; gap: 12px; }
.bd-hero-stats div { padding: 12px 18px; background: var(--yh-bg); border: 1px solid var(--yh-line); border-radius: 16px; }
.bd-hero-stats strong { display: block; font-family: var(--yh-font-head); font-size: 24px; font-weight: 700; color: var(--yh-ink); line-height: 1.1; }
.bd-hero-stats small { font-size: 13px; color: var(--yh-muted); }

.bd-hero-media { position: relative; height: 300px; display: flex; align-items: center; justify-content: center; }
.bd-shot {
    position: absolute; width: 58%; aspect-ratio: 1 / 1; border-radius: 24px; overflow: hidden;
    background: #fff; border: 1px solid var(--yh-line); box-shadow: var(--yh-shadow-lg);
    display: flex; align-items: center; justify-content: center;
}
.bd-shot img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.bd-shot--0 { z-index: 3; left: 21%; top: 6%; }
.bd-shot--1 { z-index: 2; width: 44%; left: 0; top: 34%; transform: rotate(-6deg); }
.bd-shot--2 { z-index: 1; width: 44%; right: 0; top: 30%; transform: rotate(6deg); }
.bd-shot:only-child { position: relative; left: auto; top: auto; width: 70%; }

/* ---------- toolbar ---------- */
.bd-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 40px 0 24px; }
.bd-filters { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.bd-sort { display: inline-flex; align-items: center; gap: 10px; margin: 0; flex: 0 0 auto; font-size: 14px; color: var(--yh-muted); }
.bd-sort select {
    height: 42px; padding: 0 36px 0 14px; font-size: 14px; color: var(--yh-ink); background-color: #fff;
    border: 1px solid var(--yh-line); border-radius: 999px; cursor: pointer;
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236F5E4C' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}

/* ---------- more brands ---------- */
.bd-more { margin-top: 64px; }
.bd-more-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.bd-more-head h2 { font-size: 24px; font-weight: 700; }
.bd-more-rail { display: flex; flex-wrap: wrap; gap: 10px; }
.bd-chip {
    display: inline-flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px;
    font-size: 15px; font-weight: 600; color: var(--yh-ink); background: #fff;
    border: 1px solid var(--yh-line); border-radius: 999px; transition: border-color .2s, color .2s;
}
.bd-chip:hover { border-color: var(--yh-orange); color: var(--yh-orange); }
.bd-chip em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--yh-muted); background: var(--yh-bg); border-radius: 999px; padding: 2px 8px; }

/* ---------- directory ---------- */
.bd-dir-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.bd-dir-head h1 { font-size: clamp(34px, 4vw, 52px); font-weight: 700; line-height: 1.05; }
.bd-dir-head p { margin-top: 10px; font-size: 16px; color: var(--yh-muted); }
.bd-search {
    display: flex; align-items: center; gap: 10px; width: 300px; max-width: 100%; margin: 0;
    padding: 0 18px; height: 50px; background: #fff; border: 1px solid var(--yh-line); border-radius: 999px;
}
.bd-search:focus-within { border-color: var(--yh-orange); box-shadow: 0 0 0 4px rgba(232, 98, 10, .12); }
.bd-search i { color: var(--yh-muted); }
.bd-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--yh-ink); }
.bd-featured { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 40px; }
.bd-sub { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.bd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.bd-card {
    position: relative; display: flex; align-items: center; gap: 16px; padding: 14px 18px 14px 14px;
    background: #fff; border: 1px solid var(--yh-line); border-radius: 20px; color: var(--yh-ink);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.bd-card:hover { border-color: var(--yh-orange); box-shadow: var(--yh-shadow); transform: translateY(-2px); color: var(--yh-ink); }
.bd-card[hidden] { display: none; }
.bd-card-img {
    flex: 0 0 72px; width: 72px; height: 72px; border-radius: 16px; overflow: hidden;
    display: flex; align-items: center; justify-content: center; background: #F8F5F0;
}
.bd-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.bd-mono { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--yh-font-head); font-size: 22px; font-weight: 700; }
.bd-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.bd-card-body strong { font-family: var(--yh-font-head); font-size: 17px; font-weight: 600; line-height: 1.25; }
.bd-card-body small { font-size: 13px; color: var(--yh-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-card-body .bd-tag { align-self: flex-start; margin-bottom: 4px; }
.bd-go { font-size: 13px; color: var(--yh-muted); transition: transform .2s ease, color .2s ease; }
.bd-card:hover .bd-go { transform: translateX(3px); color: var(--yh-orange); }
.bd-card--big { padding: 18px 24px 18px 18px; border-radius: 24px; background: linear-gradient(135deg, #fff 0%, #FFF7EC 100%); }
.bd-card--big .bd-card-img { flex-basis: 112px; width: 112px; height: 112px; border-radius: 20px; background: #fff; border: 1px solid var(--yh-line); }
.bd-card--big .bd-card-body strong { font-size: 24px; }

.bd-none, .bd-empty { text-align: center; color: var(--yh-muted); }
.bd-none { padding: 32px; }
.bd-empty { padding: 72px 20px; background: #fff; border: 1px dashed var(--yh-line); border-radius: 28px; }
.bd-empty h1 { font-size: 28px; margin-bottom: 10px; }
.bd-empty .yh-btn { margin-top: 22px; }
.bd-skel-hero { height: 360px; border-radius: 32px; margin-bottom: 40px; }

/* ---------- responsive ---------- */
@media (max-width: 991.98px) {
    .bd-hero { grid-template-columns: minmax(0, 1fr); padding: 32px; gap: 28px; }
    .bd-hero-media { height: 240px; }
    .bd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bd-featured { grid-template-columns: minmax(0, 1fr); }
    .bd-dir-head { flex-direction: column; align-items: stretch; }
    .bd-search { width: 100%; }
}
@media (max-width: 767.98px) {
    .bd-page { padding: 18px 0 64px; }
    .bd-hero { padding: 24px 20px; border-radius: 24px; }
    .bd-mark { width: 52px; height: 52px; border-radius: 16px; font-size: 19px; margin-bottom: 14px; }
    .bd-hero-copy .bd-tag { vertical-align: 22px; }
    .bd-hero p { font-size: 15px; }
    .bd-hero-media { height: 200px; }
    .bd-toolbar { flex-direction: column; align-items: stretch; margin: 28px 0 18px; }
    .bd-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
    .bd-filters::-webkit-scrollbar { display: none; }
    .bd-filters .yh-tab { flex: 0 0 auto; }
    .bd-sort { justify-content: space-between; }
    .bd-sort select { flex: 1; }
    /* brand page shows a real 2-column grid on phones (not a swipe rail) */
    .yh .bd-products { display: grid; grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto;
                       overflow: visible; margin: 0; padding: 0; gap: 12px; }
    .bd-products .yh-product-img { padding: 12px; }
    .bd-products .yh-product-body { padding: 12px; }
    .bd-products .yh-product-body h3 { font-size: 13.5px; min-height: 38px; }
    .bd-products .yh-price strong { font-size: 15px; }
    .bd-products .yh-add { width: 36px; height: 36px; font-size: 13px; }
    .bd-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .bd-card-img { flex-basis: 60px; width: 60px; height: 60px; }
    .bd-card--big .bd-card-img { flex-basis: 84px; width: 84px; height: 84px; }
    .bd-card--big .bd-card-body strong { font-size: 20px; }
    .bd-more { margin-top: 44px; }
}

/* ==========================================================================
   Brand banner (shared dark page banner) — brand name, message, one product
   ========================================================================== */
.bd-page { padding-top: 0 !important; }
.bd-page > #brand-root { margin-top: 40px; }
.bd-banner .ab-crumbs span { max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-banner p { margin-left: auto; margin-right: auto; }
.bd-banner.has-media { text-align: left; padding: 56px 0 60px; }
.bd-banner-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 48px; align-items: center; }
.bd-banner.has-media h1 { margin-top: 18px; }
.bd-banner.has-media p { margin-left: 0; max-width: 560px; }
.bd-banner-media { display: flex; justify-content: center; }
.bd-banner-shot {
    display: flex; align-items: center; justify-content: center;
    width: min(100%, 280px); aspect-ratio: 1 / 1; padding: 22px; overflow: hidden;
    background: var(--edge-bg, #fff); border-radius: 28px;
    box-shadow: 0 0 0 8px rgba(255, 255, 255, .06), 0 30px 60px rgba(0, 0, 0, .35);
    transform: rotate(-3deg);
}
.bd-banner-shot.is-filled { padding: 0; }
.bd-banner-shot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bd-banner-shot.is-cutout { background: #fff; }
.bd-banner-shot.is-cutout img { mix-blend-mode: multiply; }

/* directory head under the banner */
.bd-dir-head { align-items: center; }

@media (max-width: 767.98px) {
    .bd-page > #brand-root { margin-top: 24px; }
    .bd-banner.has-media { text-align: center; padding: 40px 0 44px; }
    .bd-banner-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .bd-banner.has-media p { margin-left: auto; }
    .bd-banner-media { order: -1; }
    .bd-banner-shot { width: 150px; border-radius: 22px; padding: 14px; }
}
/* product photo takes the place of the decorative pills on brand banners */
.bd-banner.has-media .ab-pill--1, .bd-banner.has-media .ab-pill--2 { display: none; }
