/* Basic responsive grid inspired by provided mockup */
.eppo-oil-outer { max-width: 1150px; margin: 0 auto; padding-bottom: 8px; --row-h: 68px; }
/* ซ่อน sidebar ข่าวเดิมที่วางผิดตำแหน่ง */
.eppo-news-sidebar { display: none !important; }
.eppo-oil-table { display: flex; align-items: flex-start; }
.eppo-oil-fixed { flex: 0 0 auto; }
.eppo-oil-scroll { flex: 1 1 auto; overflow-x: auto; }
.eppo-oil-tomorrow { flex: 0 0 150px; margin-left: 8px; display: flex; flex-direction: column; }
.eppo-oil-tomorrow-header { background: #1f3c88; color: #fff; text-align: center; height: 46px; box-sizing: border-box; padding: 8px 8px; border-top-left-radius: 12px; border-top-right-radius: 12px; font-weight: 700; line-height: 1.1; display:flex; flex-direction:column; align-items:center; justify-content:center; border-bottom: 4px solid #e3483a; }
.eppo-oil-tomorrow-header .eppo-oil-tomorrow-sub { font-size: 1.05rem; margin-top: 2px; }
.eppo-oil-tomorrow-list { display: grid; grid-auto-rows: var(--row-h); }
.eppo-oil-tomorrow-cell { height: var(--row-h); box-sizing: border-box; display:flex; align-items:center; justify-content:center; font-weight: 700; color: #1f3c88; background: #edf3ff; border: 1px solid #dbe6ff; border-top: none; }
.eppo-oil-tomorrow-cell.alt { background: #f6f9ff; }
.eppo-oil-tomorrow-footer { background: #1f3c88; color:#fff; text-align:center; font-size: .8rem; padding: 6px 4px; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
.eppo-oil-fixed-header { height: 46px; }
.eppo-oil-wrapper { min-width: 1150px; }
.eppo-oil-date { margin-bottom: 6px; }
.eppo-oil-date-title { font-size: 2rem; color: #0a6932; font-weight: 700; }
.eppo-oil-date-sub { font-size: .95rem; color: #4a4a4a; margin-top: 2px; }
.eppo-oil-brands { display: grid; gap: 0; align-items: center; }
.eppo-oil-brand { text-align: center; background: #fff; border-radius: 0; border: 1px solid #e6e6e6; padding: 8px; font-weight: 600; color: #2a2a2a; overflow: hidden; height: 46px; box-sizing: border-box; display:flex; align-items:center; justify-content:center; }
.eppo-oil-brand:not(.eppo-oil-brand--label) { border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.eppo-oil-brand--label { background: transparent; border: none; }
.eppo-oil-brand--tomorrow { background: #1f3c88; color: #fff; }
.eppo-oil-brand-name { font-size: .95rem; }
.eppo-oil-brand-logo { max-height: 28px; max-width: 100%; height: auto; width: auto; display: inline-block; object-fit: contain; }


.eppo-oil-grid { display: grid; gap: 0; }
.eppo-oil-row { display: grid; gap: 0; align-items: stretch; }
.eppo-oil-fuel { border-radius: 0px; border: 1px solid #eee; padding: 8px 10px; display: flex; flex-direction: column; justify-content: center; height: var(--row-h); min-height: var(--row-h); box-sizing: border-box; overflow: hidden; }
.eppo-oil-fuel.fuel-top { border-top-left-radius: 12px; border-top-right-radius: 12px; }
.eppo-oil-fuel.fuel-bottom { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }
.eppo-oil-fuel-name-main { font-size: .95rem; font-weight: 700; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.eppo-oil-fuel-sub { font-size: .78rem; opacity: .9; margin-top: 2px; }

.eppo-oil-cell { background: #fff; border-radius: 0px; border: 1px solid #eee; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; font-weight: 600; color: #303030; height: var(--row-h); min-height: var(--row-h); box-sizing: border-box; }
.eppo-oil-cell--tomorrow { background: #f2f7ff; border-color: #d6e3ff; font-weight: 700; }

.eppo-oil-row--effective .eppo-oil-fuel { background: #f7f7f7 !important; color: #333 !important; }
.eppo-oil-cell--effective { font-size: .9rem; color: #666; font-weight: 500; }

.eppo-oil-footnote { font-size: .9rem; color: #333; margin: 10px auto 0; line-height: 1.4; max-width: 1150px; padding: 0 4px; text-align: center; }
.eppo-oil-footnote .remark { color: #d32f2f; font-weight: 700; }

.eppo-brand-cards { max-width: 1150px; margin: 14px auto 4px; padding: 0 4px; }
.eppo-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.eppo-card { background: #f4f7fb; border: 1px solid #e8edf5; border-radius: 16px; padding: 14px; }
.eppo-card-with-news { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 20px; }
.eppo-card-with-news .eppo-card { flex: 0 0 360px; max-width: 360px; }
.eppo-card-news { flex: 1 1 auto; }
.eppo-card-head { display:flex; align-items:center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.eppo-card-brand img { height: 34px; width: auto; object-fit: contain; display:block; }
.eppo-card-title { font-weight: 800; font-size: 1.05rem; color: #1b1b1b; }
.eppo-card-sub { color:#7a7a7a; font-size: .9rem; flex-basis: 100%; }
.eppo-card-list { display:flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.eppo-card-item { display:flex; align-items:center; justify-content: space-between; padding: 10px 12px; background:#fff; border-radius: 999px; border: 1px solid #ecf0f6; }
.eppo-card-item-name { color:#2f3d4b; font-weight: 600; }
.eppo-card-item-price { color:#1f3c88; font-weight: 800; }

/* Accents per brand */
.eppo-card--blue { background:#eef4ff; border-color:#dfe9ff; }
.eppo-card--green { background:#eef8f0; border-color:#d9f0db; }
.eppo-card--orange { background:#fff1ea; border-color:#ffe1d6; }
.eppo-card--pink { background:#ffeef3; border-color:#ffdbe7; }
.eppo-card--indigo { background:#eef0ff; border-color:#dee1ff; }
.eppo-card--yellow { background:#fff8e6; border-color:#ffefc8; }
@media (max-width: 900px) {
  .eppo-oil-brand-name { font-size: .85rem; }
  .eppo-oil-cell { font-size: .95rem; }
}

/* -------- News Grid (ข่าวราคาน้ำมัน) -------- */
.eppo-oil-news { max-width: 1150px; margin: 18px auto 6px; padding: 0 4px; }
.eppo-news-sidebar .eppo-oil-news { max-width: none; margin: 0; padding: 0; }
.eppo-oil-news-title { font-size: 2rem; font-weight: 800; color: #111; margin-bottom: 10px; }
.eppo-news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.eppo-news-card { display: block; text-decoration: none; color: inherit; }
.eppo-news-thumb { width: 100%; aspect-ratio: 16/9; background-size: cover; background-position: center; border-radius: 12px; }
.eppo-news-title { margin-top: 10px; font-weight: 700; line-height: 1.35; }
.eppo-news-date { margin-top: 4px; color: #6b7280; font-size: .95rem; }
.eppo-news-card:hover .eppo-news-title { text-decoration: underline; }
.eppo-news-more { margin-top: 12px; text-align: center; }
.eppo-news-more a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #1f3c88;
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(31,60,136,.18);
  border: 1px solid #dbe6ff;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.eppo-news-more a::after {
  content: "→";
  font-weight: 800;
}
.eppo-news-more a:hover {
  background: #163170;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(31,60,136,.22);
}
.eppo-news-more a:focus-visible {
  outline: 3px solid #9ec2ff;
  outline-offset: 2px;
}
@media (max-width: 1400px) { .eppo-card-with-news .eppo-card { flex-basis: 320px; max-width: 320px; } .eppo-news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .eppo-card-with-news { flex-direction: column; } .eppo-news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .eppo-news-grid { grid-template-columns: 1fr; } }
