/* ==========================================================================
   LECO Integrated Brand Design System & Pardot Form Framework

   CONTENTS
   1. Design tokens (light, dark, system-dark)
   2. Reset & base
   3. Header & navigation
   4. Layout shell (main, split columns)
   5. Footers & animated lines
   6. Link-tree
   7. Forms
   8. Alerts & validation
   9. Tables & commerce elements
   10. Modals & mini-cart
   11. Cart, orders & checkout
   12. Product search & catalogs
   13. Contact page layout
   14. Toasts
   15. Utilities

   NOTE ON ORDER: some same-specificity rules only win because of where they
   sit in this file. Keep the section order unless you re-test cart, forms and
   the contact page.
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */

/* Light mode defaults (also the base for everything below) */
:root, [data-theme="light"] {
  /* Typography */
  --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-outfit: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-rothek: 'Rothek', 'Outfit', sans-serif;
  --font-sans: var(--font-inter);
  --font-display: var(--font-outfit);

  /* Brand colors */
  --white-white: #FFFFFF;
  --brand-white: var(--white-white);
  --black-black: #151515;
  --brand-black: var(--black-black);
  --brand-white-dark: var(--brand-black);
  --brand-black-dark: var(--brand-white);
  --brand-copper: #96694C;
  --brand-copper-dark: #BC9D85;
  --brand-heading: #001117;
  --brand-heading-dark: #F0F0F0;
  --brand-navy-dark: #001923;
  --brand-navy-medium: #002A3A;
  --brand-navy-light: #335561;
  --brand-border-light: #E3E7E9;
  --brand-accent-blue: #006DCC;

  --color-dark-navy: var(--brand-navy-dark);
  --color-medium-navy: var(--brand-navy-medium);
  --color-light-navy: var(--brand-navy-light);
  --color-heading: var(--brand-heading);
  --color-body: var(--brand-black);
  --color-bg: var(--white-white);
  --color-focus-ring: #FDCCCC;
  --color-tan: var(--brand-copper);
  --color-tan-hover: #78543D;
  --color-link: #2563EB;
  --burnt-copper: var(--brand-black);
  --color-muted: var(--brand-navy-light);

  --color-gr6: #666666;
  --color-cc-disabled: #767676;
  --color-reg-done: #71777f;

  /* Status colors (badges, pills, info alerts) */
  --status-info-text: #0B4A8B;
  --status-info-bg: #E2F0FD;
  --status-info-border: #B2D5F8;
  --status-success-text: #137333;
  --status-success-bg: #E6F4EA;
  --status-success-border: #CEEAD6;
  --status-warning-text: #8C4000;
  --status-warning-bg: #FEF3C7;
  --status-warning-border: #FDE68A;
  --status-danger-text: #A50E0E;
  --status-danger-bg: #FCE8E6;
  --status-danger-border: #FAD2CF;

  /* Surfaces & inputs */
  --surface-bg: var(--brand-white);
  --surface-alt: #FAFAFA;
  --input-bg: #FFFFFF;
  --input-border: #D1D5DB;
  --footer-bg: var(--color-heading);
  --footer-text: #47585C;

  /* Layout */
  --content-max-width: 1200px;
  --layout-block-gap: 32px;
  --form-gap: 16px;

  /* Dropdown arrow shared by form selects */
  --select-arrow: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23001117" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
}

/* Explicit dark theme */
[data-theme="dark"] {
  --brand-white: var(--brand-white-dark);
  --brand-border-light: #2D2D2D;
  --color-heading: var(--brand-heading-dark);
  --color-body: #F0F0F0;
  --color-bg: #151515;
  --color-link: #80A5F5;
  --brand-copper: #9f775c;
  --brand-accent-blue: #80A5F5;
  --color-medium-navy: #1F385C;
  --color-dark-navy: #122238;
  --color-light-navy: #3A5A8C;
  --burnt-copper: var(--brand-copper-dark);
  --color-muted: #A3A3A3;

  --color-gr6: #7f7f7f;
  --status-warning-text: #AA7242;
  --color-cc-disabled: #808080;
  --color-reg-done: #798089;

  --surface-bg: #151515;
  --surface-alt: #262626;
  --input-bg: #2A2A2A;
  --input-border: #444444;
  --footer-bg: #151515;
  --footer-text: #99AAB0;
  --btn-cart-bg: #3A5A8C;
}

/* System dark preference, used only when no data-theme attribute is set */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --brand-white: var(--brand-white-dark);
    --brand-border-light: #2D2D2D;
    --color-heading: var(--brand-heading-dark);
    --color-body: #F0F0F0;
    --color-bg: #151515;
    --color-link: #80A5F5;
    --brand-accent-blue: #80A5F5;
    --color-medium-navy: #1F385C;
    --color-dark-navy: #122238;
    --color-light-navy: #3A5A8C;
    --burnt-copper: var(--brand-copper-dark);
    --color-muted: #A3A3A3;

    --surface-bg: #1E1E1E;
    --surface-alt: #262626;
    --input-bg: #2A2A2A;
    --input-border: #444444;
    --footer-bg: #121212;
    --footer-text: #99AAB0;
  }
}


/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

html {
  overflow-y: scroll;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--color-bg);
  color: var(--color-body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}

body.linktree { padding: 40px 20px; }
body.modal-open { overflow: hidden !important; }

a {
  color: var(--color-link);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  color: var(--color-heading);
  font-family: var(--font-outfit);
  line-height: 1.15;
}

