/**
 * ============================================================
 * CtrlEat Official Shopping Website
 * ============================================================
 * CtrlEat 正式版购物网站
 * 版权归天河星雨工作室[thxymc Studio] thxymc.com所有
 * Copyright © 2026 thxymc.com. All rights reserved.
 * 网页由天河星雨工作室制作 thxymc.com
 * ！！未经允许禁止公开源码！！
 * ============================================================
 */

.ce-ad-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, .42);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.ce-ad-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.ce-ad-box {
    width: min(560px, 94vw);
    max-height: 90vh;
    overflow: hidden auto;
    position: relative;
    background: #ffffff;
    border-radius: 30px;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .28);
    transform: translateY(12px) scale(.98);
    transition: transform .18s ease;
}

.ce-ad-overlay.show .ce-ad-box {
    transform: translateY(0) scale(1);
}

.ce-ad-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, .72);
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.ce-ad-image {
    width: 100%;
    max-height: 310px;
    object-fit: contain;
    display: block;
    background: #f1f5f9;
}

.ce-ad-body {
    padding: 22px;
}

.ce-ad-badge {
    display: inline-flex;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    padding: 6px 12px;
    font-weight: 1000;
    font-size: .84rem;
    margin-bottom: 10px;
}

.ce-ad-body h2 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: clamp(1.45rem, 4vw, 2.1rem);
    line-height: 1.2;
}

.ce-ad-body p {
    margin: 0;
    color: #475569;
    font-weight: 760;
    line-height: 1.75;
    white-space: pre-wrap;
}

.ce-ad-actions {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    margin-top: 18px;
}

.ce-ad-actions button {
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 0 14px;
    font-weight: 1000;
    cursor: pointer;
}

.ce-ad-link {
    background: #16a34a;
    color: #ffffff;
}

.ce-ad-nav {
    background: #e0f2fe;
    color: #0369a1;
}

.ce-ad-counter {
    margin-top: 12px;
    color: #94a3b8;
    font-size: .86rem;
    text-align: center;
    font-weight: 900;
}

.ce-ad-today {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-weight: 900;
}

.ce-ad-today input {
    width: 16px;
    height: 16px;
}

@media (max-width: 640px) {
    .ce-ad-overlay {
        padding: 12px;
    }

    .ce-ad-box {
        border-radius: 24px;
    }

    .ce-ad-image {
        max-height: 240px;
    }

    .ce-ad-body {
        padding: 18px;
    }

    .ce-ad-actions {
        grid-template-columns: 1fr;
    }
}
