

/* ===== VARIABLES ===== */
:root{
    --bg:#f5f5f7;
    --card:#ffffff;
    --text:#111111;
    --muted:#6b7280;
    --border:#e5e7eb;
    --dark:#111827;
    --success-bg:#eefbf1;
    --success:#0a7a33;
}

/* ===== BASE ===== */
*{
    box-sizing:border-box;
}

html{
    height:100%;
}

body{
    margin:0;
    font-family:Arial, sans-serif;
    background:#dadadf !important;
    color:var(--text);
    display:flex;
    flex-direction:column;
    min-height:100vh;
}

main{
    flex:1;
}

a{
    text-decoration:none;
    color:inherit;
}

/* ===== HEADER ===== */
.topbar{
    background:#ffffff;
    border-bottom:1px solid var(--border);
    position:sticky;
    top:0;
    z-index:10;
}

.topbar-inner{
    max-width:1200px;
    margin:0 auto;
    padding:16px 20px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
}

.brand{
    font-size:24px;
    font-weight:700;
    letter-spacing:.2px;
}

.brand small{
    display:block;
    font-size:12px;
    color:var(--muted);
    margin-top:2px;
}

.topbar-links{
    display:flex;
    gap:10px;
    align-items:center;
    font-size:14px;
    flex-wrap:wrap;
}

.topbar-links a{
    font-weight:600;
}

.live-status{
    display:flex;
    align-items:center;
    gap:6px;
    font-size:13px;
}

.live-dot{
    width:8px;
    height:8px;
    background:#22c55e;
    border-radius:999px;
}

/* ===== HEADER MOBILE ===== */


/* ===== HERO ===== */
.hero{
    max-width:1200px;
    margin:0 auto;
    padding:48px 20px 28px;
    width:100%;
}

.hero-card{
    background:#ffffff;
    border:1px solid var(--border);
    border-radius:24px;
    padding:40px 28px;
    box-shadow:0 10px 30px rgba(0,0,0,.04);
}

.eyebrow{
    display:inline-block;
    background:#111827;
    color:#fff;
    padding:7px 12px;
    border-radius:999px;
    font-size:12px;
    margin-bottom:16px;
    font-weight:700;
    margin-right: auto;
}

h1{
    margin:0 0 14px;
    font-size:44px;
    line-height:1.05;
}

.hero p{
    color:var(--muted);
    font-size:18px;
    line-height:1.6;
    max-width:100%;
    margin:0;
}

/* ===== SEARCH ===== */
.search-wrap{
    margin-top:26px;
}

.search-form{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}

.search-input{
    flex:1 1 620px;
    padding:16px 18px;
    border: 1px solid black;
    border-radius:14px;
    font-size:16px;
    background:#fff;
    outline:none;
}

.search-btn{
    background:var(--dark);
    color:#fff;
    border:none;
    padding:16px 22px;
    border-radius:14px;
    font-size:16px;
    cursor:pointer;
}

/* ===== FILTERS ===== */
.category-filters{
    display:flex;
    gap:10px;
    margin-top:18px;
    flex-wrap:wrap;
}

.filter-btn{
    padding:10px 16px;
    border-radius:12px;
    background:#f3f4f6;
    font-size:14px;
    font-weight:600;
}

.filter-btn.active{
    background:#111827;
    color:#fff;
}

/* ===== STATS ===== */
.stats{
    max-width:1200px;
    margin:0 auto;
    padding:0 20px 20px;
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
}

.stat{
    background:#fff;
    border:1px solid var(--border);
    border-radius:18px;
    padding:22px;
}

.stat .label{
    color:var(--muted);
    font-size:14px;
    margin-bottom:8px;
}

.stat .value{
    font-size:30px;
    font-weight:700;
}

/* ===== CONTENT ===== */
.content{
    max-width:1200px;
    margin:0 auto;
    padding:10px 20px 60px;
}

/* ===== SECTION HEAD ===== */
.section-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    gap:20px;
    margin-bottom:18px;
}

.section-head h2{
    margin:0;
    font-size:28px;
}

.section-head p{
    margin:6px 0 0;
    color:var(--muted);
}

/* ===== GRID ===== */
.grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:18px;
}

/* ===== PRODUCT ===== */
.product-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:20px;
    overflow:hidden;
    box-shadow:0 4px 16px rgba(0,0,0,.03);
    transition:transform .15s ease, box-shadow .15s ease;
    display:flex;
    flex-direction:column;
    height:100%;
}

