
body.pet-detail-page.pet-type-dog {
    background-image: linear-gradient(rgba(248, 245, 241, 0.74), rgba(248, 245, 241, 0.82)), url("../images/pet-bg-dog.svg?v=4");
}

body.pet-detail-page.pet-type-cat {
    background-image: linear-gradient(rgba(248, 245, 241, 0.74), rgba(248, 245, 241, 0.82)), url("../images/pet-bg-cat.svg?v=4");
}

body.pet-detail-page.pet-type-bird {
    background-image: linear-gradient(rgba(248, 245, 241, 0.74), rgba(248, 245, 241, 0.82)), url("../images/pet-bg-bird.svg?v=4");
}

body.pet-detail-page.pet-type-rabbit {
    background-image: linear-gradient(rgba(248, 245, 241, 0.74), rgba(248, 245, 241, 0.82)), url("../images/pet-bg-rabbit.svg?v=1");
}

body.pet-detail-page.pet-type-hamster {
    background-image: linear-gradient(rgba(248, 245, 241, 0.74), rgba(248, 245, 241, 0.82)), url("../images/pet-bg-hamster.svg?v=1");
}

body.pet-detail-page.pet-type-guinea-pig {
    background-image: linear-gradient(rgba(248, 245, 241, 0.74), rgba(248, 245, 241, 0.82)), url("../images/pet-bg-guinea-pig.svg?v=1");
}

body.pet-detail-page.pet-type-mouse {
    background-image: linear-gradient(rgba(248, 245, 241, 0.74), rgba(248, 245, 241, 0.82)), url("../images/pet-bg-mouse.svg?v=4");
}

body.pet-detail-page.pet-type-rat {
    background-image: linear-gradient(rgba(248, 245, 241, 0.74), rgba(248, 245, 241, 0.82)), url("../images/pet-bg-rat.svg?v=1");
}

body.pet-detail-page.pet-type-ferret {
    background-image: linear-gradient(rgba(248, 245, 241, 0.74), rgba(248, 245, 241, 0.82)), url("../images/pet-bg-ferret.svg?v=1");
}

body.pet-detail-page.pet-type-turtle {
    background-image: linear-gradient(rgba(248, 245, 241, 0.74), rgba(248, 245, 241, 0.82)), url("../images/pet-bg-turtle.svg?v=4");
}

body.pet-detail-page.pet-type-lizard {
    background-image: linear-gradient(rgba(248, 245, 241, 0.74), rgba(248, 245, 241, 0.82)), url("../images/pet-bg-lizard.svg?v=4");
}

body.pet-detail-page.pet-type-snake {
    background-image: linear-gradient(rgba(248, 245, 241, 0.74), rgba(248, 245, 241, 0.82)), url("../images/pet-bg-snake.svg?v=1");
}

body.pet-detail-page.pet-type-fish {
    background-image: linear-gradient(rgba(248, 245, 241, 0.74), rgba(248, 245, 241, 0.82)), url("../images/pet-bg-fish.svg?v=4");
}

body.pet-detail-page.pet-type-horse {
    background-image: linear-gradient(rgba(248, 245, 241, 0.74), rgba(248, 245, 241, 0.82)), url("../images/pet-bg-horse-silhouette.jpg?v=1");
}

body.pet-detail-page.pet-type-other {
    background-image: linear-gradient(rgba(248, 245, 241, 0.74), rgba(248, 245, 241, 0.82)), url("../images/pet-bg-other.svg?v=4");
}

body.pet-detail-page {
    min-height: 100vh;
    background-color: #f8f5f1;
    background-attachment: fixed;
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
}

body.pet-detail-page main.container {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(47, 111, 127, 0.18);
    border-radius: 8px;
    background: rgba(255, 253, 247, 0.88);
    box-shadow: 0 28px 76px rgba(38, 59, 61, 0.14);
    backdrop-filter: blur(8px);
}

body.pet-detail-page .table {
    --bs-table-bg: rgba(255, 255, 255, 0.78);
    --bs-table-striped-bg: rgba(244, 239, 232, 0.68);
}

body.pet-detail-page .pet-memorial-hero {
    align-items: stretch;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    padding: 1rem;
    border: 1px solid rgba(47, 111, 127, 0.18);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(47, 111, 127, 0.08), rgba(185, 109, 115, 0.06)),
        rgba(255, 253, 247, 0.92);
    box-shadow: 0 18px 50px rgba(38, 59, 61, 0.12);
}