h1 { font-size: 48px; font-weight: 200; }
h2, .is-h2-style { font-size: 36px; font-weight: 200; }
h3, .is-h3-style { font-size: 28px; font-weight: 300; }
h4, .is-h4-style { font-size: 24px; font-weight: 400; }
h5, .is-h5-style { font-size: 20px; font-weight: 400; }
h6, .is-h6-style { font-size: 16px; font-weight: 300; }

p { margin-bottom: 1.25rem; }
ul, ol { margin-bottom: 1.25rem; padding-left: 1.25rem; }
li { margin-bottom: 6px; }
hr { margin: 40px 0; }

/* Global WCAG focus outline */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 4px solid var(--color-focus-ring) !important;
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* Visually hidden, still available to screen readers */
.sr-only,
.sr-only-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */

.pardot-header {
  padding: 20px 24px;
  background-color: var(--surface-bg);
  border-bottom: 1px solid var(--brand-border-light);
}


/* Inner container shared by header and both footers */
.pardot-header .header-container,
.pardot-footer .footer-container,
.leco-footer .footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.pardot-header.logged-in,
.header-container.logged-in {
  justify-content: flex-end;
}

.pardot-header img {
  height: 32px;
  width: auto;
}

.logo-block { display: flex; align-items: center; flex: 0; flex-wrap:wrap; }
.lecodirect-logo {
  content: url('../images/lecodirect-logo.svg');
  margin-top: 0.25rem;
}
[data-theme="dark"] .lecodirect-logo {
  content: url('../images/lecodirect-white.svg');
}

/* Desktop navigation */
.leco-nav-menu-wrapper-desktop {
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
}

.leco-nav-menu {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.leco-nav-menu li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.leco-nav-menu li a {
  display: inline-block;
  position: relative;
  padding: 8px 0;
  color: var(--color-heading);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.leco-nav-menu.logged-in a { font-size: 18px; }

.leco-nav-menu li a:hover,
.leco-nav-menu li.active > a {
  color: var(--brand-accent-blue);
  text-decoration: none;
}

.leco-nav-menu li.active > a::after,
.leco-nav-menu li a:hover::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--brand-accent-blue);
  border-radius: 2px;
}

.leco-nav-menu li a:focus-visible {
  outline: 3px solid var(--color-focus-ring) !important;
  outline-offset: 4px;
  border-radius: 4px;
}
.menu-right {display: flex; justify-content: flex-end; flex: 1;}

/* Theme (light/dark) toggle */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-heading); /* drives stroke="currentColor" on the icons */
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.theme-toggle-btn:hover { background-color: rgba(0, 0, 0, 0.05); }
[data-theme="dark"] .theme-toggle-btn:hover { background-color: rgba(255, 255, 255, 0.1); }

#theme-icon { width: 32px; height: 32px; }

/* Light mode shows the moon, dark mode shows the sun */
.icon-moon { display: inline-block; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: inline-block; }

/* Mobile menu toggle (hidden on desktop) */
.mobile-menu-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--brand-border-light);
  border-radius: 8px;
  background: transparent;
  color: var(--color-heading);
  font-size: 20px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-menu-toggle-btn { display: flex; }

  .header-container { flex-wrap: wrap; }

  /* Hidden until JS adds .menu-open to the header container */
  .leco-nav-menu-wrapper-desktop {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-top: 16px;
  }
  .header-container.menu-open .leco-nav-menu-wrapper-desktop { display: flex; }

  .leco-nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
  }
}


/* ==========================================================================
   4. LAYOUT SHELL
   ========================================================================== */

.pardot-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--content-max-width);
  margin: 40px auto;
  padding: 0 24px;
}

/* Split column framework */
.leco-split-block {
  display: flex;
  flex-wrap: wrap;
  gap: var(--layout-block-gap);
  width: 100%;
}
.leco-split-column { flex-grow: 1; min-width: 0; }
.leco-split-left { flex: 1 1 calc(60% - (var(--layout-block-gap) / 2)); }
.leco-split-right { flex: 1 1 calc(40% - (var(--layout-block-gap) / 2)); }

.split-50 .leco-split-left,
.split-50 .leco-split-right {
  flex: 1 1 calc(50% - (var(--layout-block-gap) / 2));
}

@media (min-width: 769px) {
  .home-page-left { padding-right: 3em; }
}

@media (max-width: 768px) {
  .leco-split-left,
  .leco-split-right,
  .split-50 .leco-split-left,
  .split-50 .leco-split-right {
    flex: 1 1 100%;
  }
  .pardot-main { margin: 24px auto; }
}


/* ==========================================================================
   5. FOOTERS & ANIMATED LINES
   ========================================================================== */

.pardot-footer {
  margin-top: auto;
  padding: 32px 24px;
  background-color: var(--footer-bg);
  color: var(--brand-white);
}
.pardot-footer p { margin: 0; font-size: 14px; color: var(--footer-text); }
.pardot-footer nav { display: flex; gap: 20px; }
.pardot-footer nav a { color: var(--brand-white); font-size: 14px; }

@media (max-width: 768px) {
  .pardot-footer .footer-container {
    flex-direction: column;
    text-align: center;
  }
}

.leco-footer { padding: 20px 24px; background-color: var(--surface-bg); }
.leco-footer a { color: var(--color-body); }

.layout-flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}
.footer-nav-links { gap: 60px; }
.footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 0;
}
.social-links { gap: 24px; }

/* Animated footer lines */
.footer-lines {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
}

.line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background-repeat: repeat-x;
  will-change: transform;
}

.line1,
.line2,
.line3 {
  background-size: 1000px 100%;
}

.line1 {
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1000 100" xmlns="http://www.w3.org/2000/svg"><path d="M0 50 C 200 30 350 0 550 40 C 750 80 850 60 1000 50" stroke="rgba(209, 219, 224, 0.9)" stroke-width="2.5" fill="none"/></svg>');
  z-index: 3;
}

