*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:Arial,Helvetica,sans-serif;background:#efe8ae;color:#111}
img{max-width:100%;height:auto;display:block}
a{text-decoration:none;color:inherit}

/* HEADER */
.topbar{width:100%;background:#f4d100;border-bottom:1px solid rgba(0,0,0,.08);position:sticky;top:0;z-index:120}
.topbar-inner{max-width:1380px;margin:0 auto;min-height:82px;display:flex;align-items:center;gap:18px;padding:6px 18px}
.topbar-logo{width:360px;min-width:360px;height:92px;display:flex;align-items:center;justify-content:center;line-height:0;overflow:hidden}
.topbar-logo picture{display:block;line-height:0}
.topbar-logo img{display:block;width:360px;height:92px;object-fit:contain}
.topbar-search{flex:1;display:flex;align-items:center;gap:10px;min-width:220px}
.topbar-search input{flex:1;height:40px;border:none;border-radius:14px;padding:0 16px;background:#fff;font-size:14px;outline:none}
.topbar-search button{height:40px;padding:0 18px;border:none;border-radius:14px;background:#1677ff;color:#fff;font-weight:700;cursor:pointer}
.topbar-nav{display:flex;align-items:center;gap:14px;font-size:13px;font-weight:700;white-space:nowrap}
.topbar-nav a{color:#111}

/* HOME */
.hero-dinamico{width:100%;height:300px;background-size:cover;background-position:center center;background-repeat:no-repeat;position:relative;overflow:hidden}
.hero-overlay{position:absolute;inset:0;background:linear-gradient(to bottom,rgba(0,0,0,0) 46%,rgba(239,232,174,.10) 64%,rgba(239,232,174,.38) 76%,rgba(239,232,174,.74) 89%,rgba(239,232,174,1) 100%)}
.home-wrapper{max-width:1380px;margin:0 auto;padding:0 16px 26px;position:relative}
.cards-section{margin-top:-48px;position:relative;z-index:15}
.section-title{font-size:1.9rem;font-weight:900;color:#111;margin:0 0 16px}
.cards-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:stretch}
.card-link{display:block;height:100%}
.card{height:100%;min-height:350px;display:flex;flex-direction:column;overflow:hidden;border-radius:18px;background:#f4f4f4;box-shadow:0 8px 20px rgba(0,0,0,.10);transition:transform .16s ease,box-shadow .16s ease}
.card:hover{transform:translateY(-4px);box-shadow:0 12px 24px rgba(0,0,0,.14)}
.card-image{width:100%;height:180px;min-height:180px;max-height:180px;object-fit:cover;background:#ddd}
.card-body{flex:1;display:flex;flex-direction:column;gap:8px;padding:12px;background:#f4f4f4}
.card-price{font-size:1.55rem;line-height:1;font-weight:900;color:#111}
.card-title{font-size:.96rem;line-height:1.2;font-weight:800;color:#111;min-height:36px;max-height:36px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.card-meta{font-size:.85rem;color:#666;min-height:18px}
.card-badge{margin-top:auto;display:inline-flex;align-items:center;justify-content:center;width:max-content;padding:6px 10px;border-radius:999px;background:#f2db7a;color:#7f5d00;font-size:.72rem;font-weight:800}
.promo-card{min-height:350px;border-radius:18px;background:#f1d65a;border:2px dashed #ccab1f;box-shadow:0 8px 20px rgba(0,0,0,.06);display:flex;align-items:center;justify-content:center;text-align:center;padding:22px}
.promo-card-inner{font-size:1rem;line-height:1.35;font-weight:900;color:#111}

/* DETALLE */
.detail-page{padding:22px 16px 36px}
.detail-wrap{max-width:1380px;margin:0 auto}
.detail-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(320px,1fr);gap:22px;align-items:start;margin-bottom:24px}
.detail-main,.detail-side{min-width:0}
.detail-gallery,.detail-card{background:#f7f7f7;border-radius:20px;box-shadow:0 8px 20px rgba(0,0,0,.08);overflow:hidden}
.detail-gallery{margin-bottom:16px}
.detail-main-image-box{width:100%;aspect-ratio:4/3;overflow:hidden;background:#ddd;display:flex;align-items:center;justify-content:center}
.detail-main-image{width:100%;height:100%;object-fit:cover}
.detail-thumbs{display:grid;grid-template-columns:repeat(auto-fit,minmax(82px,82px));justify-content:flex-start;gap:8px;padding:10px;background:#efefef}
.detail-thumb{width:82px;height:82px;border:none;background:#fff;border-radius:12px;overflow:hidden;padding:0;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.08)}
.detail-thumb img{width:100%;height:100%;object-fit:cover}
.detail-card{padding:20px}
.detail-price{font-size:2.3rem;font-weight:900;line-height:1;margin-bottom:12px;color:#111}
.detail-title{font-size:1.75rem;line-height:1.1;margin-bottom:14px;color:#111}
.detail-meta-line{display:flex;flex-wrap:wrap;gap:8px;color:#666;font-size:.9rem;margin-bottom:14px}
.detail-meta-line span{background:#efefef;border-radius:999px;padding:7px 12px}
.detail-badges{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.detail-badge{display:inline-flex;align-items:center;justify-content:center;padding:7px 11px;border-radius:999px;background:#f2db7a;color:#7f5d00;font-size:.8rem;font-weight:800}
.detail-description h2{font-size:1.08rem;margin-bottom:10px}
.detail-description p{color:#333;line-height:1.6;word-break:break-word}
.publisher-row{display:flex;align-items:center;gap:10px;margin:8px 0 14px;background:#f3f3f3;border-radius:16px;padding:10px 12px}
.publisher-avatar-box{width:50px;height:50px;border-radius:50%;overflow:hidden;background:#e6e6e6;flex:0 0 50px}
.publisher-avatar{width:100%;height:100%;object-fit:cover}
.publisher-texts{display:flex;flex-direction:column;gap:4px;min-width:0}
.publisher-name{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-weight:800;color:#111}
.publisher-link{font-size:.86rem;color:#1677ff;font-weight:700}
.seller-top-link{color:inherit}
.detail-related-second{margin-top:24px}
.seller-top{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.seller-avatar-box{width:68px;height:68px;border-radius:50%;overflow:hidden;background:#e5e5e5;flex:0 0 68px}
.seller-avatar{width:100%;height:100%;object-fit:cover}
.seller-top-info h3{margin:0 0 6px;font-size:1rem}
.seller-name{font-size:1.08rem;font-weight:800;margin-bottom:6px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.seller-verified{display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:999px;background:#dff5e1;color:#167c2f;font-size:.76rem;font-weight:800}
.seller-city{color:#666}
.seller-profile-link{margin-top:6px;color:#1677ff;font-size:.86rem;font-weight:700}
.detail-btn{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;margin-top:10px;border-radius:14px;font-weight:800}
.detail-btn-inline{max-width:260px;margin:16px auto 0}
.detail-empty{max-width:760px;margin:30px auto;background:#f7f7f7;border-radius:20px;box-shadow:0 8px 20px rgba(0,0,0,.08);padding:28px;text-align:center}
.detail-related{margin-top:10px}
.btn-main{background:#1677ff;color:#fff}
.btn-alt{background:#fff;color:#111;border:1px solid rgba(0,0,0,.12)}

/* FOOTER */
.site-footer{margin-top:28px;border-top:1px solid rgba(0,0,0,.08);background:#efe3a1}
.footer-wrap{max-width:1380px;margin:0 auto;padding:18px;text-align:center;color:#333;font-size:.95rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}
.footer-dev{display:inline-flex;align-items:center;justify-content:center;gap:10px;color:#222;font-weight:700}
.footer-dev img{height:36px;width:auto;display:block}

/* LOGIN */
.login-box{max-width:420px;margin:60px auto;background:#fff;padding:30px;border-radius:18px;box-shadow:0 10px 30px rgba(0,0,0,.08)}
.login-box input{width:100%;padding:14px;margin-bottom:12px;border:1px solid #ddd;border-radius:12px}
.login-box button{width:100%;padding:14px;border:none;border-radius:12px;background:#f4d100;font-weight:800;cursor:pointer}

/* TABLET */
@media(max-width:1100px){
.cards-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.topbar-logo{width:300px;min-width:300px;height:78px}
.topbar-logo img{width:300px;height:78px}
}

/* MOBILE / TABLET */
@media(max-width:980px){
.detail-grid{grid-template-columns:1fr}
}

@media(max-width:860px){
.topbar-inner{gap:10px;padding:10px 12px;min-height:auto;flex-wrap:wrap}
.topbar-logo{width:190px;min-width:190px;height:58px;justify-content:flex-start}
.topbar-logo img{width:190px;height:58px;max-width:none;max-height:none}
.topbar-search{order:3;width:100%;gap:8px}
.topbar-search input{height:36px;font-size:12px}
.topbar-search button{height:36px;padding:0 12px;font-size:12px}
.topbar-nav{margin-left:auto;gap:10px;font-size:12px;flex-wrap:wrap}
.hero-dinamico{height:180px}
.cards-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.cards-section{margin-top:-18px}
.card,.promo-card{min-height:255px;border-radius:14px}
.card-image{height:122px;min-height:122px;max-height:122px}
.card-body{padding:10px;gap:6px}
.card-price{font-size:1.05rem}
.card-title{font-size:.78rem;min-height:30px;max-height:30px}
.card-meta{font-size:.72rem;min-height:16px}
.card-badge{font-size:.62rem;padding:4px 8px}
.promo-card-inner{font-size:.82rem}
}

@media(max-width:640px){
.detail-page{padding:14px 10px 24px}
.detail-thumbs{grid-template-columns:repeat(4,1fr)}
.detail-thumb{width:100%;aspect-ratio:1/1;height:auto}
.publisher-row{padding:10px;border-radius:14px}
.publisher-avatar-box{width:42px;height:42px;flex-basis:42px}
.detail-price{font-size:2rem}
.detail-title{font-size:1.45rem}
.detail-card{padding:16px}
.seller-avatar-box{width:58px;height:58px;flex-basis:58px}
.seller-name{font-size:1rem}
}

@media(max-width:420px){
.topbar-logo{width:175px;min-width:175px;height:54px}
.topbar-logo img{width:175px;height:54px}
.topbar-nav{font-size:11px;gap:8px}
.topbar-search input{height:34px;padding:0 10px}
.topbar-search button{height:34px;padding:0 10px}
.hero-dinamico{height:145px}
.cards-grid{gap:8px}
.card,.promo-card{min-height:238px}
.card-image{height:108px;min-height:108px;max-height:108px}
.card-body{padding:9px}
.card-price{font-size:.95rem}
.card-title{font-size:.74rem;min-height:28px;max-height:28px}
.card-meta{font-size:.68rem}
.card-badge{font-size:.58rem;padding:4px 7px}
.promo-card-inner{font-size:.76rem}
}


/* ===== BUSCADOR PRO RCV ===== */
.buscador-pro select{
    height:40px;
    border:none;
    border-radius:14px;
    padding:0 12px;
    background:#fff;
    color:#111;
    font-size:13px;
    font-weight:700;
    outline:none;
    max-width:190px;
}

.buscador-pro select[name="ciudad"]{
    max-width:180px;
}

@media(max-width:1100px){
    .buscador-pro select{
        max-width:150px;
        font-size:12px;
    }
}

@media(max-width:860px){
    .buscador-pro{
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:8px;
    }

    .buscador-pro input{
        grid-column:1 / -1;
        width:100%;
    }

    .buscador-pro select{
        width:100%;
        max-width:none;
        height:36px;
        font-size:12px;
        border-radius:12px;
    }

    .buscador-pro button{
        grid-column:1 / -1;
        width:100%;
    }
}
