/* Naviteq Marine Supply — storefront styles */

:root {
  --navy-900: #071a2f;
  --navy-800: #0d2b48;
  --navy-700: #143a5e;
  --navy-100: #e8eef5;
  --accent: #f08c1e;
  --accent-dark: #cf7310;
  --ink: #1b2733;
  --muted: #5d6b7a;
  --line: #dbe3ec;
  --bg: #f5f7fa;
  --white: #fff;
  --green: #17784f;
  --red: #b4231f;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(7, 26, 47, .06), 0 4px 14px rgba(7, 26, 47, .07);
  --wrap: 1220px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--navy-700); }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--navy-900); }
h1 { font-size: 30px; }
h2 { font-size: 23px; }
h3 { font-size: 17px; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: 0;
  border-radius: var(--radius);
  padding: 11px 22px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: #2a1500; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }
.btn-ghost { background: #fff; color: var(--navy-800); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--navy-700); }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Top / header ---------- */
.topbar {
  background: var(--navy-900);
  color: #b9cadd;
  font-size: 12.5px;
  letter-spacing: .02em;
}
.topbar .wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; padding-top: 7px; padding-bottom: 7px; }
.topbar a { color: #dbe7f3; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar strong { color: #fff; }

.masthead { background: var(--navy-800); }
.masthead .wrap {
  display: flex; align-items: center; gap: 28px;
  padding-top: 16px; padding-bottom: 16px;
}
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; flex: none; }
.logo-mark {
  width: 38px; height: 38px; flex: none;
  border: 2px solid var(--accent); border-radius: 50%;
  display: grid; place-items: center;
  color: var(--accent); font-weight: 700; font-size: 16px; letter-spacing: -.03em;
}
.logo-text { color: #fff; line-height: 1.15; }
.logo-text b { display: block; font-size: 19px; letter-spacing: .01em; }
.logo-text span { display: block; font-size: 10.5px; color: #93b0ca; text-transform: uppercase; letter-spacing: .13em; }

.searchbar { flex: 1 1 auto; display: flex; max-width: 620px; }
.searchbar input {
  flex: 1; min-width: 0; border: 0; border-radius: var(--radius) 0 0 var(--radius);
  padding: 10px 14px; font: inherit;
}
.searchbar button {
  border: 0; border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent); color: #2a1500; font-weight: 600;
  padding: 0 20px; cursor: pointer;
}
.searchbar button:hover { background: var(--accent-dark); }

.cart-link {
  margin-left: auto; flex: none; color: #fff; text-decoration: none;
  display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px;
}
.cart-link:hover { color: var(--accent); }
.cart-count {
  background: var(--accent); color: #2a1500; border-radius: 11px;
  min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}

.mainnav { background: var(--navy-700); }
.mainnav .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.mainnav .wrap::-webkit-scrollbar { display: none; }
.mainnav a {
  color: #dceaf6; text-decoration: none; font-size: 13.5px; font-weight: 500;
  padding: 11px 14px; white-space: nowrap; border-bottom: 3px solid transparent;
}
.mainnav a:hover { background: rgba(255, 255, 255, .09); }
.mainnav a[aria-current] { border-bottom-color: var(--accent); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(105deg, var(--navy-900) 0%, var(--navy-700) 62%, #1d5480 100%);
  color: #fff; padding: 56px 0;
}
.hero h1 { color: #fff; font-size: 38px; max-width: 15ch; }
.hero p { color: #c3d6e8; font-size: 16.5px; max-width: 56ch; margin: 0 0 26px; }
.hero .btn + .btn { margin-left: 10px; }

.trustbar { background: var(--white); border-bottom: 1px solid var(--line); }
.trustbar .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; padding-top: 20px; padding-bottom: 20px; }
.trustbar b { display: block; font-size: 13.5px; color: var(--navy-900); }
.trustbar span { font-size: 12.5px; color: var(--muted); }

/* ---------- Layout ---------- */
main { padding: 30px 0 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.section-head a { font-size: 13.5px; font-weight: 600; text-decoration: none; }
.section-head a:hover { text-decoration: underline; }

.layout { display: grid; grid-template-columns: 232px 1fr; gap: 30px; align-items: start; }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-pad { padding: 18px 20px; }

.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }

/* ---------- Filters ---------- */
.filters { position: sticky; top: 16px; }
.filters h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); margin: 0; padding: 13px 18px 9px;
}
.filters > div + h3 { border-top: 1px solid var(--line); margin-top: 4px; }
.filter-list { max-height: 290px; overflow-y: auto; padding: 0 18px 14px; }
.filter-list label {
  display: flex; gap: 9px; align-items: flex-start;
  font-size: 13.5px; padding: 3px 0; cursor: pointer;
}
.filter-list input { margin: 4px 0 0; flex: none; }
.filter-list .n { color: var(--muted); font-size: 12px; margin-left: auto; padding-left: 6px; }

/* ---------- Product grid ---------- */
.toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 16px; font-size: 13.5px; color: var(--muted);
}
.toolbar select { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.toolbar .spacer { margin-left: auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 18px; }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
}
.card:hover { box-shadow: var(--shadow); border-color: #c3d0de; }
.card-img { display: block; padding: 16px; background: #fff; }
.card-img img { height: 168px; width: 100%; object-fit: contain; }
.card-body { padding: 0 15px 15px; display: flex; flex-direction: column; flex: 1; }
.card-brand { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; }
.card-title { font-size: 13.5px; line-height: 1.4; margin: 5px 0 8px; min-height: 3.7em; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--navy-700); text-decoration: underline; }
.card-mpn { font-size: 11.5px; color: var(--muted); margin-bottom: 9px; }
.card-foot { margin-top: auto; }

.price { font-size: 20px; font-weight: 700; color: var(--navy-900); }
.price-was { font-size: 12.5px; color: var(--muted); text-decoration: line-through; margin-left: 7px; }
.save { font-size: 11.5px; color: var(--green); font-weight: 600; }

.stock { font-size: 12px; font-weight: 600; margin: 7px 0 10px; }
.stock.in { color: var(--green); }
.stock.low { color: var(--accent-dark); }

.empty { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 46px 20px; text-align: center; color: var(--muted); }

/* ---------- Product detail ---------- */
.pdp { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: start; }
.pdp-gallery { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.pdp-gallery img { width: 100%; height: 420px; object-fit: contain; }
.pdp h1 { font-size: 25px; margin-bottom: 10px; }
.pdp-brand { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.pdp-ids { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.pdp-price { font-size: 31px; font-weight: 700; color: var(--navy-900); }
.pdp-buy { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 18px 0 22px; }
.qty-row { display: flex; align-items: center; gap: 12px; margin: 14px 0 16px; }
.qty-row label { font-size: 13.5px; font-weight: 600; }
.qty-row input { width: 76px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-table th, .spec-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { color: var(--muted); font-weight: 600; width: 42%; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 330px; gap: 28px; align-items: start; }
.cart-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); align-items: start; }
.cart-row:last-child { border-bottom: 0; }
.cart-row img { width: 92px; height: 92px; object-fit: contain; }
.cart-row .t { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.cart-row .t a { color: var(--ink); text-decoration: none; }
.cart-row .m { font-size: 12px; color: var(--muted); }
.cart-row input[type=number] { width: 70px; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; margin-top: 9px; }
.cart-row .right { text-align: right; }
.link-danger { background: none; border: 0; color: var(--red); font: inherit; font-size: 12.5px; cursor: pointer; padding: 0; text-decoration: underline; }

.summary-line { display: flex; justify-content: space-between; font-size: 14px; padding: 7px 0; }
.summary-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 13px; color: var(--navy-900); }

.notice { border-radius: var(--radius); padding: 13px 16px; font-size: 13.5px; margin: 14px 0; }
.notice-info { background: #eaf2fb; border: 1px solid #c2d8ef; color: #14405f; }
.notice-warn { background: #fdf3e3; border: 1px solid #f0d5a6; color: #7a4c07; }
.notice-error { background: #fdeceb; border: 1px solid #f3c4c1; color: #8c1a17; }

/* ---------- Prose pages ---------- */
.prose { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 40px; max-width: 860px; }
.prose h2 { margin-top: 32px; font-size: 19px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 14px 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.prose th { background: var(--navy-100); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); font: inherit; background: #fff;
}

/* ---------- Footer ---------- */
footer { background: var(--navy-900); color: #a9c0d6; font-size: 13.5px; margin-top: 40px; }
footer .wrap { padding-top: 40px; padding-bottom: 28px; }
.foot-cols { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 34px; }
footer h4 { color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: .11em; margin-bottom: 12px; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 7px; }
footer a { color: #a9c0d6; text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
.foot-legal { border-top: 1px solid #143a5e; margin-top: 30px; padding-top: 18px; font-size: 12.5px; color: #7e99b3; }

/* ---------- Responsive ---------- */
@media (max-width: 950px) {
  .layout, .pdp, .cart-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filter-list { max-height: 200px; }
  .trustbar .wrap { grid-template-columns: 1fr 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .pdp-gallery img { height: 300px; }
}
@media (max-width: 700px) {
  .masthead .wrap { flex-wrap: wrap; gap: 14px; }
  .searchbar { order: 3; flex-basis: 100%; max-width: none; }
  .cart-link { margin-left: auto; }
  .hero { padding: 38px 0; }
  .hero h1 { font-size: 28px; }
  .prose { padding: 24px 20px; }
  .trustbar .wrap { grid-template-columns: 1fr; gap: 14px; }
  .foot-cols { grid-template-columns: 1fr; }
}
