/* ============================================================
   Fastflow — Design System
   Clean, professional B2B marketplace styling.
   Single source of truth: no duplicate rules.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --brand:       #e8400c;
  --brand-dark:  #c23208;
  --brand-light: #fff1ec;
  --ink:         #1a1f2e;
  --ink-2:       #3d4455;
  --ink-3:       #6b7385;
  --border:      #e3e7ef;
  --bg:          #f5f7fa;
  --white:       #ffffff;
  --green:       #0e8a4a;
  --green-bg:    #e6f6ee;
  --amber:       #925f00;
  --amber-bg:    #fff6e0;
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow-md:   0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.12);
  --nav-h:       56px;
  --util-h:      36px;
  --cat-h:       44px;
  --header-total: calc(var(--util-h) + var(--nav-h) + var(--cat-h));
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; }

/* ---------- Buttons ---------- */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .55rem 1.15rem;
  cursor: pointer;
  background: var(--white);
  color: var(--ink);
  font-size: .9rem;
  font-weight: 500;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
  white-space: nowrap;
}

button:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
button:active { transform: scale(.98); }

.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
  font-weight: 700;
}
.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

.secondary {
  background: var(--brand-light);
  border-color: #fbc4b0;
  color: var(--brand-dark);
  font-weight: 600;
}
.secondary:hover { background: #ffe0d5; border-color: var(--brand); }

.text-button, .link-button {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  border-radius: 0;
  font-weight: 400;
}
.text-button:hover { color: var(--brand); box-shadow: none; }

/* ---------- Form controls ---------- */
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .6rem .85rem;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(232,64,12,.1);
}
textarea { resize: vertical; }

label {
  display: grid;
  gap: .3rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-2);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* Utility bar */
.utility-bar {
  max-width: 1320px;
  margin: 0 auto;
  height: var(--util-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  font-size: .8rem;
  color: var(--ink-3);
  border-bottom: 1px solid var(--border);
}

.utility-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.utility-links {
  display: flex;
  gap: 1rem;
}

.utility-links button {
  font-size: .8rem;
  color: var(--ink-3);
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}
.utility-links button:hover { color: var(--brand); box-shadow: none; }

/* Language switcher */
.lang-switch { display: flex; gap: .25rem; }

.lang-button {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink-3);
  padding: .15rem .55rem;
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.lang-button.active,
.lang-button:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
  box-shadow: none;
}

/* Main nav */
.main-nav {
  max-width: 1320px;
  margin: 0 auto;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 180px 1fr auto auto;
  align-items: center;
  gap: .75rem;
  padding: 0 1.5rem;
}

.brand-mark {
  display: inline-flex;
  align-items: baseline;
  gap: .1rem;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--brand);
  border-radius: 0;
  letter-spacing: -.5px;
}
.brand-mark:hover { box-shadow: none; color: var(--brand-dark); }
.brand-mark span { color: var(--ink); font-weight: 700; }

/* In-nav search */
.nav-search {
  display: flex;
  align-items: center;
  min-width: 260px; /* keep the input readable; never collapse to a few chars */
  border: 2px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
  transition: border-color .15s;
}
.nav-search:focus-within { border-color: var(--brand); }

.nav-search select {
  width: auto;
  border: none;
  border-right: 1px solid var(--border);
  border-radius: 0;
  padding: .4rem .75rem;
  font-size: .85rem;
  background: #f9fafb;
  color: var(--ink-2);
}
.nav-search select:focus { box-shadow: none; border-color: var(--border); }

.nav-search input {
  border: none;
  border-radius: 0;
  flex: 1;
  padding: .4rem .75rem;
  font-size: .9rem;
}
.nav-search input:focus { box-shadow: none; border-color: transparent; }

.nav-search button {
  border-radius: 0;
  border: none;
  border-left: 1px solid var(--brand);
  padding: .45rem 1.1rem;
  background: var(--brand);
  color: var(--white);
  font-weight: 700;
  font-size: .88rem;
}
.nav-search button:hover { background: var(--brand-dark); box-shadow: none; transform: none; }

.nav-links {
  display: flex;
  gap: .25rem;
}
.nav-links button {
  font-size: .85rem;
  color: var(--ink-2);
  padding: .3rem .6rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
}
.nav-links button:hover { color: var(--brand); background: var(--brand-light); box-shadow: none; }

.nav-actions { display: flex; gap: .5rem; align-items: center; }
.nav-actions button { font-size: .88rem; padding: .45rem 1rem; }

/* Category bar */
.category-bar {
  border-top: 1px solid var(--border);
  background: var(--white);
}

