/*
Theme Name: Astra Child
Template: astra
Version: 4.11.0
*/

/* =========================================================
   RESET
========================================================= */

html{
    -webkit-text-size-adjust:100%;
}

*{
    box-sizing:border-box;
}

body{
    margin:0;
    background:#f5f7fa;
    color:#222;
    font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    line-height:1.5;
    overflow-x:hidden;
}

img{
    max-width:100%;
    display:block;
}

/* =========================================================
   HEADER
========================================================= */

.ast-site-identity{
    position:relative;
}

.login-avatar-header{
    position:absolute;
    top:50%;
    right:20px;
    transform:translateY(-50%);
    display:flex;
    align-items:center;
    gap:15px;
    z-index:999;
}

.login-avatar-header a{
    font-size:15px;
    font-weight:500;
    color:#333;
    text-decoration:none;
}

.login-avatar-header img{
    width:36px;
    height:36px;
    border-radius:50%;
    object-fit:cover;
}

/* =========================================================
   MENU MOVIL
========================================================= */

.menu-movil{
    display:none;
    background:#e0f0ff;
    padding:10px 15px;
    border-bottom:1px solid #c2e0ff;
    position:relative;
    z-index:9999;
}

.menu-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.menu-top .btn-login,
.menu-top .btn-registro{
    text-decoration:none;
    padding:8px 14px;
    border-radius:6px;
    font-weight:600;
    font-size:14px;
    color:#fff !important;
}

.menu-top .btn-login{
    background:#5ab0ff !important;
}

.menu-top .btn-registro{
    background:#e63946 !important;
}

.menu-toggle{
    font-size:26px;
    background:#007bff;
    border:none;
    color:#fff;
    border-radius:6px;
    cursor:pointer;
    padding:4px 10px;
}

.menu-items{
    display:none;
    flex-direction:column;
    margin-top:10px;
    border-top:1px solid #c2e0ff;
}

.menu-items li{
    list-style:none;
    border-bottom:1px solid #c2e0ff;
}

.menu-items li a{
    color:#003366;
    text-decoration:none;
    padding:12px;
    display:block;
    font-size:16px;
    font-weight:500;
}

/* =========================================================
   FOOTER MOVIL
========================================================= */

.footer-movil{
    display:none;
    background:#e0f0ff;
    color:#0b2540;
    padding:18px 16px;
    border-top:1px solid #dbefff;
}

.footer-movil-inner{
    max-width:1100px;
    margin:0 auto;
    display:flex;
    flex-direction:column;
    gap:12px;
}

.footer-links{
    margin:0;
    padding:0;
    list-style:none;
}

.footer-links a{
    display:block;
    padding:8px 0;
    color:#034264;
    text-decoration:none;
}

/* =========================================================
   GRID ANUNCIOS
========================================================= */

.anuncios-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(340px,1fr));
    gap:16px;
    padding:20px;
    max-width:1500px;
    margin:auto;
}

.anuncio-item{
    background:#fff;
    border-radius:14px;
    overflow:hidden;
    border:1px solid #e8e8e8;
    box-shadow:0 4px 14px rgba(0,0,0,.06);
    transition:.2s;
    display:flex;
    flex-direction:column;
    padding:10px;
}

.anuncio-item:hover{
    transform:translateY(-3px);
}

.anuncio-item img{
    width:100%;
    height:180px;
    object-fit:cover;
    border-radius:10px;
}

.anuncio-titulo{
    font-size:1rem;
    font-weight:700;
    color:#111;
    line-height:1.35;
    margin-top:10px;
    text-decoration:none;
}

.anuncio-precio{
    font-size:1.3rem;
    font-weight:800;
    color:#ff6b00;
    margin-top:8px;
}

.anuncio-meta{
    color:#666;
    font-size:.92rem;
    margin-top:4px;
}

/* =========================================================
   SINGLE ANUNCIO
========================================================= */

.contenedor{
    width:100%;
    max-width:1300px;
    margin:auto;
    padding:20px;
}

.card{
    background:#fff;
    border-radius:16px;
    box-shadow:0 4px 20px rgba(0,0,0,.08);
    padding:20px;
    overflow:hidden;
}

.card h1{
    font-size:2rem;
    line-height:1.2;
    margin-bottom:20px;
    color:#111;
}

/* =========================================================
   GALERIA
========================================================= */

.mainSwiper{
    border-radius:14px;
    overflow:hidden;
}

.mainSwiper img{
    width:100%;
    height:520px;
    object-fit:cover;
    border-radius:12px;
}

.thumbsSwiper{
    margin-top:10px;
}

.thumbsSwiper .swiper-slide{
    width:70px !important;
    opacity:.7;
    transition:.2s;
}

.thumbsSwiper .swiper-slide-thumb-active{
    opacity:1;
}

.thumbsSwiper img{
    width:100%;
    height:58px;
    object-fit:cover;
    border-radius:8px;
    cursor:pointer;
}

/* =========================================================
   CONTENIDO
========================================================= */