body.pet-detail-page .pet-memorial-hero-media {
    min-width: 0;
}

body.pet-detail-page .pet-memorial-hero-photo {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(38, 59, 61, 0.18);
}

body.pet-detail-page .pet-memorial-hero-photo--empty {
    align-items: center;
    display: flex;
    justify-content: center;
    background: #f4efe8;
    color: #8a7865;
    font-size: 4rem;
    font-weight: 700;
}

body.pet-detail-page .pet-memorial-hero-body {
    min-width: 0;
}

body.pet-detail-page .pet-memorial-quote {
    color: var(--bmp-muted);
    font-size: 1.05rem;
    font-style: italic;
}

body.pet-detail-page .pet-memorial-description {
    max-width: 48rem;
    color: var(--bmp-ink);
    font-size: 1rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

body.pet-detail-page .pet-memorial-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    color: var(--bmp-muted);
    font-size: 0.95rem;
}

body.pet-detail-page .pet-related-browse {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem;
    border: 1px solid rgba(49, 86, 106, 0.14);
    border-radius: 8px;
    background: rgba(255, 252, 240, 0.72);
}

body.pet-detail-page .pet-related-browse-label {
    color: #5d6966;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.pet-detail-page .pet-related-browse-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

body.pet-detail-page .memorial-action {
    min-width: 9.5rem;
}

body.pet-detail-page .memorial-heading-icon {
    position: relative;
    display: inline-block;
    width: 1.1rem;
    height: 1.35rem;
    margin-right: 0.45rem;
    vertical-align: -0.18rem;
}

body.pet-detail-page .memorial-heading-icon::before {
    content: "";
    position: absolute;
    left: 0.3rem;
    top: 0;
    width: 0.48rem;
    height: 0.72rem;
    border-radius: 50% 50% 45% 45%;
    background: linear-gradient(180deg, #ffe8a3 0%, #f0ad4e 62%, #d9822b 100%);
    box-shadow: 0 0 0.55rem rgba(240, 173, 78, 0.45);
}

body.pet-detail-page .memorial-heading-icon::after {
    content: "";
    position: absolute;
    left: 0.18rem;
    bottom: 0;
    width: 0.76rem;
    height: 0.74rem;
    border-radius: 0.12rem 0.12rem 0.2rem 0.2rem;
    background: #f8f0df;
    border: 1px solid rgba(142, 108, 70, 0.38);
    box-shadow: inset 0 -0.15rem 0 rgba(142, 108, 70, 0.08);
}

body.pet-detail-page .section-heading-icon {
    position: relative;
    display: inline-block;
    width: 1.15rem;
    height: 1.15rem;
    margin-right: 0.45rem;
    vertical-align: -0.15rem;
}

body.pet-detail-page .section-heading-icon--reactions::before,
body.pet-detail-page .section-heading-icon--reactions::after {
    content: "";
    position: absolute;
    top: 0.2rem;
    width: 0.56rem;
    height: 0.78rem;
    border-radius: 0.56rem 0.56rem 0 0;
    background: #d86f8f;
}

body.pet-detail-page .section-heading-icon--reactions::before {
    left: 0.58rem;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
}

body.pet-detail-page .section-heading-icon--reactions::after {
    left: 0.04rem;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

body.pet-detail-page .section-heading-icon--share::before {
    content: "";
    position: absolute;
    left: 0.08rem;
    top: 0.46rem;
    width: 1rem;
    height: 0.18rem;
    background: #6f91a3;
    transform: rotate(-24deg);
    box-shadow: 0.02rem 0.42rem 0 #6f91a3;
}

body.pet-detail-page .section-heading-icon--share::after {
    content: "";
    position: absolute;
    left: 0.02rem;
    top: 0.32rem;
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 50%;
    background: #6f91a3;
    box-shadow: 0.84rem -0.34rem 0 #6f91a3, 0.86rem 0.52rem 0 #6f91a3;
}

body.pet-detail-page .memorial-button-icon {
    position: relative;
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: 0.35rem;
    vertical-align: -0.14rem;
}

body.pet-detail-page .memorial-button-icon--candle::before {
    content: "";
    position: absolute;
    left: 0.33rem;
    top: 0;
    width: 0.34rem;
    height: 0.5rem;
    border-radius: 50% 50% 45% 45%;
    background: linear-gradient(180deg, #ffe8a3, #f0ad4e 68%, #d9822b);
}

body.pet-detail-page .memorial-button-icon--candle::after {
    content: "";
    position: absolute;
    left: 0.24rem;
    bottom: 0.02rem;
    width: 0.52rem;
    height: 0.48rem;
    border-radius: 0.1rem 0.1rem 0.16rem 0.16rem;
    background: #fff5df;
    border: 1px solid rgba(142, 108, 70, 0.42);
}

body.pet-detail-page .memorial-button-icon--flower::before {
    content: "";
    position: absolute;
    left: 0.28rem;
    top: 0.06rem;
    width: 0.44rem;
    height: 0.44rem;
    border-radius: 50%;
    background: #d86f8f;
    box-shadow: -0.28rem 0.16rem 0 #eaa8b8, 0.28rem 0.16rem 0 #eaa8b8, 0 0.34rem 0 #d86f8f;
}

body.pet-detail-page .memorial-button-icon--flower::after {
    content: "";
    position: absolute;
    left: 0.47rem;
    top: 0.48rem;
    width: 0.08rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #5f8f67;
}

body.pet-detail-page .memorial-button-icon--heart::before,
body.pet-detail-page .memorial-button-icon--heart::after {
    content: "";
    position: absolute;
    top: 0.18rem;
    width: 0.5rem;
    height: 0.72rem;
    border-radius: 0.5rem 0.5rem 0 0;
    background: #d86f8f;
}

body.pet-detail-page .memorial-button-icon--heart::before {
    left: 0.5rem;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
}

body.pet-detail-page .memorial-button-icon--heart::after {
    left: 0;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

body.pet-detail-page .memorial-button-icon--ribbon::before {
    content: "";
    position: absolute;
    left: 0.24rem;
    top: 0.04rem;
    width: 0.52rem;
    height: 0.52rem;
    border: 0.14rem solid #7b8fb5;
    border-radius: 50%;
}

body.pet-detail-page .memorial-button-icon--ribbon::after {
    content: "";
    position: absolute;
    left: 0.27rem;
    top: 0.56rem;
    width: 0.46rem;
    height: 0.42rem;
    background: linear-gradient(135deg, transparent 48%, #7b8fb5 49% 66%, transparent 67%), linear-gradient(45deg, transparent 48%, #7b8fb5 49% 66%, transparent 67%);
}

body.pet-detail-page .memorial-button-icon--tear::before {
    content: "";
    position: absolute;
    left: 0.26rem;
    top: 0.04rem;
    width: 0.48rem;
    height: 0.82rem;
    border-radius: 50% 50% 50% 0;
    background: #6fa6c8;
    transform: rotate(-45deg);
}

body.pet-detail-page .memorial-button-icon--dove::before {
    content: "";
    position: absolute;
    left: 0.08rem;
    top: 0.38rem;
    width: 0.82rem;
    height: 0.36rem;
    border-radius: 50% 50% 45% 45%;
    background: #d9dde8;
    transform: rotate(-12deg);
}

body.pet-detail-page .memorial-button-icon--dove::after {
    content: "";
    position: absolute;
    left: 0.48rem;
    top: 0.12rem;
    width: 0.42rem;
    height: 0.5rem;
    border-radius: 50% 50% 0 50%;
    background: #eef1f7;
    transform: rotate(24deg);
    box-shadow: -0.45rem 0.12rem 0 -0.08rem #eef1f7;
}

body.pet-detail-page .share-button-icon {
    position: relative;
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: 0.35rem;
    vertical-align: -0.16rem;
}

body.pet-detail-page .share-button-icon--copy::before,
body.pet-detail-page .share-button-icon--copy::after {
    content: "";
    position: absolute;
    width: 0.58rem;
    height: 0.72rem;
    border: 0.12rem solid currentColor;
    border-radius: 0.12rem;
}

body.pet-detail-page .share-button-icon--copy::before {
    left: 0.32rem;
    top: 0.08rem;
    opacity: 0.55;
}

body.pet-detail-page .share-button-icon--copy::after {
    left: 0.08rem;
    top: 0.28rem;
    background: rgba(255, 255, 255, 0.75);
}

body.pet-detail-page .share-button-icon--whatsapp::before {
    content: "";
    position: absolute;
    left: 0.06rem;
    top: 0.06rem;
    width: 0.84rem;
    height: 0.84rem;
    border: 0.12rem solid currentColor;
    border-radius: 50%;
}

body.pet-detail-page .share-button-icon--whatsapp::after {
    content: "";
    position: absolute;
    left: 0.33rem;
    top: 0.23rem;
    width: 0.34rem;
    height: 0.48rem;
    border: solid currentColor;
    border-width: 0 0.14rem 0.14rem 0;
    border-radius: 0 0 0.18rem 0;
    transform: rotate(28deg);
    box-shadow: -0.28rem 0.48rem 0 -0.12rem currentColor;
}

body.pet-detail-page .share-button-icon--facebook::before {
    content: "f";
    position: absolute;
    left: 0.29rem;
    top: -0.16rem;
    font-family: Arial, sans-serif;
    font-size: 1.28rem;
    font-weight: 700;
    line-height: 1;
    color: currentColor;
}

body.pet-detail-page .share-button-icon--x::before,
body.pet-detail-page .share-button-icon--x::after {
    content: "";
    position: absolute;
    left: 0.12rem;
    top: 0.43rem;
    width: 0.82rem;
    height: 0.14rem;
    border-radius: 999px;
    background: currentColor;
}

body.pet-detail-page .share-button-icon--x::before {
    transform: rotate(45deg);
}

body.pet-detail-page .share-button-icon--x::after {
    transform: rotate(-45deg);
}

body.pet-detail-page .share-button-icon--email::before {
    content: "";
    position: absolute;
    left: 0.06rem;
    top: 0.22rem;
    width: 0.88rem;
    height: 0.58rem;
    border: 0.12rem solid currentColor;
    border-radius: 0.1rem;
}

body.pet-detail-page .share-button-icon--email::after {
    content: "";
    position: absolute;
    left: 0.16rem;
    top: 0.28rem;
    width: 0.68rem;
    height: 0.42rem;
    border-right: 0.12rem solid currentColor;
    border-bottom: 0.12rem solid currentColor;
    transform: rotate(45deg) skew(-10deg, -10deg);
}

body.pet-detail-page .pet-share-action {
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

body.pet-detail-page #petMemorialTabs {
    gap: 0.2rem;
}

body.pet-detail-page #petMemorialTabs .nav-link {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    white-space: nowrap;
}

body.pet-detail-page .similar-pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.85rem;
}

body.pet-detail-page .similar-pet-card {
    display: block;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(130, 112, 92, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

body.pet-detail-page .similar-pet-card:hover,
body.pet-detail-page .similar-pet-card:focus {
    border-color: rgba(47, 111, 127, 0.45);
    box-shadow: 0 12px 28px rgba(68, 58, 45, 0.12);
    color: inherit;
    transform: translateY(-1px);
}

body.pet-detail-page .similar-pet-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #f4efe8;
}

body.pet-detail-page .similar-pet-card-image--empty {
    align-items: center;
    display: flex;
    justify-content: center;
    color: #8a7865;
    font-size: 2.4rem;
    font-weight: 700;
}

body.pet-detail-page .similar-pet-card-body {
    display: block;
    padding: 0.65rem;
}

body.pet-detail-page .similar-pet-card-name,
body.pet-detail-page .similar-pet-card-meta {
    display: block;
    overflow-wrap: anywhere;
}

body.pet-detail-page .similar-pet-card-name {
    font-weight: 700;
}

body.pet-detail-page .similar-pet-card-meta {
    margin-top: 0.2rem;
    color: #6c757d;
    font-size: 0.86rem;
}

body.pet-detail-page .pet-youtube-placeholder,
body.pet-detail-page .pet-youtube-frame {
    aspect-ratio: 16 / 9;
    width: 100%;
    border: 1px solid rgba(130, 112, 92, 0.16);
    border-radius: 8px;
    background: rgba(248, 245, 241, 0.88);
}

body.pet-detail-page .pet-youtube-placeholder {
    align-items: center;
    display: flex;
    justify-content: center;
    padding: 1rem;
}

body.pet-detail-page .pet-youtube-frame {
    display: block;
}

body.pet-detail-page .memorial-login-logo {
    width: 58px;
    height: auto;
}

body.pet-detail-page .memorial-login-brand-name {
    color: #4b3f35;
    font-size: 1rem;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    body.pet-detail-page {
        background-attachment: scroll;
    }

    body.pet-detail-page main.container {
        margin-top: 0;
        margin-bottom: 0;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }
}

body.pet-detail-page .pet-detail-photo {
    max-width: 320px;
}

body.pet-detail-page .pet-detail-mobile {
    display: grid;
    gap: 0.85rem;
}

body.pet-detail-page .pet-detail-mobile-picture,
body.pet-detail-page .pet-detail-mobile-row {
    border: 1px solid rgba(130, 112, 92, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 26px rgba(68, 58, 45, 0.08);
}

body.pet-detail-page .pet-detail-mobile-picture {
    padding: 0.85rem;
}

body.pet-detail-page .pet-detail-mobile-photo {
    width: 100%;
    max-height: 18rem;
    object-fit: cover;
}

body.pet-detail-page .pet-detail-mobile-list {
    display: grid;
    gap: 0.75rem;
}

body.pet-detail-page .pet-detail-mobile-row {
    padding: 0.9rem 1rem;
}

body.pet-detail-page .pet-detail-mobile-label {
    color: #6d6256;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

body.pet-detail-page .pet-detail-mobile-value {
    margin-top: 0.2rem;
    overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
    body.pet-detail-page #petMemorialTabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
        border-bottom: 0;
    }

    body.pet-detail-page #petMemorialTabs .nav-item {
        min-width: 0;
    }

    body.pet-detail-page #petMemorialTabs .nav-link {
        justify-content: center;
        width: 100%;
        min-height: 2.75rem;
        border: 1px solid var(--bs-border-color);
        border-radius: 0.375rem;
        font-size: 0.92rem;
        line-height: 1.2;
        padding-right: 0.75rem;
        padding-left: 0.75rem;
        text-align: center;
        white-space: normal;
    }

    body.pet-detail-page #petMemorialTabs .nav-link.active {
        border-color: var(--bs-primary);
    }

    body.pet-detail-page .pet-memorial-hero {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.85rem;
    }

    body.pet-detail-page .pet-memorial-hero-photo {
        max-height: 20rem;
    }

    body.pet-detail-page .pet-memorial-hero-body {
        padding: 0;
    }

    body.pet-detail-page .memorial-action,
    body.pet-detail-page [data-memorial-type="reaction"] {
        width: 100%;
    }

    body.pet-detail-page .pet-share-actions {
        flex-direction: column;
    }

    body.pet-detail-page .pet-share-action {
        width: 100%;
    }

    body.pet-detail-page .similar-pets-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem;
    }

    body.pet-detail-page [data-comments-section] .d-flex.justify-content-between {
        align-items: stretch !important;
    }

    body.pet-detail-page [data-comments-pagination],
    body.pet-detail-page [data-comments-section] .btn-outline-secondary {
        width: 100%;
    }
}

/* Pet detail: memorial centerpiece */
body.pet-detail-page {
    background-color: #e8f2ee;
}

body.pet-detail-page main.container {
    border: 0;
    background: rgba(255, 250, 240, 0.9);
    box-shadow: 0 34px 90px rgba(10, 30, 34, 0.22);
}

body.pet-detail-page .pet-memorial-hero {
    position: relative;
    overflow: hidden;
    gap: clamp(1rem, 3vw, 2rem);
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 0;
    background:
        linear-gradient(120deg, rgba(18, 63, 70, 0.96), rgba(22, 46, 51, 0.88) 48%, rgba(185, 88, 102, 0.18));
    color: #fffaf0;
    box-shadow: 0 26px 70px rgba(10, 30, 34, 0.25);
}

body.pet-detail-page .pet-memorial-hero::after {
    content: "";
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: min(14rem, 26vw);
    height: 0.3rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--bmp-petal), var(--bmp-gold), rgba(255, 250, 240, 0.72));
}

