/* STW Wholesale — red #C1272D, black, white. Wheel-catalog layout. */
:root {
  --stw-red: #C1272D;
  --stw-red-dark: #961e23;
  --stw-black: #141414;
  --stw-ink: #1a1a1a;
  --stw-gray-700: #3d3d3d;
  --stw-gray-500: #6b6b6b;
  --stw-gray-200: #e6e6e6;
  --stw-gray-100: #f4f4f4;
  --stw-white: #fff;
  --ok: #1e7e34;
  --warn: #8a5a00;
  --shadow: 0 10px 30px rgba(0,0,0,.06);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", system-ui, sans-serif; background: #fff; color: var(--stw-ink); }
img { max-width: 100%; }
a { color: var(--stw-red-dark); }
button, input, select, textarea { font-family: inherit; }

/* ---------- Utility bar + header ---------- */
.util-bar {
  background: #1b1b1b; color: #cfcfcf; font-size: 12px; letter-spacing: .02em;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 28px; flex-wrap: wrap;
}
.util-links { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.util-links a, .util-links button {
  color: #fff; text-decoration: none; background: none; border: 0; padding: 0;
  font-size: 12px; font-weight: 650; cursor: pointer;
}
.util-links a:hover, .util-links button:hover { color: #ffb4b6; }
.util-user { color: #ddd; }
.site-header {
  background: #fff; display: flex; align-items: center; gap: 22px;
  padding: 12px 28px; border-bottom: 3px solid var(--stw-red);
  position: sticky; top: 0; z-index: 30;
}
.logo img { height: 52px; display: block; }
.site-nav { display: flex; gap: 22px; margin: 0 auto; align-items: center; }
.site-nav a { color: var(--stw-ink); text-decoration: none; font-weight: 700; font-size: 15px; }
.site-nav a:hover { color: var(--stw-red); }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; width: 42px; height: 42px; align-items: center; justify-content: center; cursor: pointer; }
.nav-burger span, .nav-burger span:before, .nav-burger span:after {
  display: block; width: 20px; height: 2px; background: var(--stw-ink); position: relative; content: "";
}
.nav-burger span:before { position: absolute; top: -6px; }
.nav-burger span:after { position: absolute; top: 6px; }
.header-cta .btn { white-space: nowrap; }

/* ---------- Hero / homepage ---------- */
.hero-band {
  background: radial-gradient(900px 420px at 78% 40%, #4a1719 0%, #141414 58%);
  color: #fff; display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px;
  align-items: center; padding: 54px 7vw; min-height: 460px;
}
.eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--stw-red); }
.hero-band .eyebrow { color: #ff8d90; }
.hero-band h1 { margin: 0 0 12px; font-size: clamp(34px, 5vw, 58px); line-height: .98; letter-spacing: -.03em; }
.hero-band p { margin: 0; color: #ddd; font-size: 17px; max-width: 520px; line-height: 1.5; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-search { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.hero-search input, .hero-search select {
  background: rgba(255,255,255,.96); border: 0; border-radius: 6px; padding: 11px 12px; min-width: 140px;
}
.wheel-frame { background: #fff; border-radius: 28px; padding: 18px; box-shadow: 0 20px 50px rgba(0,0,0,.28); }
.wheel-frame img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; }
.brand-strip { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 18px 24px; background: var(--stw-gray-100); }
.brand-strip a {
  text-decoration: none; color: var(--stw-ink); background: #fff; border-radius: 999px;
  padding: 8px 14px; font-weight: 750; font-size: 13px; box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.brand-strip a span { color: var(--stw-gray-500); font-weight: 600; }
.page { max-width: 1280px; margin: 0 auto; padding: 36px 28px 10px; }
.section-title { margin: 0 0 18px; font-size: 28px; letter-spacing: -.02em; }
.section-title i { display: block; width: 46px; height: 3px; background: var(--stw-red); margin-top: 8px; font-style: normal; }
.model-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.feature-tile {
  display: block; text-decoration: none; color: inherit; background: #fff; border-radius: 18px;
  overflow: hidden; box-shadow: var(--shadow); border: 1px solid #eee;
}
.feature-tile img { width: 100%; aspect-ratio: 16/10; object-fit: contain; background: #f7f7f7; }
.feature-copy { padding: 18px 20px 22px; }
.feature-copy h3 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.feature-copy p { margin: 0 0 14px; color: var(--stw-gray-500); }
.feed-banner {
  background: #fff8e8; color: #6a4b00; border-bottom: 1px solid #f0e0b2;
  padding: 10px 28px; font-size: 13px;
}

/* ---------- Catalog ---------- */
.catalog-top { display: flex; justify-content: space-between; gap: 16px; align-items: end; flex-wrap: wrap; }
.catalog-top h1 { margin: 0; font-size: 32px; }
.muted { color: var(--stw-gray-500); font-size: 14px; }
.catalog-layout { display: grid; grid-template-columns: 230px 1fr; gap: 28px; align-items: start; }
.filters { background: var(--stw-gray-100); border-radius: 14px; padding: 16px; position: sticky; top: 92px; }
.filters h2 { margin: 0 0 8px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.filters label { margin-top: 10px; }
.filters .btn { width: 100%; margin-top: 12px; text-align: center; }
.wheel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.wheel-card {
  background: #fff; border: 1px solid #eee; border-radius: 16px; padding: 14px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.wheel-photo { display: flex; align-items: center; justify-content: center; background: #fafafa; border-radius: 12px; min-height: 180px; }
.wheel-photo img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.wheel-card h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.wheel-card h3 a { color: inherit; text-decoration: none; }
.wheel-card h3 a:hover { color: var(--stw-red); }
.spec-line { margin: 0; color: #444; font-size: 14px; }
.stock { margin: 0; font-size: 12px; font-weight: 750; }
.stock.in { color: var(--ok); }
.stock.out { color: #8a1f1a; }
.stock.unk { color: var(--warn); }
.finish-row { display: flex; gap: 6px; flex-wrap: wrap; }
.finish-row img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 1px solid var(--stw-gray-200); background: #fff; }
.pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin: 22px 0; }
.pager a { font-weight: 750; text-decoration: none; }

/* ---------- Pricing visibility ---------- */
.price-dealer { font-size: 26px; font-weight: 800; color: var(--stw-red); letter-spacing: -.03em; }
.price-msrp { color: var(--stw-gray-500); font-size: 14px; margin-top: 2px; }
.price-msrp s { margin-right: 6px; }
.tier-pill, .tier-line {
  display: inline-block; margin-top: 6px; background: var(--stw-ink); color: #fff;
  border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700;
}
.tier-line { display: block; width: fit-content; margin-top: 6px; }
.admin-cost { font-size: 13px; color: #6a4b00; margin-top: 4px; }
.price-lock {
  background: #f7f7f7; border: 1px dashed #ccc; border-radius: 10px; padding: 10px 12px; font-size: 14px;
}
.price-lock strong { display: block; margin-bottom: 4px; }
.price-lock-links { display: flex; gap: 12px; flex-wrap: wrap; }
.price-lock-links a { font-weight: 800; text-decoration: none; }
.no-photo {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 180px;
  color: var(--stw-gray-500); font-size: 13px; text-align: center; padding: 12px;
}

/* ---------- Product ---------- */
.pdp { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: start; }
.pdp-photo { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fafafa; border-radius: 18px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumbs button { border: 1px solid var(--stw-gray-200); background: #fff; border-radius: 10px; padding: 4px; cursor: pointer; }
.thumbs img { width: 72px; height: 72px; object-fit: contain; display: block; }
.spec-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.spec-table th, .spec-table td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--stw-gray-200); font-size: 14px; }
.spec-table th { color: var(--stw-gray-500); font-weight: 650; width: 42%; }
.qty-row { display: flex; gap: 8px; margin-top: 14px; align-items: center; }
.qty-row input { width: 80px; }

/* ---------- Brands / about ---------- */
.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.brand-card { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid #eee; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.brand-card img { width: 100%; aspect-ratio: 1.3; object-fit: contain; background: #fafafa; }
.brand-card div { padding: 14px 16px 18px; }
.brand-card h3 { margin: 0; }
.prose { max-width: 680px; line-height: 1.55; }

/* ---------- Shared controls (storefront + admin) ---------- */
.btn { display: inline-block; background: var(--stw-red); color: #fff; border: 0; border-radius: 6px; padding: 10px 18px; font-size: 15px; font-weight: 750; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--stw-red-dark); color: #fff; }
.btn-dark { background: var(--stw-black); }
.btn-dark:hover { background: #333; }
.btn-light { background: #fff; color: var(--stw-ink); }
.btn-light:hover { background: var(--stw-gray-100); color: var(--stw-ink); }
.btn-ghost { background: #fff; color: var(--stw-ink); border: 1px solid var(--stw-gray-200); }
.btn-ghost:hover { background: var(--stw-gray-100); color: var(--stw-ink); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.hero-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.hero-band .btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
label { display: block; font-weight: 650; margin: 12px 0 4px; font-size: 14px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 15px; background: #fff;
}
.form-narrow { max-width: 460px; margin: 40px auto; }
.card { background: #fff; border-radius: 12px; padding: 22px; box-shadow: var(--shadow); margin-bottom: 16px; border: 1px solid #eee; }
main > .card { max-width: 920px; margin-left: auto; margin-right: auto; }
main > .card.form-narrow { max-width: 460px; }
.alert { border-radius: 8px; padding: 12px 14px; margin: 0 0 14px; font-size: 14px; }
.alert-error { background: #fdecea; color: #8a1f1a; }
.alert-ok { background: #e6f4ea; color: #1e7e34; }
.alert-info { background: #eef4fb; color: #1a3f6b; }
.badge { display: inline-block; font-size: 12px; font-weight: 750; border-radius: 999px; padding: 3px 10px; }
.badge-in { background: #e6f4ea; color: var(--ok); }
.badge-out { background: #fdecea; color: #8a1f1a; }
.badge-supplier { background: var(--stw-black); color: #fff; }
table.data { width: 100%; border-collapse: collapse; background: #fff; }
table.data th { background: var(--stw-black); color: #fff; text-align: left; padding: 10px 12px; font-size: 13px; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--stw-gray-200); font-size: 14px; vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
.status { font-weight: 750; text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.status-pending { color: var(--warn); } .status-confirmed { color: #1a56b6; }
.status-shipped { color: var(--ok); } .status-cancelled, .status-suspended { color: #8a1f1a; }
.status-approved { color: var(--ok); }
.inline-form { display: inline; }
.inline-form .btn { margin-right: 6px; }
.cart-thumb { width: 64px; height: 64px; object-fit: contain; background: #fafafa; border-radius: 8px; vertical-align: middle; margin-right: 8px; }

/* ---------- Admin ---------- */
.topbar { background: var(--stw-black); color: #fff; padding: 10px 24px; display: flex; align-items: center; gap: 24px; }
.logo-badge { background: #fff; border-radius: 8px; padding: 4px 12px; display: inline-flex; }
.logo-badge img { height: 48px; display: block; }
.nav { display: flex; gap: 16px; margin-left: auto; align-items: center; }
.nav a { color: #fff; text-decoration: none; font-weight: 700; }
.nav .user { color: #bbb; font-size: 13px; }
.admin-shell { display: flex; min-height: calc(100vh - 72px); background: var(--stw-gray-100); }
.sidebar { width: 220px; background: var(--stw-black); color: #fff; padding: 12px 0; flex-shrink: 0; }
.sidebar a { display: block; color: #ddd; padding: 12px 22px; text-decoration: none; font-weight: 700; }
.sidebar a:hover, .sidebar a.active { background: var(--stw-red); color: #fff; }
.admin-main { flex: 1; padding: 24px; max-width: 1100px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: 10px; padding: 16px; border-left: 5px solid var(--stw-red); }
.stat .num { font-size: 28px; font-weight: 800; }
.stat .lbl { color: var(--stw-gray-500); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tier-edit { display: grid; grid-template-columns: 1.4fr .6fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.tier-edit label { margin: 0; font-weight: 600; }

/* ---------- Footer ---------- */
.footer { background: var(--stw-black); color: #bdbdbd; padding: 28px; margin-top: 28px; font-size: 14px; }
.footer-inner { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; gap: 18px; align-items: center; flex-wrap: wrap; }
.footer img { height: 42px; background: #fff; border-radius: 6px; padding: 3px 8px; }
.footer a { color: #ddd; }

@media (max-width: 1100px) {
  .model-grid, .wheel-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .util-bar, .site-header { padding-left: 16px; padding-right: 16px; }
  .nav-burger { display: flex; margin-left: auto; }
  .site-nav { display: none; }
  .header-cta { display: none; }
  .site-header { flex-wrap: wrap; }
  .nav-toggle:checked ~ .site-nav {
    display: flex; flex-direction: column; gap: 12px; width: 100%;
    padding: 8px 0 12px; margin: 0;
  }
  .hero-band, .pdp, .catalog-layout, .feature-grid { grid-template-columns: 1fr; }
  .hero-band { padding: 32px 16px; min-height: 0; }
  .filters { position: static; }
  .page { padding: 24px 16px 8px; }
  .model-grid, .wheel-grid, .brand-grid { grid-template-columns: 1fr; }
  .tier-edit { grid-template-columns: 1fr; }
  .admin-shell { flex-direction: column; }
  .sidebar { width: 100%; display: flex; overflow-x: auto; }
  .sidebar a { white-space: nowrap; }
}