.category-rail {
  max-width: 1320px;
  margin: 0 auto;
  height: var(--cat-h);
  display: flex;
  align-items: center;
  gap: .25rem;
  padding: 0 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-rail::-webkit-scrollbar { display: none; }

.category-rail button {
  flex: none;
  font-size: .82rem;
  padding: .3rem .8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-2);
  white-space: nowrap;
}
.category-rail button:hover,
.category-rail button.active {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
  box-shadow: none;
}

/* ---------- Main content ---------- */
main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

/* ---------- Hero ---------- */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fff8f5 0%, var(--white) 50%, #f5f7ff 100%);
  border: 1px solid #f0d8d0;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  overflow: hidden;
  position: relative;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -80px;
  right: 360px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(232,64,12,.06) 0%, transparent 65%);
  pointer-events: none;
}

.hero-copy { display: flex; flex-direction: column; gap: 1rem; }

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
}

.hero-copy h1 {
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -.02em;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--ink-3);
  max-width: 560px;
}

.hero-search-block { display: flex; flex-direction: column; gap: .6rem; }

.hero-search {
  display: flex;
  border: 2px solid var(--brand);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(232,64,12,.15);
}
.hero-search input {
  border: none;
  border-radius: 0;
  flex: 1;
  padding: .65rem 1rem;
  font-size: .95rem;
}
.hero-search input:focus { box-shadow: none; border-color: transparent; }
.hero-search button {
  border: none;
  border-radius: 0;
  padding: .65rem 1.4rem;
  background: var(--brand);
  color: var(--white);
  font-weight: 700;
}
.hero-search button:hover { background: var(--brand-dark); transform: none; box-shadow: none; }

.hero-highlights {
  font-size: .84rem;
  color: var(--ink-3);
  padding: .5rem .85rem;
  background: var(--brand-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--brand);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}
.hero-actions .primary { padding: .65rem 1.5rem; font-size: .95rem; }
.hero-actions .secondary { padding: .6rem 1.3rem; font-size: .9rem; }
.hero-consult { font-size: .85rem; color: var(--brand); font-weight: 600; }

/* Hero right column */
.hero-right {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.hero-showcase {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 200px;
  flex: none;
}

.hero-showcase img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}

.hero-showcase:hover img { transform: scale(1.04); }

.hero-showcase-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,31,46,.65) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: .85rem 1rem;
}

.hero-showcase-badge {
  background: var(--white);
  border-radius: 999px;
  padding: .3rem .9rem;
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* Hero stats panel */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .65rem;
}

.hero-stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  box-shadow: var(--shadow-sm);
}
.hero-stat strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand);
}
.hero-stat span { font-size: .78rem; color: var(--ink-3); }

/* ---------- Stats strip ---------- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-card strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--brand);
  margin-bottom: .3rem;
}
.stat-card span { font-size: .82rem; color: var(--ink-3); }

/* ---------- Sections ---------- */
.section { margin-bottom: 2.5rem; }

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.section-heading h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.85rem);
  font-weight: 800;
  color: var(--ink);
  margin-top: .25rem;
  letter-spacing: -.02em;
}

.section-heading .eyebrow { margin-bottom: .15rem; }

.section-heading input { max-width: 300px; }

/* ---------- Feature cards ---------- */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.feature-cards article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.feature-cards article:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon, .service-icon { font-size: 1.75rem; line-height: 1; }

.feature-cards strong {
  font-size: .95rem;
  font-weight: 800;
  color: var(--ink);
  display: block;
}

.feature-cards p { font-size: .86rem; color: var(--ink-3); }

/* ---------- Service section (buyer/supplier) ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.service-grid article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-grid h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
}

.service-grid ul {
  padding-left: 1.1rem;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.service-grid li { font-size: .9rem; }

.service-sub { font-size: .84rem; color: var(--ink-3); }

.service-grid button { align-self: flex-start; }

/* ---------- Service cards (core services) ---------- */
.service-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.service-cards article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.service-cards article:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.service-cards strong { font-size: .9rem; font-weight: 700; }
.service-cards p { font-size: .8rem; color: var(--ink-3); }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.product-image {
  width: 100%;
  height: 200px;
  padding: 0;
  border: none;
  border-radius: 0;
  overflow: hidden;
  background: var(--bg);
  cursor: pointer;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.product-image:hover img { transform: scale(1.04); }

.product-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  flex: 1;
}

.product-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
}

.product-title {
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  font-weight: 700;
  font-size: .9rem;
  color: var(--ink);
  cursor: pointer;
  line-height: 1.3;
  border-radius: 0;
}
.product-title:hover { color: var(--brand); box-shadow: none; }

.product-body p { font-size: .8rem; color: var(--ink-3); }

.price { color: var(--brand); font-size: 1.05rem; font-weight: 700; }

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .4rem;
}
.spec-grid div { }
dt { font-size: .7rem; color: var(--ink-3); }
dd { font-size: .8rem; font-weight: 700; margin: 0; }
dl { margin: 0; }