.product-card:hover{
    transform:translateY(-2px);
    box-shadow:0 10px 24px rgba(0,0,0,.06);
}

.product-image{
    height:250px;
    display:flex;
    justify-content:center;
    align-items:center;
    background:#fff;
    position:relative;
    padding:18px;
    border-bottom:1px solid var(--border);
}

.product-image img{
    max-width:100%;
    max-height:210px;
    object-fit:contain;
}

.no-image{
    color:var(--muted);
    font-size:14px;
}

.category-badge{
    position:absolute;
    top:12px;
    right:12px;
    background:#f3f4f6;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:600;
}

.product-body{
    padding:18px;
    display:flex;
    flex-direction:column;
    flex:1;
}

.brand-line{
    color:var(--muted);
    font-size:13px;
    margin-bottom:8px;
    min-height:18px;
}

.brand-line a{
    color:var(--muted);
    font-weight:600;
}

.brand-line a:hover{
    opacity:.8;
}

.product-title{
    font-size:17px;
    font-weight:700;
    line-height:1.35;
    margin:0 0 12px;

    /* 3 líneas fijas para alinear el resto */
    min-height:68px;
    display:-webkit-box;
    -webkit-line-clamp:3;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.barcode{
    font-size:13px;
    color:var(--muted);
    margin-bottom:14px;
    word-break:break-word;
    min-height:18px;
}

.price-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    margin-bottom:14px;
    min-height:42px;
}

.price{
    font-size:28px;
    font-weight:700;
}

.stores-badge{
    background:var(--success-bg);
    color:var(--success);
    padding:7px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
}

.saving{
    font-size:13px;
    color:var(--muted);
    margin-bottom:16px;
    min-height:18px;
}

.btn{
    display:block;
    text-align:center;
    background:#111827;
    color:#fff;
    padding:12px 14px;
    border-radius:12px;
    font-size:14px;
    font-weight:700;
    margin-top:auto;
}

/* ===== LOAD MORE ===== */
.load-more-wrap{
    text-align:center;
    margin-top:28px;
}

.load-more-btn{
    background:#111827;
    color:#fff;
    padding:14px 24px;
    border:none;
    border-radius:12px;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
}

/* ===== FOOTER ===== */
.footer{
    background:#f3f4f6;
    border-top:1px solid var(--border);
}

.footer-bottom{
    padding:15px 20px;
}

.footer-bottom-inner{
    max-width:1200px;
    margin:0 auto;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    flex-wrap:wrap;
}

.footer-links{
    display:flex;
    gap:15px;
    flex-wrap:wrap;
}

/* ===== SCROLL BUTTON ===== */
.scroll-top-btn{
    position:fixed;
    right:20px;
    bottom:20px;
    width:50px;
    height:50px;
    background:#111827;
    color:#fff;
    border:none;
    border-radius:50%;
    cursor:pointer;
    box-shadow:0 8px 20px rgba(0,0,0,.18);
    z-index:999;
}

/* ===== PRODUCT PAGE ===== */
.product-page{
    padding-top:30px;
    padding-bottom:30px;
}

.back-link{
    display:inline-block;
    margin-bottom:18px;
    font-weight:600;
    color:var(--text);
}

.product-hero-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:24px;
    padding:22px;
    margin-bottom:22px;
    box-shadow:0 4px 16px rgba(0,0,0,.03);
}

.product-hero-grid{
    display:grid;
    grid-template-columns:280px 1fr;
    gap:24px;
    align-items:start;
}

.product-hero-image{
    position:relative;
    min-height:320px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:18px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:18px;
}

.product-hero-image img{
    max-width:100%;
    max-height:280px;
    object-fit:contain;
}

.product-badge-fixed{
    position:absolute;
    top:12px;
    right:12px;
}

.product-hero-info{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.product-page-title{
    margin:0;
    font-size:32px;
    line-height:1.15;
}

.product-meta{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    color:var(--muted);
    font-size:15px;
}

.product-summary-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:16px;
    margin-top:6px;
    align-items:stretch;
}

.summary-box{
    background:#f8fafc;
    border:1px solid var(--border);
    border-radius:16px;
    padding:18px;
}

.summary-label{
    font-size:14px;
    color:var(--muted);
    margin-bottom:8px;
}