body.pet-detail-page .pet-memorial-hero-photo {
    border: 4px solid rgba(255, 250, 240, 0.86);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

body.pet-detail-page .pet-memorial-hero .badge {
    border-color: rgba(255, 250, 240, 0.28) !important;
    background: rgba(255, 250, 240, 0.14) !important;
    color: #fffaf0 !important;
}

body.pet-detail-page .pet-memorial-quote,
body.pet-detail-page .pet-memorial-description,
body.pet-detail-page .pet-memorial-meta {
    color: rgba(255, 250, 240, 0.82);
}

body.pet-detail-page .pet-memorial-description a,
body.pet-detail-page .pet-memorial-hero a:not(.btn) {
    color: #fff4c8;
}

body.pet-detail-page #petMemorialTabs {
    margin-top: 1.4rem;
    padding: 0.4rem;
    border: 1px solid rgba(18, 63, 70, 0.12);
    border-radius: 8px;
    background: rgba(18, 63, 70, 0.08);
}

body.pet-detail-page #petMemorialTabs .nav-link {
    border-radius: 8px;
    color: var(--bmp-evergreen);
    font-weight: 800;
}

body.pet-detail-page #petMemorialTabs .nav-link.active {
    background: var(--bmp-evergreen);
    color: #fffaf0;
    box-shadow: 0 10px 22px rgba(18, 63, 70, 0.18);
}