.supplier-line {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  font-size: .78rem;
  color: var(--ink-3);
  border-top: 1px solid var(--border);
  padding-top: .6rem;
}

.card-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.card-actions button { font-size: .8rem; padding: .4rem .8rem; }

/* ---------- Status pills ---------- */
.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: .2rem .6rem;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-pill.good { background: var(--green-bg); color: var(--green); }
.status-pill.warn { background: var(--amber-bg); color: var(--amber); }

/* ---------- Supplier grid ---------- */
.supplier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.supplier-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: .85rem;
  padding: 1.1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.supplier-card:hover { box-shadow: var(--shadow-md); }

.supplier-logo {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--white);
  font-weight: 900;
  font-size: 1rem;
  flex: none;
}

.supplier-head {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  align-items: flex-start;
}

.supplier-card p { font-size: .8rem; color: var(--ink-3); margin-top: .25rem; }

.supplier-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .4rem;
  margin-top: .65rem;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.about-grid p { color: var(--ink-2); margin-bottom: .85rem; font-size: .95rem; }

.about-trust {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  box-shadow: var(--shadow-sm);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink-2);
}

.trust-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green-bg);
  color: var(--green);
  font-weight: 900;
  font-size: .8rem;
  flex: none;
}

/* ---------- Membership ---------- */
.membership-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.membership-grid article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.membership-grid h3 { font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.membership-grid p { font-size: .88rem; color: var(--ink-3); }

/* ---------- AI Functions ---------- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.feature-list article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.feature-list article:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.feature-list h4 {
  font-size: .95rem;
  font-weight: 800;
  margin-bottom: .6rem;
  color: var(--ink);
}
.feature-list p { font-size: .85rem; color: var(--ink-3); }

/* ---------- FAQ ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.faq-grid article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.faq-grid h4 { font-size: .92rem; font-weight: 700; margin-bottom: .5rem; color: var(--ink); }
.faq-grid p { font-size: .86rem; color: var(--ink-3); }

/* ---------- News ---------- */
.news-copy p { color: var(--ink-2); font-size: .95rem; }

/* ---------- Contact ---------- */
.contact-section .section-heading { margin-bottom: 1.25rem; }

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 2rem;
  align-items: start;
}

.contact-details { padding: 1rem 0; }
.contact-details p {
  font-size: .95rem;
  color: var(--ink-2);
  margin-bottom: .75rem;
}

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: .9rem;
}

/* ---------- Dashboard ---------- */
.dashboard .section-heading { margin-bottom: 1rem; }

.small-metric { font-size: .85rem; font-weight: 700; color: var(--ink-3); }

.workspace {
  display: grid;
  grid-template-columns: 220px 1fr 300px;
  gap: 1rem;
  align-items: start;
}

.workspace-card,
.account-card,
.thread-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1rem;
}

.tab-button { font-size: .82rem; padding: .35rem .75rem; }
.tab-button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.record-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: .75rem;
  display: grid;
  gap: .6rem;
}

.record-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .4rem;
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  justify-content: flex-start;
}

.record-actions select { max-width: 160px; }

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .85rem;
  gap: .5rem;
}
.workspace-header h3 { font-size: 1rem; font-weight: 800; }
.workspace-header span { font-size: .8rem; color: var(--ink-3); }

.stack-list, .audit-list, .data-form, .verification-grid {
  display: grid;
  gap: .75rem;
}

.data-form.two-column {
  grid-template-columns: repeat(2, 1fr);
}
.wide { grid-column: 1 / -1; }

.inline-form {
  display: grid;
  gap: .55rem;
  margin-top: .75rem;
}

.stack-list article, .audit-list article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85rem;
  font-size: .85rem;
}

.guest-card {
  background: var(--brand-light);
  border-color: #fbc4b0;
}

.sample-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}

/* ---------- Product detail modal ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
}

.product-detail img {
  height: 220px;
  border-radius: var(--radius-md);
  object-fit: cover;
  width: 100%;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .65rem;
  margin: .85rem 0;
}

/* ---------- Audit ---------- */
.audit-section .audit-list article {
  font-size: .84rem;
  color: var(--ink-2);
}
.audit-list strong { display: block; font-size: .86rem; color: var(--ink); }
.audit-list span { font-size: .76rem; color: var(--ink-3); }
.audit-list p { color: var(--ink-3); margin-top: .25rem; }

/* ---------- Misc helpers ---------- */
.feedback { font-weight: 700; font-size: .88rem; }
.feedback.success { color: var(--green); }
.feedback.error, .error { color: #c0392b; }
.empty-state { color: var(--ink-3); font-size: .88rem; }
.muted, .notice { color: var(--ink-3); font-size: .88rem; }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(10, 15, 30, .55);
  z-index: 200;
  backdrop-filter: blur(2px);
}
.modal.hidden { display: none; }

