html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    overflow-x: hidden;
}

:root {
    --primary: #FFCC00;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-2: #475569;
    --light: #ffffff;
}

/* ── BASE ── */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: #ffffff;
    color: var(--text);
}

/* ── NAVBAR ── */
.navbar {
    background: #ffffff;
    color: var(--text);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border-bottom: 1px solid var(--border);
}
.logo {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo .dot { color: var(--primary); }

.btn-solid { background: var(--primary); color: #ffffff; border: none; padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.3s; }
.btn-solid:hover { background: #1d4ed8; }
.btn-outline { background: transparent; color: #475569; border: 1px solid #cbd5e1; padding: 10px 20px; border-radius: 8px; margin-right: 10px; cursor: pointer; font-weight: 500; transition: 0.3s; }
.btn-outline:hover { border-color: #ffffff; color: #ffffff; }

/* ── SEARCH BAR ── */
.search-bar {
    background: linear-gradient(135deg, #0a0a0a, #0a0a0a);
    padding: 20px 5%;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--primary);
}
.search-bar select, .search-bar input {
    flex: 1 1 12%;
    min-width: 130px;
    padding: 12px 18px;
    border-radius: 25px;
    border: 1px solid var(--border);
    outline: none;
    font-family: 'Poppins', sans-serif;
    background: #111111;
    color: var(--text);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.search-bar select option { background: #111111; color: var(--text); }
.search-bar input { flex: 1; min-width: 200px; max-width: 400px; }
.search-bar input::placeholder { color: #666; }
.btn-search {
    flex: 0 1 auto;
    min-width: 100px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}
.btn-search:hover { background: #1d4ed8; transform: translateY(-2px); }

/* ── CONTAINER ── */
.container { padding: 30px 5%; max-width: 1400px; margin: 0 auto; }
.feed-title {
    font-size: 22px;
    margin-bottom: 22px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.feed-title::before { content: ''; width: 4px; height: 22px; background: var(--primary); border-radius: 2px; }

/* ── AD GRID ── */
.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* ── AD CARD ── */
.ad-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.ad-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.1);
    border-color: #FFCC00;
}
.ad-card.vip { border-left: 4px solid #FFCC00; }

/* ── VIP / NEW BADGES ── */
.vip-badge {
    position: absolute; top: 10px; left: 10px;
    background: #FFCC00; color: #111;
    padding: 3px 10px; border-radius: 4px;
    font-size: 11px; font-weight: 800; z-index: 2;
    letter-spacing: 0.5px; text-transform: uppercase;
}
.new-badge {
    position: absolute; top: 10px; right: 10px;
    background: #111; color: #FFCC00;
    padding: 3px 10px; border-radius: 4px;
    font-size: 10px; font-weight: 800; z-index: 2;
}

/* ── AD IMAGE ── */
.ad-image { height: 190px; background: #f1f5f9; position: relative; overflow: hidden; }
.ad-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; display: block; }
.ad-card:hover .ad-image img { transform: scale(1.04); }

/* ── AD INFO ── */
.ad-info {
    padding: 14px 16px 6px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--surface);
}
.ad-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
}
.ad-desc {
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.5;
    margin-bottom: 10px;
    flex: 1;
}
.ad-location {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
    padding-bottom: 4px;
}
.ad-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}
.ad-age { font-size: 13px; font-weight: 600; color: var(--primary); }

/* ── CONTACT BUTTONS ── */
.contact-buttons { display: flex; gap: 8px; }
.btn-wa {
    background: #25D366; color: #ffffff; border-radius: 50%;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; font-weight: bold; font-size: 16px;
    transition: 0.2s; flex-shrink: 0;
}
.btn-wa:hover { background: #1da851; transform: scale(1.1); }
.btn-tg {
    background: #0088cc; color: #ffffff; border-radius: 50%;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; font-weight: bold; font-size: 16px;
    transition: 0.2s;
}
.btn-tg:hover { background: #B8960C; transform: scale(1.05); }

/* ── AD ACTIONS ROW ── */
.ad-actions { display: flex; gap: 8px; padding: 8px 10px 12px; align-items: center; }
.btn-ver-tel {
    width: 100%;
    background: #111;
    border: 2px solid #111;
    color: #FFCC00;
    border-radius: 6px;
    padding: 12px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0px;
    text-align: center;
    text-transform: uppercase;
    box-shadow: 2px 2px 0px #FFCC00;
}
.btn-ver-tel:hover, .btn-ver-tel.revealed { background: #FFCC00; color: #111; box-shadow: 2px 2px 0px #111; }

/* ── BADGE NUEVO ── */
.new-badge {
    position: absolute;
    top: 10px; left: 10px;
    background: #22c55e;
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 10;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(34,197,94,0.5);
}

/* ── AVAILABLE NOW BADGE ── */
.available-badge {
    position: absolute;
    top: 10px; left: 10px;
    background: rgba(0,208,132,0.9);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 10;
}
.avail-dot {
    width: 6px; height: 6px;
    background: white;
    border-radius: 50%;
    animation: availPulse 1.2s infinite;
}
@keyframes availPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
}

/* ── MODAL ── */
.modal {
    display: none;
    position: fixed;
    z-index: 9999999 !important;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.modal-content {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    margin: 40px auto 10% auto;
    padding: 36px;
    border-radius: 20px;
    width: 90%;
    max-width: 440px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0,0,0,0.7);
}
@media (max-width: 768px) { .modal-content { margin-top: 20px; padding: 20px; } }
.modal h2 { margin-top: 0; color: var(--text); font-weight: 700; }
.modal input, .modal select, .modal textarea {
    width: 100%;
    padding: 14px;
    margin: 8px 0 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    background: var(--surface-2);
    color: var(--text);
}
.modal input:focus, .modal select:focus, .modal textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.modal input::placeholder, .modal textarea::placeholder { color: #555; }
.close { position: absolute; right: 20px; top: 16px; font-size: 26px; cursor: pointer; color: #666; transition: 0.2s; }
.close:hover { color: var(--primary); }
.login-box { text-align: left; }

/* ── AGE GATE ── */









/* ── COOKIE BANNER ── */
#cookieBanner {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #ffffff; border-top: 1px solid #333;
    padding: 12px 20px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; z-index: 9998; font-size: 13px; color: #aaa; flex-wrap: wrap;
}
#cookieBanner a { color: var(--primary); text-decoration: none; }
#cookieBanner button {
    background: var(--primary); color: #ffffff; border: none;
    padding: 8px 20px; border-radius: 20px; cursor: pointer;
    font-weight: 700; white-space: nowrap; flex-shrink: 0;
}

/* ── PAGINATION ── */
#paginationControls button {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 16px;
    margin: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}
#paginationControls button:hover { border-color: var(--primary); color: var(--primary); }
#paginationControls button.active-page { background: var(--primary); color: #ffffff; border-color: var(--primary); }
#paginationControls span { color: var(--text-2); font-size: 13px; margin: 0 8px; }

/* ── BANNER SLOTS ── */
ins[id^="1127"] {
    background: #1a1a24;
    border: 1px dashed #3a3a50;
    display: inline-block !important;
    position: relative;
    border-radius: 8px;
    min-width: 300px;
    min-height: 90px;
}
ins[id^="1127"]:empty::before {
    content: '📢 Espacio Publicitario';
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    color: #444; font-size: 12px; white-space: nowrap;
}

/* ── MOBILE ── */
@media (max-width: 768px) {
    .nav-actions { display: none; }
    .ads-grid { grid-template-columns: repeat(auto-fill, minmax(155px,1fr)); gap: 12px; }
    .ad-image { height: 200px; }
    .ad-title { font-size: 14px; }
    .ad-desc { font-size: 11px; }
}

/* ── STICKY NAVBAR (all screens) ── */
header.navbar {
    position: fixed !important;
    width: 100% !important;
    box-sizing: border-box !important;
    left: 0 !important; top: 0 !important;
    z-index: 9999999 !important;
    background: #0a0a0a !important;
    border-bottom: 2px solid var(--primary) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    padding: 12px 20px !important;
}

@media (max-width: 768px) {
    
    header.navbar {
        position: relative !important;
        top: 0 !important;
        height: auto !important;
        flex-direction: column !important;
        padding: 10px !important;
        gap: 10px !important;
    }
    header.navbar .nav-actions {
        display: flex !important;
        width: 100% !important;
        justify-content: space-around !important;
        gap: 8px !important;
    }
    header.navbar .nav-actions button { flex: 1 !important; font-size: 13px !important; padding: 9px !important; }
    .logo { margin: 0 auto !important; }
    .vip-badge { top: 8px !important; right: 8px !important; font-size: 9px !important; }
    .new-badge { top: 8px !important; left: 8px !important; font-size: 9px !important; }
    #paginationControls { display: flex !important; flex-wrap: wrap !important; justify-content: center !important; gap: 5px !important; }
}

/* ── RESPONSIVE BANNERS ── */
.desktop-banner { display: block; }
.mobile-banner { display: none; }
@media (max-width: 768px) {
    .desktop-banner { display: none !important; }
    .mobile-banner { display: block !important; }
}








/* Robust Fixed Header */
.header-wrapper {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    z-index: 999999 !important;
    background: #000000 !important;
    border-bottom: 2px solid #FFCC00 !important;
    padding: 0 5% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 70px !important;
    min-height: 70px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
}
body {
    padding-top: 70px !important;
}