.summary-value{
    font-size:22px;
    font-weight:700;
    color:var(--text);
}

.stores-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:24px;
    padding:22px;
    box-shadow:0 4px 16px rgba(0,0,0,.03);
}

.stores-card-head{
    margin-bottom:18px;
}

.stores-card-head h2{
    margin:0 0 6px;
    font-size:32px;
}

.stores-card-head p{
    margin:0;
    color:var(--muted);
    font-size:15px;
}

.stores-table-wrap{
    overflow-x:auto;
}

.stores-table{
    width:100%;
    border-collapse:collapse;
}

.stores-table th,
.stores-table td{
    padding:16px 12px;
    text-align:left;
    border-bottom:1px solid var(--border);
    vertical-align:middle;
    font-size:14px;
}

.stores-table th{
    background:#fafafa;
    color:var(--muted);
    font-weight:700;
}

.best-store-row{
    background:#d2edd8 !important;
}

.store-price{
    font-size:16px;
    font-weight:700;
    color:var(--text);
}

.stock-ok{
    color:#0a7a33;
    font-weight:700;
}

.stock-no{
    color:#b42318;
    font-weight:700;
}

.table-btn{
    display:inline-block;
    background:#111827;
    color:#fff;
    padding:10px 14px;
    border-radius:10px;
    font-size:13px;
    font-weight:700;
    white-space:nowrap;
}

/* ===== TOP PAGE ===== */
.top-card{
    position:relative;
}

.top-rank-badge{
    position:absolute;
    top:12px;
    left:12px;
    background:#111827;
    color:#fff;
    font-size:12px;
    font-weight:700;
    padding:6px 10px;
    border-radius:999px;
    z-index:2;
}

.top-block{
    margin-bottom:40px;
}

.section-link{
    display:inline-block;
    padding:10px 14px;
    border:1px solid var(--border);
    border-radius:12px;
    background:#fff;
    font-size:14px;
    font-weight:600;
    color:var(--text);
}

.section-link:hover{
    opacity:.8;
}

/* ===== STORES PAGE ===== */
.stores-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:18px;
}

.store-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:20px;
    overflow:hidden;
    box-shadow:0 4px 16px rgba(0,0,0,.03);
}

.store-card-body{
    padding:20px;
}

.store-card-top{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
    margin-bottom:18px;
}

.store-name{
    margin:0 0 6px;
    font-size:22px;
    line-height:1.2;
}

.store-domain{
    color:var(--muted);
    font-size:14px;
    word-break:break-word;
}

.store-platform{
    background:#f3f4f6;
    color:#111827;
    font-size:12px;
    font-weight:700;
    padding:7px 10px;
    border-radius:999px;
    white-space:nowrap;
}

.store-stats{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:14px;
    margin-bottom:16px;
}

.store-stat-box{
    background:#f8fafc;
    border:1px solid var(--border);
    border-radius:16px;
    padding:16px;
}

.store-stat-label{
    font-size:13px;
    color:var(--muted);
    margin-bottom:8px;
}

.store-stat-value{
    font-size:22px;
    font-weight:700;
    color:var(--text);
}

.store-meta{
    color:var(--muted);
    font-size:14px;
    margin-bottom:18px;
}

.store-actions{
    margin-top:6px;
}

/* ===== BRANDS PAGE ===== */
.brands-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:18px;
}

.brand-card{
    display:block;
    background:#fff;
    border:1px solid var(--border);
    border-radius:20px;
    padding:22px;
    transition:all .15s ease;
}

.brand-card:hover{
    transform:translateY(-2px);
    box-shadow:0 10px 24px rgba(0,0,0,.06);
}

.brand-name{
    font-size:20px;
    font-weight:700;
    margin-bottom:8px;
}

.brand-count{
    font-size:14px;
    color:var(--muted);
}

/* ===== LEGAL PAGES ===== */
.legal-page{
    padding-top:30px;
    padding-bottom:30px;
}

.legal-card{
    max-width:900px;
    margin:0 auto;
    background:#fff;
    border:1px solid var(--border);
    border-radius:24px;
    padding:30px;
    box-shadow:0 4px 16px rgba(0,0,0,.03);
}

.legal-card h1{
    margin:0 0 18px;
    font-size:40px;
    line-height:1.1;
}

.legal-card h2{
    margin:28px 0 10px;
    font-size:24px;
    line-height:1.2;
}

