/* === RESET + BASE === */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{font-family:'Inter',system-ui,-apple-system,sans-serif;font-size:15px;line-height:1.6;color:#374151;background:#f8fafc;-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
a{color:#2563eb;text-decoration:none;transition:color .15s}
a:hover{color:#1d4ed8}
ul,ol{list-style:none}
table{border-collapse:collapse;width:100%}
input,button,select{font:inherit}

/* === LAYOUT === */
.wrap{max-width:1200px;margin:0 auto;padding:0 16px}
.grid{display:grid;gap:24px}
.grid-main{grid-template-columns:1fr}
@media(min-width:768px){.grid-main{grid-template-columns:1fr 300px}}
@media(min-width:1024px){.grid-main{grid-template-columns:1fr 336px}}

/* === TOPBAR === */
.topbar{background:linear-gradient(135deg,#1e3a5a 0%,#1e40af 100%);color:#fff;position:sticky;top:0;z-index:100;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.topbar .wrap{display:flex;align-items:center;justify-content:space-between;height:56px}
.topbar .logo{font-size:1.2rem;font-weight:800;color:#fff;letter-spacing:-.02em;white-space:nowrap}
.topbar .logo span{color:#60a5fa}
.topbar nav{display:none;gap:4px}
.topbar nav a{color:rgba(255,255,255,.85);font-size:.8rem;font-weight:500;padding:6px 12px;border-radius:6px;transition:background .15s,color .15s}
.topbar nav a:hover,.topbar nav a.active{background:rgba(255,255,255,.15);color:#fff}
@media(min-width:768px){.topbar nav{display:flex}}

/* Mobile menu */
.menu-btn{display:flex;align-items:center;justify-content:center;width:40px;height:40px;background:rgba(255,255,255,.1);border:none;border-radius:8px;cursor:pointer;color:#fff}
.menu-btn svg{width:22px;height:22px}
@media(min-width:768px){.menu-btn{display:none}}
.mobile-nav{display:none;background:#1e3a5a;padding:8px 16px 16px}
.mobile-nav.open{display:block}
.mobile-nav a{display:block;color:rgba(255,255,255,.9);padding:10px 12px;font-size:.9rem;border-radius:6px}
.mobile-nav a:hover{background:rgba(255,255,255,.1);color:#fff}

/* === HERO / PAGE HEADER === */
.page-header{background:#fff;border-bottom:1px solid #e5e7eb;padding:20px 0}
.page-header h1{font-size:1.35rem;font-weight:800;color:#111827;line-height:1.3}
@media(min-width:768px){.page-header h1{font-size:1.6rem}}

/* === BREADCRUMB === */
.breadcrumb{font-size:.75rem;color:#9ca3af;margin-bottom:12px;display:flex;flex-wrap:wrap;align-items:center;gap:4px}
.breadcrumb a{color:#6b7280}
.breadcrumb a:hover{color:#2563eb}
.breadcrumb .sep{color:#d1d5db}

/* === CARDS === */
.card{background:#fff;border-radius:12px;border:1px solid #e5e7eb;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.card-body{padding:20px}
@media(min-width:768px){.card-body{padding:24px}}

/* === AD SLOTS === */
.ad-slot{text-align:center;margin:20px 0;min-height:90px;overflow:hidden}
.ad-slot-top{margin:16px 0}
.ad-slot-inline{margin:24px 0;padding:12px 0;border-top:1px solid #f3f4f6;border-bottom:1px solid #f3f4f6}
.ad-slot-sidebar{margin-bottom:16px;text-align:center}
.ad-slot-footer{margin:24px 0;text-align:center}

/* === TABLES === */
.price-table{font-size:.82rem}
.price-table thead th{background:#1e3a5a;color:#fff;padding:10px 12px;text-align:left;font-weight:600;font-size:.7rem;text-transform:uppercase;letter-spacing:.05em;cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;position:relative}
.price-table thead th:hover{background:#1e40af}
.price-table th.headerSortUp::after{content:' \25B2';font-size:.6em;opacity:.7}
.price-table th.headerSortDown::after{content:' \25BC';font-size:.6em;opacity:.7}
.price-table tbody td{padding:8px 12px;border-bottom:1px solid #f3f4f6;vertical-align:middle}
.price-table tbody tr:hover{background:#eff6ff}
.price-table tbody tr:nth-child(even){background:#fafbfc}
.price-table tbody tr:nth-child(even):hover{background:#eff6ff}

/* Responsive table */
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:12px;border:1px solid #e5e7eb}
.table-wrap .price-table thead th:first-child{border-radius:0}
.table-wrap .price-table thead th:last-child{border-radius:0}

/* === PRICES === */
.price{font-weight:700;color:#1e3a5a}
.price-diesel{color:#d97706}
.price-95{color:#059669}
.price-98{color:#4f46e5}
.price-na{color:#d1d5db;font-weight:400}
.pill{display:inline-block;padding:2px 8px;border-radius:9999px;font-size:.7rem;font-weight:600}
.pill-diesel{background:#fef3c7;color:#92400e}
.pill-95{background:#d1fae5;color:#065f46}
.pill-98{background:#e0e7ff;color:#3730a3}

/* === STAT BOXES === */
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin:16px 0}
.stat-box{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:14px 16px;text-align:center}
.stat-box .label{font-size:.7rem;text-transform:uppercase;letter-spacing:.04em;color:#9ca3af;font-weight:600}
.stat-box .value{font-size:1.4rem;font-weight:800;color:#111827;margin-top:2px}
.stat-box .value.diesel{color:#d97706}
.stat-box .value.g95{color:#059669}
.stat-box .value.g98{color:#4f46e5}

/* === SECTION TITLES === */
.section-title{font-size:1.15rem;font-weight:800;color:#111827;margin:24px 0 12px;padding-bottom:8px;border-bottom:2px solid #eff6ff}
h3.section-title{font-size:1rem}

/* === SIDEBAR === */
.sidebar-section{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:16px;margin-bottom:16px}
.sidebar-section h3{font-weight:700;font-size:.85rem;color:#111827;margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid #f3f4f6}
.sidebar-section li a{display:block;padding:4px 0;font-size:.8rem;color:#4b5563;transition:color .15s}
.sidebar-section li a:hover{color:#2563eb}
.sidebar-section ul{display:flex;flex-direction:column;gap:1px}

/* === SEARCH === */
.search-box{display:flex;gap:8px;max-width:400px}
.search-box input{flex:1;padding:10px 14px;border:1px solid #d1d5db;border-radius:8px;font-size:.9rem;outline:none;transition:border-color .15s}
.search-box input:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.search-box button{padding:10px 20px;background:#2563eb;color:#fff;font-weight:600;border:none;border-radius:8px;cursor:pointer;font-size:.85rem;transition:background .15s}
.search-box button:hover{background:#1d4ed8}

/* === PAGINATION === */
.pagination{display:flex;flex-wrap:wrap;gap:4px;margin:20px 0;padding:0;list-style:none}
.pagination li a{display:block;padding:6px 12px;font-size:.78rem;border-radius:6px;background:#fff;border:1px solid #e5e7eb;color:#4b5563;transition:all .15s}
.pagination li a:hover{background:#eff6ff;border-color:#93c5fd;color:#2563eb}
.pagination li a.current{background:#2563eb;color:#fff;border-color:#2563eb}
.pagination li.details{display:none}

/* === FOOTER === */
.footer{background:#1e3a5a;color:rgba(255,255,255,.8);padding:40px 0 24px;margin-top:40px}
.footer h3{color:#fff;font-size:.9rem;font-weight:700;margin-bottom:16px}
.footer-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
@media(min-width:640px){.footer-grid{grid-template-columns:repeat(3,1fr)}}
@media(min-width:768px){.footer-grid{grid-template-columns:repeat(4,1fr)}}
@media(min-width:1024px){.footer-grid{grid-template-columns:repeat(6,1fr)}}
.footer a{color:rgba(255,255,255,.65);font-size:.75rem;transition:color .15s;display:block;padding:2px 0}
.footer a:hover{color:#fff}
.footer-bottom{margin-top:32px;padding-top:20px;border-top:1px solid rgba(255,255,255,.1);text-align:center;font-size:.75rem;color:rgba(255,255,255,.4)}
.footer-ccaa{margin-bottom:32px;padding-bottom:24px;border-bottom:1px solid rgba(255,255,255,.1)}

/* === MAP === */
.map-wrap{border-radius:12px;overflow:hidden;border:1px solid #e5e7eb;margin:16px 0}
.map-wrap iframe{display:block;width:100%;height:250px;border:0}
@media(min-width:768px){.map-wrap iframe{height:300px}}

/* === FUEL DETAIL TABLE (gasolinera individual) === */
.fuel-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin:16px 0}
.fuel-item{background:#f8fafc;border:1px solid #e5e7eb;border-radius:8px;padding:12px;text-align:center}
.fuel-item .fuel-name{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:#6b7280;font-weight:600}
.fuel-item .fuel-price{font-size:1.3rem;font-weight:800;color:#111827;margin-top:4px}

/* === LINKS GRID (homepage) === */
.links-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
@media(min-width:640px){.links-grid{grid-template-columns:repeat(3,1fr)}}
@media(min-width:768px){.links-grid{grid-template-columns:repeat(4,1fr)}}
.link-card{display:block;background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:12px 14px;font-size:.85rem;font-weight:500;color:#374151;transition:all .15s}
.link-card:hover{border-color:#93c5fd;background:#eff6ff;color:#2563eb;box-shadow:0 2px 4px rgba(37,99,235,.08)}
.link-card small{display:block;font-size:.7rem;color:#9ca3af;font-weight:400;margin-top:2px}

/* === 404 PAGE === */
.error-page{text-align:center;padding:80px 20px}
.error-page h1{font-size:6rem;font-weight:900;color:#e5e7eb;line-height:1}
.error-page h2{font-size:1.5rem;font-weight:700;color:#111827;margin:16px 0 8px}
.error-page p{color:#6b7280;margin-bottom:24px}

/* === HELPERS === */
.text-center{text-align:center}
.mt-0{margin-top:0}
.mt-1{margin-top:8px}
.mt-2{margin-top:16px}
.mt-3{margin-top:24px}
.mb-0{margin-bottom:0}
.mb-1{margin-bottom:8px}
.mb-2{margin-bottom:16px}
.mb-3{margin-bottom:24px}
.hidden{display:none}
.font-bold{font-weight:700}
.text-sm{font-size:.85rem}
.text-xs{font-size:.75rem}
.text-muted{color:#9ca3af}
.gap-sm{gap:8px}
.badge-24h,.badge-glp,.badge-gnc{display:inline-block;font-size:.65rem;font-weight:700;padding:1px 5px;border-radius:3px;vertical-align:middle;line-height:1.4}
.badge-24h{background:#d1fae5;color:#065f46}
.badge-glp{background:#dbeafe;color:#1e40af}
.badge-gnc{background:#fef3c7;color:#92400e}
.faq-list{display:flex;flex-direction:column;gap:8px}
.faq-list details{border:1px solid #e5e7eb;border-radius:6px;padding:0}
.faq-list summary{padding:12px 16px;cursor:pointer;font-weight:600;font-size:.95rem;list-style:none}
.faq-list summary::-webkit-details-marker{display:none}
.faq-list summary::before{content:"▸ ";color:#6b7280}
.faq-list details[open] summary::before{content:"▾ "}
.faq-list details p{padding:0 16px 12px;color:#4b5563;font-size:.9rem;line-height:1.6}