.line2 {
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1000 100" xmlns="http://www.w3.org/2000/svg"><path d="M0 50 C 150 80 400 95 600 60 C 800 25 900 35 1000 50" stroke="rgba(228, 215, 208, 0.9)" stroke-width="2.5" fill="none"/></svg>');
  background-position: -400px bottom;
  z-index: 2;
}

.line3 {
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1000 100" xmlns="http://www.w3.org/2000/svg"><path d="M0 50 C 300 80 400 20 650 50 C 800 70 900 20 1000 50" stroke="rgba(209, 219, 224, 0.4)" stroke-width="2.5" fill="none"/></svg>');
  background-position: -200px bottom;
  z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .line1 { animation: moveLine 28s linear infinite; }
  .line2 { animation: moveLineReverse 24s linear infinite; }
  .line3 { animation: moveLine 35s linear infinite; }
}

@keyframes moveLine {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-1000px); }
}

@keyframes moveLineReverse {
  0%   { transform: translateX(-1000px); }
  100% { transform: translateX(0); }
}


/* ==========================================================================
   6. LINK-TREE
   ========================================================================== */

.linktree-container {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: 40px 24px;
  background: var(--surface-bg);
  border: 1px solid var(--brand-border-light);
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  text-align: center;
  overflow: hidden;
}

.linktree-banner-wrapper {
  width: calc(100% + 48px);
  margin: -40px -24px 32px -24px;
  aspect-ratio: 580 / 300;
  overflow: hidden;
}
.linktree-banner-wrapper img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.linktree-header { margin-bottom: 32px; }
.linktree-logo { max-width: 160px; height: auto; margin-bottom: 20px; }

.linktree-title {
  margin-bottom: 8px;
  color: var(--color-heading);
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 300;
  line-height: 1.2;
}
.linktree-subtitle { font-size: 16px; color: var(--color-body); }

.linktree-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}
.linktree-links ul { list-style: none; padding-left: 0; }
.linktree-links li { margin-bottom: 16px; }

/* Buttons & actions */
.linktree-btn,
.linktree-links li a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 60px;
  padding: 15px 30px;
  border: 2px solid var(--color-medium-navy);
  border-radius: 16px;
  color: var(--color-medium-navy);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  text-decoration: none !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

button.linktree-btn {
  background-color: var(--color-medium-navy);
  color: var(--brand-white);
  cursor: pointer;
}
button.linktree-btn:hover { background-color: var(--color-dark-navy); }

.linktree-btn:hover,
.linktree-links li a:hover {
  background: var(--color-dark-navy) !important;
  border-color: var(--color-dark-navy) !important;
  color: var(--brand-white) !important;
}

.linktree-btn.featured,
.linktree-links li a.featured {
  background: var(--color-tan) !important;
  border-color: var(--color-tan) !important;
  color: var(--brand-white) !important;
}
.linktree-btn.featured:hover,
.linktree-links li a.featured:hover {
  background: var(--color-tan-hover) !important;
  border-color: var(--color-tan-hover) !important;
}

.linktree-footer {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--brand-border-light);
}
.linktree-footer p { font-size: 14px; color: var(--footer-text); }
.linktree-footer a { color: var(--color-medium-navy); font-weight: 500; }


/* ==========================================================================
   7. FORMS (Pardot form engine)
   ========================================================================== */

