/* =========================================================================
   PetPress — BHS "Adoptable Pets" section (client Figma spec)
   Scoped under .pp-bhs. Fonts: Onest + Nunito (enqueued in petpress.php).
   ========================================================================= */

.pp-bhs {
    --ppb-orange:        #F65E2B;
    --ppb-orange-btn:    rgba(246, 94, 43, .90);   /* #F65E2BE5 */
    --ppb-teal:          #009899;
    --ppb-heading:       #222222;
    --ppb-desc:          #606967;
    --ppb-badge-txt:     #ffffff;
    --ppb-filter-txt:    #1A1A1A;
    --ppb-filter-border: #E4E7EC;
    --ppb-radius:        20px;

    max-width: 1280px;
    margin: 0 auto;
    padding: 8px 16px 40px;
    box-sizing: border-box;
    font-family: 'Onest', sans-serif;
    color: var(--ppb-heading);
}
.pp-bhs *,
.pp-bhs *::before,
.pp-bhs *::after { box-sizing: border-box; }

/* ---------- filter bar ---------- */
.pp-bhs__filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    column-gap: 10px;
    row-gap: 10px;
    margin-bottom: 28px;
}

.pp-bhs__select { position: relative; }

.pp-bhs__select select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #fff;
    border: 1px solid var(--ppb-filter-border);
    border-radius: 8px;
    font-family: 'Onest', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    color: var(--ppb-filter-txt);
    padding: 12px 40px 12px 12px;
    cursor: pointer;
    min-width: 120px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.pp-bhs__select select:hover  { border-color: #cfd4d3; }
.pp-bhs__select select:focus  { outline: none; border-color: var(--ppb-teal);
                                 box-shadow: 0 0 0 3px rgba(0,152,153,.14); }

.pp-bhs__select::after {
    content: "";
    position: absolute;
    right: 15px;
    top: 50%;
    width: 9px; height: 9px;
    border-right: 2px solid #4b5350;
    border-bottom: 2px solid #4b5350;
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

/* ---------- grid ---------- */
.pp-bhs__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* ---------- card ---------- */
.pp-bhs__card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: none;
    border-radius: var(--ppb-radius);
    box-shadow: 0px 0px 15.4px 0px rgba(0, 0, 0, .10);
    padding: 0;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.pp-bhs__card:hover {
    transform: translateY(-4px);
    box-shadow: 0px 8px 26px 0px rgba(0, 0, 0, .14);
}

/* media — full-bleed, top corners follow the card radius via overflow:hidden */
.pp-bhs__media {
    position: relative;
    aspect-ratio: 16 / 11;
    background: #f2f4f3;
    overflow: hidden;
}
.pp-bhs__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.pp-bhs__card:hover .pp-bhs__media img { transform: scale(1.04); }

/* gradient overlay on every card image */
.pp-bhs__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(125.92deg, rgba(255, 255, 255, 0) 44%, rgba(255, 255, 255, 0) 58%, #39A46B 100%);
    pointer-events: none;
    z-index: 1;
}

.pp-bhs__badge {
    position: absolute;
    top: 16px; right: 16px;
    z-index: 2;
    background: var(--ppb-teal);
    color: var(--ppb-badge-txt);
    font-family: 'Onest', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1;
    padding: 8px 13px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* body — 28px all around */
.pp-bhs__body {
    position: relative;
    z-index: 1;
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.pp-bhs__cat {
    font-family: 'Onest', sans-serif;
    font-weight: 500;
    font-size: 18px;
    color: var(--ppb-teal);
    margin-bottom: 8px;
}

.pp-bhs__name {
    margin: 0 0 12px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.2;
    color: var(--ppb-heading);
}
.pp-bhs__age {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 18px;
    color: var(--ppb-heading);
    white-space: nowrap;
}

.pp-bhs__desc {
    margin: 0 0 24px;
    font-family: 'Onest', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.55;
    color: var(--ppb-desc);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* apply button */
.pp-bhs__btn {
    align-self: flex-start;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--ppb-orange-btn);
    color: #fff !important;
    text-decoration: none !important;
    font-family: 'Onest', sans-serif;
    font-weight: 500;
    font-size: 15px;
    line-height: 1;
    padding: 9px 22px;
    border-radius: 999px;
    transition: background .15s ease, transform .15s ease;
}
.pp-bhs__btn:hover {
    background: var(--ppb-teal);
    color: #fff !important;
    transform: translateY(-1px);
}
.pp-bhs__btn img,
.pp-bhs__btn svg { width: 24px; height: 24px; flex: none; display: block; }

/* decorative paw (client asset) — flush to the card's bottom-right corner */
.pp-bhs__card .pp-bhs__paw {
    position: absolute !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    top: auto !important;
    width: 75px !important;
    height: auto !important;
    max-width: 75px;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    object-fit: contain;
    object-position: right bottom;
    pointer-events: none;
    z-index: 0;
}

/* ---------- states ---------- */
.pp-bhs__card.pp-bhs--hidden { display: none; }

.pp-bhs__empty {
    text-align: center;
    font-family: 'Onest', sans-serif;
    color: var(--ppb-desc);
    font-size: 18px;
    padding: 48px 0;
}

.pp-bhs__more-wrap { text-align: center; margin-top: 34px; }
.pp-bhs__more {
    background: var(--ppb-orange-btn);
    color: #fff;
    border: none;
    font-family: 'Onest', sans-serif;
    font-weight: 500;
    font-size: 18px;
    padding: 12px 34px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.pp-bhs__more:hover { background: var(--ppb-teal); transform: translateY(-1px); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
    .pp-bhs__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 620px) {
    .pp-bhs__grid { grid-template-columns: 1fr; }
    .pp-bhs__filters { justify-content: stretch; }
    .pp-bhs__select { flex: 1 1 46%; }
    .pp-bhs__select select { width: 100%; min-width: 0; }
}

/* =========================================================================
   BHS — Single Pet Detail page (.pp-bhs-detail)
   ========================================================================= */
.pp-bhs-detail {
    --ppd-orange:      #F65E2B;
    --ppd-orange-btn:  rgba(246, 94, 43, .90);
    --ppd-teal:        #009899;
    --ppd-ink:         #08221C;
    --ppd-heading:     #222222;
    --ppd-muted:       #606967;
    --ppd-panel:       #F7F7F5;
    --ppd-border:      #ececec;
    font-family: 'Onest', sans-serif;
    color: var(--ppd-heading);
    /* space below the site header */
    margin-top: 140px;
    /* break out of the theme's constrained content column (block/FSE safe) */
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
/* hide the host page's own title on the detail view (banner already shows it) */
.pp-detail-view .wp-block-post-title,
.pp-detail-view .entry-title,
.pp-detail-view .wp-block-post-featured-image { display: none !important; }
/* keep the 140px top gap below the header even inside the content wrapper */
.pp-detail-view .entry-content > .pp-bhs-detail,
.pp-detail-view .wp-block-post-content > .pp-bhs-detail { margin-top: 140px; }

/* The header/footer are injected inside the page content on this theme, so let
   them span the full viewport width (like everywhere else on the site) instead
   of being clamped to the content column — this restores their internal
   alignment (e.g. right-aligned header icons). */
.pp-detail-view .entry-content,
.pp-detail-view .wp-block-post-content { max-width: none !important; }
.pp-detail-view header.wp-block-template-part,
.pp-detail-view footer.wp-block-template-part,
.pp-detail-view .entry-content > .wp-block-template-part,
.pp-detail-view .wp-block-post-content > .wp-block-template-part {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
.pp-bhs-detail *, .pp-bhs-detail *::before, .pp-bhs-detail *::after { box-sizing: border-box; }
.pp-bhs-detail .ppd-wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ---- banner ---- */
.pp-bhs-detail .ppd-banner {
    position: relative;
    height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.pp-bhs-detail .ppd-banner__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(6,28,23,.35) 0%, rgba(6,28,23,.55) 100%);
}
.pp-bhs-detail .ppd-banner__inner { position: relative; z-index: 1; padding: 0 20px; }
.pp-bhs-detail .ppd-banner__title {
    margin: 0 0 14px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 92px;
    line-height: 1.05;
    color: #fff;
}
.pp-bhs-detail .ppd-breadcrumb {
    display: inline-flex; align-items: center; gap: 14px;
    font-size: 17px; color: #fff;
}
.pp-bhs-detail .ppd-breadcrumb a { color: #fff; text-decoration: none; }
.pp-bhs-detail .ppd-breadcrumb a:hover { text-decoration: underline; }
.pp-bhs-detail .ppd-breadcrumb__current {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--ppd-teal); font-weight: 600;
}
.pp-bhs-detail .ppd-breadcrumb__arrow { width: 24px; height: auto; display: inline-block; vertical-align: middle; }

/* ---- main 70 / 30 ---- */
.pp-bhs-detail .ppd-main { padding: 0; margin-top: 100px; }
.pp-bhs-detail .ppd-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
    gap: 32px;
    align-items: start;
}

.pp-bhs-detail .ppd-gallery__main {
    border-radius: 16px; overflow: hidden; background: #eef1f0;
    aspect-ratio: 4 / 3;
}
.pp-bhs-detail .ppd-gallery__main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-bhs-detail .ppd-gallery__thumbs {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px;
}
.pp-bhs-detail .ppd-thumb {
    padding: 0; border: 2px solid transparent; border-radius: 12px;
    overflow: hidden; cursor: pointer; background: #eef1f0; aspect-ratio: 4 / 3;
    transition: border-color .15s ease;
}
.pp-bhs-detail .ppd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-bhs-detail .ppd-thumb.is-active { border-color: var(--ppd-teal); }

/* info panel */
.pp-bhs-detail .ppd-info {
    background: var(--ppd-panel);
    border: 1px solid var(--ppd-border);
    border-radius: 16px;
    padding: 28px;
}
.pp-bhs-detail .ppd-info__eyebrow {
    display: inline-block; color: var(--ppd-orange);
    font-size: 13px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase;
    margin-bottom: 8px;
}
.pp-bhs-detail .ppd-info__title {
    margin: 0 0 8px; font-family: 'Nunito', sans-serif; font-weight: 700;
    font-size: 30px; color: var(--ppd-heading);
}
.pp-bhs-detail .ppd-info__lede { margin: 0 0 20px; color: var(--ppd-muted); font-size: 16px; line-height: 1.5; }

.pp-bhs-detail .ppd-apply-btn,
.pp-bhs-detail .ppd-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font-family: 'Onest', sans-serif; font-weight: 500; font-size: 16px;
    text-decoration: none; border-radius: 999px; cursor: pointer; border: none;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}
.pp-bhs-detail .ppd-apply-btn {
    width: 100%; background: var(--ppd-orange-btn); color: #fff !important;
    padding: 14px 24px; margin-bottom: 22px;
}
.pp-bhs-detail .ppd-apply-btn:hover { background: var(--ppd-teal); transform: translateY(-1px); }

.pp-bhs-detail .ppd-specs { margin: 0 0 22px; padding: 0; }
.pp-bhs-detail .ppd-spec {
    display: flex; gap: 12px; padding: 7px 0;
    border-bottom: 1px solid rgba(0,0,0,.05);
}
.pp-bhs-detail .ppd-spec:last-child { border-bottom: none; }
.pp-bhs-detail .ppd-spec dt { margin: 0; flex: 0 0 42%; color: var(--ppd-muted); font-size: 15px; }
.pp-bhs-detail .ppd-spec dd { margin: 0; color: var(--ppd-teal); font-weight: 600; font-size: 15px; }

.pp-bhs-detail .ppd-about__title {
    margin: 8px 0 10px; font-family: 'Nunito', sans-serif; font-weight: 700;
    font-size: 20px; color: var(--ppd-heading);
}
.pp-bhs-detail .ppd-about__text { color: var(--ppd-muted); font-size: 15px; line-height: 1.65; }
.pp-bhs-detail .ppd-about__text p { margin: 0 0 12px; }

/* ---- bring home + fee ---- */
.pp-bhs-detail .ppd-adopt { padding: 0; margin-top: 100px; }
.pp-bhs-detail .ppd-adopt__grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: 40px; align-items: start;
}
.pp-bhs-detail .ppd-adopt__title {
    margin: 0 0 10px; font-family: 'Nunito', sans-serif; font-weight: 700;
    font-size: 50px; color: var(--ppd-heading);
}
.pp-bhs-detail .ppd-adopt__text { color: var(--ppd-muted); font-size: 15px; line-height: 1.6; }

.pp-bhs-detail .ppd-fee {
    position: relative; overflow: hidden;
    background: var(--ppd-panel); border: 1px solid var(--ppd-border);
    border-radius: 18px; padding: 32px;
}
.pp-bhs-detail .ppd-fee__price {
    font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 40px; color: var(--ppd-heading);
    line-height: 1;
}
.pp-bhs-detail .ppd-fee__price span { font-family: 'Onest', sans-serif; font-size: 16px; font-weight: 400; color: var(--ppd-muted); }
.pp-bhs-detail .ppd-fee__note { margin: 10px 0 20px; color: var(--ppd-muted); font-size: 15px; }
.pp-bhs-detail .ppd-steps { list-style: none; margin: 0 0 24px; padding: 0; }
.pp-bhs-detail .ppd-steps li { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; color: var(--ppd-heading); font-size: 15px; }
.pp-bhs-detail .ppd-step__num {
    flex: none; width: 26px; height: 26px; border-radius: 50%;
    background: var(--ppd-orange); color: #fff; font-size: 14px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center;
}
.pp-bhs-detail .ppd-fee__btns { display: flex; flex-wrap: wrap; gap: 14px; }
.pp-bhs-detail .ppd-btn { padding: 13px 24px; font-size: 15px; }
.pp-bhs-detail .ppd-btn--primary { background: var(--ppd-orange-btn); color: #fff !important; }
.pp-bhs-detail .ppd-btn--primary:hover { background: var(--ppd-teal); transform: translateY(-1px); }
.pp-bhs-detail .ppd-btn--ghost { background: #fff; color: var(--ppd-orange) !important; border: 1px solid var(--ppd-orange); }
.pp-bhs-detail .ppd-btn--ghost:hover { background: var(--ppd-orange); color: #fff !important; }

/* ---- share band ---- */
.pp-bhs-detail .ppd-share { background: var(--ppd-panel); padding: 64px 0; margin-top: 100px; text-align: center; }
.pp-bhs-detail .ppd-share__eyebrow {
    display: inline-block; background: #FFF0EA; color: var(--ppd-orange);
    font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 8px; margin-bottom: 14px;
}
.pp-bhs-detail .ppd-share__title {
    margin: 0 0 10px; font-family: 'Nunito', sans-serif; font-weight: 700;
    font-size: 50px; color: var(--ppd-heading);
}
.pp-bhs-detail .ppd-share__text { margin: 0 0 22px; color: var(--ppd-muted); font-size: 16px; }
.pp-bhs-detail .ppd-share__btns { display: inline-flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.pp-bhs-detail .ppd-share__btn {
    background: var(--ppd-orange-btn); color: #fff !important; text-decoration: none;
    font-weight: 500; font-size: 15px; padding: 11px 24px; border-radius: 999px;
    transition: background .15s ease, transform .15s ease;
}
.pp-bhs-detail .ppd-share__btn:hover { background: var(--ppd-teal); transform: translateY(-1px); }

/* ---- related ---- */
.pp-bhs-detail .ppd-related { padding: 0; margin-top: 100px; margin-bottom: 100px; }
.pp-bhs-detail .ppd-related__title {
    margin: 0 0 28px; font-family: 'Nunito', sans-serif; font-weight: 700;
    font-size: 50px; color: var(--ppd-heading);
}
.pp-bhs-detail .ppd-related .pp-bhs { max-width: none; padding: 0; }

/* arrows inside detail buttons */
.pp-bhs-detail .pp-bhs__arrow { width: 22px; height: 22px; flex: none; display: block; }

/* ---- responsive ---- */
@media (max-width: 900px) {
    .pp-bhs-detail .ppd-grid { grid-template-columns: 1fr; gap: 24px; }
    .pp-bhs-detail .ppd-adopt__grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 620px) {
    .pp-bhs-detail { margin-top: 30px; }
    .pp-detail-view .entry-content > .pp-bhs-detail,
    .pp-detail-view .wp-block-post-content > .pp-bhs-detail { margin-top: 30px; }
    .pp-bhs-detail .ppd-banner { height: 360px; }
    .pp-bhs-detail .ppd-banner__title { font-size: 50px; }
    .pp-bhs-detail .ppd-adopt__title,
    .pp-bhs-detail .ppd-share__title,
    .pp-bhs-detail .ppd-related__title { font-size: 30px; }
    .pp-bhs-detail .ppd-main,
    .pp-bhs-detail .ppd-adopt,
    .pp-bhs-detail .ppd-share,
    .pp-bhs-detail .ppd-related { margin-top: 60px; }
    .pp-bhs-detail .ppd-related { margin-bottom: 60px; }
    .pp-bhs-detail .ppd-gallery__thumbs { grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .pp-bhs-detail .ppd-fee__btns .ppd-btn { width: 100%; }
}
