@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Barlow:wght@400;500;600;700&display=swap');

:root {
  --bg: #0e1114;
  --bg2: #14181d;
  --card: #1b2026;
  --card-hi: #232a32;
  --ink: #e9eef3;
  --muted: #9aa7b4;
  --steel: #8b95a1;
  --brand: #ff6b1a;
  --brand-hi: #ff9a4d;
  --brand-dark: #b34a00;
  --accent: #ffc400;
  --danger: #e05252;
  --ok: #4caf7d;
  --border: #2e353d;
  --border-hi: #454f59;
  --radius: 8px;
  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.5;
  background:
    radial-gradient(1200px 500px at 50% -8%, rgba(255,255,255,0.07), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.014) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, #14181d 0%, #0c0f12 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
a { color: var(--brand-hi); text-decoration: none; }
a:hover { color: var(--brand); text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Header : gunmetal bar ---------- */
.site-header {
  background: linear-gradient(180deg, #2b3138 0%, #1c2127 60%, #14181d 100%);
  border-bottom: 3px solid var(--brand);
  box-shadow: 0 2px 12px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 19px; letter-spacing: 0.08em; text-transform: uppercase; }
.logo:hover { text-decoration: none; color: #fff; }
.logo-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 6px;
  font-family: var(--font-head); font-weight: 700; font-size: 17px; color: #101318;
  background: linear-gradient(135deg, #f2f5f8 0%, #b9c2cb 40%, #7e8894 50%, #d5dbe1 60%, #98a2ad 100%);
  border: 1px solid #5b636d;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), inset 0 -2px 3px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.5);
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}
.logo span { color: var(--brand-hi); }
.site-header nav a { color: #c6d0da; margin-left: 22px; font-weight: 600; font-family: var(--font-head); font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; }
.site-header nav a:hover { color: var(--brand-hi); text-decoration: none; }
.cart-count {
  display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px;
  background: linear-gradient(180deg, var(--brand-hi), var(--brand));
  color: #1a1206; font-size: 12px; font-weight: 800;
  text-align: center; vertical-align: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* ---------- Hero : truck photo + dark steel ---------- */
.hero {
  position: relative;
  color: #fff; padding: 96px 0 88px; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(8,10,12,0.78) 0%, rgba(8,10,12,0.45) 45%, rgba(8,10,12,0.9) 100%),
    url('/images/hero-truck.jpg') center 32% / cover no-repeat,
    #12161a;
  border-bottom: 1px solid #000;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 18px, #131313 18px 36px);
  box-shadow: 0 -1px 0 rgba(0,0,0,0.6);
}
.hero-kicker {
  display: inline-block; font-family: var(--font-head); font-size: 13px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--brand-hi); margin-bottom: 14px;
  border: 1px solid #4a4038; padding: 6px 14px; border-radius: 4px;
  background: rgba(0,0,0,0.35);
}
.hero h1 {
  margin: 0 0 14px; font-size: 46px; line-height: 1.08; font-weight: 700;
  background: linear-gradient(180deg, #ffffff 0%, #cfd8e0 38%, #79838f 50%, #eef2f6 53%, #a7b1bc 78%, #e2e8ee 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.7));
}
.hero p { margin: 0 0 28px; font-size: 18px; color: #c3ced8; max-width: 600px; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }

/* ---------- Photo banner : highway ---------- */
.banner {
  position: relative; padding: 96px 0; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(8,10,12,0.94) 0%, rgba(8,10,12,0.62) 50%, rgba(8,10,12,0.2) 100%),
    url('/images/banner-highway.jpg') center / cover no-repeat,
    #12161a;
  border-top: 1px solid #000; border-bottom: 1px solid #000;
}
.banner::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 18px, #131313 18px 36px);
}
.banner h2 {
  margin: 0 0 12px; font-size: 36px; font-weight: 700;
  background: linear-gradient(180deg, #ffffff 0%, #cfd8e0 38%, #79838f 50%, #eef2f6 53%, #a7b1bc 78%, #e2e8ee 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.7));
}
.banner h2::before { display: none; }
.banner p { margin: 0 0 24px; font-size: 17px; color: #c3ced8; max-width: 520px; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }

/* ---------- Buttons : machined metal ---------- */
.btn {
  display: inline-block; border: 1px solid var(--brand-dark); cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 13px 28px; border-radius: 6px; color: #1c1105;
  background: linear-gradient(180deg, var(--brand-hi) 0%, var(--brand) 48%, #e05e00 52%, var(--brand) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -3px 6px rgba(0,0,0,0.28), 0 4px 12px rgba(0,0,0,0.5);
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}
.btn:hover { filter: brightness(1.08); text-decoration: none; color: #1c1105; }
.btn:active { transform: translateY(1px); box-shadow: inset 0 2px 6px rgba(0,0,0,0.35); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-secondary {
  background: linear-gradient(180deg, #4a545e 0%, #333b44 48%, #23282f 52%, #2e353d 100%);
  border-color: #10141a; color: #e9eef3; text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.btn-secondary:hover { color: #fff; filter: brightness(1.12); }
.btn-outline { background: rgba(255,255,255,0.04); color: var(--brand-hi); border: 2px solid var(--brand); box-shadow: none; text-shadow: none; }
.btn-outline:hover { background: rgba(255,107,26,0.14); color: var(--brand-hi); }
.btn-danger {
  background: linear-gradient(180deg, #e06565 0%, #c0392b 50%, #96281b 100%);
  border-color: #5e150c; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.btn-danger:hover { color: #fff; filter: brightness(1.1); }
.btn-small { padding: 9px 16px; font-size: 13px; }

/* ---------- Sections ---------- */
.section { padding: 44px 0; }
.section h2 {
  margin: 0 0 22px; font-size: 24px; color: var(--ink);
  display: flex; align-items: center; gap: 12px;
}
.section h2::before {
  content: ""; width: 8px; height: 26px; flex: 0 0 auto;
  background: linear-gradient(180deg, var(--brand-hi), var(--brand-dark));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
  clip-path: polygon(0 0, 100% 4px, 100% 100%, 0 calc(100% - 4px));
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }

/* ---------- Product card : steel plate + rivets ---------- */
.card {
  background: linear-gradient(180deg, var(--card-hi) 0%, var(--card) 30%, #161b20 100%);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 6px 16px rgba(0,0,0,0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--brand-dark); box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 10px 24px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,107,26,0.25); }
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle 3.5px at 12px 12px, #7d8792 55%, #20252b 60%, transparent 68%),
    radial-gradient(circle 3.5px at calc(100% - 12px) 12px, #7d8792 55%, #20252b 60%, transparent 68%),
    radial-gradient(circle 3.5px at 12px calc(100% - 12px), #7d8792 55%, #20252b 60%, transparent 68%),
    radial-gradient(circle 3.5px at calc(100% - 12px) calc(100% - 12px), #7d8792 55%, #20252b 60%, transparent 68%);
  opacity: 0.9;
}
.card img { width: 100%; height: 180px; object-fit: cover; background: #0c0f12; border-bottom: 1px solid var(--border); }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-weight: 700; font-size: 16px; margin: 0; font-family: var(--font-body); text-transform: none; letter-spacing: 0; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--brand-hi); }
.card-meta { color: var(--muted); font-size: 13px; }
.card-price {
  font-size: 22px; font-weight: 700; margin-top: auto; font-family: var(--font-head); letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff 20%, #ffb37a 60%, var(--brand) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.card-actions { display: flex; gap: 8px; margin-top: 10px; }
.badge-sample {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 10px, #151515 10px 20px);
  color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
  padding: 4px 10px; border-radius: 4px; text-shadow: 0 1px 2px #000;
  border: 1px solid #000;
}
.badge-out { background: #5b636d; color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 4px; display: inline-block; letter-spacing: 0.06em; }

/* ---------- Category chips : metal plates ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  background: linear-gradient(180deg, #2a3138 0%, #1d232a 100%);
  border: 1px solid var(--border-hi);
  border-radius: 6px; padding: 14px 24px;
  font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 3px 8px rgba(0,0,0,0.4);
}
.chip:hover { border-color: var(--brand); color: var(--brand-hi); text-decoration: none; transform: translateY(-2px); }

/* ---------- Toolbar / forms : dark steel ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px;
  background: linear-gradient(180deg, #20262d, #171c21);
  border: 1px solid var(--border-hi); border-radius: var(--radius); padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 4px 10px rgba(0,0,0,0.35);
}
.toolbar input[type="search"] { flex: 1; min-width: 180px; }
.toolbar select { width: auto; }
.toolbar input[type="search"], .toolbar select, .form input, .form select, .form textarea,
.qty-row input, .cart-table input[type="number"] {
  font-size: 15px; padding: 10px 12px; border-radius: 6px; width: 100%;
  background: #0f1317; border: 1px solid #3a434d; color: var(--ink);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
  font-family: var(--font-body);
}
.toolbar input:focus, .form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: inset 0 2px 5px rgba(0,0,0,0.5), 0 0 0 2px rgba(255,107,26,0.25);
}
.results-count { color: var(--muted); font-size: 14px; }

/* ---------- Product detail ---------- */
.detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  background: linear-gradient(180deg, var(--card-hi), var(--card) 40%, #151a1f);
  border: 1px solid var(--border-hi); border-radius: var(--radius); padding: 28px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 8px 20px rgba(0,0,0,0.45);
  position: relative;
}
.detail img { width: 100%; border-radius: 6px; background: #0c0f12; border: 1px solid var(--border); }
.detail h1 { margin-top: 0; font-size: 30px; }
.detail .price {
  font-size: 34px; font-family: var(--font-head); letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff 20%, #ffb37a 60%, var(--brand) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fitment { white-space: pre-line; background: #0f1317; border: 1px solid var(--border); border-radius: 6px; padding: 12px; color: var(--muted); }
.qty-row { display: flex; gap: 12px; align-items: center; margin: 16px 0; }
.qty-row input { width: 70px; text-align: center; font-size: 16px; padding: 10px; }
.stock-ok { color: var(--ok); font-weight: 700; }
.stock-low { color: var(--accent); font-weight: 700; }
.stock-out { color: var(--danger); font-weight: 700; }

/* ---------- Cart ---------- */
.cart-table { width: 100%; border-collapse: collapse; background: linear-gradient(180deg, #1e242b, #171c21); border: 1px solid var(--border-hi); border-radius: var(--radius); overflow: hidden; box-shadow: 0 6px 16px rgba(0,0,0,0.4); }
.cart-table th, .cart-table td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; }
.cart-table th { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; color: var(--steel); background: rgba(0,0,0,0.3); }
.cart-table img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.cart-table input[type="number"] { width: 64px; padding: 8px; }
.cart-total { text-align: right; font-size: 22px; font-weight: 700; margin: 16px 0; font-family: var(--font-head); letter-spacing: 0.04em; }
.link-danger { color: var(--danger); cursor: pointer; background: none; border: 0; font-size: 14px; padding: 0; }
.link-danger:hover { text-decoration: underline; }

/* ---------- Checkout ---------- */
.checkout-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
.panel {
  background: linear-gradient(180deg, var(--card-hi), var(--card) 40%, #151a1f);
  border: 1px solid var(--border-hi); border-radius: var(--radius); padding: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 8px 20px rgba(0,0,0,0.45);
}
.panel h2 { margin-top: 0; font-size: 19px; }
.form label { display: block; font-weight: 600; font-size: 13px; margin: 12px 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.notice { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; font-weight: 600; border: 1px solid; }
.notice-warn { background: rgba(255,196,0,0.1); border-color: #8a6d00; color: #ffd75e; }
.notice-error { background: rgba(224,82,82,0.1); border-color: #7c2b2b; color: #ff9c9c; }
.notice-ok { background: rgba(76,175,125,0.1); border-color: #2c6e4e; color: #8fe0b4; }
#card-element { border: 1px solid #3a434d; border-radius: 6px; padding: 12px; background: #0f1317; box-shadow: inset 0 2px 5px rgba(0,0,0,0.5); }
.summary-line { display: flex; justify-content: space-between; padding: 6px 0; color: var(--muted); }
.summary-total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 700; border-top: 2px solid var(--border-hi); margin-top: 10px; padding-top: 12px; font-family: var(--font-head); letter-spacing: 0.04em; }
.summary-item { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.summary-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }

/* ---------- Success ---------- */
.success-box {
  text-align: center; padding: 48px 24px;
  background: linear-gradient(180deg, var(--card-hi), var(--card) 40%, #151a1f);
  border: 1px solid var(--border-hi); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 8px 20px rgba(0,0,0,0.45);
}
.success-box .order-no { font-size: 28px; font-weight: 700; color: var(--brand-hi); letter-spacing: 2px; font-family: var(--font-head); }

/* ---------- Admin ---------- */
.admin-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-tabs button {
  padding: 10px 20px; border: 1px solid var(--border-hi); cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase;
  background: linear-gradient(180deg, #2a3138, #1d232a); color: var(--ink); border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.admin-tabs button.active {
  background: linear-gradient(180deg, var(--brand-hi), var(--brand) 55%, #e05e00);
  color: #1c1105; border-color: var(--brand-dark); text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}
.data-table { width: 100%; border-collapse: collapse; background: #171c21; border: 1px solid var(--border-hi); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.data-table th, .data-table td { padding: 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.data-table th { background: rgba(0,0,0,0.35); font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; color: var(--steel); }
.data-table img.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.status-pill { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; border: 1px solid; }
.st-active, .st-paid, .st-completed { background: rgba(76,175,125,0.14); color: #8fe0b4; border-color: #2c6e4e; }
.st-inactive, .st-cancelled { background: rgba(224,82,82,0.14); color: #ff9c9c; border-color: #7c2b2b; }
.st-pending { background: rgba(255,196,0,0.12); color: #ffd75e; border-color: #8a6d00; }
.st-shipped { background: rgba(255,107,26,0.12); color: #ffb37a; border-color: #8a4a00; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.65); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 100; overflow-y: auto; }
.modal {
  background: linear-gradient(180deg, #232a32, #181d23); border: 1px solid var(--border-hi);
  border-radius: var(--radius); padding: 28px; width: 100%; max-width: 640px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.08);
}
.modal h2 { margin-top: 0; }
.login-box { max-width: 420px; margin: 80px auto; }
.img-preview { max-width: 160px; max-height: 160px; border-radius: 8px; border: 1px solid var(--border-hi); margin-top: 8px; display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, #14181d, #0a0d0f);
  border-top: 3px solid var(--brand);
  color: #8b95a1; margin-top: 60px; padding: 36px 0; font-size: 14px;
  position: relative;
}
.site-footer::before {
  content: ""; position: absolute; top: -13px; left: 0; right: 0; height: 10px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 18px, #131313 18px 36px);
}
.site-footer a { color: var(--brand-hi); }
.site-footer strong { color: #fff; font-family: var(--font-head); letter-spacing: 0.06em; text-transform: uppercase; }

@media (max-width: 760px) {
  .detail, .checkout-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .hero { padding: 52px 0 48px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}