body.pet-detail-page .tab-content {
    padding: 1rem;
    border: 1px solid rgba(18, 63, 70, 0.12);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: rgba(255, 250, 240, 0.72);
}

body.pet-detail-page .pet-detail-mobile-picture,
body.pet-detail-page .pet-detail-mobile-row,
body.pet-detail-page .similar-pet-card {
    border-color: rgba(18, 63, 70, 0.14);
    background: var(--bmp-paper-solid);
    box-shadow: 0 14px 34px rgba(12, 35, 39, 0.1);
}

@media (max-width: 767.98px) {
    body.pet-detail-page .pet-memorial-hero {
        grid-template-columns: 1fr;
    }

    body.pet-detail-page .pet-memorial-hero::after {
        width: calc(100% - 2rem);
    }

    body.pet-detail-page .tab-content {
        padding: 0.85rem;
    }
}

/* Final paradise pet detail pass */
body.pet-detail-page {
    background-color: #eaf8ff;
}

body.pet-detail-page main.container {
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 252, 240, 0.92);
    box-shadow: 0 30px 90px rgba(49, 86, 106, 0.18);
}

body.pet-detail-page .pet-memorial-hero {
    border: 1px solid rgba(255, 255, 255, 0.74);
    background:
        linear-gradient(90deg, rgba(24, 62, 70, 0.82) 0%, rgba(37, 81, 90, 0.64) 42%, rgba(255, 255, 255, 0.18) 100%),
        image-set(
            url("../images/home-pet-paradise-hero.webp") type("image/webp"),
            url("../images/home-pet-paradise-hero.png") type("image/png")
        );
    background-position: center;
    background-size: cover;
    box-shadow: 0 30px 80px rgba(49, 86, 106, 0.24);
}