.pardot-form-wrapper {
  padding: 32px;
  background-color: var(--surface-bg);
  border: 1px solid var(--brand-border-light);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.form-section-title {
  padding-top: 24px;
  margin-bottom: 24px;
  color: var(--color-heading);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  text-align: center;
}

form.form {
  display: flex;
  flex-wrap: wrap !important;
  gap: var(--form-gap) !important;
  width: 100%;
  margin: 0 auto 2em;
  color: var(--color-body);
  font-family: var(--font-sans);
}
form.form * { box-sizing: border-box; }

form.form .form-field,
form.form .submit {
  flex: 1 1 100%;
  width: 100%;
}

form.form div.form-field {
  display: flex;
  flex-direction: column;
  margin: 0 0 20px 0 !important;
  text-align: left;
}

form.form .form-field.half {
  flex: 1 1 calc(50% - (var(--form-gap) / 2)) !important;
  max-width: calc(50% - (var(--form-gap) / 2)) !important;
}

@media (max-width: 580px) {
  form.form .form-field.half {
    flex: 1 1 100% !important;
    max-width: 100% !important;
  }
}

form.form label {
  display: block;
  margin-bottom: 6px;
  color: var(--color-heading);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

form.form p.required label::after,
form.form label.required::after {
  content: " *";
  color: var(--color-tan);
}

form.form input[type="text"],
form.form input[type="password"],
form.form input[type="email"],
form.form input[type="tel"],
form.form input[type="url"],
form.form input[type="number"],
form.form select,
form.form textarea {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: var(--color-heading);
  font-family: var(--font-sans);
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

form.form select {
  padding-right: 40px;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 16px center;
}

form.form textarea { min-height: 120px; resize: vertical; }

form.form input:focus-visible,
form.form select:focus-visible,
form.form textarea:focus-visible,
form.form input[type="checkbox"]:focus-visible,
form.form input[type="radio"]:focus-visible {
  outline: 4px solid var(--color-focus-ring) !important;
  outline-offset: 1px;
  border-color: var(--color-medium-navy);
}

form.form span.value { display: block; margin-top: 4px; }
form.form span.value span { display: flex; align-items: center; margin-bottom: 8px; }
form.form span.value label { margin-bottom: 0; font-weight: 400; cursor: pointer; }

form.form input[type="checkbox"],
form.form input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  accent-color: var(--color-medium-navy);
  cursor: pointer;
}

form.form span.description {
  display: block;
  margin-top: 4px;
  color: var(--footer-text);
  font-size: 13px;
}

/* Native select placeholder styling */
select:invalid { font-size: 15px; font-style: italic; }
select option { font-size: 15px; font-style: normal; }
option:disabled { color: #ccc; }

/* Submit buttons */
form.form div.submit {
  margin-top: 28px !important;
  margin-bottom: 0 !important;
}

form.form input[type="submit"],
.btn-primary {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 60px;
  padding: 15px 30px;
  background: var(--color-medium-navy) !important;
  border: none;
  border-radius: 16px;
  color: var(--white-white) !important;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

form.form input[type="submit"]:hover,
.btn-primary:hover {
  background: var(--color-dark-navy) !important;
}

#noaccountnote { margin-left: 1em; }

@media (max-width: 480px) {
  .linktree-container { padding: 28px 16px; border-radius: 16px; }
  .linktree-title { font-size: 28px; }

  .linktree-btn,
  form.form input[type="submit"],
  .btn-primary {
    height: 52px;
    min-height: 52px;
    font-size: 16px;
  }
}


/* ==========================================================================
   8. ALERTS & VALIDATION
   ========================================================================== */

/* State colors, usable on any element */
.error,
.alert-danger,
.alert.danger {
  color: #721C24 !important;
  background-color: #FFF6F6 !important;
  border-color: #FBC6CB !important;
}

.success {
  color: #155724 !important;
  background-color: #E8F5E9 !important;
  border-color: #C3E6CB !important;
}

.warning {
  color: #856404 !important;
  background-color: #FFF9DB !important;
  border-color: #FFEEBA !important;
}

div.alert-dismissible {
  padding: 1em;
  border-radius: 8px;
  font-weight: 500;
}

/* Alert / message banner (matches toasts) */
.alert {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.alert p { flex: 1; margin-bottom: 0; }
.alert a { font-weight: 600; text-decoration: underline; }

.alert .close {
  padding: 0;
  background: transparent !important;
  border: none !important;
  color: var(--brand-black);
  font-size: 20px !important;
  font-weight: bold;
  line-height: 1;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.alert .close:hover { opacity: 1; }

/* Variants: colored accent border (matches .leco-toast) */
.alert.error,
.alert.danger,
.alert-danger { border-left: 5px solid #C5221F !important; }

.alert.success { border-left: 5px solid #28a745 !important; }
.alert.warning { border-left: 5px solid #ffc107 !important; }

.alert.info {
  color: var(--status-info-text) !important;
  background-color: var(--status-info-bg) !important;
  border-color: var(--status-info-border) !important;
  border-left: 5px solid var(--brand-accent-blue) !important;
}

/* Inline form errors */
form.form div.errors {
  width: 100%;
  margin-bottom: 8px;
  padding: 12px 16px;
  background-color: #FFF6F6;
  border: 1px solid #F5C6CB;
  border-radius: 8px;
  color: #721C24;
  font-size: 14px;
  font-weight: 600;
}
form.form .error-wrapper .error {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 500;
}

.reg-progress { display:flex; gap:8px; margin:0 0 18px; padding:0; list-style:none; font-size:13px; }
.reg-progress li { flex:1; padding:6px 0; border-top:4px solid #ddd; color: var(--color-cc-disabled); }
.reg-progress li.active { border-color:#96694C; color:var(--brand-copper); font-weight:600; }
.reg-progress li.done { border-color:#4C5561; color:var(--color-reg-done); }
.reg-row { display:flex; gap:12px; flex-wrap:wrap; }
.reg-row .form-field { flex:1 1 140px; }
.reg-hp { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.reg-actions { display:flex; gap:12px; margin-top:16px; align-items:center; }
.reg-hint { font-size:13px; color:var(--color-gr6); margin-top:4px; }
.reg-checks { list-style:none; margin:8px 0 0; padding:0; font-size:13px; color: var(--color-cc-disabled); }
.reg-checks li.ok { color:#385723; }
.reg-checks li::before { content:"\25CB  "; }
.reg-checks li.ok::before { content:"\2713  "; }
#reg-bill-fields { display:none; margin-top:8px; }
#reg-escape {margin-top:20px;}
#reg-response {margin-bottom:15px; padding:10px;}


/* ==========================================================================
   9. TABLES & COMMERCE ELEMENTS
   ========================================================================== */

table,
#cart {
  width: 100%;
  margin: 2rem 0;
  background-color: var(--surface-bg);
  border: 1px solid var(--brand-border-light);
  border-radius: 8px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
}

th, td { padding: 16px; border: none; text-align: left; }

/*
 * NOTE: the rule lines below set size/position/repeat but there is no
 * background-image, so they currently render nothing. (The main-site
 * stylesheet uses a linear-gradient here.) Add a background-image if you
 * want header/row divider lines.
 */
thead th,
th {
  background-color: transparent;
  background-size: 100% 1px;
  background-position: bottom;
  background-repeat: no-repeat;
  color: var(--color-heading);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}

tbody td {
  background-size: 100% 1px;
  background-position: top;
  background-repeat: no-repeat;
  color: var(--color-body);
}

caption {
  margin-top: 12px;
  padding: 8px 0;
  color: var(--footer-text);
  font-size: 14px;
  text-align: left;
}

/* Table filters */
th select#type-filter,
th select#category-filter {
  display: block;
  width: 100%;
  min-width: 140px;
  max-width: 200px;
  height: 36px;
  margin-top: 6px;
  padding: 4px 12px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  color: var(--color-heading);
  font-size: 14px;
  cursor: pointer;
}

/* Badges */
.spec-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.spec-badge,
.csp-badge {
  display: inline-block;
  padding: 2px 6px;
  background-color: var(--surface-alt);
  border: 1px solid var(--input-border);
  border-radius: 3px;
  color: var(--color-heading);
  font-size: 11px;
  font-weight: 500;
}

.spec-badge.lot-badge,
.csp-badge.volume {
  background-color: var(--status-info-bg);
  border-color: var(--status-info-border);
  color: var(--status-info-text);
  font-weight: 600;
}

.spec-badge.iso-badge,
.csp-sale {
  background-color: var(--status-success-bg);
  border-color: var(--status-success-border);
  color: var(--status-success-text);
  font-weight: 600;
}

.spec-badge.spec-alert {
  background-color: var(--status-danger-bg);
  border-color: var(--status-danger-border);
  color: #C5221F;
}

.spec-badge.sample-tag {
  background-color: #f1f3f5;
  border-color: #e9ecef;
  color: #495057;
}

/* Status pills */
.status-pill {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}
.status-in-stock {
  color: var(--status-success-text);
  background-color: var(--status-success-bg);
  border: 1px solid var(--status-success-border);
}
.status-limited {
  color: var(--status-warning-text);
  background-color: var(--status-warning-bg);
  border: 1px solid var(--status-warning-border);
}
.status-out-of-stock {
  color: var(--status-danger-text);
  background-color: var(--status-danger-bg);
  border: 1px solid var(--status-danger-border);
}

/* Action links / buttons */
.add-to-cart,
.backorder,
.more-info.btn,
button.more-info,
.reorder,
.reset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.add-to-cart, .reorder, .more-info { color: var(--brand-accent-blue); }
.backorder, .reset { color: var(--status-warning-text); }

/* Cart table */
#cart thead th {
  background-color: var(--surface-alt);
  font-size: 13px;
  text-transform: uppercase;
}
#cart th:nth-child(3), #cart td:nth-child(3),
#cart th:nth-child(4), #cart td:nth-child(4) { text-align: right; }
#cart th:nth-child(5), #cart td:nth-child(5) { text-align: center; }
#cart td:first-child { color: var(--brand-accent-blue); font-weight: 600; }

#cart .remove {
  background: transparent !important;
  border: none !important;
  color: var(--status-danger-text) !important;
  font-weight: 700;
  cursor: pointer;
}
[data-theme="dark"] #cart .remove { color: #FF6B6B !important; } /* brighter red for contrast */
[data-theme="dark"] #cart .remove:hover { background-color: rgba(255, 107, 107, 0.15) !important; }

#cart tfoot tr td {
  background-color: var(--surface-alt);
  border-top: 2px solid var(--brand-border-light);
}

/* Quantity input inside the cart table */
#cart .cart-qty-input {
  width: 70px !important;
  height: 38px !important;
  padding: 4px 8px !important;
  background-color: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: 6px !important;
  color: var(--color-heading) !important;
  font-family: var(--font-sans) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  text-align: center !important;
}

/* Update-cart / small buttons */
#cart tfoot .btn,
#cart .btn-sm,
.modal-footer button {
  display: inline-block !important;
  width: auto !important;
  height: 38px;
  padding: 6px 16px;
  background-color: var(--surface-alt);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  color: var(--color-heading);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
#cart tfoot .btn:hover { background-color: var(--brand-border-light); }

/* Hide the mini-cart on the cart page */
body.cart-view-page .mini-cart-widget { display: none !important; }


/* ==========================================================================
   10. MODALS & MINI-CART
   ========================================================================== */

.modal {
  position: fixed !important;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1050 !important;
  display: none;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.5);
}
.modal.in,
.modal.show { display: block !important; overflow-y: auto !important; }

.modal-dialog {
  position: relative !important;
  z-index: 1051 !important;
  width: 90%;
  max-width: 800px;
  margin: 30px auto !important;
}

.modal-content {
  display: flex;
  flex-direction: column;
  background-color: var(--surface-bg);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.modal-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 1.25rem 1.5rem !important;
  border-bottom: 1px solid var(--brand-border-light) !important;
}
.modal-title {
  margin: 0 !important;
  color: var(--color-heading) !important;
  font-size: 20px !important;
}
.modal-header .close {
  background: transparent !important;
  border: 0 !important;
  color: var(--color-heading);
  font-size: 24px !important;
  font-weight: bold;
  line-height: 1;
  opacity: 0.5;
  cursor: pointer;
}
.modal-body {
  max-height: calc(100vh - 200px);
  padding: 1.5rem !important;
  overflow-y: auto !important;
}
.modal-footer {
  padding: 1rem 1.5rem !important;
  border-top: 1px solid var(--brand-border-light) !important;
  text-align: right !important;
}

/* Quantity spinner */
.qty-spinner {
  display: inline-flex !important;
  align-items: center !important;
  width: 140px !important;
  height: 38px !important;
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: 6px !important;
  overflow: hidden !important;
}
.qty-spinner .qty-input {
  width: 50px !important;
  height: 38px !important;
  background: transparent !important;
  border: none !important;
  color: var(--color-heading) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-align: center !important;
}
.qty-spinner .btn-qty {
  width: 45px !important;
  height: 38px !important;
  background: var(--surface-alt) !important;
  border: none !important;
  color: var(--color-heading) !important;
  cursor: pointer !important;
}
.qty-picker-container { margin-top: 1em; }

/* Mini-cart widget */
.mini-cart-widget {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 1040 !important;
  display: flex;
  flex-direction: column;
  width: 320px !important;
  max-height: 420px !important;
  background: var(--surface-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Nudged up and faded when it would overlap the footer */
.mini-cart-widget.footer-avoid {
  transform: translateY(-80px);
  opacity: 0.4;
  pointer-events: none; /* clicks pass through */
}

.mini-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--color-heading);
  color: var(--brand-white);
  font-size: 14px;
  font-weight: 600;
}
.mini-cart-actions { display: flex; gap: 6px; }
.mini-cart-toggle {
  background: transparent;
  border: none;
  color: var(--brand-white);
  font-size: 18px;
  cursor: pointer;
}
.mini-cart-close {
  padding: 0 4px;
  background: transparent;
  border: none;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.mini-cart-close:hover { opacity: 0.7; }

.mini-cart-body {
  max-height: 240px;
  padding: 12px 16px;
  background: var(--surface-alt);
  overflow-y: auto;
}
.mini-cart-list { list-style: none; margin: 0; padding: 0; }
.mini-cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--brand-border-light);
  font-size: 13px;
}
.mini-cart-footer {
  padding: 12px 16px;
  background: var(--surface-bg);
  border-top: 1px solid var(--brand-border-light);
  text-align: center;
}

.btn-view-cart {
  display: block;
  width: 100%;
  padding: 8px 0;
  background: var(--btn-cart-bg, var(--brand-accent-blue));
  border-radius: 6px;
  color: #fff;
  font-weight: 600;
  text-align: center;
}
.btn-view-cart:hover { filter: brightness(1.15); color: #fff !important; }


/* ==========================================================================
   11. CART, ORDERS & CHECKOUT
   ========================================================================== */

#add-to-cart {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  height: 38px;
  padding: 6px 16px;
  background-color: var(--color-medium-navy) !important;
  border: none;
  border-radius: 6px;
  color: #FFFFFF !important; /* white in both light and dark modes */
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}
#add-to-cart:hover {
  background-color: var(--color-dark-navy) !important;
  color: #FFFFFF !important;
}

/* Cart action buttons (prevents full-width stretch) */
.cart-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 2rem;
}

.cart-actions .btn,
.cart-actions a.btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  height: auto;
  min-height: 48px;
  padding: 10px 24px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Primary checkout button */
.cart-actions .btn-success,
.cart-actions .btn-primary {
  background-color: var(--color-medium-navy) !important;
  border: none !important;
  color: var(--white-white);
}
.cart-actions .btn-success:hover,
.cart-actions .btn-primary:hover {
  background-color: var(--color-dark-navy) !important;
}

/* Secondary "Request a quote" button */
.cart-actions .btn-outline-secondary {
  background: transparent !important;
  border: 2px solid var(--brand-border-light) !important;
  color: var(--color-heading) !important;
}
.cart-actions .btn-outline-secondary:hover {
  background: var(--surface-alt) !important;
  border-color: var(--color-heading) !important;
}

/* Order history card */
.order-wrap {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background-color: var(--surface-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.order-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.order-title {
  margin-top: 0;
  margin-bottom: 0.25rem;
  color: var(--color-heading);
  font-size: 1.25rem;
  font-weight: 500;
}
.order-date {
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.order-wrap .reorder.btn {
  display: inline-flex !important;
  justify-content: center;
  align-self: flex-start;
  flex: initial !important; /* don't stretch inside the flex row */
  width: auto !important;
  max-width: fit-content !important;
  padding: 8px 16px;
  background-color: var(--color-medium-navy);
  border: none;
  border-radius: 8px;
  color: #FFFFFF !important;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.order-wrap .reorder.btn:hover { background-color: var(--color-dark-navy); }

.address-card {
  padding: 1.5rem;
  background-color: var(--surface-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Shipping / billing tables */
.shipping-information tr,
.billing-information tr {
  border-bottom: 1px solid var(--input-border);
  font-size: 14px;
}
.shipping-information th,
.billing-information th { font-size: 16px; }
.shipping-information td,
.billing-information td {
  padding: 12px;
  color: var(--color-body);
  vertical-align: top;
}
.shipping-information strong,
.billing-information strong { font-size: 15px; }

/* Checkout */
#checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
#checkout-total,
#checkout-cart {
  width: 100%;
  margin-top: 1rem;
  padding-top: 2em;
  border-top: 2px solid var(--brand-copper);
}

/* Contract/PO details (dims when disabled) */
#ccpo-details {
  border-color: var(--brand-copper);
  border-width: 2px;
  transition: border-color 2s, border-width 1s;
}
#ccpo-details.disabled {
  position: relative;
  border-color: var(--input-border);
  border-width: 1px;
  color: #333;
}
#ccpo-details.disabled::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: var(--brand-white);
  border-radius: 6px;
  opacity: 0.4;
}
#ccpo-details.disabled label { color: var(--color-cc-disabled); }

/* SnapPay */
.snappaygif img { width: 24px; height: 24px; object-fit: contain; }
.snappay-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  color: var(--color-heading);
  font-size: 13px;
}
#ccerr .snappay-notice { display: block; }


/* ==========================================================================
   12. PRODUCT SEARCH & CATALOGS
   ========================================================================== */

/* Product search result card */
.product-search-card {
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.product-search-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  font-size: 16px;
}
.product-search-card-sku {
  margin-right: 0.25em;
  color: var(--color-gr6);
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.product-search-card-header .badge {
  padding: 4px 8px;
  background: var(--surface-alt);
  border: 1px solid var(--input-border);
  border-radius: 4px;
  color: var(--color-heading);
  font-size: 12px;
}
.product-search-card h3 {
  color: var(--color-body);
  font-size: 16px;
  font-weight: 500;
}
.product-search-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--brand-border-light);
  font-size: 16px;
}

.price-disclaimer {
  margin-top: 12px;
  border-left: 5px solid;
  border-color: var(--brand-heading-dark);
  font-size: 14px;
}
.price-disclaimer p { padding: 8px 0 8px 12px; }
.master-price { color: var(--color-muted); font-size: 12px; line-height: 1; }

/* Search layout */
.leco-search-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px;
  margin-top: 20px;
}

/* Flat sidebar matching the main LECO site */
.leco-filter-sidebar {
  flex: 1 1 260px;
  padding: 0;
  background-color: transparent;
  border: none;
  border-radius: 0;
}

.leco-results-main {
  flex: 3 1 600px;
  min-width: 0;
}

.filter-sidebar-title {
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--brand-border-light);
  color: var(--color-heading);
  font-size: 20px;
  font-weight: 500;
}

.filter-group { margin-bottom: 24px; }
.filter-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.filter-group-label {
  color: var(--color-heading);
  font-size: 14px;
  font-weight: 600;
}

.filter-actions {
  padding: 0;
  background: none;
  border: none;
  color: var(--brand-accent-blue);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}
.filter-actions + .filter-actions::before {
  content: " | ";
  color: var(--color-body);
  text-decoration: none;
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 450px;
  padding-right: 4px;
  overflow-y: auto;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--burnt-copper);
  font-size: 14px;
  cursor: pointer;
}
.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-medium-navy);
  cursor: pointer;
}

