body.oil-provider-ptt {
  --oil-brand-color: #0066b3;
  --oil-brand-accent: #00a2e8;
}
body.oil-provider-bcp {
  --oil-brand-color: #00a651;
  --oil-brand-accent: #7ac142;
}
body.oil-provider-shell {
  --oil-brand-color: #ffcc00;
  --oil-brand-accent: #dd1d21;
}
body.oil-provider-caltex {
  --oil-brand-color: #009a93;
  --oil-brand-accent: #d41b2c;
}
body.oil-provider-irpc {
  --oil-brand-color: #005baa;
  --oil-brand-accent: #f39200;
}
body.oil-provider-pt {
  --oil-brand-color: #008853;
  --oil-brand-accent: #ed1c24;
}
body.oil-provider-susco {
  --oil-brand-color: #ffcc00;
  --oil-brand-accent: #003399;
}
body.oil-provider-pure {
  --oil-brand-color: #00a651;
  --oil-brand-accent: #004b87;
}
body.oil-provider-sinopec {
  --oil-brand-color: #e60012;
  --oil-brand-accent: #003399;
}


    /* Top Nav Single-Row Clamp with +/- Expand Button */
    @media (min-width: 761px) {
      .site-header .main-nav {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        min-width: 0;
        flex: 1 1 auto;
      }
      .main-nav-links-wrap {
        flex: 1;
        min-width: 0;
        height: 38px;
        overflow: hidden;
        transition: height 0.3s ease;
      }
      .main-nav-links-wrap.is-expanded {
        height: auto;
        overflow: visible;
      }
      .main-nav-links-list {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        column-gap: clamp(6px, 1vw, 14px);
        row-gap: 6px;
      }
      .top-nav-toggle-btn {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0;
        font-family: inherit;
        font-size: 1.15rem;
        font-weight: 800;
        line-height: 1;
        color: #9cffee;
        background: rgba(156, 255, 238, 0.08);
        border: 1px solid rgba(156, 255, 238, 0.28);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
      }
      .top-nav-toggle-btn:hover,
      .top-nav-toggle-btn.is-active {
        color: #02201d;
        background: linear-gradient(135deg, #9cffee 0%, #48dcc8 100%);
        border-color: #9cffee;
        box-shadow: 0 2px 10px rgba(72, 220, 200, 0.35);
      }
    }

    @media (max-width: 760px) {
      .site-header .main-nav {
        display: none;
      }
      .site-header .main-nav[data-open="true"] {
        display: flex;
      }
      .top-nav-toggle-btn {
        display: none !important;
      }
      .main-nav-links-wrap {
        height: auto !important;
        overflow: visible !important;
      }
      .main-nav-links-list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
      }
      .main-nav-links-list a {
        display: block;
        padding: 11px 14px;
        color: #dbe7eb;
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        font-size: 0.9rem;
      }
      .main-nav-links-list a:last-child {
        border-bottom: none;
      }
      .main-nav-links-list a:hover,
      .main-nav-links-list a.is-active {
        color: #9cffee;
        background: rgba(156, 255, 238, 0.08);
      }
    }

    /* Scoped styling for individual oil brand page */
    .brand-hero-section {
      padding: 34px 0 20px;
    }
    .brand-hero-card {
      position: relative;
      padding: 30px;
      background: linear-gradient(145deg, rgba(20, 28, 40, 0.95) 0%, rgba(12, 17, 25, 0.98) 100%);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 20px;
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    }
    .brand-header-flex {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 16px;
      margin-bottom: 22px;
    }
    .brand-title-wrap {
      display: flex;
      align-items: center;
      gap: 16px;
    }
    .brand-badge-circle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 52px;
      height: 52px;
      background: linear-gradient(135deg, var(--oil-brand-color) 0%, var(--oil-brand-accent) 100%);
      border-radius: 14px;
      font-size: 1.25rem;
      font-weight: 800;
      color: #ffffff;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    }
    .brand-hero-card h1 {
      margin: 0 0 4px;
      font-size: clamp(1.4rem, 2.8vw, 2.1rem);
      color: #ffffff;
      line-height: 1.25;
    }
    .brand-hero-subtitle {
      margin: 0;
      color: #94a3b8;
      font-size: 0.95rem;
    }
    .brand-og-figure {
      margin: 0 0 24px;
      overflow: hidden;
      background: #030914;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 16px;
      box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
    }
    .brand-og-image {
      display: block;
      width: 100%;
      height: auto;
      aspect-ratio: 1200 / 630;
      object-fit: cover;
    }
    .brand-og-caption {
      margin: 0;
      padding: 10px 16px 12px;
      color: #aebdca;
      background: rgba(7, 12, 20, 0.96);
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      font-size: 0.8rem;
      line-height: 1.55;
    }
    .brand-price-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
      gap: 14px;
      margin-top: 24px;
    }
    .brand-price-card {
      padding: 16px 18px;
      background: rgba(255, 255, 255, 0.035);
      border: 1px solid rgba(255, 255, 255, 0.07);
      border-radius: 14px;
      transition: transform 0.2s ease, border-color 0.2s ease;
    }
    .brand-price-card:hover {
      transform: translateY(-2px);
      border-color: rgba(156, 255, 238, 0.35);
      background: rgba(156, 255, 238, 0.04);
    }
    .brand-fuel-label {
      font-size: 0.88rem;
      color: #cbd5e1;
      font-weight: 700;
      margin-bottom: 6px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .brand-fuel-price {
      font-size: 1.75rem;
      font-weight: 800;
      color: #9cffee;
      line-height: 1;
      font-family: system-ui, -apple-system, sans-serif;
    }
    .brand-fuel-unit {
      font-size: 0.78rem;
      color: #94a3b8;
      margin-left: 4px;
      font-weight: 600;
    }
    .brand-market-range {
      margin-top: 6px;
      font-size: 0.75rem;
      color: #64748b;
    }
    .brand-chart-container {
      margin-top: 32px;
      padding: 22px;
      background: rgba(10, 15, 25, 0.7);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 16px;
    }
    .brand-chart-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
      margin-bottom: 18px;
    }
    .brand-chart-tabs {
      display: flex;
      align-items: center;
      gap: 8px;
      overflow-x: auto;
      max-width: 100%;
      padding: 2px 2px 6px;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: thin;
      scrollbar-color: rgba(156, 255, 238, 0.3) transparent;
    }
    .brand-chart-tabs::-webkit-scrollbar {
      height: 4px;
    }
    .brand-chart-tabs::-webkit-scrollbar-thumb {
      background: rgba(156, 255, 238, 0.25);
      border-radius: 4px;
    }
    .brand-chart-tab {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 7px 14px;
      font-size: 0.82rem;
      font-weight: 700;
      border-radius: 8px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(255, 255, 255, 0.05);
      color: #cbd5e1;
      cursor: pointer;
      transition: all 0.2s ease;
      white-space: nowrap;
      flex-shrink: 0;
      font-family: inherit;
    }
    .brand-chart-tab:hover {
      background: rgba(255, 255, 255, 0.1);
      color: #ffffff;
      border-color: rgba(156, 255, 238, 0.3);
    }
    .brand-chart-tab.is-active {
      background: #16b8a6;
      color: #042421;
      border-color: #16b8a6;
      font-weight: 800;
    }
    .brand-chart-pane {
      position: relative;
      width: 100%;
      height: 250px;
    }
    .brand-chart-plot-wrap {
      position: relative;
      width: 100%;
      height: 100%;
    }
    .brand-chart-tooltip {
      position: absolute;
      z-index: 30;
      transform: translate(-50%, -100%) translateY(-12px);
      padding: 8px 16px;
      font-size: 0.88rem;
      font-weight: 800;
      color: #ffffff;
      background: rgba(8, 14, 22, 0.95);
      border: 1px solid rgba(72, 220, 200, 0.45);
      border-radius: 9px;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
      white-space: nowrap;
      pointer-events: none;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      letter-spacing: -0.01em;
      transition: opacity 0.15s ease, transform 0.15s ease;
    }
    .brand-chart-tooltip[data-align="start"] {
      transform: translate(0, -100%) translateY(-12px);
    }
    .brand-chart-tooltip[data-align="end"] {
      transform: translate(-100%, -100%) translateY(-12px);
    }
    .brand-chart-point-group {
      outline: none;
      cursor: pointer;
    }
    .brand-chart-hitarea {
      fill: transparent;
      stroke: transparent;
      cursor: pointer;
    }
    .brand-chart-dot {
      transition: r 0.18s ease, stroke-width 0.18s ease, fill 0.18s ease;
    }
    .brand-chart-point-group:hover .brand-chart-dot,
    .brand-chart-point-group:focus .brand-chart-dot,
    .brand-chart-point-group.is-active .brand-chart-dot {
      r: 6;
      fill: #9cffee !important;
      stroke: #02201d;
      stroke-width: 2.5;
      filter: drop-shadow(0 0 8px rgba(156, 255, 238, 0.9));
    }
    .brand-info-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
      gap: 20px;
      margin-top: 32px;
    }
    .brand-info-card {
      padding: 24px;
      background: linear-gradient(160deg, rgba(20, 28, 40, 0.85) 0%, rgba(12, 17, 25, 0.9) 100%);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 16px;
    }
    .brand-info-card h3 {
      margin: 0 0 12px;
      font-size: 1.15rem;
      color: #9cffee;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .brand-info-card p {
      margin: 0 0 12px;
      color: #cbd5e1;
      font-size: 0.9rem;
      line-height: 1.65;
    }
    .brand-other-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 14px;
    }
    .brand-other-pill {
      display: inline-flex;
      align-items: center;
      padding: 7px 14px;
      font-size: 0.82rem;
      font-weight: 700;
      color: #cbd5e1;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 999px;
      text-decoration: none;
      transition: all 0.2s ease;
    }
    .brand-other-pill:hover {
      color: #9cffee;
      border-color: rgba(156, 255, 238, 0.4);
      background: rgba(156, 255, 238, 0.1);
      transform: translateY(-1px);
    }
    .brand-other-pill.is-current {
      background: linear-gradient(135deg, #9cffee 0%, #48dcc8 100%);
      color: #02201d;
      border-color: #9cffee;
      font-weight: 800;
    }

    /* 7-Day History Table with Fuel Tabs */
    .brand-table-container {
      margin-top: 24px;
      padding: 22px;
      background: rgba(10, 15, 25, 0.7);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 16px;
    }
    .brand-table-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 14px;
      margin-bottom: 18px;
    }
    .brand-fuel-tabs {
      display: flex;
      align-items: center;
      gap: 8px;
      overflow-x: auto;
      max-width: 100%;
      padding: 2px 2px 6px;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: thin;
      scrollbar-color: rgba(156, 255, 238, 0.3) transparent;
    }
    .brand-fuel-tabs::-webkit-scrollbar {
      height: 4px;
    }
    .brand-fuel-tabs::-webkit-scrollbar-thumb {
      background: rgba(156, 255, 238, 0.25);
      border-radius: 4px;
    }
    .brand-fuel-tab-btn {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 7px 14px;
      font-size: 0.82rem;
      font-weight: 700;
      border-radius: 8px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(255, 255, 255, 0.05);
      color: #cbd5e1;
      cursor: pointer;
      transition: all 0.2s ease;
      font-family: inherit;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .fuel-tab-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: inline-block;
      flex-shrink: 0;
    }
    .brand-fuel-tab-btn:hover {
      background: rgba(255, 255, 255, 0.1);
      color: #ffffff;
      border-color: rgba(156, 255, 238, 0.3);
    }
    .brand-fuel-tab-btn.is-active {
      background: #16b8a6;
      color: #042421;
      border-color: #16b8a6;
      font-weight: 800;
    }
    .brand-fuel-tab-btn.is-active .fuel-tab-dot {
      background-color: #042421 !important;
    }
    .brand-history-table-responsive {
      width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(8, 12, 20, 0.6);
    }
    .brand-history-table {
      width: 100%;
      min-width: 580px;
      border-collapse: collapse;
      font-size: 0.86rem;
    }
    .brand-history-table thead th {
      padding: 12px 16px;
      background: rgba(20, 28, 40, 0.9);
      color: #94a3b8;
      font-size: 0.78rem;
      font-weight: 750;
      text-transform: uppercase;
      letter-spacing: 0.02em;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .brand-history-table tbody td {
      padding: 12px 16px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.04);
      color: #e2e8f0;
      vertical-align: middle;
    }
    .brand-history-table tbody tr:hover {
      background: rgba(156, 255, 238, 0.04);
    }
    .brand-history-table tbody tr.row-latest {
      background: rgba(22, 184, 166, 0.08);
    }
    .badge-latest-pill {
      display: inline-block;
      margin-left: 6px;
      padding: 2px 7px;
      background: rgba(22, 184, 166, 0.2);
      border: 1px solid rgba(156, 255, 238, 0.4);
      border-radius: 6px;
      color: #9cffee;
      font-size: 0.7rem;
      font-weight: 750;
    }
    .price-val {
      font-size: 1.05rem;
      font-weight: 800;
      color: #9cffee;
    }
    .price-unit {
      font-size: 0.74rem;
      color: #64748b;
      margin-left: 3px;
    }
    .table-change-text {
      font-weight: 750;
      font-size: 0.84rem;
    }
    .table-change-text.is-up {
      color: #f87171;
    }
    .table-change-text.is-down {
      color: #34d399;
    }
    .table-change-text.is-flat {
      color: #94a3b8;
    }
    .table-status-badge {
      display: inline-block;
      padding: 3px 10px;
      border-radius: 6px;
      font-size: 0.75rem;
      font-weight: 750;
      white-space: nowrap;
    }
    .table-status-badge.is-up {
      background: rgba(239, 68, 68, 0.15);
      color: #fca5a5;
      border: 1px solid rgba(239, 68, 68, 0.3);
    }
    .table-status-badge.is-down {
      background: rgba(34, 197, 94, 0.15);
      color: #86efac;
      border: 1px solid rgba(34, 197, 94, 0.3);
    }
    .table-status-badge.is-flat {
      background: rgba(148, 163, 184, 0.12);
      color: #cbd5e1;
      border: 1px solid rgba(148, 163, 184, 0.25);
    }

    @media (max-width: 760px) {
      .brand-og-figure {
        margin-right: -14px;
        margin-left: -14px;
        border-radius: 12px;
      }
      .brand-og-caption {
        padding-right: 14px;
        padding-left: 14px;
      }
      .brand-chart-header,
      .brand-table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
      }
      .brand-chart-tabs,
      .brand-fuel-tabs {
        width: 100%;
      }
      .brand-chart-tab,
      .brand-fuel-tab-btn {
        font-size: 0.8rem;
        padding: 7px 12px;
      }
    }
