/* Storm Machinery — site-wide assets/style.css */
:root {
  --navy: #0d1b2a; --navy2: #13263a; --ink: #1c2b3a; --muted: #5b6b7c;
  --orange: #f26522; --orange-d: #d9531a; --bg: #f5f7fa; --card: #ffffff;
  --line: #e3e8ee; --ok: #157a4a; --ok-l: #e8f6ef; --warn: #a85a00; --warn-l: #fdf3e7;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', 'Helvetica Neue', Arial, 'PingFang SC', sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ===== header ===== */
.topbar { background: var(--navy); color: #cfd8e3; font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.topbar a { color: #fff; }
header.site { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.nav { display: flex; align-items: center; gap: 26px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--navy); letter-spacing: .3px; }
.logo .mark { width: 38px; height: 38px; background: var(--orange); color: #fff; display: grid; place-items: center; border-radius: 8px; font-size: 20px; }
.logo small { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); letter-spacing: 1.5px; line-height: 1.2; }
.nav .links { display: flex; gap: 22px; margin-left: auto; font-weight: 600; font-size: 14.5px; }
.nav .links a { color: var(--ink); padding: 6px 2px; border-bottom: 2.5px solid transparent; }
.nav .links a.on, .nav .links a:hover { color: var(--orange); border-color: var(--orange); }
.nav .cta { background: var(--orange); color: #fff; padding: 9px 18px; border-radius: 7px; font-weight: 700; font-size: 14px; }
.nav .cta:hover { background: var(--orange-d); }
.burger { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 7px; padding: 7px 11px; font-size: 18px; cursor: pointer; }

/* ===== hero ===== */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 60%, #1b3a5c 100%); color: #fff; padding: 78px 0 86px; }
.hero h1 { font-size: 40px; line-height: 1.25; max-width: 720px; }
.hero h1 b { color: var(--orange); }
.hero p { margin: 18px 0 30px; font-size: 17px; color: #b9c7d6; max-width: 640px; }
.hero .btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 26px; border-radius: 8px; font-weight: 700; font-size: 15px; cursor: pointer; border: none; transition: .15s; }
.btn-o { background: var(--orange); color: #fff; } .btn-o:hover { background: var(--orange-d); }
.btn-w { background: #fff; color: var(--navy); } .btn-w:hover { background: #e9eef4; }
.hero .stats { display: flex; gap: 40px; margin-top: 46px; flex-wrap: wrap; }
.hero .stats div b { display: block; font-size: 26px; color: #fff; }
.hero .stats div span { font-size: 13px; color: #8fa2b5; }

/* ===== sections ===== */
section.pad { padding: 62px 0; }
.sec-head { text-align: center; margin-bottom: 38px; }
.sec-head h2 { font-size: 30px; color: var(--navy); }
.sec-head p { color: var(--muted); margin-top: 8px; }
.grid { display: grid; gap: 20px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }

/* category / product cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: .18s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(13,27,42,.10); }
.thumb { height: 150px; display: grid; place-items: center; font-size: 52px; color: #fff; }
.c-excavator { background: linear-gradient(135deg, #b45309, #f59e0b); }
.c-loader { background: linear-gradient(135deg, #92400e, #d97706); }
.c-bulldozer { background: linear-gradient(135deg, #7c2d12, #ea580c); }
.c-roller { background: linear-gradient(135deg, #374151, #6b7280); }
.c-crane { background: linear-gradient(135deg, #7f1d1d, #dc2626); }
.c-concrete { background: linear-gradient(135deg, #334155, #64748b); }
.c-attachment { background: linear-gradient(135deg, #1e3a5f, #3b82f6); }
.c-truck { background: linear-gradient(135deg, #14532d, #22c55e); }
.c-trailer { background: linear-gradient(135deg, #312e81, #6366f1); }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 16.5px; color: var(--navy); line-height: 1.35; }
.card .meta { font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
.card .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.badge { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.badge.av { background: var(--ok-l); color: var(--ok); }
.badge.sold { background: #eee; color: #888; }
.price { font-weight: 800; color: var(--orange); font-size: 15px; }

/* why us */
.why { display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
.why .item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px 20px; }
.why .item .ic { font-size: 30px; }
.why .item h4 { margin: 10px 0 6px; color: var(--navy); font-size: 16px; }
.why .item p { font-size: 13.5px; color: var(--muted); }

/* banner cta */
.cta-band { background: linear-gradient(120deg, var(--navy), #1b3a5c); color: #fff; border-radius: 14px; padding: 40px 44px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-band h3 { font-size: 24px; }
.cta-band p { color: #b9c7d6; margin-top: 6px; }

/* ===== product detail ===== */
.pd-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; margin-top: 30px; }
.pd-hero { border-radius: 14px; height: 340px; display: grid; place-items: center; font-size: 110px; color: #fff; }
.pd-info h1 { font-size: 27px; color: var(--navy); line-height: 1.3; }
.pd-info .sub { color: var(--muted); margin: 8px 0 16px; }
table.spec { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.spec tr:nth-child(odd) { background: #fafbfc; }
table.spec td { padding: 10px 14px; font-size: 14px; border-bottom: 1px solid var(--line); }
table.spec td:first-child { color: var(--muted); width: 42%; font-weight: 600; }
.pd-desc { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px 26px; margin-top: 30px; white-space: pre-wrap; }
.crumbs { font-size: 13px; color: var(--muted); margin-top: 22px; }
.crumbs a { color: var(--orange); }

/* filter */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0; }
.filters button { padding: 8px 18px; border-radius: 20px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--muted); }
.filters button.on { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ===== forms ===== */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 30px 32px; max-width: 640px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { font-size: 13px; font-weight: 700; color: var(--navy); display: block; margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--orange); }
.hp { position: absolute; left: -9999px; }
.form-msg { margin-top: 12px; font-size: 14px; font-weight: 600; display: none; padding: 10px 14px; border-radius: 8px; }
.form-msg.ok { display: block; background: var(--ok-l); color: var(--ok); }
.form-msg.err { display: block; background: #fdecec; color: #b91c1c; }

/* ===== news ===== */
.article-body { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 34px 38px; white-space: pre-wrap; font-size: 15.5px; }
.art-meta { color: var(--muted); font-size: 13.5px; margin: 6px 0 18px; }
.tag { display: inline-block; background: var(--warn-l); color: var(--warn); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }

/* ===== footer ===== */
footer.site { background: var(--navy); color: #9fb0c2; margin-top: 70px; padding: 50px 0 0; font-size: 14px; }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 34px; padding-bottom: 36px; }
footer.site h5 { color: #fff; font-size: 15px; margin-bottom: 14px; }
footer.site a { display: block; padding: 3px 0; }
footer.site a:hover { color: #fff; }
footer.site .legal { border-top: 1px solid #22354c; padding: 16px 0; font-size: 12.5px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.wa-float { position: fixed; right: 22px; bottom: 22px; background: #25d366; color: #fff; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 27px; box-shadow: 0 6px 18px rgba(0,0,0,.25); z-index: 60; }

@media (max-width: 900px) {
  .g3, .g4, .why { grid-template-columns: repeat(2, 1fr); }
  .pd-grid { grid-template-columns: 1fr; }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 30px; }
}
@media (max-width: 600px) {
  .g2, .g3, .g4, .why, .fgrid { grid-template-columns: 1fr; }
  .nav .links { display: none; position: absolute; top: 66px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 18px 22px; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.08); }
  .nav .links.open { display: flex; }
  .burger { display: block; }
  .nav .cta { display: none; }
}

/* ===== 真实照片（CMS 上传后）===== */
.thumb-img { height: 180px; overflow: hidden; background: #eef1f5; }
.thumb-img img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.card:hover .thumb-img img { transform: scale(1.04); }
.gallery { border-radius: 14px; overflow: hidden; background: #eef1f5; }
.gallery #main-img { width: 100%; height: 380px; object-fit: cover; display: block; }
.gallery-thumbs { display: flex; gap: 8px; padding: 10px; background: #fff; overflow-x: auto; }
.gallery-thumbs img { width: 74px; height: 58px; object-fit: cover; border-radius: 6px; cursor: pointer; opacity: .65; border: 2px solid transparent; flex: 0 0 auto; }
.gallery-thumbs img:hover, .gallery-thumbs img.on { opacity: 1; border-color: var(--orange); }
.pd-desc p { margin-bottom: 14px; }
.article-body p { margin-bottom: 14px; }