/* Live pagination */
.leco-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  padding: 0;
  list-style: none;
}
.leco-pagination button,
.leco-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  background-color: var(--surface-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: var(--color-heading);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.leco-pagination button:hover { background-color: var(--surface-alt); }
.leco-pagination .active span,
.leco-pagination button.active {
  background-color: var(--color-medium-navy);
  border-color: var(--color-medium-navy);
  color: var(--white-white);
}

button[aria-disabled="true"] {
  color: #aaaaaa;
  text-decoration: none;
  cursor: not-allowed;
  pointer-events: none; /* disables clicks and hover */
}

@media (max-width: 768px) {
  .leco-search-layout { flex-direction: column; }

  .leco-filter-sidebar,
  .leco-results-main {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* "Show out-of-stock" toggle switch */
.stock-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-heading, #333);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

/* Default: gray track (out-of-stock hidden) */
.toggle-switch-ui {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
  background-color: #ccc;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background-color 0.2s ease;
}

/* Handle */
.toggle-switch-ui::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

/* Checked: blue track (out-of-stock shown) */
.sr-only-input:checked + .toggle-switch-ui {
  background-color: var(--brand-accent-blue, #0056b3);
}
.sr-only-input:checked + .toggle-switch-ui::after { transform: translateX(20px); }

/* Keyboard focus ring */
.sr-only-input:focus-visible + .toggle-switch-ui {
  outline: 2px solid var(--brand-accent-blue, #0056b3);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.25);
}

/* High-contrast / forced-colors mode */
@media (forced-colors: active) {
  .toggle-switch-ui { border: 1px solid ButtonText; }
  .sr-only-input:checked + .toggle-switch-ui::after { background-color: Highlight; }
}

.disclaimer-toggle-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.no-match { padding: 20px; color: var(--color-muted); text-align: center; }

/* Home search */
form.home-search-form { margin-top: 1.5rem; }
form.home-search-form div { display: flex; gap: 10px; max-width: 100%; }
form.home-search-form input {
  flex: 5;
  padding: 12px 16px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: var(--color-heading);
}
form.home-search-form button {
  flex: 1;
  padding: 12px 24px;
  border-radius: 8px;
  white-space: nowrap;
}

/* Catalogs hub */
.leco-catalogs-hub {
  display: flex;
  flex-wrap: wrap;
  gap: var(--layout-block-gap, 2rem);
}
.leco-catalogs-hub .leco-split-left { flex: 1 1 calc(35% - (var(--layout-block-gap, 2rem) / 2)); }
.leco-catalogs-hub .leco-split-right { flex: 1 1 calc(65% - (var(--layout-block-gap, 2rem) / 2)); }

@media (max-width: 992px) {
  .leco-catalogs-hub .leco-split-left,
  .leco-catalogs-hub .leco-split-right {
    flex: 1 1 100% !important;
  }
}

/* Catalog category cards */
.leco-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.leco-catalog-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  background: var(--color-bg);
  border: 1px solid var(--border-color, #e5e5e5);
  border-radius: var(--border-radius, 6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  color: var(--color-muted);
  font-size: 0.9em;
}
.leco-catalog-card .spec-badges { margin-bottom: 1.1rem; }

.leco-card-links {
  margin: 0 0 1rem 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}
.leco-card-links li { margin-bottom: 0.35rem; }

.leco-catalog-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 0.875rem;
  background-color: var(--color-medium-navy);
  border-radius: var(--border-radius-sm, 4px);
  color: var(--white-white);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.leco-catalog-btn:hover {
  background-color: var(--color-dark-navy);
  color: #fff;
  text-decoration: none;
}

.catalog-assistance {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--brand-copper-dark);
  color: var(--color-muted);
  font-size: smaller;
}


/* ==========================================================================
   13. CONTACT PAGE LAYOUT
   ========================================================================== */

.leco-split-block.leco-contact-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--layout-block-gap, 32px);
}

/* Form on the right (62%), info on the left (38%) */
.leco-contact-layout .leco-split-left { flex: 1 1 calc(38% - (var(--layout-block-gap, 32px) / 2)); }
.leco-contact-layout .leco-split-right { flex: 1 1 calc(62% - (var(--layout-block-gap, 32px) / 2)); }

@media (max-width: 768px) {
  .leco-contact-layout .leco-split-left,
  .leco-contact-layout .leco-split-right,
  .split-50 .leco-split-left,
  .split-50 .leco-split-right {
    flex: 1 1 100% !important;
  }
}

/* Contact details */
.leco-contact-layout .contact-item { margin-bottom: 1.5rem; }
.leco-contact-layout .contact-item h2 {
  margin-bottom: 0.375rem;
  color: var(--color-heading);
  font-size: 20px;
  font-weight: 400;
}

.leco-contact-layout address,
.leco-contact-layout .contact-item p,
.leco-contact-layout .contact-item ul {
  margin-bottom: 0;
  color: var(--color-body);
  font-size: 16px;
  font-style: normal;
}
.leco-contact-layout .contact-item ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Custom form grid */
.leco-contact-layout .form-row-custom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--form-gap, 16px);
  box-sizing: border-box;
}
.leco-contact-layout .form-col-12 { flex: 1 1 100%; box-sizing: border-box; }
.leco-contact-layout .form-col-6 {
  flex: 1 1 calc(50% - (var(--form-gap, 16px) / 2));
  box-sizing: border-box;
}
/* 3-column calculation that avoids wrapping issues */
.leco-contact-layout .form-col-4 {
  flex: 1 1 calc(33.333% - ((var(--form-gap, 16px) * 2) / 3));
  min-width: 130px;
  box-sizing: border-box;
}

@media (max-width: 576px) {
  .leco-contact-layout .form-col-6,
  .leco-contact-layout .form-col-4 {
    flex: 1 1 100% !important;
  }
}

/* Form controls */
.leco-contact-layout label.form-label {
  display: block;
  margin-bottom: 6px;
  color: var(--color-heading);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
}

.leco-contact-layout .form-control,
.leco-contact-layout .form-select {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  box-sizing: border-box;
  color: var(--color-heading);
  font-family: var(--font-sans);
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.leco-contact-layout .form-select {
  padding-right: 40px;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 16px center;
  appearance: none;
  -webkit-appearance: none;
}

.leco-contact-layout textarea.form-control { min-height: 120px; resize: vertical; }

.leco-contact-layout .form-control:focus-visible,
.leco-contact-layout .form-select:focus-visible {
  outline: 4px solid var(--color-focus-ring) !important;
  outline-offset: 1px;
  border-color: var(--color-medium-navy);
}

/* Checkbox / GDPR consent */
.leco-contact-layout .form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 0.5rem;
}
.leco-contact-layout .form-check-input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--color-medium-navy);
  cursor: pointer;
}
.leco-contact-layout .form-check-label {
  color: var(--color-body);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}

