/* ============================================
   Fuel Page — V6 (priceshub-style)
   fuel.css v2.0
   ============================================ */

/* --- Hero --- */
.fuel-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 60%, #ea580c22 100%);
    padding: 40px 0 32px;
    color: #fff;
    text-align: center;
}
.fuel-hero-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.fuel-hero-title i { color: #ea580c; font-size: 1.6rem; }
.fuel-hero-sub {
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
    margin: 0;
}

/* --- Best Prices Ribbon --- */
.fuel-best-section {
    background: var(--bg, #f8fafc);
    padding: 28px 0;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.fuel-best-heading {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}
.fuel-best-heading i { color: #f59e0b; }
.fuel-best-ribbon {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.fuel-best-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 180px;
    padding: 14px 18px;
    background: var(--surface, #fff);
    border-radius: 14px;
    border: 1px solid var(--border, #e2e8f0);
    border-left: 4px solid var(--cat-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}
.fuel-best-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.fbc-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg, #f1f5f9);
    border: 1px solid var(--border, #e2e8f0);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.fbc-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
}
.fbc-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.fbc-type {
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.fbc-price {
    font-family: 'Orbitron', monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--cat-color);
}
.fbc-station {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
}

/* --- Main --- */
.fuel-main {
    padding-bottom: 40px;
}

/* --- Section Head --- */
.fuel-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 32px 0 20px;
}
.fuel-section-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ea580c, #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}
.fuel-section-head h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin: 0;
    color: var(--text);
}

/* --- Category Tabs --- */
.fuel-cat-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.fuel-cat-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    border: 2px solid var(--border, #e2e8f0);
    border-radius: 14px;
    background: var(--surface, #fff);
    cursor: pointer;
    min-width: 90px;
    transition: all 0.2s;
    font-family: var(--font-heading);
    white-space: nowrap;
    flex-shrink: 0;
}
.fuel-cat-tab i {
    font-size: 1.1rem;
    color: var(--text-muted, #64748b);
    transition: color 0.2s;
}
.fuel-cat-tab .fct-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}
.fuel-cat-tab .fct-best {
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    transition: color 0.2s;
}
.fuel-cat-tab:hover {
    border-color: var(--cat-color);
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}
.fuel-cat-tab.active {
    border-color: var(--cat-color);
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.fuel-cat-tab.active i { color: var(--cat-color); }
.fuel-cat-tab.active .fct-best { color: var(--cat-color); }

/* --- Panels --- */
.fuel-cat-panel { display: none; }
.fuel-cat-panel.active {
    display: block;
    animation: fuelFadeIn 0.3s ease;
}
@keyframes fuelFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Panel Header --- */
.fcp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    margin: 16px 0 12px;
    background: var(--surface, #fff);
    border-radius: 12px;
    border-left: 4px solid var(--cat-color);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.fcp-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.fcp-title i { color: var(--cat-color); }
.fcp-octane {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted, #64748b);
}
.fcp-range {
    font-family: 'Orbitron', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cat-color);
}

/* --- Comparison List --- */
.fcp-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.fcp-row {
    display: grid;
    grid-template-columns: 42px 44px minmax(80px, 1fr) minmax(100px, 1.3fr) minmax(80px, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--surface, #fff);
    border-radius: 12px;
    border: 1px solid var(--border, #e2e8f0);
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
}
.fcp-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.fcp-row--best {
    border: 2px solid #059669;
    background: linear-gradient(135deg, rgba(5,150,105,0.04), var(--surface, #fff));
}

/* Place */
.fcp-place { display: flex; align-items: center; justify-content: center; }
.fcp-medal {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.85rem; color: #fff;
}
.fcp-medal-1 { background: linear-gradient(135deg, #FFD700, #FFA500); box-shadow: 0 2px 8px rgba(255,215,0,0.3); }
.fcp-medal-2 { background: linear-gradient(135deg, #C0C0C0, #9CA3AF); box-shadow: 0 2px 8px rgba(192,192,192,0.3); }
.fcp-medal-3 { background: linear-gradient(135deg, #CD7F32, #B8860B); box-shadow: 0 2px 8px rgba(205,127,50,0.3); }
.fcp-num {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg, #f1f5f9); border: 2px solid var(--border, #e2e8f0);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; color: var(--text-muted, #64748b);
}

/* Logo */
.fcp-logo {
    width: 40px; height: 40px; border-radius: 10px;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
    background: var(--bg, #f1f5f9); border: 1px solid var(--border, #e2e8f0);
    flex-shrink: 0;
}
.fcp-logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }

/* Name / Fuel Name */
.fcp-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fcp-fuel-name {
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bar */
.fcp-bar-wrap {
    height: 8px;
    background: var(--bg, #f1f5f9);
    border-radius: 4px;
    overflow: hidden;
}
.fcp-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Price cell */
.fcp-price-cell {
    display: flex;
    align-items: baseline;
    gap: 3px;
    justify-content: flex-end;
    white-space: nowrap;
}
.fcp-price {
    font-family: 'Orbitron', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}
.fcp-lari {
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    font-weight: 600;
}

/* Badge & Diff */
.fcp-badge {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.fcp-diff {
    font-size: 0.78rem;
    color: #dc2626;
    font-weight: 600;
    font-family: 'Orbitron', monospace;
    white-space: nowrap;
}

/* --- Station Cards Grid (priceshub-style) --- */
.fuel-stations-section {
    margin-top: 16px;
    padding: 40px 0;
    background: linear-gradient(180deg, var(--bg, #f8fafc) 0%, var(--bg, #f8fafc) 100%);
}
.fuel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.fuel-card {
    background: var(--surface, #fff);
    border-radius: 16px;
    border: 1px solid var(--border, #e2e8f0);
    border-top: 4px solid var(--brand);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.25s, box-shadow 0.25s;
}
.fuel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.fc-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.fc-logo {
    width: 52px; height: 52px;
    border-radius: 12px;
    object-fit: contain;
    background: var(--bg, #f1f5f9);
    border: 1px solid var(--border, #e2e8f0);
    padding: 4px;
    flex-shrink: 0;
}
.fc-meta h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin: 0 0 2px;
    color: var(--text);
}
.fc-link {
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}
.fc-link i { font-size: 0.65rem; }
.fc-link:hover { color: var(--brand); }

/* Table inside card */
.fc-table {
    width: 100%;
    border-collapse: collapse;
}
.fc-table thead th {
    padding: 10px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    background: var(--bg, #f8fafc);
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.fc-table thead th:last-child { text-align: right; }
.fc-table tbody td {
    padding: 10px 16px;
    font-size: 0.88rem;
    color: var(--text);
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.fc-table tbody tr:last-child td { border-bottom: none; }
.fc-price-td {
    text-align: right;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 0.92rem !important;
    color: var(--text);
    white-space: nowrap;
}

/* --- Fuel Calculator --- */
.fuel-calc-section {
    padding: 0 0 24px;
}
.fuel-calc-card {
    background: var(--surface, #fff);
    border-radius: 16px;
    border: 1px solid var(--border, #e2e8f0);
    padding: 24px;
    max-width: 500px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.calc-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.calc-row label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
}
.calc-row select,
.calc-row input {
    padding: 10px 14px;
    border: 2px solid var(--border, #e2e8f0);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg, #f8fafc);
    color: var(--text);
    transition: border-color 0.2s;
}
.calc-row select:focus,
.calc-row input:focus {
    outline: none;
    border-color: #ea580c;
}
.calc-inputs {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 16px;
}
.calc-inputs .calc-row { flex: 1; margin-bottom: 0; }
.calc-result {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 6px;
}
.calc-eq {
    font-size: 1.2rem;
    color: var(--text-muted, #64748b);
    font-weight: 700;
}
.calc-total {
    font-family: 'Orbitron', monospace;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ea580c;
}
.calc-lari {
    font-size: 1rem;
    color: var(--text-muted, #64748b);
    font-weight: 600;
}
.calc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ea580c, #f97316);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(234,88,12,0.3);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .fcp-row {
        grid-template-columns: 38px 40px 1fr auto auto;
    }
    .fcp-bar-wrap { display: none; }
    .fcp-fuel-name { display: none; }
    .fuel-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .fuel-hero { padding: 28px 0 20px; }
    .fuel-hero-title { font-size: 1.5rem; }
    .fuel-best-ribbon { gap: 10px; }
    .fuel-best-card { min-width: 160px; padding: 12px 14px; }
    .fbc-price { font-size: 1rem; }

    .fuel-cat-tabs { gap: 6px; }
    .fuel-cat-tab { padding: 10px 12px; min-width: 78px; }

    .fcp-row {
        grid-template-columns: 34px 38px 1fr auto auto;
        gap: 8px;
        padding: 10px 12px;
    }
    .fcp-bar-wrap { display: none; }
    .fcp-fuel-name { display: none; }
    .fcp-price { font-size: 0.92rem; }

    .fuel-grid { grid-template-columns: 1fr; }
    .fuel-calc-card { max-width: 100%; }
}
@media (max-width: 480px) {
    .fuel-hero-title { font-size: 1.25rem; }
    .fuel-best-card { min-width: 148px; padding: 10px 12px; gap: 10px; }
    .fbc-logo { width: 36px; height: 36px; }
    .fbc-price { font-size: 0.92rem; }
    .fbc-type { font-size: 0.72rem; }

    .fuel-cat-tab { min-width: 68px; padding: 8px 10px; }
    .fuel-cat-tab .fct-name { font-size: 0.72rem; }
    .fuel-cat-tab .fct-best { font-size: 0.72rem; }

    .fcp-row {
        grid-template-columns: 30px 34px 1fr auto;
        gap: 6px;
        padding: 8px 10px;
        border-radius: 10px;
    }
    .fcp-medal, .fcp-num { width: 28px; height: 28px; font-size: 0.78rem; }
    .fcp-logo { width: 34px; height: 34px; }
    .fcp-name { font-size: 0.82rem; }
    .fcp-badge { font-size: 0.65rem; padding: 2px 6px; }
    .fcp-diff { display: none; }

    .calc-inputs { flex-direction: column; gap: 12px; }
    .fc-table thead th,
    .fc-table tbody td { padding: 8px 12px; }
}
