/* Sitewide promo — badges and modal. Palette matches the age gate. */

.zootd-promo-badge {
    display: inline-block;
    margin: 6px 0 0;
    padding: 4px 10px;
    border-radius: 50px;
    background: linear-gradient(135deg, #FF70A6, #FF9770);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.4;
}

/*
 * Blocksy's shop-loop product-card renderer sweeps the WooCommerce-standard
 * woocommerce_after_shop_loop_item_title hook into its own DOM position —
 * right next to the title, not the price — regardless of card layout
 * (shop_cards_type, custom layouts, etc: see product-card.php:264-270,
 * an ungated redirect_callbacks() sweep with no priority filter). Rather
 * than chase that private, version-coupled internal layout in PHP, fix the
 * VISUAL position here instead: .product is a flex column
 * (display: flex; flex-direction: column) in Blocksy's own bundled
 * woocommerce.min.css, and none of its children set an explicit `order`,
 * so they all default to order: 0. Giving the badge a high order value
 * pushes it to the end of the flex column — after the price and
 * add-to-cart button — no matter where it actually sits in the DOM.
 * Harmlessly ignored on any theme where .product isn't a flex container:
 * the badge then simply renders at its natural DOM position, right after
 * the title, exactly per spec.
 */
.zootd-promo-badge {
    order: 999;
}

.zootd-promo-note {
    margin: 8px 0 16px;
    padding: 8px 14px;
    border-left: 3px solid #FF70A6;
    background: rgba(255, 112, 166, .07);
    color: #212223;
    font-size: 13px;
    font-weight: 600;
}

/* --- modal --- */

.zootd-promo-modal[hidden] { display: none; }

.zootd-promo-modal {
    position: fixed;
    inset: 0;
    /* Deliberately below the age gate's 2147483000. */
    z-index: 2147482000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(33, 34, 35, .72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: zootd-promo-fade .25s ease-out both;
}

.zootd-promo-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 40px 32px;
    background: #fff;
    border: 1px solid #F2F2F2;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(255, 112, 166, .25);
    text-align: center;
    animation: zootd-promo-card-in .4s cubic-bezier(.4, 0, .2, 1) both;
}

.zootd-promo-bar {
    display: block;
    width: 56px;
    height: 4px;
    margin: 0 auto 24px;
    border-radius: 2px;
    background: linear-gradient(135deg, #FF70A6 0%, #FF9770 25%, #F7C446 50%, #BFD93A 65%, #45BAEA 100%);
}

.zootd-promo-title {
    margin: 0 0 12px;
    color: #212223;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
}

.zootd-promo-body {
    margin: 0 auto 28px;
    max-width: 340px;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.zootd-promo-cta {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    background: linear-gradient(135deg, #FF70A6, #FF9770);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(255, 112, 166, .35);
    transition: all .3s ease;
}

.zootd-promo-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 112, 166, .45);
    color: #fff;
}

.zootd-promo-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #888;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.zootd-promo-close:hover { color: #212223; }

.zootd-promo-card :focus-visible,
.zootd-promo-close:focus-visible {
    outline: 2px solid #00B4B7;
    outline-offset: 2px;
}

body.zootd-promo-open { overflow: hidden; }

@keyframes zootd-promo-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes zootd-promo-card-in {
    from { opacity: 0; transform: translateY(8px) scale(.97) }
    to   { opacity: 1; transform: none }
}

@media (prefers-reduced-motion: reduce) {
    .zootd-promo-modal,
    .zootd-promo-card { animation: none !important; }
    .zootd-promo-cta { transition: none; }
    .zootd-promo-cta:hover { transform: none; }
}
