/* =========================================================
   Industrial Exchange – "Trusted Industrial" (CAT-ish)
   Palette: Industrial Blue + Equipment Yellow
   Fully replaces prior CSS
   ========================================================= */

:root{
  /* Core */
  --bg: #f3f4f6;            /* light gray paper */
  --surface: #ffffff;       /* cards */
  --surface-2: #eef1f5;     /* sidebar */
  --text: #0f172a;          /* slate 900 */
  --muted: #475569;         /* slate 600 */
  --line: rgba(15, 23, 42, 0.16);

  /* Brand */
  --blue: #0b3a78;          /* industrial blue */
  --blue-2: #164b93;        /* hover blue */
  --yellow: #f4c400;        /* equipment yellow */
  --yellow-2: #ffd21f;      /* hover yellow */
  --danger: #b91c1c;

  /* Sizing */
  --radius: 10px;
  --radius-lg: 12px;
  --max: 1180px;

  /* Shadows */
  --shadow-sm: 0 1px 0 rgba(15,23,42,.05);
  --shadow-md: 0 8px 24px rgba(15,23,42,.08);

  /* Layout */
  --header-h: 64px;
}

/* Base reset-ish */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin:0;
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, #fafbfc 0%, var(--bg) 70%);
}

/* Links */
a{ color: var(--blue); text-decoration: none; }
a:hover{ text-decoration: underline; }

/* Container */
.container{
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

/* =========================================================
   Header
   ========================================================= */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner{
  display:flex;
  align-items:center;
  gap: 14px;
  width: 100%;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .2px;
  color: var(--text);
  text-decoration:none;
}

/* Optional: add a small yellow "badge" look to the brand */
.brand::before{
  content:"";
  width: 10px;
  height: 26px;
  border-radius: 2px;
  background: var(--yellow);
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.12);
}

/* Nav */
.nav{
  display:flex;
  gap: 8px;
  margin-left: auto;
}
.nav-link{
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration:none;
}
.nav-link:hover{
  color: var(--text);
  background: rgba(11,58,120,.08);
  text-decoration:none;
}

/* Mobile "Filters" button */
.menu-btn{
  display:none;
  margin-left: auto;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.menu-btn:hover{
  border-color: rgba(11,58,120,.25);
}

/* =========================================================
   Optional Trust Bar (if you add it under header)
   ========================================================= */
.trustbar{
  background:#fff;
  border-bottom: 1px solid var(--line);
}
.trustbar-inner{
  display:flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px 0;
  color: var(--muted);
  font-size: 13px;
}
.trustbar a{ color: var(--blue); }

/* =========================================================
   Main Layout
   ========================================================= */
.layout{
  display:grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  padding: 18px 0 34px;
}

/* =========================================================
   Sidebar
   ========================================================= */
.sidebar{ position: relative; }

.sidebar-inner{
  position: sticky;
  top: calc(var(--header-h) + 12px);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.sidebar-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 10px;
}
.sidebar h2{
  margin: 0;
  font-size: 18px;
  letter-spacing: .2px;
}

/* Close button only used on mobile modal sidebar */
.close-btn{
  display:none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 10px;
  cursor:pointer;
}
.close-btn:hover{ color: var(--text); }

/* Fields */
.field{
  display:grid;
  gap: 6px;
  margin: 12px 0;
}
.field > span,
.field legend{
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

input, select{
  width:100%;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  outline: none;
}
input:focus, select:focus{
  border-color: rgba(11,58,120,.35);
  box-shadow: 0 0 0 3px rgba(11,58,120,.10);
}

/* Tag box */
fieldset.field{
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}
fieldset.field legend{
  padding: 0 8px;
}
.check{
  display:flex;
  gap: 8px;
  align-items:center;
  margin: 6px 0;
  color: var(--text);
}
.check input{
  width: auto;
  accent-color: var(--blue);
}

/* Filter buttons */
.filter-actions{
  display:flex;
  gap: 10px;
  margin-top: 10px;
}

/* =========================================================
   Content
   ========================================================= */
.content-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 0 6px;
}
.content-header h1{
  margin: 6px 0 2px;
  font-size: 26px;
  letter-spacing: .2px;
}
.muted{ color: var(--muted); }
.small{ font-size: 13px; }

/* =========================================================
   Grid and Cards
   ========================================================= */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

/* Card: "spec sheet" look */
.card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display:flex;
  flex-direction: column;
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease;
}
.card:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: rgba(11,58,120,.22);
}

.thumb{
  aspect-ratio: 16 / 10;
  background: linear-gradient(180deg, rgba(11,58,120,.10), rgba(11,58,120,.02));
  border-bottom: 1px solid var(--line);
}
.thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

.card-body{
  padding: 12px;
  display:flex;
  flex-direction: column;
  gap: 10px;
}

/* Title + price */
.card-top{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 10px;
}
.card h3{
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

/* Price gets a subtle "label" feeling */
.price{
  margin:0;
  font-weight: 900;
  color: var(--text);
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(244,196,0,.28);
  border: 1px solid rgba(15,23,42,.12);
}

.meta{
  margin:0;
  color: var(--muted);
  font-size: 13px;
}

/* Chips */
.chips{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip{
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(15,23,42,.03);
  padding: 4px 8px;
  border-radius: 999px;
}

/* Actions */
.card-actions{
  margin-top: auto;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn{
  display:inline-block;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  letter-spacing: .2px;
  text-decoration:none;
  cursor:pointer;
}
.btn:hover{
  background: var(--blue-2);
  text-decoration:none;
}

/* "Ghost" button becomes a yellow-accent outline */
.btn-ghost{
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover{
  border-color: rgba(244,196,0,.65);
  box-shadow: 0 0 0 3px rgba(244,196,0,.18);
}

/* =========================================================
   Sections and Footer
   ========================================================= */
.section{
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.site-footer{
  background:#fff;
  border-top: 1px solid var(--line);
  padding: 22px 0 40px;
}

/* =========================================================
   Mobile
   ========================================================= */
@media (max-width: 900px){
  .layout{ grid-template-columns: 1fr; }
  .nav{ display:none; }
  .menu-btn{ display:inline-block; }

  /* Sidebar becomes a modal overlay */
  .sidebar{
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(15,23,42,.45);
    display:none;
    padding: 14px;
    z-index: 60;
  }
  .sidebar.open{ display:block; }

  .sidebar-inner{
    position: relative;
    top: 0;
    max-width: 560px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
  }

  .close-btn{ display:inline-block; }
}
