/* modern.css — responsive layer for the abbsales.com template (Dan 2026-10-25 modernization).
   Loaded AFTER the legacy stylesheets. Layout and type only: page text, URLs, titles, meta, headings, links and
   structured data are untouched. Flash banners keep playing (Ruffle); their boxes only get a max-width. */
:root {
  --abb-green: #678d38;
  --abb-green-soft: #eef4e6;
  --abb-ink: #1f2420;
  --abb-muted: #59605a;
  --abb-line: #dfe3dc;
  --abb-link: #2f5d10;
  --abb-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
html { -webkit-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #f3f5f1; color: var(--abb-ink); font-family: var(--abb-font); font-size: 15px; line-height: 1.5; }
body, td, th, p, li, div, span, input, select, textarea, h1, h2, h3, h4 { font-family: var(--abb-font); }
img { max-width: 100%; height: auto; }
a:link, a:visited, a:hover, a:active { font-family: inherit; }

/* ---------- frame ---------- */
#container {
  width: auto; max-width: 1200px; margin: 0 auto; background: #fff; box-shadow: 0 0 0 1px var(--abb-line);
  display: grid; grid-template-columns: 240px minmax(0, 1fr);
}
#container > * { min-width: 0; }
#greenheader {
  grid-column: 1 / -1; width: auto; height: auto; padding: 6px 16px; background: var(--abb-green); color: #fff;
  font-size: 14px; text-align: center;
}
#greenheader a:link, #greenheader a:visited { color: #fff; font-size: 14px; }
#headershadow { display: none; }
#leftmenucontainer {
  grid-column: 1; grid-row: 2 / span 20; float: none; width: auto; height: auto; top: 0; border-left: 0; border-right: 1px solid var(--abb-line);
  background: #fff;
}
#grosslogo { width: auto; height: auto; padding: 14px 16px; text-align: center; }
.prouddistributor { width: auto; height: auto; padding: 6px 12px; text-align: center; }
.prouddistributor img { margin: 0 auto; }
.browsecategoryproducts { float: none; width: auto; margin: 8px 0 0; line-height: 1.35; font-size: 14px; }
.browsecategoryproducts > br { display: none; }
.lineitemoptions { padding: 0; border-left: 4px solid transparent; }
.lineitemoptions a:link, .lineitemoptions a:visited { display: block; padding: 6px 14px; font-size: 14px; font-weight: 500; color: var(--abb-ink); text-decoration: none; }
.lineitemoptions:hover { border-left-color: var(--abb-green); background: var(--abb-green-soft); }
.additionalleft { float: none; width: auto; padding: 20px 14px; margin: 12px 0 0; font-size: 14px; }

