:root {
  --navy: #1b2a41;
  --navy-2: #24364f;
  --steel: #5b6b7a;
  --orange: #e8641b;
  --orange-dark: #cf5410;
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e2e6ea;
  --text: #22303c;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: var(--navy); color: #fff; }
.header-row { display: flex; align-items: center; gap: 28px; padding: 16px 20px; }
.logo { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.logo-mark { background: var(--orange); color: #fff; font-weight: 800; font-size: 22px; padding: 8px 10px; border-radius: 6px; }
.logo-text { font-weight: 700; font-size: 17px; line-height: 1.15; }
.logo-text small { font-weight: 400; font-size: 12px; color: #b9c4d0; letter-spacing: .04em; }
.search-form { flex: 1; display: flex; max-width: 560px; }
.search-form input { flex: 1; padding: 10px 14px; border: 0; border-radius: 5px 0 0 5px; font-size: 15px; }
.search-form button { background: var(--orange); color: #fff; border: 0; padding: 0 22px; border-radius: 0 5px 5px 0; font-size: 15px; font-weight: 600; cursor: pointer; }
.search-form button:hover { background: var(--orange-dark); }
.header-links { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.header-contact { font-size: 13px; color: #d7dee6; text-align: right; }
.header-contact small { color: #93a0ab; }
.cart-link { font-weight: 600; background: var(--navy-2); padding: 10px 16px; border-radius: 6px; }
.cart-link:hover { background: #2d4260; }
.cart-badge { background: var(--orange); border-radius: 10px; padding: 1px 8px; font-size: 13px; margin-left: 4px; }
.cat-nav { background: var(--navy-2); }
.cat-nav-row { display: flex; align-items: stretch; }
.allcat { position: relative; flex-shrink: 0; }
.allcat-btn { height: 100%; background: var(--orange); color: #fff; border: 0; padding: 11px 18px; font-size: 14px; font-weight: 700; cursor: pointer; }
.allcat-btn:hover { background: var(--orange-dark); }
.allcat-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--line); border-radius: 0 0 8px 8px; box-shadow: 0 10px 24px rgba(27,42,65,.18); min-width: 300px; max-height: 70vh; overflow-y: auto; z-index: 60; }
.allcat.open .allcat-menu { display: block; }
.allcat-menu a { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 11px 16px; color: var(--text); font-size: 14px; font-weight: 500; border-bottom: 1px solid var(--bg); }
.allcat-menu a:hover { background: var(--bg); color: var(--orange-dark); }
.allcat-menu span { color: var(--steel); font-size: 12px; }
.cat-links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.cat-links::-webkit-scrollbar { display: none; }
@media (min-width: 861px) {
  .cat-links { justify-content: space-evenly; overflow: hidden; }
  .cat-links.measuring { justify-content: flex-start; }
}
.cat-links a { color: #d7dee6; padding: 11px 14px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.cat-links a:hover, .cat-links a.active { background: var(--navy); color: #fff; }
.cat-links a.cat-hidden { display: none; }
.cat-links a.brands-link { flex-shrink: 0; background: var(--navy); color: #fff; font-weight: 700; border-radius: 4px; margin: 6px 8px 6px 0; padding: 5px 14px; }
.cat-links a.brands-link:hover, .cat-links a.brands-link.active { background: var(--orange); color: #fff; }

/* Hero / USP */
.hero { background: linear-gradient(120deg, var(--navy) 0%, #2d4260 100%); color: #fff; border-radius: 10px; padding: 52px 48px; margin: 24px 0; }
.hero h1 { font-size: 34px; line-height: 1.2; margin-bottom: 12px; }
.hero p { color: #c6d0da; max-width: 560px; margin-bottom: 22px; }
.usp-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 28px; }
.usp { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; font-size: 14px; }
.usp strong { display: block; color: var(--navy); }
.usp span { color: var(--steel); font-size: 13px; }

/* Buttons */
.btn { display: inline-block; padding: 11px 22px; border-radius: 6px; font-weight: 600; font-size: 15px; border: 0; cursor: pointer; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.45); margin-left: 10px; }
.btn-ghost:hover { border-color: #fff; }
.btn-lg { padding: 14px 32px; font-size: 16px; }

/* Sections & grids */
.section-title { margin: 30px 0 14px; font-size: 22px; color: var(--navy); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-head .section-title { margin-bottom: 14px; }
.section-link { font-size: 14px; font-weight: 600; color: var(--orange-dark); white-space: nowrap; }
.section-link:hover { text-decoration: underline; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.cat-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 20px 16px; transition: box-shadow .15s; }
.cat-card:hover { box-shadow: 0 4px 14px rgba(27,42,65,.12); }
.cat-name { display: block; font-weight: 700; color: var(--navy); }
.cat-count { font-size: 13px; color: var(--steel); }
.cat-grid-photo { grid-template-columns: repeat(6, 1fr); }
.cat-card-photo { padding: 14px; text-align: center; }
.cat-card-photo .cat-img { aspect-ratio: 1; background: var(--bg); border-radius: 6px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; overflow: hidden; }
.cat-card-photo .cat-img img { max-width: 80%; max-height: 80%; object-fit: contain; }
.cat-card-photo .cat-name { font-size: 14px; margin-bottom: 2px; }
@media (max-width: 1000px) { .cat-grid-photo { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .cat-grid-photo { grid-template-columns: repeat(2, 1fr); } }
.cat-grid-all { margin-bottom: 40px; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 40px; }
.brand-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; transition: box-shadow .15s; }
.brand-card:hover { box-shadow: 0 4px 14px rgba(27,42,65,.12); }
.brand-name { display: block; font-weight: 700; color: var(--navy); }
.brand-count { font-size: 13px; color: var(--steel); }
.brand-grid-photo { grid-template-columns: repeat(6, 1fr); }
.brand-card-photo { padding: 14px; text-align: center; }
.brand-card-photo .brand-img { aspect-ratio: 1; background: var(--bg); border-radius: 6px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; overflow: hidden; }
.brand-card-photo .brand-img img { max-width: 80%; max-height: 80%; object-fit: contain; }
.brand-card-photo .brand-name { font-size: 14px; margin-bottom: 2px; }
@media (max-width: 1000px) { .brand-grid-photo { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .brand-grid-photo { grid-template-columns: repeat(2, 1fr); } }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 30px; }
.product-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 4px; transition: box-shadow .15s; min-width: 0; overflow-wrap: anywhere; }
.product-card:hover { box-shadow: 0 4px 14px rgba(27,42,65,.12); }
.product-card .card-link { display: block; color: inherit; }
.product-card .card-link:hover .card-title { color: var(--orange-dark); }
.card-img { aspect-ratio: 1; background: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.card-img img { max-height: 100%; object-fit: contain; }
.card-brand { display: inline-block; font-size: 12px; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: .05em; }
a.card-brand:hover { text-decoration: underline; }
.card-title { font-size: 14px; font-weight: 600; color: var(--navy); min-height: 42px; }
.card-meta { font-size: 12px; color: var(--steel); }
.card-price { font-size: 17px; font-weight: 700; color: var(--text); margin-top: auto; }
.card-price small { font-weight: 400; color: var(--steel); }

/* Listing */
.breadcrumbs { font-size: 13px; color: var(--steel); margin: 18px 0 6px; }
.breadcrumbs a { color: var(--steel); text-decoration: underline; }
.page-title { font-size: 26px; color: var(--navy); margin-bottom: 18px; }
.listing-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sort-form label { font-size: 13px; font-weight: 600; color: var(--steel); }
.sort-form select { margin-left: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; background: var(--card); color: var(--text); cursor: pointer; }
.page-title small { font-size: 14px; color: var(--steel); font-weight: 400; }
.pagination { display: flex; gap: 6px; margin: 10px 0 30px; }
.pagination a, .pagination .current { padding: 7px 13px; border: 1px solid var(--line); border-radius: 5px; background: var(--card); font-size: 14px; }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }
.pagination .dots { padding: 7px 4px; color: var(--steel); }
.empty-note { color: var(--steel); padding: 30px 0; }

/* Product page */
.product-page { display: grid; grid-template-columns: minmax(280px, 440px) 1fr; gap: 36px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 28px; margin-bottom: 10px; }
.product-gallery img { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumbs img { width: 64px; height: 64px; object-fit: contain; cursor: pointer; }
.product-info { min-width: 0; overflow-wrap: anywhere; }
.product-info h1 { font-size: 24px; color: var(--navy); margin: 2px 0 6px; }
.product-ids { font-size: 13px; color: var(--steel); margin-bottom: 16px; }
.price-box { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; margin-bottom: 16px; }
.price { font-size: 28px; font-weight: 800; color: var(--navy); }
.pack-note { color: var(--steel); margin-left: 8px; }
.min-order { font-size: 13px; color: var(--orange-dark); font-weight: 600; margin-top: 2px; }
.lead-time { font-size: 13px; color: #22803c; font-weight: 600; margin-top: 4px; }
.freight-note { font-size: 13px; color: var(--orange-dark); font-weight: 600; margin-top: 2px; }
.shipping-note { font-size: 12px; color: var(--steel); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.add-row { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 22px; }
.add-row label { font-size: 13px; color: var(--steel); font-weight: 600; }
.add-row input { display: block; width: 90px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 16px; margin-top: 4px; }
.product-desc, .product-specs { margin-bottom: 20px; }
.product-desc h3, .product-specs h3 { font-size: 16px; color: var(--navy); margin-bottom: 8px; }
.product-specs table { border-collapse: collapse; width: 100%; max-width: 480px; font-size: 14px; }
.product-specs th, .product-specs td { text-align: left; padding: 8px 12px; border: 1px solid var(--line); }
.product-specs th { background: var(--bg); color: var(--steel); font-weight: 600; width: 45%; }

/* Cart & checkout */
.cart-page table, .order-table { width: 100%; border-collapse: collapse; background: var(--card); font-size: 14px; }
.cart-page th, .cart-page td, .order-table th, .order-table td { padding: 12px; border: 1px solid var(--line); text-align: left; }
.cart-page th, .order-table th { background: var(--bg); color: var(--steel); }
.cart-page img { width: 56px; height: 56px; object-fit: contain; }
.cart-qty { width: 70px; padding: 7px; border: 1px solid var(--line); border-radius: 5px; }
.cart-remove { color: #c0392b; background: none; border: 0; cursor: pointer; font-size: 13px; text-decoration: underline; }
.cart-summary-lines { text-align: right; margin-top: 12px; font-size: 14px; color: var(--steel); }
.cart-summary-lines small { color: var(--steel); }
.cart-total { font-size: 18px; font-weight: 700; margin: 8px 0 16px; text-align: right; }
.cart-actions { text-align: right; margin-bottom: 40px; }
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; margin-bottom: 40px; }
.checkout-form { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.checkout-form h3 { color: var(--navy); margin: 14px 0 10px; }
.checkout-form h3:first-child { margin-top: 0; }
.checkout-form label { display: block; font-size: 13px; font-weight: 600; color: var(--steel); margin-bottom: 12px; }
.checkout-form input, .checkout-form textarea { display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 15px; margin-top: 4px; font-family: inherit; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row:has(> :nth-child(3)) { grid-template-columns: 2fr 1fr 1fr; }
.pay-note { background: #fdf3ec; border: 1px solid #f3d5bd; border-radius: 8px; padding: 14px 16px; font-size: 14px; margin: 16px 0 18px; }
.thanks-box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 36px; margin: 30px 0 50px; }
.thanks-box h1 { color: var(--navy); margin-bottom: 10px; }
.thanks-box p { margin-bottom: 8px; }
.order-table { margin: 22px 0; }
.total-row td { font-weight: 700; }

/* Auth & account */
.account-link { font-size: 13px; color: #d7dee6; text-align: left; }
.account-link small { color: #93a0ab; }
.auth-box { max-width: 520px; margin: 36px auto 60px; }
.auth-box h1 { color: var(--navy); margin-bottom: 6px; }
.auth-sub { color: var(--steel); margin-bottom: 14px; }
.auth-form { margin-top: 14px; }
.auth-alt { margin-top: 14px; font-size: 14px; color: var(--steel); }
.auth-alt a { color: var(--orange-dark); text-decoration: underline; }
.form-error { background: #fdecea; border: 1px solid #f5c6c0; color: #a94438; border-radius: 6px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.quote-box { max-width: 620px; }
/* honeypot: invisible to humans, bots fill it in */
.hp-field { position: absolute !important; left: -9999px !important; height: 0; width: 0; opacity: 0; }
.quote-sent { background: #eef6ef; border: 1px solid #cfe6d4; border-radius: 8px; padding: 22px 24px; }
.quote-sent h3 { color: #22803c; margin-bottom: 8px; }
.quote-sent p { margin-bottom: 14px; }
.account-page { margin-bottom: 50px; }
.account-head { display: flex; align-items: baseline; justify-content: space-between; }
.btn-link { color: var(--orange-dark); text-decoration: underline; font-size: 14px; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.account-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; font-size: 14px; }
.account-card h3 { color: var(--navy); margin-bottom: 8px; }
.account-card a { color: var(--orange-dark); text-decoration: underline; }
.muted { color: var(--steel); }
.order-card { margin-bottom: 14px; }
.order-head { display: flex; gap: 14px; align-items: baseline; margin-bottom: 8px; }
.order-status { background: #eef6ef; color: #22803c; border-radius: 4px; padding: 2px 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.order-sum { margin-left: auto; font-weight: 700; }
.order-card .order-table { margin: 0; }
@media (max-width: 700px) { .account-grid { grid-template-columns: 1fr; } }

/* Admin */
.admin-page { margin-bottom: 50px; }
.admin-page .usp strong { font-size: 22px; }
.admin-table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.admin-table-wrap .order-table { margin: 0; font-size: 13px; }

/* Static pages */
.static-page { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 32px 36px; margin: 24px 0 50px; max-width: 820px; }
.static-page h1 { color: var(--navy); margin-bottom: 14px; }
.static-page h3 { color: var(--navy); margin: 20px 0 8px; }
.static-page p, .static-page li { margin-bottom: 8px; }
.static-page ul { padding-left: 22px; }
.contact-table { border-collapse: collapse; margin: 14px 0; }
.contact-table th, .contact-table td { text-align: left; padding: 10px 16px; border: 1px solid var(--line); }
.contact-table th { background: var(--bg); color: var(--steel); }
.contact-table a { color: var(--orange-dark); text-decoration: underline; }

/* Footer */
.site-footer { background: var(--navy); color: #c6d0da; margin-top: 20px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding: 36px 20px 20px; }
.footer-grid h4 { color: #fff; margin-bottom: 10px; }
.footer-grid a { display: block; padding: 3px 0; color: #c6d0da; }
.footer-grid a:hover { color: #fff; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); padding: 14px 20px; font-size: 13px; color: #93a0ab; }

@media (max-width: 860px) {
  .header-row { flex-wrap: wrap; gap: 14px; }
  .search-form { order: 3; min-width: 100%; max-width: none; }
  .header-contact { display: none; }
  .product-page { grid-template-columns: 1fr; padding: 18px; }
  .checkout-grid { grid-template-columns: 1fr; }
  .hero { padding: 34px 24px; }
  .hero h1 { font-size: 26px; }
}

@media (max-width: 700px) {
  .form-row, .form-row:has(> :nth-child(3)) { grid-template-columns: 1fr; gap: 0; }
  .btn-lg { width: 100%; text-align: center; }
  .hero .btn { display: block; margin: 10px 0 0; text-align: center; }
  .btn-ghost { margin-left: 0; }
  /* tables scroll inside their box instead of breaking the page */
  .cart-page table, .order-table { display: block; overflow-x: auto; white-space: nowrap; }
  .checkout-form, .static-page, .thanks-box { padding: 18px; }
  .account-head { flex-wrap: wrap; gap: 8px; }
  .order-head { flex-wrap: wrap; }
}

@media (max-width: 600px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-card { padding: 10px; }
  .card-title { font-size: 13px; min-height: 0; }
  .card-price { font-size: 15px; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .usp-row { grid-template-columns: 1fr 1fr; }
  .page-title { font-size: 21px; }
  .price { font-size: 23px; }
}

/* --- Faceted filters sidebar -------------------------------------- */
.listing-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.filters-sidebar { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; position: sticky; top: 16px; }
.filter-group { padding: 14px 0; border-bottom: 1px solid var(--line); }
.filter-group:first-child { padding-top: 0; }
.filter-group:last-of-type { border-bottom: 0; }
.filter-group h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--steel); margin-bottom: 10px; }
.price-range-inputs { display: flex; align-items: center; gap: 8px; }
.price-range-inputs input { width: 0; flex: 1; border: 1px solid var(--line); border-radius: 5px; padding: 7px 8px; font-size: 14px; }
.price-range-inputs span { color: var(--steel); }
.filter-check { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 5px 0; cursor: pointer; }
.filter-check input { flex-shrink: 0; }
.filter-count { margin-left: auto; color: var(--steel); font-size: 12px; }
.filter-scroll { max-height: 220px; overflow-y: auto; padding-right: 4px; }
.filter-apply { width: 100%; background: var(--orange); color: #fff; border: 0; border-radius: 5px; padding: 10px; font-weight: 700; font-size: 14px; cursor: pointer; margin-top: 14px; }
.filter-apply:hover { background: var(--orange-dark); }
.filter-clear { display: block; text-align: center; margin-top: 10px; font-size: 13px; color: var(--steel); text-decoration: underline; }
.filter-clear:hover { color: var(--orange-dark); }
.listing-main { min-width: 0; }

@media (max-width: 860px) {
  .listing-layout { grid-template-columns: 1fr; }
  .filters-sidebar { position: static; }
  .filter-scroll { max-height: 160px; }
}
