/* ═══════════════════════════════════════════════════════════════════════════
   ACG INDUSTRIAL — Global Stylesheet
   AgaCanGroup · Part of the NOVA Platform Ecosystem
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ────────────────────────────────────────────────────────── */
:root {
  --green:      #004D40;
  --green-dk:   #00332B;
  --green-xdk:  #001F1A;
  --green-mid:  #00695C;
  --green-lt:   #E8F5F0;
  --gold:       #C8960C;
  --gold-lt:    #FFF3CD;
  --ink:        #0D1117;
  --text:       #1A2E25;
  --muted:      #5A7A6E;
  --rule:       #C5D8D0;
  --bg:         #F7FAF9;
  --white:      #FFFFFF;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans:  'Geist', system-ui, sans-serif;
  --radius:     8px;
  --radius-lg:  14px;
  --shadow:     0 2px 16px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.18);
  --ease:       cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-sans); font-size: 16px; line-height: 1.65; color: var(--text); background: var(--white); }
img  { max-width: 100%; display: block; }
a    { color: inherit; text-decoration: none; }

/* ── Typography ───────────────────────────────────────────────────────────── */
h1,h2,h3,h4 { font-family: var(--font-serif); line-height: 1.2; color: var(--green-dk); }
h1 { font-size: clamp(2rem,   5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.1rem; }
p  { color: var(--text); max-width: 66ch; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container   { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.section-pad { padding: 80px 0; }
.section-pad-sm { padding: 48px 0; }

/* ── Topbar ───────────────────────────────────────────────────────────────── */
.topbar {
  background: var(--green-xdk);
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  font-family: var(--font-sans);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  height: 30px;
  display: flex;
  align-items: center;
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; }
.topbar-left  { display: flex; align-items: center; gap: 20px; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.topbar a     { color: rgba(255,255,255,0.55); transition: color .2s; }
.topbar a:hover { color: var(--gold); }
.topbar strong  { color: var(--gold); font-weight: 600; }
.topbar .dot    { color: rgba(255,255,255,0.2); }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
  background: var(--green);
  height: 68px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 2px 12px rgba(0,77,64,0.30);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.nav-badge {
  width: 38px; height: 38px;
  background: var(--gold);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-sans);
  font-weight: 800; font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--green-xdk);
  flex-shrink: 0;
}
.nav-wordmark {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--white);
}
.nav-links {
  display: flex; align-items: center;
  gap: 4px; list-style: none;
}
.nav-links a {
  display: block; padding: 8px 16px;
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,0.82);
  border-radius: var(--radius);
  transition: background .2s, color .2s;
}
.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.10);
  color: var(--white);
}
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 20px;
  background: var(--gold);
  color: var(--green-xdk) !important;
  font-weight: 700; font-size: 13.5px;
  border-radius: var(--radius);
  letter-spacing: 0.02em;
  transition: filter .2s, transform .15s;
}
.nav-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.nav-toggle {
  display: none; background: none; border: none;
  cursor: pointer; padding: 6px;
  color: var(--white); font-size: 20px;
}

/* ── Section label ────────────────────────────────────────────────────────── */
.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px;
}
.section-label::before {
  content: ''; display: block;
  width: 28px; height: 2px;
  background: var(--gold); border-radius: 2px;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 14.5px;
  font-weight: 600; cursor: pointer; border: none;
  transition: all .2s var(--ease);
  text-decoration: none; letter-spacing: 0.02em;
}
.btn-primary   { background: var(--gold); color: var(--green-xdk); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-green     { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-mid); transform: translateY(-1px); }
.btn-outline   { background: transparent; color: var(--green); border: 2px solid var(--green); }
.btn-outline:hover { background: var(--green); color: var(--white); }
.btn-outline-white { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.5); }
.btn-outline-white:hover { background: rgba(255,255,255,0.10); border-color: var(--white); }
.btn-lg { padding: 15px 36px; font-size: 16px; }
.btn-sm { padding: 8px 18px; font-size: 13px; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); padding: 28px;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

/* ── Section variants ─────────────────────────────────────────────────────── */
.section-dark     { background: var(--green-dk); color: var(--white); }
.section-dark h1,
.section-dark h2,
.section-dark h3  { color: var(--white); }
.section-dark p   { color: rgba(255,255,255,0.72); }
.section-ink      { background: var(--ink); color: var(--white); }
.section-green-lt { background: var(--green-lt); }
.section-bg       { background: var(--bg); }