body.pet-detail-page .pet-memorial-hero::after {
    background: linear-gradient(90deg, #ff9fb2, #ffd56f, #98dcff);
}

body.pet-detail-page .pet-memorial-hero-photo {
    border-color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 50px rgba(24, 62, 70, 0.28);
}

body.pet-detail-page #petMemorialTabs {
    border-color: rgba(49, 86, 106, 0.14);
    background: rgba(255, 255, 255, 0.56);
    box-shadow: 0 14px 34px rgba(91, 151, 186, 0.1);
}

body.pet-detail-page #petMemorialTabs .nav-link {
    border-radius: 999px;
    color: #31566a;
}

body.pet-detail-page #petMemorialTabs .nav-link:hover,
body.pet-detail-page #petMemorialTabs .nav-link:focus {
    color: #8f3f4d;
}

body.pet-detail-page #petMemorialTabs .nav-link.active {
    background: #b95866;
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(185, 88, 102, 0.2);
}

body.pet-detail-page .tab-content,
body.pet-detail-page .pet-detail-mobile-picture,
body.pet-detail-page .pet-detail-mobile-row,
body.pet-detail-page .similar-pet-card,
body.pet-detail-page [data-comments-section] {
    border-color: rgba(49, 86, 106, 0.14);
    background:
        radial-gradient(circle at 94% 0%, rgba(255, 245, 199, 0.44), transparent 38%),
        rgba(255, 255, 255, 0.62);
    box-shadow: 0 18px 44px rgba(91, 151, 186, 0.12);
}