.modal-content {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink-3);
  border-color: var(--border);
}
.modal-close:hover { color: var(--brand); border-color: var(--brand); box-shadow: none; }

/* ---------- Footer ---------- */
footer {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--ink-3);
  font-size: .85rem;
}

.footer-brand { display: flex; flex-direction: column; gap: .25rem; }
.footer-brand strong { color: var(--ink-2); font-size: .9rem; }

.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links button {
  font-size: .82rem;
  color: var(--ink-3);
  border: 0;
  background: transparent;
  border-radius: 0;
}
.footer-links button:hover { color: var(--brand); box-shadow: none; }

/* ---------- How It Works ---------- */
.how-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
}

.how-step {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.how-step:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.how-step-img {
  height: 175px;
  overflow: hidden;
}
.how-step-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.how-step:hover .how-step-img img { transform: scale(1.05); }

.step-content { padding: 1.25rem 1.35rem 1.5rem; }

.step-num {
  display: block;
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  color: var(--brand);
  margin-bottom: .5rem;
  opacity: .85;
}

.step-content h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: .45rem;
}

.step-content p { font-size: .86rem; color: var(--ink-3); line-height: 1.55; }

.how-connector {
  width: 32px;
  height: 2px;
  background: linear-gradient(to right, var(--border), var(--brand), var(--border));
  border-radius: 2px;
  flex: none;
}

/* ---------- Testimonials ---------- */
.testimonials-section {
  background: linear-gradient(135deg, #fff8f5 0%, var(--white) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid #f0d8d0;
  padding: 2rem 2rem 2.25rem;
  margin-bottom: 2.5rem;
}
.testimonials-section .section-heading { margin-bottom: 1.5rem; }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--brand);
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin: 0;
  transition: box-shadow .2s, transform .2s;
}
.testimonial-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.testimonial-quote-icon {
  font-size: 3rem;
  line-height: .8;
  color: var(--brand);
  font-family: Georgia, serif;
  font-weight: 900;
  opacity: .6;
}

.testimonial-card p {
  font-size: .9rem;
  color: var(--ink-2);
  font-style: italic;
  line-height: 1.65;
  flex: 1;
}

.testimonial-card footer {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}
.testimonial-card footer strong {
  font-size: .88rem;
  font-weight: 700;
  color: var(--ink);
}
.testimonial-card footer span { font-size: .78rem; color: var(--ink-3); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1180px) {
  .feature-cards { grid-template-columns: repeat(2, 1fr); }
  .feature-list   { grid-template-columns: repeat(2, 1fr); }
  .product-grid   { grid-template-columns: repeat(3, 1fr); }
  .service-cards  { grid-template-columns: repeat(3, 1fr); }
  .workspace      { grid-template-columns: 1fr; }
}

/* Below ~1200px the menu + actions crowd the single-row nav and squeeze the
   search field. Drop the search onto its own full-width row so it stays usable. */
@media (max-width: 1200px) {
  .main-nav { grid-template-columns: 1fr auto; grid-template-rows: auto auto; }
  .nav-search { grid-column: 1 / -1; order: 3; }
  .nav-links { display: none; }
}

@media (max-width: 960px) {
  .main-nav { grid-template-columns: 1fr auto; grid-template-rows: auto auto; }
  .nav-search { grid-column: 1 / -1; order: 3; }
  .nav-links { display: none; }
  .hero-section { grid-template-columns: 1fr; }
  .hero-right { flex-direction: row; flex-wrap: wrap; }
  .hero-showcase { flex: 1 1 220px; height: 160px; }
  .hero-stats { flex: 1 1 220px; grid-template-columns: repeat(2, 1fr); }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .membership-grid { grid-template-columns: 1fr; }
  .supplier-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .service-cards { grid-template-columns: repeat(3, 1fr); }
  .how-steps { grid-template-columns: 1fr; }
  .how-connector { display: none; }
  .testimonials-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .utility-bar { display: none; }
  .main-nav { padding: 0 1rem; }
  .category-rail { padding: 0 1rem; }
  main { padding: 1rem 1rem 3rem; }
  .hero-section { padding: 1.5rem; }
  .hero-right { flex-direction: column; }
  .hero-showcase { height: 180px; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .feature-cards { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .service-cards { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .supplier-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .membership-grid { grid-template-columns: 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .record-meta { grid-template-columns: repeat(2, 1fr); }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .supplier-meta { grid-template-columns: repeat(2, 1fr); }
  footer { flex-direction: column; align-items: flex-start; }
  .data-form.two-column { grid-template-columns: 1fr; }
  .testimonials-section { padding: 1.25rem; }
  .step-num { font-size: 2rem; }
}