/*
 * Primary button: inherits the global .btn-primary styles. These two
 * properties keep it at full size on small screens, where the global
 * rule shrinks .btn-primary to 52px / 16px at <=480px.
 */
.leco-contact-layout .btn-primary {
  height: 60px;
  font-size: 18px;
}


/* ==========================================================================
   14. TOASTS
   ========================================================================== */

#leco-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: calc(100% - 48px);
  max-width: 360px;
}

.leco-toast {
  padding: 14px 18px;
  background-color: var(--surface-bg, #1e1e1e);
  border-left: 5px solid var(--color-medium-navy, #003366);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  color: var(--color-heading, #fff);
  font-size: 14px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.leco-toast.show { opacity: 1; transform: translateY(0); }
.leco-toast.success { border-left-color: #28a745; }
.leco-toast.warning { border-left-color: #ffc107; }


/* ==========================================================================
   15. UTILITIES (keep last)
   ========================================================================== */

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5em; }
.mb-2 { margin-bottom: 1em; }
.mb-3 { margin-bottom: 1.5em; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5em; }
.mt-2 { margin-top: 1em; }
.mt-3 { margin-top: 1.5em; }
.ml-0 { margin-left: 0; }
.ml-1 { margin-left: 0.5em; }
.ml-2 { margin-left: 1em; }
.ml-3 { margin-left: 1.5em; }
.mr-0 { margin-right: 0; }
.mr-1 { margin-right: 0.5em; }
.mr-2 { margin-right: 1em; }
.mr-3 { margin-right: 1.5em; }

.account-overview-links .btn {margin:0.5em;}

/* print-styles */
  .print-only {display:none !important;}
  
  .confirmation-container{max-width: 800px; margin-top: 2rem; margin-bottom: 3rem; border: 1px solid var(--input-border, #ddd); border-radius: 12px; padding: 2.5rem; box-shadow: 0 4px 12px rgba(0,0,0,0.05);}
    
@media print {
    body * {
        visibility: hidden;
        
    }
    body {
        background-color: #fff !important;
        color: #000 !important;
        font-family:Arial, Helvetica, sans-serif;
        font-size:14px;
    }
    .confirmation-container, .confirmation-container * {
        visibility: visible;
        
    }
    .confirmation-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none !important;
        border: none !important;
        max-width: 100% !important;
        margin: 1em 0 0 0 !important;
        padding: 0 !important;
    }

    .print-only {display:block !important;}
    .btn {
        display: none !important;
    }

    h1, h2, h3 {font-size:20px !important; color:#000 !important;}

    th {font-size:16px;  color:#000 !important;}

    .cart-actions, .no-print {
        display: none !important;
    }
    #order-notice {font-family:'Courier New', Courier, monospace;font-size:12px;}
}