.legal-card p{
    margin:0 0 16px;
    color:var(--muted);
    font-size:16px;
    line-height:1.8;
}

.contact-box{
    margin:24px 0;
    padding:20px;
    background:#f8fafc;
    border:1px solid var(--border);
    border-radius:18px;
}

.contact-row{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:12px;
    color:var(--text);
}

.contact-row:last-child{
    margin-bottom:0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px){
    .grid{
        grid-template-columns:repeat(3,1fr);
    }

    .brands-grid{
        grid-template-columns:repeat(3,1fr);
    }
}

@media (max-width: 980px){
    .stores-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media (max-width: 900px){
    .product-hero-grid{
        grid-template-columns:1fr;
    }

    .product-summary-grid{
        grid-template-columns:1fr;
    }

    .product-page-title{
        font-size:28px;
    }

    .stores-card-head h2{
        font-size:28px;
    }
}

@media (max-width: 820px){
    h1{
        font-size:34px;
    }

    .stats{
        grid-template-columns:1fr;
    }

    .grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media (max-width: 768px){
    .brands-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .legal-card{
        padding:22px;
    }

    .legal-card h1{
        font-size:32px;
    }

    .legal-card h2{
        font-size:22px;
    }

    .legal-card p{
        font-size:15px;
    }
}

@media (max-width: 640px){
    .stores-grid{
        grid-template-columns:1fr;
    }

    .store-stats{
        grid-template-columns:1fr;
    }

    .store-card-top{
        flex-direction:column;
        align-items:flex-start;
    }
}

@media (max-width: 480px){
    .brands-grid{
        grid-template-columns:1fr;
    }
}
/* ===== PRODUCT PAGE MOBILE FIX ===== */
@media (max-width: 768px){
    .product-page{
        padding-top:20px;
        padding-bottom:24px;
    }

    .back-link{
        margin-bottom:14px;
        font-size:14px;
    }

    .product-hero-card,
    .stores-card{
        padding:16px;
        border-radius:18px;
    }

    .product-hero-grid{
        grid-template-columns:1fr;
        gap:16px;
    }

    .product-hero-image{
        min-height:220px;
        padding:14px;
        border-radius:14px;
    }

    .product-hero-image img{
        max-height:180px;
    }

    .product-hero-info{
        gap:12px;
    }

    .product-page-title{
        font-size:24px;
        line-height:1.2;
    }

    .product-meta{
        display:flex;
        flex-direction:column;
        align-items:flex-start;
        gap:6px;
        font-size:13px;
        line-height:1.45;
    }

    .product-meta span{
        display:block;
    }

    .product-meta span:nth-child(even){
        display:none; /* oculta los separadores · */
    }

    .product-summary-grid{
        grid-template-columns:1fr;
        gap:10px;
    }

    .summary-box{
        padding:14px;
        border-radius:14px;
    }

    .summary-label{
        font-size:13px;
    }

    .summary-value{
        font-size:20px;
    }

    .stores-card-head h2{
        font-size:24px;
        margin-bottom:4px;
    }

    .stores-card-head p{
        font-size:14px;
    }

    .stores-table-wrap{
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
        border:1px solid var(--border);
        border-radius:14px;
        background:#fff;
    }

    .stores-table{
        min-width:760px;
    }

    .stores-table th,
    .stores-table td{
        padding:12px 10px;
        font-size:13px;
        white-space:nowrap;
    }

    .stores-table td:nth-child(2){
        min-width:180px;
        white-space:normal;
    }

    .store-price{
        font-size:15px;
    }

    .table-btn{
        display:inline-block;
        background:#111827;
        color:#fff;
        border-radius:10px;
        font-weight:700;
        white-space:nowrap;
        padding:9px 12px;
        font-size:12px;
    }
}

@media (max-width: 480px){
    .content{
        padding:10px 12px 32px;
    }

    .product-hero-card,
    .stores-card{
        padding:14px;
        border-radius:16px;
    }

    .product-hero-image{
        min-height:200px;
    }

    .product-hero-image img{
        max-height:160px;
    }

    .product-page-title{
        font-size:21px;
    }

    .eyebrow{
        font-size:11px;
        padding:6px 10px;
        margin-bottom:12px;
    }

    .summary-value{
        font-size:18px;
    }

    .stores-card-head h2{
        font-size:21px;
    }

    .stores-table{
        min-width:700px;
    }

    .scroll-top-btn{
        right:14px;
        bottom:14px;
        width:44px;
        height:44px;
    }
}
.best-price-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-left:8px;
    padding:5px 9px;
    border-radius:999px;
    background:#111827;
    color:#fff;
    font-size:11px;
    font-weight:700;
    white-space:nowrap;
    vertical-align:middle;
}

.store-name-cell{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}
.best-store-row td{
    background:#d2edd8  !important;
}

.best-store-row td:first-child{
    border-top-left-radius:12px;
    border-bottom-left-radius:12px;
}

.best-store-row td:last-child{
    border-top-right-radius:12px;
    border-bottom-right-radius:12px;
}

.product-winner{
    margin-top:14px;
    margin-bottom:18px;
    padding:14px 18px;
    border-radius:14px;
    background:#eefbf1;
    border:1px solid #c7e7d0;
    font-size:15px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:10px;
}

.product-winner strong{
    font-weight:700;
}

.winner-link{
    background:#111827;
    color:#fff;
    padding:8px 12px;
    border-radius:10px;
    font-size:13px;
    font-weight:700;
    text-decoration:none;
}

.winner-link:hover{
    opacity:.85;
}
@media (max-width: 768px){
    .product-winner{
        flex-direction:column;
        align-items:flex-start;
    }
}
.brand-logo{
    display:flex;
    align-items:center;
}

.brand-logo img{
    height:100px;
    width:auto;
    display:block;
}

.mobile-menu-toggle{
    display:none;
    width:44px;
    height:44px;
    border:none;
    background:transparent;
    padding:0;
    cursor:pointer;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:5px;
    z-index:20;
}

.mobile-menu-toggle span{
    display:block;
    width:24px;
    height:2px;
    background:#111827;
    border-radius:999px;
}

.mobile-menu-panel{
    display:none;
}

.desktop-links{
    display:flex;
}

.brand-logo{
    display:flex;
    align-items:center;
}

.brand-logo img{
    height:56px;
    width:auto;
    display:block;
}

.mobile-menu-toggle{
    display:none;
    width:44px;
    height:44px;
    border:none;
    background:transparent;
    padding:0;
    cursor:pointer;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:5px;
    z-index:20;
}

.mobile-menu-toggle span{
    display:block;
    width:24px;
    height:2px;
    background:#111827;
    border-radius:999px;
}

.desktop-links{
    display:flex;
}

.mobile-header-status{
    display:none;
}

.mobile-menu-panel{
    display:none;
}

@media (max-width: 560px){
    .topbar{
        position:sticky;
        top:0;
    }

    .topbar-inner{
        display:grid;
        grid-template-columns:44px 1fr 44px;
        align-items:center;
        gap:10px;
        padding:14px 16px 8px;
        max-width:100%;
    }

    .mobile-menu-toggle{
        display:flex;
        justify-self:start;
        grid-column:1;
    }

    .brand-logo{
        grid-column:2;
        justify-content:center;
        width:100%;
    }

    .brand-logo img{
        height:42px;
        margin:0 auto;
    }

    .desktop-links{
        display:none;
    }

    .mobile-header-status{
        display:flex;
        align-items:center;
        justify-content:center;
        gap:8px;
        font-size:14px;
        color:var(--muted);
        padding:0 16px 12px;
        border-bottom:1px solid var(--border);
    }

    .mobile-menu-panel{
        display:none;
        position:absolute;
        top:100%;
        left:0;
        width:100%;
        background:#fff;
        border-bottom:1px solid var(--border);
        box-shadow:0 10px 24px rgba(0,0,0,.08);
        z-index:15;
    }

    .mobile-menu-panel.open{
        display:block;
    }

    .mobile-menu-links{
        display:flex;
        flex-direction:column;
        gap:18px;
        padding:18px 16px;
    }

    .mobile-menu-links a{
        font-size:16px;
        font-weight:700;
        color:#111827;
    }
}
@media (max-width: 560px){
    .hero-card{
        padding:28px 20px;
    }

    h1{
        font-size:28px;
    }

    .hero p{
        font-size:16px;
    }

    .search-btn,
    .search-input{
        width:100%;
    }

    .grid{
        grid-template-columns:1fr;
    }

    .footer-bottom-inner{
        flex-direction:column;
        align-items:flex-start;
    }
}