/* ============================================================
   RedSun — Responsive Overrides
   Loaded last on every page. Only adjusts layout on smaller
   screens; desktop styles are left untouched.
   ============================================================ */

/* ---------- Global safety nets (mobile & tablet) ---------- */
@media (max-width: 1024px) {
  img, video, iframe, svg { max-width: 100%; }
  table { max-width: 100%; }
}

/* ---------- Dealer page: info note (text was split into columns) ---------- */
.dealer-note-card {
  display: block;
  position: relative;
  padding-left: 41px;
}
.dealer-note-card svg {
  position: absolute;
  left: 16px;
  top: 16px;
  margin-top: 0;
}

/* ============================================================
   Tablet  (≤ 1100px)
   ============================================================ */
@media (max-width: 1100px) {
  /* Products: 4-up water heater grid is set inline — override it */
  .sub-products-grid[style] { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ============================================================
   Tablet  (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  /* Products: keep the 3 category tabs on one row */
  .tabs-container { flex-wrap: nowrap; }
  .tab-btn { flex: 1 1 0; border-bottom: none; }

  /* About: odd stat out spans the full row instead of sitting alone */
  .about-stat-item:nth-child(3):last-child { grid-column: 1 / -1; }
}

/* ============================================================
   Mobile  (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  /* About: centre timeline dots on the vertical line */
  .timeline-dot { left: -39px; }
}

/* ============================================================
   Small mobile  (≤ 640px)
   ============================================================ */
@media (max-width: 640px) {
  /* Products: single column cards */
  .sub-products-grid,
  .sub-products-grid[style] { grid-template-columns: 1fr !important; }

  /* Products: compact tabs */
  .tab-btn { padding: 16px 6px; font-size: .78rem; line-height: 1.3; }

  /* Card footers: keep link + price readable */
  .sub-card-footer { flex-wrap: wrap; gap: 8px; }

  /* Long words / emails / URLs never push the page sideways */
  h1, h2, h3, p, a, li, td, th { overflow-wrap: break-word; }
}