.bannerspace {
  grid-column: 2; float: none; width: auto; height: auto; margin: 0; padding: 10px clamp(12px, 2vw, 24px); z-index: auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
}
.bannerspaceleft, .searchbannerright { position: static; left: auto; width: auto; max-width: 100%; margin: 0; float: none; }
.searchbannerright form { display: flex; gap: 6px; }
.searchbannerright input[type="search"] { width: 200px !important; max-width: 52vw; padding: 7px 10px !important; border: 1px solid #bfc6bb; border-radius: 4px; font-size: 14px !important; }
.searchbannerright button { padding: 7px 14px !important; border: 0; border-radius: 4px; background: var(--abb-green); color: #fff; font-weight: 600; font-size: 14px !important; cursor: pointer; }
.menu {
  grid-column: 2; float: none; width: auto; height: auto; margin: 0; border-left: 0; border-right: 0;
  display: flex; flex-wrap: wrap; gap: 0; background: #f7f8f5; border-top: 1px solid var(--abb-line); border-bottom: 1px solid var(--abb-line);
}
.menuoption { float: none; width: auto; height: auto; padding: 0; border: 0; }
.menu a:link, .menu a:visited, .menu a:hover { display: block; padding: 10px 18px; font-size: 14px; font-weight: 600; color: var(--abb-ink); }
.menu a:hover { color: var(--abb-green); text-decoration: none; }

.mainbody { grid-column: 2; float: none; width: auto; margin: 0; padding: 18px clamp(12px, 2.4vw, 32px) 28px; position: static; }
#rightcolumn { grid-column: 2; float: none; width: auto; height: auto; top: 0; position: static; border: 0; background: none; padding: 0 clamp(12px, 2.4vw, 32px) 16px; text-align: right; }
#footer {
  grid-column: 1 / -1; width: auto; height: auto; padding: 14px 16px; background: var(--abb-ink); color: #e6e9e4; font-size: 14px; text-align: center; line-height: 1.6;
}
#footer a:link, #footer a:visited { color: #fff; font-size: 14px; }

/* ---------- content: release every fixed width ---------- */
.mainwrap, .printthispage, .printheader, .greenheaderstop, .greenheaderstopsmall, .greenheaderstopbelow, .greenheaderstopright,
.greenheaderstopbottom, .greenheaderstopbottomsmall, .greenembedded, .fullblank, .partnumberfinder, .partnumberfinderheader,
.partnumberfinderheader2, .partnumberfinderheaderhide, .partnumberprogram, .partnumberprogramhide, .partnumberprogramnoborder,
.partnumberprogramnobordermargin, .lineitemselectionsfull, .lineitemselectionsfulldotted, .lineitemselectionsfullpadded,
.lineitemselectionstrans, .contacus, .pilotdevices {
  float: none; width: auto; max-width: 100%; height: auto;
}
.mainbody, .mainbody p, .mainbody li, .mainbody td { font-size: 15px; }
.mainbody h1, .mainbody h2 { line-height: 1.25; }
.greenheaderstop, .greenheaderstopsmall, .partnumberfinderheader, .partnumberfinderheader2 {
  background: var(--abb-green) !important; color: #fff; padding: 6px 12px; border-radius: 4px 4px 0 0; font-size: 14px; font-weight: 700; margin-top: 18px;
}
.printthispage { text-align: right; font-size: 13px; }
/* product header: picture | text | catalog cover, wrapping when narrow */
.mainwrap { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-start; }
.mainwrap > .printthispage, .mainwrap > .printheader, .mainwrap > .greenheaderstop { flex: 1 1 100%; }
.mainproductinfo, .mainproductinfo2, .mainproductinfo2large, .mainproductinfo3, .mainproductinfosmall { float: none; height: auto; max-width: 100%; }
.mainproductinfo2, .mainproductinfo2large { flex: 1 1 260px; width: auto; }
/* home: featured product + catalogue blocks */
.greenheaderstopbelow { float: left; width: 50%; }
.greenheaderstopright { float: right; width: 45%; }
.greenheaderstopbottomsmall { float: left; width: 30%; }
/* part tables */
.partnumberprogram, .partnumberprogramnoborder, .partnumberprogramnobordermargin { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mainbody table { border-collapse: collapse; }
.mainbody table td, .mainbody table th { font-size: 13.5px; }
/* selection pages: card rows */
.lineitemselections, .lineitemselectionslong { float: left; width: auto; max-width: 100%; }
/* Flash banners (played by Ruffle) never wider than their column */
.mainbody object, .mainbody embed, .mainbody ruffle-object, .mainbody ruffle-embed, .bannerspace object, .bannerspace embed { max-width: 100%; }

/* ---------- tablet & phone ---------- */
@media (max-width: 900px) {
  #container { grid-template-columns: minmax(0, 1fr); }
  #leftmenucontainer, .bannerspace, .menu, .mainbody, #rightcolumn, #footer { grid-column: 1; grid-row: auto; }
  #leftmenucontainer { border-right: 0; border-bottom: 1px solid var(--abb-line); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 0 12px 12px; }
  #grosslogo { flex: 0 0 auto; padding: 10px 0; }
  #grosslogo img { max-height: 56px; width: auto; }
  .prouddistributor { flex: 1 1 auto; border: 0; text-align: left; }
  .browsecategoryproducts { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
  .lineitemoptions { border: 1px solid var(--abb-line); border-radius: 999px; }
  .lineitemoptions:hover { border-color: var(--abb-green); }
  .lineitemoptions a:link, .lineitemoptions a:visited { padding: 5px 12px; font-size: 13.5px; }
  .additionalleft { display: none; }
  .menu { justify-content: center; }
  .mainbody div { max-width: 100%; }
  .mainbody div[style*="width"] { width: auto !important; }
  .greenheaderstopbelow, .greenheaderstopright, .greenheaderstopbottomsmall { float: none; width: auto; }
  .mainbody table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .mainbody table table { display: table; }
  .mainbody [class^="partnumberprogram"] td, .mainbody [class^="partnumberprogram"] th { white-space: nowrap; }
  #rightcolumn { text-align: center; }
}
/* pass 2: every other direct child of #container is page content (selection pages use e.g. .contactorselection) */
#container > :not(#greenheader):not(#headershadow):not(#leftmenucontainer):not(#footer):not(.bannerspace):not(.menu):not(#rightcolumn) {
  grid-column: 2; float: none; width: auto; max-width: 100%; height: auto; margin-left: 0; margin-right: 0; padding-left: clamp(12px, 2.4vw, 32px); padding-right: clamp(12px, 2.4vw, 32px);
}
.solutionscentering { position: static; left: auto; right: auto; top: auto; width: auto; }
@media (max-width: 900px) {
  #container > :not(#greenheader):not(#headershadow):not(#leftmenucontainer):not(#footer):not(.bannerspace):not(.menu):not(#rightcolumn) { grid-column: 1; }
  #container div { max-width: 100%; }
  #container div[style*="width"] { width: auto !important; }
  #container table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #container table table { display: table; }
}
/* pass 3: menu items and home blocks had fixed heights / 13px line-height, so bigger text overlapped */
.lineitemoptions { float: none; width: auto; height: auto; border: 0; border-top: 1px solid var(--abb-line); border-left: 4px solid transparent; }
.greenheaderstop, .greenheaderstopsmall, .greenheaderstopbelow, .greenheaderstopright, .greenheaderstopbottom, .greenheaderstopbottomsmall,
.greenembedded, .partnumberfinderheader, .partnumberfinderheader2 { line-height: 1.5; height: auto; }
.greenheaderstopbelow, .greenheaderstopbottomsmall, .greenembedded, .greenheaderstopright { padding: 12px 0; border: 0; }
.mainbody { display: flex; flex-wrap: wrap; gap: 0 24px; align-items: flex-start; align-content: flex-start; }
.mainbody > * { float: none; flex: 1 1 100%; min-width: 0; }
.mainbody > .greenheaderstopbelow { flex: 1 1 52%; width: auto; }
.mainbody > .greenheaderstopright { flex: 1 1 36%; width: auto; text-align: center; }
.mainbody > .greenheaderstopbottomsmall { flex: 0 1 180px; width: auto; text-align: center; }
.mainbody > .greenembedded { flex: 1 1 52%; width: auto; }
.greenembedded ul { columns: 2 200px; margin: 6px 0; }
@media (max-width: 900px) {
  .lineitemoptions { border: 1px solid var(--abb-line); border-radius: 999px; }
  .mainbody > .greenheaderstopbelow, .mainbody > .greenheaderstopright, .mainbody > .greenheaderstopbottomsmall, .mainbody > .greenembedded { flex: 1 1 100%; }
}
.browsecategoryproducts a, .browsecategoryproducts a:link, .browsecategoryproducts a:visited { height: auto; width: auto; text-indent: 0; font-family: var(--abb-font); }
@media (max-width: 900px) { #container a { overflow-wrap: break-word; } .lineitemoptions { max-width: 100%; } }
.printthispage a { display: inline-block; max-width: 100%; white-space: normal !important; }
@media (max-width: 900px) { .printthispage { text-align: left; } }
@media (max-width: 900px) { .printthispage a[style*="margin-left"] { margin-left: 0 !important; float: none !important; } }
/* Ruffle (Flash emulator) players: never wider than the column; Ruffle letterboxes the movie */
ruffle-embed, ruffle-object, #container object, #container embed { max-width: 100% !important; }