/* ── Divider ──────────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--rule); border: none; margin: 0; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer { background: var(--ink); color: rgba(255,255,255,0.65); padding: 64px 0 0; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 48px; }
.footer-badge {
  width: 42px; height: 42px; background: var(--gold); border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: var(--green-xdk); margin-bottom: 14px;
}
.footer-name { font-family: var(--font-serif); font-size: 18px; color: var(--white); margin-bottom: 10px; }
.footer-desc { color: rgba(255,255,255,0.50); font-size: 13.5px; line-height: 1.7; max-width: 280px; }
.footer-nova { margin-top: 18px; font-size: 12px; color: rgba(255,255,255,0.30); letter-spacing: 0.04em; }
.footer-nova a { color: var(--gold); }
.footer-col h4 {
  font-family: var(--font-sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.30); margin-bottom: 18px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255,255,255,0.60); font-size: 13.5px; transition: color .2s; }
.footer-col ul li a:hover { color: var(--gold); }
.footer-contact-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; color: rgba(255,255,255,0.60); font-size: 13.5px; }
.footer-contact-item i { color: var(--gold); margin-top: 3px; font-size: 13px; width: 14px; }
.footer-contact-item a { color: rgba(255,255,255,0.60); transition: color .2s; }
.footer-contact-item a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-bottom-copy { font-size: 12px; color: rgba(255,255,255,0.25); }
.footer-bottom-right { display: flex; gap: 20px; }
.footer-bottom-right a { font-size: 12px; color: rgba(255,255,255,0.30); transition: color .2s; }
.footer-bottom-right a:hover { color: var(--gold); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .nav-links, .nav-right { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--green); padding: 16px 24px 24px;
    gap: 4px; z-index: 899;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .section-pad { padding: 48px 0; }
  .topbar { display: none; }
}

/* ── Scroll to top ────────────────────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s, background .2s;
  z-index: 999;
  pointer-events: none;
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover {
  background: var(--green-mid);
}

/* ── Search button in navbar ─────────────────────────────────────────────── */
.nav-search-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  color: rgba(255,255,255,0.80);
  font-size: 15px;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  margin-right: 4px;
}
.nav-search-btn:hover {
  background: rgba(255,255,255,0.18);
  color: var(--white);
  border-color: rgba(255,255,255,0.30);
}

/* ── Search overlay ──────────────────────────────────────────────────────── */
.search-overlay {
  position: fixed; inset: 0;
  z-index: 1000;
  display: flex; flex-direction: column;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.search-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Backdrop */
.search-overlay-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Panel slides down from top */
.search-overlay-panel {
  position: relative;
  width: 100%; max-width: 720px;
  margin: 80px 24px 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.30);
  transform: translateY(-16px);
  transition: transform .25s var(--ease);
  overflow: hidden;
}
.search-overlay.open .search-overlay-panel {
  transform: translateY(0);
}

.search-overlay-inner { padding: 20px 24px 24px; }

/* Header */
.search-overlay-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.search-overlay-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.search-overlay-close {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: 6px; cursor: pointer;
  font-size: 13px; color: var(--muted);
  transition: background .2s, color .2s;
}
.search-overlay-close:hover { background: var(--rule); color: var(--text); }

/* Input */
.search-overlay-form { margin-bottom: 16px; }
.search-overlay-input-wrap {
  display: flex; align-items: center;
  background: var(--bg);
  border: 2px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s;
}
.search-overlay-input-wrap:focus-within {
  border-color: var(--green);
  background: var(--white);
}
.search-overlay-icon {
  padding: 0 14px;
  color: var(--muted); font-size: 15px;
  flex-shrink: 0;
}
.search-overlay-input {
  flex: 1;
  padding: 14px 0;
  background: transparent;
  border: none; outline: none;
  font-family: var(--font-sans);
  font-size: 16px; color: var(--text);
}
.search-overlay-input::placeholder { color: var(--muted); }
.search-overlay-submit {
  padding: 0 18px;
  background: var(--green); color: var(--white);
  border: none; cursor: pointer;
  font-size: 14px; height: 100%;
  transition: background .2s;
  align-self: stretch;
  display: flex; align-items: center;
}
.search-overlay-submit:hover { background: var(--green-mid); }

