:root {
  --ink: #1a1a1a;
  --muted: #5d635c;
  --teal: #2d7d38;
  --cyan: #3e9749;
  --pale: #edf6ed;
  --line: #d9e2d7;
  --orange: #d9291c;
}

.topbar,
.site-footer {
  background: #202020;
}

.primary,
.quote-btn {
  background: #d9291c;
}

.primary:hover,
.quote-btn:hover {
  background: #b71f15;
}

.product-price,
.detail-price {
  color: #d9291c;
}

.quote-price {
  display: inline-block;
  color: #d9291c;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.3rem;
}

.site-logo,
.footer-brand img {
  display: block;
  width: auto;
  max-width: 160px;
  height: 54px;
  object-fit: contain;
}

.footer-brand img {
  height: 70px;
  margin-bottom: 1rem;
}

.brand-dot {
  background: #d9291c;
}

/* Override inherited reference-theme accents with Lister Petter green and red. */
:root { --teal: #2d7d38; --cyan: #3e9749; --pale: #edf6ed; --ink: #1a1a1a; }
.topbar, .hero, .info-hero, .contact-hero, .site-footer { background: #1a1a1a; }
.primary, .quote-btn, .quote-submit, .help-card button, .woocommerce .button, .woocommerce button.button, .woocommerce a.button { background: #d9291c !important; }
.primary:hover, .quote-btn:hover, .quote-submit:hover, .help-card button:hover { background: #b71f15 !important; }
.brand-dot, .tree .brand-tree strong { background: #2d7d38; color: #fff; }
.eyebrow.dark, .secondary, .product-price, .detail-price, .quote-price { color: #2d7d38; }
.server-catalogue .eyebrow { color: #3e9749; }
.server-category-hero { background: #2b2b2b; }
.server-category-hero .eyebrow,
.server-category-hero h1,
.server-category-hero p { color: #fff; }
.server-sidebar .tree a:hover, .server-sidebar .tree a.active { background: var(--pale); color: var(--teal); }
.server-sidebar .tree .brand-tree strong { background: var(--pale); color: var(--teal); }
.cart-button { background: #d9291c; box-shadow: 0 7px 18px rgba(217, 41, 28, 0.24); }
.cart-button:hover { background: #b71f15; }
.cart-button .quote-count { color: #d9291c; }
.folder:hover, .secondary:hover { border-color: #2d7d38; }
.footer-brand > img { filter: none; }
.footer-payments > small::after { content: 'Contact our team at sales@lpafrica.co.za for product support and quotes.'; }

/* A closed quote drawer must not remain as an invisible full-page click target. */
.drawer-backdrop:not(.open) { display: none !important; }
.drawer-backdrop.open { display: block !important; visibility: visible; pointer-events: auto; }

.header .logo {
  min-width: 160px;
  min-height: 64px;
  background: url("assets/lister-petter-logo-colour.png") left center / contain no-repeat;
}
.header .logo .site-logo { opacity: 0; }

.product-image .part-placeholder,
.detail-image .part-placeholder {
  width: min(58%, 130px);
  height: min(58%, 130px);
  object-fit: contain;
  filter: grayscale(1) contrast(1.5);
  opacity: 0.78;
}

.detail-image .part-placeholder {
  width: min(52%, 220px);
  height: min(52%, 220px);
}

.server-product-grid .product-image img:not(.part-placeholder) {
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  object-fit: contain;
  object-position: center;
  transform: none;
}

.server-product-grid .product-image img[src*="ALPHA-Generator-Engines-LPWX"] {
  transform: scale(1.28);
}

.server-contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.server-contact-layout .tab-body {
  margin: 0;
}

.server-contact-form label {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.server-contact-form input,
.server-contact-form textarea {
  box-sizing: border-box;
  width: 100%;
  border: 2px solid #b8cbb8;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
}

.server-contact-form textarea { resize: vertical; }
.server-contact-form input:focus,
.server-contact-form textarea:focus {
  border-color: #2d7d38;
  outline: 3px solid rgba(45, 125, 56, 0.16);
  outline-offset: 1px;
}
.server-contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-map { display: block; width: 100%; min-height: 280px; margin-top: 20px; border: 0; border-radius: 6px; }

.server-coverage-map { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr); align-items: center; gap: 32px; margin: 42px 0; padding: 34px; border: 1px solid #b8cbb8; border-radius: 8px; background: #f7fbf6; }
.server-coverage-map h2 { margin: 8px 0 12px; color: var(--ink); }
.server-coverage-map p { margin: 0; color: var(--muted); font-size: 18px; font-weight: 700; line-height: 1.45; }
.server-africa-map { min-width: 0; }
.server-africa-map img { display: block; width: 100%; height: auto; border-radius: 8px; box-shadow: 0 12px 24px rgba(16, 48, 53, .16); }

.server-quote-drawer { width: min(100%, 460px); }
.server-quote-drawer .drawer-head { top: 0; }
.server-quote-drawer .close { color: #2d7d38; }
.server-quote-drawer .quote-item button { color: #d9291c; }
.server-quote-drawer .quote-submit { display: block; text-align: center; text-decoration: none; background: #d9291c; }
.server-quote-drawer .quote-submit:hover { background: #b71f15; }
.server-quote-placeholder { display: grid; width: 100%; height: 100%; place-items: center; color: #2d7d38; font-weight: 800; }
.server-quote-empty { margin: 24px 0; }

.server-quote-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 42px; margin: 48px 0 70px; }
.server-quote-form, .server-quote-items-panel { margin: 0; padding: 34px; border: 2px solid #b8cbb8; border-radius: 18px; background: #fff; }
.server-quote-form h2, .server-quote-items-panel h2 { margin-top: 0; color: var(--ink); }
.server-quote-form label { display: grid; gap: 6px; margin-bottom: 14px; color: var(--ink); font-size: 13px; font-weight: 700; }
.server-quote-form input, .server-quote-form textarea { box-sizing: border-box; width: 100%; border: 2px solid #b8cbb8; border-radius: 6px; padding: 10px 12px; color: var(--ink); font: inherit; }
.server-quote-form input:focus, .server-quote-form textarea:focus { border-color: #2d7d38; outline: 3px solid rgba(45, 125, 56, .16); outline-offset: 1px; }
.server-quote-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.server-quote-form .address-fields { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
.server-quote-form .address-fields label:first-child, .server-quote-form .address-fields label:nth-child(2) { grid-column: span 1; }
.server-quote-form textarea { resize: vertical; }
.server-quote-form .consent { display: flex; grid-template-columns: auto 1fr; align-items: flex-start; gap: 8px; font-weight: 500; }
.server-quote-form .consent input { width: auto; margin-top: 3px; }
.server-quote-items-panel { border: 0; background: transparent; padding: 8px 0; }
.server-quote-items-panel .eyebrow { color: #2d7d38; }
.server-quote-items-panel .quote-item { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.server-quote-items-panel .quote-thumb { width: 64px; height: 72px; border-radius: 8px; background: var(--pale); overflow: hidden; }
.server-quote-items-panel .quote-thumb img { width: 100%; height: 100%; object-fit: contain; }
.server-quote-items-panel .quote-item h4 { margin: 0 0 6px; color: var(--ink); font-size: 13px; }
.server-quote-items-panel .quote-item button { border: 0; padding: 0; background: transparent; color: #d9291c; font-size: 12px; cursor: pointer; }
.server-quote-items-panel .quote-item .sku { color: var(--muted); font-size: 11px; }

.server-category-directory { margin: 42px 0 48px; }
.server-category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.server-category-card { display: flex; min-height: 205px; flex-direction: column; justify-content: flex-start; overflow: hidden; border: 2px solid #b9cbb9; border-radius: 12px; background: #fff; padding-top: 24px; box-shadow: 0 3px 10px rgba(26, 74, 35, .06); }
.server-category-card-image { display: grid; height: 96px; place-items: center; overflow: hidden; background: #edf6ed; }
.server-category-card-image img { display: block; width: 100%; height: 100%; padding: 8px; object-fit: contain !important; object-position: center; mix-blend-mode: normal; }
.category-image-engine-parts-blocks img { width: 76% !important; object-fit: contain; padding: 12px; }
.category-image-water-pumps img { width: 58% !important; object-fit: contain; padding: 16px; filter: grayscale(1) contrast(1.35); opacity: .7; }
.server-category-card > div, .server-category-card > .server-category-card-link { margin-left: 24px; margin-right: 24px; }
.server-category-card .eyebrow { margin: 0; color: #2d7d38; font-size: 10px; }
.server-category-card h3 { margin: 22px 0 8px; color: var(--ink); font-size: 20px; line-height: 1.15; }
.server-category-card p { margin: 0; color: var(--muted); font-size: 13px; }
.server-category-card-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; color: #2d7d38; font-size: 13px; font-weight: 800; text-decoration: none; }
.server-category-card-link span { font-size: 20px; line-height: 1; }
.server-category-card:hover { border-color: #2d7d38; box-shadow: 0 10px 24px rgba(45, 125, 56, .1); }
.site-footer h3, .site-footer a:hover { color: #3e9749; }
.server-toolbar { position: sticky; }
.server-search-results { position: absolute; z-index: 50; top: calc(100% - 2px); left: 10px; right: 10px; max-height: 420px; overflow-y: auto; border: 2px solid #b9cbb9; border-radius: 0 0 10px 10px; background: #fff; box-shadow: 0 18px 34px rgba(20, 45, 25, .16); }
.server-search-results[hidden] { display: none; }
.server-search-results a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.server-search-results a:last-child { border-bottom: 0; }
.server-search-results a:hover, .server-search-results a.active { background: var(--pale); }
.server-search-results strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.server-search-results span { color: var(--muted); font-size: 12px; }
.server-search-empty { margin: 0; padding: 16px; color: var(--muted); }
.server-category-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .72fr); align-items: center; gap: 24px; }
.server-category-hero-copy { position: relative; z-index: 1; }
.server-category-hero-image { display: grid; min-height: 220px; place-items: center; overflow: hidden; }
.server-category-hero-image img { width: min(100%, 470px); height: 250px; object-fit: contain; mix-blend-mode: normal; filter: saturate(1.05) contrast(1.05) drop-shadow(0 18px 16px rgba(0, 0, 0, .35)); transform: scale(1.4); }

@media (max-width: 900px) { .server-quote-layout { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 700px) { .server-coverage-map { grid-template-columns: 1fr; gap: 22px; padding: 24px; } .server-coverage-map p { font-size: 16px; } }
@media (max-width: 550px) { .server-quote-form, .server-quote-items-panel { padding: 24px; } .server-quote-form .form-row, .server-quote-form .address-fields { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .server-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 550px) { .server-category-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .server-category-hero { grid-template-columns: 1fr; } .server-category-hero-image { min-height: 120px; } .server-category-hero-image img { width: min(100%, 300px); height: 145px; } }
@media (max-width: 550px) { .server-search-results a { grid-template-columns: 1fr; gap: 3px; } }

@media (max-width: 800px) {
  .server-contact-layout { grid-template-columns: 1fr; }
}

.lpafrica-static-shell .header-inner,
.lpafrica-static-shell .topbar-inner {
  width: min(1200px, calc(100% - 48px));
}

.lpafrica-static-shell .main-nav a,
.lpafrica-static-shell .header-actions a {
  text-decoration: none;
}

.lpafrica-home {
  width: min(1200px, calc(100% - 48px));
  margin: 2rem auto 5rem;
}

.lpafrica-home .hero {
  min-height: 390px;
  padding: clamp(2.5rem, 6vw, 5rem);
  border-radius: 8px;
}

.lpafrica-home .hero h1 {
  max-width: 650px;
  margin: 0.75rem 0 1.25rem;
  font-size: clamp(2.5rem, 5vw, 4.75rem);
  line-height: 1.02;
}

.lpafrica-home .hero p {
  max-width: 620px;
  font-size: 1.05rem;
  line-height: 1.65;
}

.lpafrica-home .hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.lpafrica-home .hero-meta span {
  font-size: 0.9rem;
  font-weight: 700;
}

.lpafrica-hero-action,
.lpafrica-catalogue-link .primary {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.85rem 1.15rem;
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.lpafrica-catalogue-link {
  padding: 4rem 0 1rem;
}

.lpafrica-catalogue-link h2 {
  margin: 0.65rem 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.lpafrica-catalogue-link p {
  max-width: 600px;
  font-size: 1rem;
  line-height: 1.6;
}

.lpafrica-range-directory {
  padding: 4rem 0;
}

.lpafrica-range-directory h2,
.lpafrica-contact-band h2 {
  margin: 0.65rem 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.lpafrica-range-directory > p {
  max-width: 690px;
  line-height: 1.6;
}

.lpafrica-range-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.lpafrica-range-grid a {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 4px solid #2d7d38;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.lpafrica-range-grid a:hover {
  border-color: #2d7d38;
  background: #edf6ed;
}

.lpafrica-contact-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.65fr);
  gap: 3rem;
  margin-top: 1rem;
  padding: clamp(2rem, 5vw, 4rem);
  background: #1a1a1a;
  color: #fff;
}

.lpafrica-contact-band p {
  max-width: 620px;
  color: #e4e4e4;
  line-height: 1.65;
}

.lpafrica-contact-band address {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  font-style: normal;
  line-height: 1.5;
}

.lpafrica-contact-band address strong { margin-bottom: 0.25rem; font-size: 1.1rem; }
.lpafrica-contact-band address a { color: #fff; font-weight: 800; text-decoration-color: #d9291c; text-underline-offset: 3px; }

@media (max-width: 760px) {
  .lpafrica-static-shell .topbar { height: auto; padding: 0.65rem 0; }
  .lpafrica-static-shell .topbar-inner { gap: 0.4rem; flex-direction: column; }
  .lpafrica-static-shell .header-inner { height: auto; min-height: 76px; gap: 0.75rem; flex-wrap: wrap; padding: 0.5rem 0; }
  .lpafrica-static-shell .main-nav { order: 3; width: 100%; overflow-x: auto; }
  .lpafrica-static-shell .header-actions { margin-left: auto; }
  .lpafrica-static-shell .icon-btn { display: none; }
  .lpafrica-home { width: min(100% - 28px, 1200px); margin-top: 1rem; }
  .lpafrica-home .hero { min-height: 0; padding: 2rem 1.5rem; }
  .lpafrica-range-grid { grid-template-columns: 1fr; }
  .lpafrica-contact-band { grid-template-columns: 1fr; gap: 1.5rem; padding: 2rem 1.5rem; }
}