/* ============================================
   Gasolineras CatalogoCoches.com v1.2
   Colores: #1280DF (acento), #010101 (texto), #ffffff (fondo)
   Fuente: Montserrat + Open Sans (heredada del tema)
   ============================================ */

#gcc-app {
    font-family: 'Montserrat', 'Open Sans', sans-serif;
    color: #010101;
    background: #F6F7F9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(1,1,1,0.07);
    margin-bottom: 40px;
}

/* ── CABECERA ── */
.gcc-header {
    background: #fff;
    border-bottom: 1px solid rgba(1,1,1,0.08);
    padding: 24px 28px;
}
.gcc-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}
.gcc-header-title {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #1280DF;
}
.gcc-header-title h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 2px;
    color: #010101;
    line-height: 1.2;
}
.gcc-header-title p {
    font-size: 12px;
    color: rgba(1,1,1,0.45);
    margin: 0;
    font-weight: 400;
}
.gcc-header-stats {
    display: flex;
    gap: 24px;
}
.gcc-stat { text-align: center; }
.gcc-stat span {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #010101;
    line-height: 1;
}
.gcc-stat small {
    font-size: 11px;
    color: rgba(1,1,1,0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.gcc-stat-accent span { color: #1280DF; }

/* ── FILTROS ── */
.gcc-filters {
    background: #fff;
    border-bottom: 1px solid rgba(1,1,1,0.08);
    padding: 16px 28px;
}
.gcc-filters-inner {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}
.gcc-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 160px;
}
.gcc-filter-group label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(1,1,1,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.gcc-filter-group select {
    height: 42px;
    border: 1.5px solid #CAD0D9;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 14px;
    font-family: inherit;
    color: #010101;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.gcc-filter-group select:focus { border-color: #1280DF; }
.gcc-filter-group select:disabled { background-color: #F6F7F9; color: rgba(1,1,1,0.35); cursor: not-allowed; }

.gcc-btn-geo {
    height: 42px;
    padding: 0 16px;
    border: 1.5px solid #1280DF;
    border-radius: 8px;
    background: #fff;
    color: #1280DF;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
    white-space: nowrap;
}
.gcc-btn-geo:hover { background: #1280DF; color: #fff; }
.gcc-btn-geo.loading { opacity: 0.6; cursor: wait; }

.gcc-btn-primary {
    height: 42px;
    padding: 0 24px;
    border: none;
    border-radius: 8px;
    background: #1280DF;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.gcc-btn-primary:hover { background: #0e6bc0; }

/* ── MAIN ── */
.gcc-main {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    min-height: 960px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 28px;
    box-sizing: border-box;
    width: 100%;
}

/* ── MAPA ── */
.gcc-map-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(1,1,1,0.08);
    min-height: 960px;
}
#gcc-map {
    width: 100%;
    height: 100%;
    min-height: 960px;
    background: #e8eef4;
}
.gcc-map-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 1000;
    border-radius: 12px;
}
.gcc-map-overlay p {
    font-size: 14px;
    color: rgba(1,1,1,0.5);
    text-align: center;
    max-width: 260px;
    margin: 0;
    line-height: 1.5;
}
.gcc-map-overlay.hidden { display: none; }

/* ── LISTA ── */
.gcc-list-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(1,1,1,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.gcc-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(1,1,1,0.07);
    background: #F6F7F9;
}
.gcc-list-header span {
    font-size: 13px;
    font-weight: 600;
    color: rgba(1,1,1,0.6);
}
.gcc-list-header select {
    font-size: 12px;
    border: 1px solid #CAD0D9;
    border-radius: 6px;
    padding: 4px 8px;
    font-family: inherit;
    color: #010101;
    background: #fff;
    cursor: pointer;
}
#gcc-list {
    flex: 1;
    overflow-y: auto;
    max-height: 900px;
}

/* ── CARD GASOLINERA ── */
.gcc-card {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(1,1,1,0.06);
    cursor: pointer;
    transition: background 0.12s;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.gcc-card:hover { background: #F0F3F7; }
.gcc-card.active { background: rgba(18,128,223,0.06); border-left: 3px solid #1280DF; }
.gcc-card-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #F6F7F9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: rgba(1,1,1,0.4);
    flex-shrink: 0;
    margin-top: 2px;
}
.gcc-card.gcc-top-3 .gcc-card-rank { background: #1280DF; color: #fff; }
.gcc-card-body { flex: 1; min-width: 0; }
.gcc-card-nombre {
    font-size: 13px;
    font-weight: 600;
    color: #010101;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gcc-card-rotulo {
    font-size: 11px;
    color: rgba(1,1,1,0.45);
    margin: 0 0 6px;
}
.gcc-card-direccion {
    font-size: 11px;
    color: rgba(1,1,1,0.5);
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gcc-card-precio { text-align: right; flex-shrink: 0; }
.gcc-card-precio-valor {
    font-size: 18px;
    font-weight: 700;
    color: #010101;
    line-height: 1;
}
.gcc-card-precio-valor.gcc-barato { color: #2e8b57; }
.gcc-card-precio-valor.gcc-caro { color: #c0392b; }
.gcc-card-precio-unit {
    font-size: 10px;
    color: rgba(1,1,1,0.4);
    display: block;
    margin-top: 2px;
}
.gcc-card-precio-diff { font-size: 10px; margin-top: 4px; font-weight: 600; }
.gcc-card-precio-diff.menos { color: #2e8b57; }
.gcc-card-precio-diff.mas { color: #c0392b; }

/* ── EMPTY / LOADING ── */
.gcc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    gap: 12px;
    color: rgba(1,1,1,0.35);
    font-size: 13px;
    text-align: center;
}
.gcc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    gap: 16px;
    font-size: 13px;
    color: rgba(1,1,1,0.45);
}
.gcc-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(18,128,223,0.2);
    border-top-color: #1280DF;
    border-radius: 50%;
    animation: gcc-spin 0.7s linear infinite;
}
@keyframes gcc-spin { to { transform: rotate(360deg); } }

/* ── PRECIOS MEDIOS ── */
.gcc-precios-section {
    background: #fff;
    border-top: 1px solid rgba(1,1,1,0.06);
    padding: 28px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}
.gcc-section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #010101;
}
.gcc-precios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.gcc-precio-card {
    background: #F6F7F9;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    border: 1.5px solid transparent;
    transition: border-color 0.15s;
}
.gcc-precio-card:hover { border-color: #1280DF; }
.gcc-precio-card-nombre {
    font-size: 11px;
    font-weight: 600;
    color: rgba(1,1,1,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.gcc-precio-card-valor { font-size: 22px; font-weight: 700; color: #1280DF; }
.gcc-precio-card-unit { font-size: 10px; color: rgba(1,1,1,0.35); margin-top: 2px; }

/* ── POPUP MAPA ── */
.gcc-popup h4 { font-size: 13px; font-weight: 700; margin: 0 0 4px; font-family: 'Montserrat', sans-serif; }
.gcc-popup p { font-size: 11px; color: #666; margin: 0 0 6px; line-height: 1.4; }
.gcc-popup .gcc-popup-precio { font-size: 18px; font-weight: 700; color: #1280DF; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .gcc-main { grid-template-columns: 1fr; padding: 16px; }
    .gcc-map-wrapper { min-height: 500px; }
    #gcc-map { min-height: 500px; }
    #gcc-list { max-height: 460px; }
}
@media (max-width: 600px) {
    .gcc-header { padding: 16px; }
    .gcc-header-title h1 { font-size: 18px; }
    .gcc-header-stats { display: none; }
    .gcc-filters { padding: 12px 16px; }
    .gcc-filter-group { min-width: 100%; }
    .gcc-btn-geo, .gcc-btn-primary { width: 100%; justify-content: center; }
    .gcc-precios-section { padding: 16px; }
}