@media (max-width: 767.98px) {
    body.pet-detail-page main.container {
        border: 0;
        background: rgba(255, 252, 240, 0.96);
    }

    body.pet-detail-page .pet-memorial-hero {
        background:
            linear-gradient(180deg, rgba(24, 62, 70, 0.84), rgba(24, 62, 70, 0.48)),
            image-set(
                url("../images/home-pet-paradise-hero.webp") type("image/webp"),
                url("../images/home-pet-paradise-hero.png") type("image/png")
            );
        background-position: 60% center;
        background-size: cover;
    }

    body.pet-detail-page #petMemorialTabs .nav-link {
        border-radius: 8px;
    }
}

/* Pet detail contrast pass */
body.pet-detail-page main.container a:not(.btn):not(.similar-pet-card) {
    color: #8f3f4d;
    font-weight: 700;
    text-decoration-color: rgba(143, 63, 77, 0.42);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

body.pet-detail-page main.container a:not(.btn):not(.similar-pet-card):hover,
body.pet-detail-page main.container a:not(.btn):not(.similar-pet-card):focus {
    color: #31566a;
    text-decoration-color: currentColor;
}

body.pet-detail-page .pet-memorial-hero a:not(.btn) {
    color: #fff4c8;
    text-decoration-color: rgba(255, 244, 200, 0.72);
}

body.pet-detail-page .pet-memorial-hero .btn-link,
body.pet-detail-page .pet-memorial-description .btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.75rem !important;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff4c8;
    font-weight: 800;
    text-decoration: none;
}