.contenido{
    margin-top:28px;
    font-size:1rem;
    line-height:1.7;
}

/* =========================================================
   DATOS VEHICULO
========================================================= */

.datos-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px 30px;
    margin-top:30px;
}

.dato{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    padding:10px 0;
    border-bottom:1px solid #ececec;
}

.label{
    font-weight:700;
    color:#111;
}

.valor{
    color:#555;
    text-align:right;
}

/* =========================================================
   VENDEDOR
========================================================= */

.vendedor{
    margin-top:35px;
    padding:20px;
    background:#f7f9fc;
    border-radius:14px;
    text-align:center;
}

.botones{
    display:flex;
    justify-content:center;
    gap:12px;
    margin-top:15px;
    flex-wrap:wrap;
}

/* =========================================================
   BOTONES
========================================================= */

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:12px 18px;
    min-width:170px;
    border-radius:999px;
    background:#3cc9ff;
    color:#fff;
    text-decoration:none;
    font-weight:600;
    transition:.2s;
}

.btn:hover{
    background:#009fd6;
    transform:translateY(-2px);
}

/* =========================================================
   SHARE
========================================================= */

.share-box{
    margin-top:35px;
    text-align:center;
}

.share-icons{
    display:flex;
    justify-content:center;
    gap:12px;
    flex-wrap:wrap;
    margin-top:12px;
}

.share-btn{
    width:46px;
    height:46px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    font-size:20px;
    background:#f2f4f7;
    transition:.2s;
}

.share-btn:hover{
    transform:scale(1.06);
}

/* =========================================================
   FLOATING SHARE
========================================================= */

.floating-share{
    position:fixed;
    right:18px;
    bottom:18px;
    z-index:999;
    display:none;
}

.floating-share a{
    width:58px;
    height:58px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#25d366;
    color:#fff;
    text-decoration:none;
    font-size:26px;
    box-shadow:0 8px 24px rgba(0,0,0,.2);
}

/* =========================================================
   TABLET
========================================================= */

@media(max-width:1024px){

    .menu-movil{
        display:block !important;
    }

    .footer-movil{
        display:block;
    }

    .contenedor{
        max-width:100%;
    }

    .mainSwiper img{
        height:380px;
    }

    .anuncios-grid{
        grid-template-columns:1fr;
        gap:14px;
    }

}

/* =========================================================
   MOVIL
========================================================= */

@media(max-width:768px){

    .contenedor{
        padding:10px;
    }

    .card{
        padding:14px;
        border-radius:12px;
    }

    .card h1{
        font-size:1.45rem;
    }

    .mainSwiper img{
        height:240px;
    }

    .thumbsSwiper{
        margin-top:8px;
    }

    .thumbsSwiper .swiper-slide{
        width:58px !important;
    }

    .thumbsSwiper img{
        height:46px;
        border-radius:6px;
    }

    .datos-grid{
        grid-template-columns:1fr;
        gap:0;
    }

    .dato{
        flex-direction:row;
        align-items:center;
        justify-content:space-between;
        gap:10px;
    }

    .label,
    .valor{
        font-size:.95rem;
    }

    .valor{
        text-align:right;
    }

    .btn{
        width:100%;
        min-width:unset;
    }

    .floating-share{
        display:block;
    }

    .anuncio-item{
        padding:8px;
        border-radius:12px;
    }

    .anuncio-item img{
        height:160px;
        border-radius:8px;
    }

    .anuncio-precio{
        font-size:1.15rem;
    }

}

/* =========================================================
   MOVIL PEQUEÑO
========================================================= */

@media(max-width:480px){

    .card h1{
        font-size:1.25rem;
    }

    .mainSwiper img{
        height:210px;
    }

    .thumbsSwiper .swiper-slide{
        width:52px !important;
    }

    .thumbsSwiper img{
        height:42px;
    }

    .anuncios-grid{
        padding:10px;
        gap:12px;
    }

    .anuncio-item img{
        height:145px;
    }

}
/* ===============================
   FIX GLOBAL IMÁGENES (NO ROMPER ICONOS)
=============================== */

.mainSwiper img,
.thumbsSwiper img,
.anuncio-item img {
    object-fit: cover !important;
    width: 100%;
}

/* Evita deformación de iconos (ubicación, UI, plugins) */
img[src*="icon"],
svg {
    object-fit: unset !important;
    width: auto !important;
    height: auto !important;
}
.thumbsSwiper .swiper-slide {
    width: 64px !important;
    height: 64px !important;
    flex-shrink: 0;
}

.thumbsSwiper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media(max-width:768px){

    .mainSwiper img {
        height: 240px !important;
        object-fit: cover;
    }

    .thumbsSwiper .swiper-slide {
        width: 52px !important;
        height: 52px !important;
    }

}
/* ===============================
   PROTECCIÓN OVERLAYS (CHAT / COOKIES)
=============================== */

#cmplz-manage-consent,
.cmplz-cookiebanner,
.bp-messages-wrap,
.better-messages,
.messenger-container {
    z-index: 999999 !important;
}
