/* FieldFleet design system — modernised */
:root {
  --graphite: #1a1b16;
  --graphite-soft: #2e2f27;
  --concrete: #f0ede8;
  --concrete-dark: #e0dcd3;
  --white: #ffffff;
  --yellow: #e6aa2a;
  --yellow-dark: #c48f18;
  --rust: #b84d22;
  --rust-soft: #fae8e0;
  --steel: #737870;
  --loden: #3d4a30;
  --loden-soft: #e4ead9;
  --font-display: "Oswald", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 10px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --border: 1px solid rgba(0,0,0,0.08);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.14);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--concrete);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 600;
  margin: 0;
  color: var(--graphite);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: var(--font-body); font-size: 15px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- NAV ---------- */
.nav {
  background: var(--graphite);
  border-bottom: 3px solid var(--yellow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.logo i { color: var(--yellow); font-size: 24px; }
.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--yellow); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 22px; cursor: pointer; }
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: var(--border);
  background: var(--white);
  color: var(--graphite);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--yellow); border-color: var(--yellow-dark); color: var(--graphite); }
.btn-primary:hover { background: var(--yellow-dark); }
.btn-dark { background: var(--graphite); border-color: var(--graphite); color: var(--white); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,0.3); color: var(--white); }
.btn-outline-light:hover { border-color: rgba(255,255,255,0.7); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ---------- HERO ---------- */
.hero {
  background: linear-gradient(150deg, #1a1b16 0%, #2e2f27 60%, #3d3e33 100%);
  color: var(--white);
  padding: 72px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(230,170,42,0.08) 0%, transparent 60%);
}
.hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--yellow);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(26px, 5vw, 46px);
  line-height: 1.12;
}
.hero p.sub {
  color: rgba(255,255,255,0.55);
  font-size: 16px;
  margin: 14px 0 36px;
}

/* Search bar */
.search-bar {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 8px 8px 8px 16px;
  display: flex;
  gap: 8px;
  max-width: 740px;
  margin: 0 auto;
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.search-bar select,
.search-bar input {
  border: none;
  padding: 10px 4px;
  font-size: 15px;
  color: var(--graphite);
  background: transparent;
  flex: 1;
  min-width: 120px;
  outline: none;
}
.search-bar select { border-right: 1px solid var(--concrete-dark); padding-right: 8px; }
.search-bar .btn { flex-shrink: 0; border-radius: 10px; }

/* ---------- SECTIONS ---------- */
.section { padding: 52px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-head h2 { font-size: 20px; }
.section-head a { font-size: 13px; color: var(--rust); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- CATEGORY GRID ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.cat-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 14px 18px;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--yellow);
}
.cat-card i { font-size: 28px; color: var(--rust); }
.cat-card .name { font-weight: 600; margin-top: 10px; font-size: 13px; }
.cat-card .count { font-family: var(--font-mono); font-size: 11px; color: var(--steel); margin-top: 3px; }

/* ---------- LISTING CARDS ---------- */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.listing-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.listing-card.featured { border: 2px solid var(--yellow); }
.listing-thumb {
  background: var(--concrete-dark);
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-thumb i { font-size: 44px; color: var(--steel); }
.featured-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--yellow);
  color: var(--graphite);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 100px;
}
.listing-body { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; }
.listing-subcat { font-size: 10px; color: var(--rust); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.listing-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; color: var(--graphite); }
.listing-meta { font-size: 12px; color: var(--steel); margin-bottom: 12px; }
.listing-loc { font-size: 12px; color: var(--steel); margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 4px; }

/* spec plate price tag */
.spec-plate {
  display: inline-flex;
  align-items: center;
  background: var(--graphite);
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  position: relative;
}
.spec-plate::before, .spec-plate::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  top: 5px;
}
.spec-plate::before { left: 5px; }
.spec-plate::after { right: 5px; }

/* ---------- SIDEBAR / FILTERS ---------- */
.layout-with-sidebar { display: flex; gap: 24px; align-items: flex-start; }
.sidebar {
  width: 230px;
  flex-shrink: 0;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 80px;
}
.filter-group { margin-bottom: 20px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group .label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--steel);
  margin-bottom: 8px;
  display: block;
}
.filter-group input[type="text"],
.filter-group select { width: 100%; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 6px; }
.results-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.results-count { font-family: var(--font-mono); font-size: 12px; color: var(--steel); }
@media (max-width: 760px) {
  .layout-with-sidebar { flex-direction: column; }
  .sidebar { width: 100%; position: static; }
}

/* ---------- FORMS ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  border: 1.5px solid var(--concrete-dark);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--white);
  color: var(--graphite);
  transition: border-color 0.15s;
  font-family: var(--font-body);
  font-size: 15px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--yellow);
  outline: none;
}
textarea { resize: vertical; min-height: 90px; }

.upload-box {
  border: 2px dashed var(--concrete-dark);
  border-radius: var(--radius-lg);
  padding: 28px 18px;
  text-align: center;
  color: var(--steel);
  background: var(--white);
  transition: border-color 0.15s;
}
.upload-box:hover { border-color: var(--yellow); }
.upload-box i { font-size: 28px; margin-bottom: 8px; display: block; }

.form-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

.tab-row { display: flex; gap: 6px; margin-bottom: 22px; background: var(--concrete); padding: 4px; border-radius: var(--radius); }
.tab-row .btn { flex: 1; border-radius: 8px; }
.tab-row .btn[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow-dark); box-shadow: var(--shadow-sm); }

/* ---------- DASHBOARD CARDS ---------- */
.metric-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 28px; }
.metric-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.metric-card .label { font-size: 11px; color: var(--steel); text-transform: uppercase; letter-spacing: 0.06em; }
.metric-card .value { font-family: var(--font-mono); font-size: 28px; font-weight: 600; margin-top: 6px; }