body.pet-detail-page .pet-memorial-description .btn-link {
    padding: 0.15rem 0.65rem !important;
    border: 1px solid rgba(143, 63, 77, 0.22);
    background: rgba(255, 255, 255, 0.74);
    color: #8f3f4d;
}

body.pet-detail-page .pet-memorial-hero .btn-link:hover,
body.pet-detail-page .pet-memorial-hero .btn-link:focus,
body.pet-detail-page .pet-memorial-description .btn-link:hover,
body.pet-detail-page .pet-memorial-description .btn-link:focus {
    background: #8f3f4d;
    color: #ffffff;
}

body.pet-detail-page .btn-outline-primary,
body.pet-detail-page .btn-outline-secondary,
body.pet-detail-page .btn-outline-success,
body.pet-detail-page .btn-outline-warning,
body.pet-detail-page .btn-outline-dark {
    border-width: 2px;
    background: rgba(255, 255, 255, 0.86);
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(49, 86, 106, 0.12);
}

body.pet-detail-page .btn-outline-primary {
    border-color: #31566a;
    color: #31566a;
}

body.pet-detail-page .btn-outline-secondary,
body.pet-detail-page .btn-outline-dark {
    border-color: #5d6470;
    color: #4d5460;
}

body.pet-detail-page .btn-outline-success {
    border-color: #3f7c5f;
    color: #2f6b4f;
}

body.pet-detail-page .btn-outline-warning {
    border-color: #a56914;
    color: #7b4d0f;
}

body.pet-detail-page .btn-outline-primary:hover,
body.pet-detail-page .btn-outline-primary:focus,
body.pet-detail-page .btn-outline-secondary:hover,
body.pet-detail-page .btn-outline-secondary:focus,
body.pet-detail-page .btn-outline-dark:hover,
body.pet-detail-page .btn-outline-dark:focus {
    border-color: #31566a;
    background: #31566a;
    color: #ffffff;
}

body.pet-detail-page .btn-outline-success:hover,
body.pet-detail-page .btn-outline-success:focus {
    border-color: #2f6b4f;
    background: #2f6b4f;
    color: #ffffff;
}

body.pet-detail-page .btn-outline-warning:hover,
body.pet-detail-page .btn-outline-warning:focus {
    border-color: #8a560f;
    background: #8a560f;
    color: #ffffff;
}

body.pet-detail-page .btn-primary {
    border-color: #b95866;
    background: #b95866;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 12px 26px rgba(185, 88, 102, 0.22);
}

body.pet-detail-page .btn-primary:hover,
body.pet-detail-page .btn-primary:focus {
    border-color: #8f3f4d;
    background: #8f3f4d;
    color: #ffffff;
}

body.pet-detail-page #petMemorialTabs {
    background: rgba(255, 255, 255, 0.82);
}

body.pet-detail-page #petMemorialTabs .nav-link {
    border: 1px solid rgba(49, 86, 106, 0.18);
    background: rgba(255, 255, 255, 0.72);
    color: #31566a;
    box-shadow: 0 8px 20px rgba(91, 151, 186, 0.08);
}