/* Hints */
.search-overlay-hints {
  display: flex; align-items: center;
  flex-wrap: wrap; gap: 8px;
}
.sh-label {
  font-size: 12px; color: var(--muted);
  margin-right: 4px;
}
.sh-hint {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  background: var(--green-lt);
  border: 1px solid var(--rule);
  border-radius: 20px;
  font-size: 12.5px; color: var(--green);
  font-weight: 500;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.sh-hint:hover { background: var(--green); color: var(--white); }
.sh-hint--page {
  background: var(--gold-lt);
  color: var(--text);
  border-color: rgba(200,150,12,0.25);
}
.sh-hint--page:hover { background: var(--gold); color: var(--white); }

/* Keyboard hint */
.search-overlay-inner::after {
  content: 'Press Esc to close';
  display: block;
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}

/* ── RFQ basket button in navbar ─────────────────────────────────────────── */
.nav-rfq-btn {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  color: rgba(255,255,255,0.80);
  font-size: 16px;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  margin-right: 4px;
}
.nav-rfq-btn:hover {
  background: rgba(255,255,255,0.18);
  color: var(--white);
  border-color: rgba(255,255,255,0.30);
}
.rfq-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--gold); color: var(--green-xdk);
  border-radius: 10px; font-size: 10px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ── RFQ Drawer ──────────────────────────────────────────────────────────── */
.rfq-drawer-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.50);
  z-index: 950;
  backdrop-filter: blur(2px);
}
.rfq-drawer-overlay.open { display: block; }

.rfq-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 380px; max-width: 92vw;
  background: var(--white);
  z-index: 951;
  transform: translateX(100%);
  transition: transform .3s var(--ease);
  display: flex; flex-direction: column;
  box-shadow: -4px 0 32px rgba(0,0,0,0.18);
}
.rfq-drawer.open { transform: translateX(0); }

.rfq-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  background: var(--green-dk);
  flex-shrink: 0;
}
.rfq-drawer-title {
  display: flex; align-items: center; gap: 10px;
  color: var(--white); font-weight: 700; font-size: 15px;
}
.rfq-drawer-title i { color: var(--gold); }
.rfq-drawer-count {
  background: var(--gold); color: var(--green-xdk);
  border-radius: 10px; padding: 1px 8px;
  font-size: 11px; font-weight: 800;
}
.rfq-drawer-close {
  background: rgba(255,255,255,0.10); border: none; cursor: pointer;
  color: rgba(255,255,255,0.80); font-size: 16px;
  width: 32px; height: 32px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.rfq-drawer-close:hover { background: rgba(255,255,255,0.20); color: var(--white); }

.rfq-drawer-body {
  flex: 1; overflow-y: auto;
  padding: 0;
}

.rfq-drawer-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 48px 24px; text-align: center;
}
.rfq-drawer-empty i  { font-size: 40px; color: var(--rule); margin-bottom: 16px; }
.rfq-drawer-empty p  { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.rfq-drawer-empty span { font-size: 13px; color: var(--muted); line-height: 1.5; }

.rfq-item-list { list-style: none; padding: 8px 0; }
.rfq-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
  transition: background .15s;
}
.rfq-item:hover { background: var(--bg); }
.rfq-item-img {
  width: 52px; height: 52px; flex-shrink: 0;
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.rfq-item-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.rfq-item-img i { color: var(--muted); font-size: 18px; }
.rfq-item-body { flex: 1; min-width: 0; }
.rfq-item-brand { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.rfq-item-title { font-size: 13px; font-weight: 600; color: var(--green-dk); line-height: 1.3; margin: 3px 0; word-break: break-word; }
.rfq-item-mfr   { font-size: 11.5px; color: var(--muted); }
.rfq-item-qty {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px;
}
.rfq-qty-btn {
  width: 26px; height: 26px;
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: 4px; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.rfq-qty-btn:hover { background: var(--green-lt); border-color: var(--green); }
.rfq-qty-val { font-size: 13px; font-weight: 600; color: var(--text); min-width: 20px; text-align: center; }
.rfq-item-remove {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 13px; padding: 4px;
  margin-top: -2px; flex-shrink: 0;
  transition: color .2s;
}
.rfq-item-remove:hover { color: #c0392b; }

.rfq-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--rule);
  background: var(--bg);
  flex-shrink: 0;
}
.rfq-drawer-summary {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--muted);
  margin-bottom: 12px;
}

/* ── Add to RFQ toggle button states ─────────────────────────────────────── */
.cat-add-rfq[data-added="true"],
.btn-add-rfq[data-added="true"] {
  background: transparent !important;
  color: var(--green) !important;
  border: 1.5px solid var(--green) !important;
}
.cat-add-rfq[data-added="true"]:hover,
.btn-add-rfq[data-added="true"]:hover {
  background: #fff0f0 !important;
  color: #c0392b !important;
  border-color: #c0392b !important;
}