.plan-banner {
  background: var(--loden-soft);
  border: 1px solid rgba(61,74,48,0.15);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.table-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s;
}
.table-row:hover { box-shadow: var(--shadow-md); }
.table-row .thumb {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--concrete);
  display: flex; align-items: center; justify-content: center;
  color: var(--steel); flex-shrink: 0; font-size: 20px;
}
.table-row .title { font-weight: 600; font-size: 14px; }
.table-row .price { font-family: var(--font-mono); font-size: 12px; color: var(--steel); }
.table-row .stat { font-size: 12px; color: var(--steel); min-width: 70px; text-align: right; }
.tag { font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 4px 10px; border-radius: 100px; letter-spacing: 0.04em; }
.tag-active { background: var(--loden-soft); color: var(--loden); }
.tag-warn { background: var(--rust-soft); color: var(--rust); }

/* ---------- PRICING ---------- */
.trial-banner {
  background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow-dark) 100%);
  color: var(--graphite);
  text-align: center;
  padding: 14px 0;
  font-weight: 600;
  font-size: 14px;
}
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.plan-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.plan-card:hover { box-shadow: var(--shadow-md); }
.plan-card.popular {
  border: 2px solid var(--yellow);
  position: relative;
  box-shadow: var(--shadow-md);
}
.plan-badge {
  position: absolute; top: -13px; left: 22px;
  background: var(--yellow); color: var(--graphite);
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  padding: 4px 12px; border-radius: 100px;
}
.plan-card .price { font-family: var(--font-mono); font-size: 32px; font-weight: 600; margin: 12px 0 3px; }
.plan-card .price span { font-size: 13px; color: var(--steel); font-weight: 400; }
.plan-card .note { font-size: 12px; color: var(--steel); margin-bottom: 18px; }
.plan-card ul { list-style: none; padding: 0; margin: 0 0 22px; font-size: 13px; }
.plan-card li { padding: 6px 0; display: flex; gap: 8px; align-items: flex-start; border-bottom: 1px solid var(--concrete); }
.plan-card li:last-child { border-bottom: none; }
.plan-card li i { color: var(--loden); margin-top: 2px; }
.seller-row {
  border-top: var(--border);
  padding-top: 28px;
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- LEGAL PAGES ---------- */
.legal h2 { font-size: 16px; margin-top: 30px; margin-bottom: 8px; text-transform: none; }
.legal p, .legal li { font-size: 14px; color: var(--graphite-soft); line-height: 1.7; }
.legal ul { padding-left: 20px; }
.legal .updated { font-size: 12px; color: var(--steel); margin-bottom: 24px; }

/* ---------- GALLERY ---------- */
.gallery-main {
  background: var(--concrete-dark);
  height: 340px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumbs div {
  width: 64px; height: 52px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.gallery-thumbs div:hover { border-color: var(--yellow); }
.gallery-thumbs div img { width: 100%; height: 100%; object-fit: cover; }

/* Spec table */
.spec-table { width: 100%; font-size: 14px; border-collapse: collapse; margin-top: 16px; }
.spec-table td { padding: 10px 0; border-bottom: var(--border); }
.spec-table td:first-child { color: var(--steel); width: 40%; }
.spec-table td:last-child { font-family: var(--font-mono); font-size: 13px; }

/* Seller card */
.seller-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.seller-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--concrete-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
  color: var(--graphite);
}

/* Detail layout */
.detail-grid { display: flex; gap: 28px; flex-wrap: wrap; }
.detail-main { flex: 1.6; min-width: 300px; }
.detail-side { flex: 1; min-width: 260px; }

/* ---------- LIGHTBOX ---------- */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox-overlay.open { display: flex; }
.lightbox-img {
  max-width: 95vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 8px 60px rgba(0,0,0,0.6);
  cursor: zoom-out;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 50%;
  backdrop-filter: blur(4px);
}
.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-counter {
  color: rgba(255,255,255,0.6);
  font-family: var(--font-mono);
  font-size: 13px;
  margin-top: 14px;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--graphite);
  color: rgba(255,255,255,0.5);
  padding: 32px 0;
  margin-top: 48px;
  font-size: 13px;
}
.footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer a { color: rgba(255,255,255,0.5); }
.footer a:hover { color: var(--yellow); }

/* ---------- PHOTO GRID ---------- */
.photo-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.photo-thumb { width: 80px; height: 72px; border-radius: 10px; object-fit: cover; border: var(--border); }

/* ---------- AI BUTTON ---------- */
.ai-btn {
  background: var(--graphite);
  color: var(--yellow);
  border: none;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  transition: opacity 0.15s;
}
.ai-btn:hover { opacity: 0.85; }
.ai-loading { font-size: 12px; color: var(--steel); margin-top: 6px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  .listing-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .listing-thumb { height: 130px; }
  .hero { padding: 48px 0 56px; }
  .form-card { padding: 22px 16px; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}