body.pet-detail-page #petMemorialTabs .nav-link:hover,
body.pet-detail-page #petMemorialTabs .nav-link:focus {
    border-color: #31566a;
    background: #31566a;
    color: #ffffff;
}

body.pet-detail-page #petMemorialTabs .nav-link.active {
    border-color: #b95866;
    background: #b95866;
    color: #ffffff;
}

body.pet-detail-page #petMemorialTabs .nav-link .badge {
    color: #31566a !important;
}

body.pet-detail-page #petMemorialTabs .nav-link:hover .badge,
body.pet-detail-page #petMemorialTabs .nav-link:focus .badge,
body.pet-detail-page #petMemorialTabs .nav-link.active .badge {
    border-color: rgba(255, 255, 255, 0.44) !important;
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

body.pet-detail-page .tab-content {
    background:
        radial-gradient(circle at 94% 0%, rgba(255, 245, 199, 0.5), transparent 38%),
        rgba(255, 255, 255, 0.8);
}

body.pet-detail-page .pet-share-action,
body.pet-detail-page .memorial-action,
body.pet-detail-page [data-memorial-type="reaction"] {
    min-height: 2.5rem;
}

body.pet-detail-page .pet-detail-guide-prompt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(49, 86, 106, 0.14);
    border-radius: 8px;
    background:
        radial-gradient(circle at 94% 0%, rgba(255, 245, 199, 0.44), transparent 38%),
        rgba(255, 255, 255, 0.72);
    box-shadow: 0 16px 38px rgba(91, 151, 186, 0.12);
}

body.pet-detail-page .pet-detail-guide-prompt h2 {
    color: #31566a;
    font-weight: 900;
}

body.pet-detail-page .pet-memorial-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.34);
    color: #31566a;
}

body.pet-detail-page .pet-memorial-meta > span {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    color: #31566a;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;
    box-shadow: 0 10px 24px rgba(24, 62, 70, 0.12);
}

body.pet-detail-page .pet-memorial-meta a {
    color: #8f3f4d !important;
}

body.pet-detail-page .pet-memorial-meta .badge {
    margin-right: 0.25rem;
    margin-left: 0.25rem;
    background: #b95866 !important;
    color: #ffffff !important;
}

body.pet-detail-page .pet-gallery-display-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

body.pet-detail-page .pet-gallery-display-item {
    display: block;
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(49, 86, 106, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 30px rgba(49, 86, 106, 0.12);
}

body.pet-detail-page .pet-gallery-display-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform 0.18s ease;
}

body.pet-detail-page .pet-gallery-display-item:hover .pet-gallery-display-thumb,
body.pet-detail-page .pet-gallery-display-item:focus .pet-gallery-display-thumb {
    transform: scale(1.04);
}

body.pet-detail-page .pet-gallery-slide-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: min(70vh, 640px);
    border-radius: 8px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 245, 199, 0.34), transparent 42%),
        rgba(232, 242, 238, 0.56);
}

body.pet-detail-page .pet-gallery-slide-image {
    max-width: 100%;
    max-height: min(70vh, 640px);
    border-radius: 8px;
    object-fit: contain;
}

body.pet-detail-page #petImageGalleryModal .carousel-control-prev,
body.pet-detail-page #petImageGalleryModal .carousel-control-next {
    width: 3.25rem;
    opacity: 1;
}

body.pet-detail-page #petImageGalleryModal .carousel-control-prev-icon,
body.pet-detail-page #petImageGalleryModal .carousel-control-next-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background-color: rgba(49, 86, 106, 0.82);
    background-size: 58%;
}

@media (max-width: 767.98px) {
    body.pet-detail-page .pet-memorial-meta {
        gap: 0.45rem;
    }

    body.pet-detail-page .pet-memorial-meta > span {
        width: 100%;
        border-radius: 8px;
    }

    body.pet-detail-page .pet-detail-guide-prompt {
        align-items: stretch;
        flex-direction: column;
    }

    body.pet-detail-page .pet-gallery-display-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    body.pet-detail-page .pet-gallery-slide-frame {
        min-height: 54vh;
    }

    body.pet-detail-page .pet-gallery-slide-image {
        max-height: 54vh;
    }
}
