/* ===== Reset + Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--place-font);
    background: var(--place-bg);
    color: #1a1a1a;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== Container ===== */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

/* ===== Header ===== */
.header { position: relative; margin-bottom: 16px; }
.cover {
    width: calc(100% + 32px);
    margin: 0 -16px;
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.cover::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(transparent, var(--place-bg));
}
.cover--gradient {
    background: linear-gradient(135deg, var(--place-primary), color-mix(in srgb, var(--place-primary) 60%, white));
}
.header-content {
    text-align: center;
    margin-top: -50px;
    position: relative;
    z-index: 1;
}
.logo {
    width: 80px; height: 80px;
    border-radius: 12px;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin: 0 auto 8px;
    object-fit: cover;
    background: #fff;
}
.logo--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    background: var(--place-primary);
}
.name {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}
.description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* ===== Header sem cover ===== */
.header--no-cover .cover { display: none; }
.header--no-cover .header-content { margin-top: 16px; }

/* ===== Social bar ===== */
.social-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 16px 0;
}
.social-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.06);
    color: #333;
    transition: transform 150ms ease, background 150ms ease;
}
.social-icon:hover { transform: scale(1.1); background: rgba(0,0,0,0.1); }
.social-icon--wa { color: #25D366; }

/* ===== Buttons ===== */
.buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
}
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--place-primary);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    border-radius: 12px;
    transition: transform 150ms ease, box-shadow 150ms ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn:active { transform: scale(0.98); }
.btn--instagram {
    background: linear-gradient(45deg, #833AB4, #FD1D1D, #FCAF45);
}
.btn--whatsapp { background: #25D366; }
.btn-icon { display: flex; align-items: center; }
.btn-icon svg { width: 18px; height: 18px; }

/* ===== Ad slots ===== */
.ad-slot {
    margin: 10px 0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    min-height: 0;
}
.ad-slot:empty { display: none; }
.ad-slot img {
    width: 100%;
    border-radius: 12px;
}
.ad-slot .ad-label {
    position: absolute;
    bottom: 6px; right: 8px;
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.3);
    padding: 1px 6px;
    border-radius: 4px;
}

/* ===== Popup (preRoll) ===== */
.popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 200ms ease-in;
}
.popup-overlay.visible { display: flex; opacity: 1; }
.popup-wrapper {
    position: relative;
    max-width: 320px;
    width: 90%;
}
.popup-content {
    position: relative;
    transform: scale(0.85);
    opacity: 0;
    transition: transform 300ms ease-out, opacity 300ms ease-out;
}
.popup-overlay.visible .popup-content { transform: scale(1); opacity: 1; }
.popup-timer {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: rgba(255,255,255,0.6);
    transform-origin: left;
    animation: timer-shrink 5s linear forwards;
}
@keyframes timer-shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.popup-close {
    position: absolute;
    top: -14px; right: -14px;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: #cfcfcf;
    color: #111;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 300ms ease;
    z-index: 10;
}
.popup-close.show { opacity: 1; }
.popup-content img { border-radius: 12px; width: 100%; }

/* ===== Footer ===== */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    font-size: 11px;
    color: #999;
}
.footer a { color: #999; text-decoration: none; }
.footer a:hover { color: #666; }
.footer strong { font-weight: 700; }

/* ===== Responsive ===== */
@media (min-width: 480px) {
    .container { padding: 0 24px 60px; }
    .cover { height: 220px; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
