/* WEBEGE MASCOTS V1 — decorative only; no JS, no fixed positioning. */
body[data-webege-mascot="ege"] { --webege-shop-mascot: url("../assets/mascots-v1/ege.webp"); --webege-shop-ratio: 384 / 256; }
body[data-webege-mascot="oge"] { --webege-shop-mascot: url("../assets/mascots-v1/oge.webp"); --webege-shop-ratio: 384 / 234; }
body[data-webege-mascot] #shop-year-section,
body[data-webege-mascot] .shop-seo-breadcrumbs { position: relative; }
body[data-webege-mascot] #shop-year-section::before,
body[data-webege-mascot] .shop-seo-breadcrumbs::after,
body.free-body .free-info-card::before,
#cart-modal .cart-items > .cart-item:first-child::before {
    content: "";
    position: absolute;
    display: block;
    pointer-events: none;
    user-select: none;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    z-index: 2;
}
/* The asset sits over the RIGHT year tile, not relative to the viewport. */
body[data-webege-mascot] #shop-year-section { overflow: visible !important; }
body[data-webege-mascot] #shop-year-section::before {
    width: clamp(150px, 14vw, 184px);
    aspect-ratio: var(--webege-shop-ratio);
    background-image: var(--webege-shop-mascot);
    left: 75%;
    top: 0;
    transform: translate(-50%, calc(-100% + 9px));
}
body[data-webege-mascot] .shop-seo-breadcrumbs::after { display: none; }

body.free-body .free-info-card::before {
    width: clamp(140px, 13vw, 172px);
    aspect-ratio: 384 / 234;
    background-image: url("../assets/mascots-v1/free.webp");
    right: 26px;
    bottom: calc(100% - 9px);
}

/* Add space INSIDE the existing scrollable list, never over checkout. */
#cart-modal .cart-items > .cart-item:first-child {
    position: relative;
    overflow: visible;
    margin-top: 57px !important;
}
#cart-modal .cart-items > .cart-item:first-child::before {
    width: 88px;
    aspect-ratio: 224 / 168;
    left: 50%;
    bottom: calc(100% - 8px);
    transform: translateX(-50%);
    background-image: url("../assets/mascots-v1/cart.webp");
}

/* Narrow layouts and browser zoom: move mascot into the breadcrumb row. */
@media (max-width: 1099px) {
    body[data-webege-mascot] #shop-year-section::before { display: none; }
    body[data-webege-mascot] .shop-seo-breadcrumbs {
        box-sizing: border-box;
        min-height: 49px;
        padding-right: 82px;
        align-items: center;
    }
    body[data-webege-mascot] .shop-seo-breadcrumbs::after {
        display: block;
        width: 72px;
        aspect-ratio: var(--webege-shop-ratio);
        background-image: var(--webege-shop-mascot);
        right: 2px;
        bottom: -1px;
    }
}
@media (max-width: 920px) {
    body.free-body .free-info-card { margin-top: 49px !important; }
    body.free-body .free-info-card::before { width: 120px; right: 22px; }
}
@media (max-width: 700px) {
    #cart-modal .cart-items > .cart-item:first-child { margin-top: 34px !important; }
    #cart-modal .cart-items > .cart-item:first-child::before { width: 56px; bottom: calc(100% - 6px); }
}
/* Preserve checkout room in landscape, small-height windows, keyboard/zoom. */
@media (max-height: 650px) {
    #cart-modal .cart-items > .cart-item:first-child { margin-top: 0 !important; }
    #cart-modal .cart-items > .cart-item:first-child::before { display: none; }
}
@media print {
    body[data-webege-mascot] #shop-year-section::before,
    body[data-webege-mascot] .shop-seo-breadcrumbs::after,
    body.free-body .free-info-card::before,
    #cart-modal .cart-items > .cart-item:first-child::before { display: none; }
    body.free-body .free-info-card,
    #cart-modal .cart-items > .cart-item:first-child { margin-top: 0 !important; }
}
