/*
Theme Name: Resq Marine
Theme URI: https://resqmarine.com
Author: Resq Marine / De Wolf Maritime Safety
Description: Custom brochure theme for Resq Marine — SOLAS-approved release hooks. Navy/orange brand design with a lightweight product post type.
Version: 1.2.3
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: resqmarine
*/

:root {
  --navy: #003473;
  --navy-dark: #002450;
  --navy-darker: #001a3b;
  --orange: #fe5200;
  --orange-dark: #d94600;
  --ink: #14212f;
  --grey: #56657a;
  --line: #dde4ec;
  --paper: #f5f7fa;
  --white: #ffffff;
  --max-w: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
}

h1, h2, h3, .brand-name {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  line-height: 1.15;
  color: var(--navy);
}

img { max-width: 100%; display: block; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }

.eyebrow {
  display: block;
  color: var(--orange);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  margin-bottom: 10px;
}

/* ---------- Header ---------- */
.topbar {
  background: var(--navy-darker);
  color: #9db4d0;
  font-size: 0.8rem;
  padding: 7px 0;
}
.topbar .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.topbar a { color: #cddcee; text-decoration: none; }
.topbar a:hover { color: var(--white); }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  border-bottom: 3px solid var(--orange);
}
body.admin-bar .site-header { top: 32px; }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 78px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { height: 54px; width: auto; }
.brand-name {
  color: var(--white);
  font-weight: 700; font-size: 1.5rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.brand-name span { color: var(--orange); }

.main-nav { display: flex; gap: 2px; align-items: center; }
.main-nav a {
  color: #cddcee; text-decoration: none; font-weight: 500; font-size: 0.92rem;
  padding: 27px 16px; border-bottom: 3px solid transparent; margin-bottom: -3px;
  transition: color 0.15s, border-color 0.15s;
}
.main-nav a:hover { color: var(--white); }
.main-nav a.active { color: var(--white); border-bottom-color: var(--orange); }
.main-nav a.nav-cta {
  background: var(--orange); color: var(--white);
  padding: 11px 22px; margin-left: 18px; margin-bottom: 0;
  border: 0; font-weight: 600;
}
.main-nav a.nav-cta:hover { background: var(--orange-dark); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--white); margin: 6px 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: var(--white);
  background:
    linear-gradient(90deg, rgba(0,26,59,0.92) 0%, rgba(0,36,80,0.78) 45%, rgba(0,52,115,0.35) 100%),
    url("assets/hero-davit.jpg") center 55% / cover no-repeat,
    var(--navy-dark);
  padding: 110px 0 120px;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  max-width: 640px; margin-bottom: 18px;
}
.hero h1 em { font-style: normal; color: var(--orange); }
.hero .rule { width: 64px; height: 4px; background: var(--orange); margin-bottom: 26px; }
.hero p.lead { font-size: 1.12rem; color: #c6d6e9; max-width: 540px; margin-bottom: 38px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.page-hero {
  background: linear-gradient(90deg, rgba(0,26,59,0.94), rgba(0,36,80,0.82)), url("assets/hero-davit.jpg") center 55% / cover no-repeat, var(--navy-dark);
  color: var(--white); padding: 64px 0;
}
.page-hero h1 {
  color: var(--white); font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.page-hero .rule { width: 56px; height: 4px; background: var(--orange); margin: 14px 0 12px; }
.page-hero p { color: #c6d6e9; max-width: 620px; font-size: 1.02rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 14px 32px; transition: background 0.15s, color 0.15s, border-color 0.15s;
  cursor: pointer; border: 0; font-family: inherit;
}
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-dark); color: var(--white); }
.btn-outline { border: 1px solid rgba(255,255,255,0.55); color: var(--white); background: transparent; }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); color: var(--white); }
.btn-outline-dark { border: 1px solid var(--navy); color: var(--navy); background: transparent; }
.btn-outline-dark:hover { background: var(--navy); color: var(--white); }
.btn-sm { padding: 10px 20px; font-size: 0.87rem; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-head { max-width: 720px; margin-bottom: 54px; }
.section-head h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.section-head .rule { width: 56px; height: 4px; background: var(--orange); margin: 16px 0 18px; }
.section-head p { color: var(--grey); font-size: 1.02rem; }

.bg-grey { background: var(--paper); }
.bg-navy { background: var(--navy); color: var(--white); }

/* ---------- Grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 26px; }
@media (min-width: 700px)  { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }

.feature-block {
  background: var(--white); border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  padding: 34px 30px;
}
.feature-block .f-icon { width: 40px; height: 40px; color: var(--orange); margin-bottom: 18px; }
.feature-block .f-icon svg { width: 100%; height: 100%; }
.feature-block h3 { font-size: 1.25rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; }
.feature-block p { color: var(--grey); font-size: 0.94rem; }

/* ---------- Product cards ---------- */
.product-card {
  background: var(--white); border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.product-card:hover { border-color: var(--navy); box-shadow: 0 10px 30px rgba(0,36,80,0.10); }
.product-card .img-wrap {
  background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
  border-bottom: 1px solid var(--line);
  height: 300px; display: grid; place-items: center; padding: 24px;
}
.product-card .img-wrap img { max-height: 252px; width: auto; object-fit: contain; }
.product-card .code { color: var(--grey); font-size: 0.78rem; letter-spacing: 0.08em; margin-bottom: 6px; }
.product-card .card-body { padding: 28px; display: flex; flex-direction: column; flex: 1; }
.product-card .tag {
  align-self: flex-start; color: var(--navy);
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em;
  border: 1px solid var(--line); padding: 4px 10px; margin-bottom: 14px;
}
.product-card h3 { font-size: 1.45rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 8px; }
.product-card h3 a { color: inherit; text-decoration: none; }
.product-card p { color: var(--grey); font-size: 0.93rem; flex: 1; margin-bottom: 22px; }
.product-card .card-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1.15fr; gap: 60px; align-items: start; }
.product-detail .photo {
  background: var(--white); border: 1px solid var(--line); padding: 36px;
  display: grid; place-items: center;
}
.product-detail .photo img { max-height: 540px; width: auto; object-fit: contain; }
.product-detail h1.p-title { font-size: 2.2rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 4px; color: var(--navy); }
.product-detail .subtitle { color: var(--orange); font-weight: 600; margin-bottom: 22px; font-size: 1.02rem; }
.product-detail .p-content p { color: var(--grey); margin-bottom: 16px; font-size: 0.97rem; }
.product-detail h3 { font-size: 1.2rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.spec-list { list-style: none; margin: 26px 0 30px; border-top: 2px solid var(--navy); }
.spec-list li {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 11px 2px; border-bottom: 1px solid var(--line); font-size: 0.93rem;
}
.spec-list .k { color: var(--grey); }
.spec-list .v { font-weight: 600; text-align: right; color: var(--navy); }

.doc-link {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  background: var(--paper); border: 1px solid var(--line);
  padding: 14px 18px; color: var(--ink); font-weight: 600; font-size: 0.93rem; margin: 12px 0;
  transition: border-color 0.15s;
}
.doc-link:hover { border-color: var(--orange); }
.doc-link .doc-icon { width: 26px; height: 26px; color: var(--orange); flex-shrink: 0; }
.doc-link .doc-icon svg { width: 100%; height: 100%; }
.doc-link small { color: var(--grey); font-weight: 400; display: block; font-size: 0.8rem; }

.detail-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- CTA band ---------- */
.cta-band {
  padding: 72px 0;
  background: linear-gradient(rgba(0,36,80,0.88), rgba(0,36,80,0.88)), url("assets/pattern.jpg") center / cover no-repeat, var(--navy);
  color: var(--white);
}
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.cta-band p { color: #b3c6de; max-width: 520px; margin-top: 6px; }

/* ---------- Forms ---------- */
.form-card { background: var(--white); border: 1px solid var(--line); padding: 40px; }
.form-card h3 { font-size: 1.35rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.88rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #c3ceda; border-radius: 0;
  font-size: 0.97rem; font-family: inherit; color: var(--ink); background: var(--white);
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--navy);
}
.form-note { font-size: 0.84rem; color: var(--grey); margin-top: 14px; }

/* WordPress form plugin harmonisation (Jetpack/CF7 inside .form-card) */
.form-card input[type="text"], .form-card input[type="email"], .form-card select, .form-card textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #c3ceda; border-radius: 0;
  font-size: 0.97rem; font-family: inherit;
}
.form-card input[type="submit"], .form-card button[type="submit"] {
  background: var(--orange); color: var(--white); border: 0; padding: 14px 32px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; width: 100%;
}
.form-card input[type="submit"]:hover, .form-card button[type="submit"]:hover { background: var(--orange-dark); }

/* ---------- Contact info ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 32px; align-items: start; }
.info-card { background: var(--navy); color: var(--white); padding: 38px; }
.info-card h3 { color: var(--white); margin-bottom: 24px; font-size: 1.35rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.info-card .info-row { display: flex; gap: 14px; margin-bottom: 22px; align-items: flex-start; }
.info-card .info-row .ico { width: 22px; height: 22px; color: var(--orange); flex-shrink: 0; margin-top: 3px; }
.info-card .info-row .ico svg { width: 100%; height: 100%; }
.info-card .info-row a { color: var(--white); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
.info-card .muted { color: #b3c6de; font-size: 0.92rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-darker); color: #9db4d0; padding: 60px 0 24px; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 44px; margin-bottom: 44px; }
.footer-grid.footer-grid--2col { grid-template-columns: 2fr 1fr; max-width: 900px; }
.site-footer .f-logo { height: 64px; width: auto; margin-bottom: 16px; }
.site-footer h4 {
  color: var(--white); font-size: 0.85rem; margin-bottom: 16px;
  text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #9db4d0; text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.8rem; color: #7691b3;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { padding: 20px 0 0; font-size: 0.85rem; color: var(--grey); }
.breadcrumb a { color: var(--navy); text-decoration: none; }
.breadcrumb a:hover { color: var(--orange); }

/* ---------- Generic page content ---------- */
.page-content { max-width: 800px; }
.page-content p { color: var(--grey); margin-bottom: 16px; }
.page-content h2, .page-content h3 { margin: 26px 0 12px; }
.page-content ul, .page-content ol { margin: 0 0 16px 22px; color: var(--grey); }
.page-content a { color: var(--orange); }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .product-detail, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .main-nav {
    display: none; position: absolute; top: 78px; left: 0; right: 0;
    flex-direction: column; background: var(--navy); padding: 8px 28px 22px;
    align-items: stretch; border-bottom: 3px solid var(--orange);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 4px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 0; }
  .main-nav a.active { border-bottom-color: rgba(255,255,255,0.08); color: var(--orange); }
  .main-nav a.nav-cta { margin: 14px 0 0; text-align: center; }
  .nav-toggle { display: block; }
  .hero { padding: 76px 0 84px; }
  .section { padding: 60px 0; }
  .topbar { display: none; }
}

/* ---------- Quote cart ---------- */
.rq-cart-count {
  display: none; align-items: center; justify-content: center;
  background: var(--white); color: var(--orange);
  font-size: 0.72rem; font-weight: 700;
  min-width: 19px; height: 19px; border-radius: 999px;
  padding: 0 5px; margin-left: 7px; vertical-align: middle;
}
.rq-add-quote.rq-added { background: var(--navy); color: var(--white); border-color: var(--navy); }
.rq-cart-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.rq-cart-table th {
  text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--grey); border-bottom: 2px solid var(--navy); padding: 6px 4px;
}
.rq-cart-table td { border-bottom: 1px solid var(--line); padding: 10px 4px; vertical-align: middle; }
.rq-cart-table small { color: var(--grey); }
.rq-qty-col { width: 74px; text-align: center; }
.rq-qty { width: 64px; padding: 8px; border: 1px solid #c3ceda; text-align: center; font-family: inherit; }
.rq-remove {
  background: none; border: 0; color: var(--grey); font-size: 1.3rem; cursor: pointer; padding: 4px 8px;
}
.rq-remove:hover { color: var(--orange); }
.rq-cart-empty { color: var(--grey); font-size: 0.93rem; background: var(--paper); border: 1px dashed var(--line); padding: 16px; }
.rq-cart-empty a { color: var(--orange); }
.rq-hp { position: absolute; left: -9999px; }
.rq-notice-success {
  background: #e8f6ec; border: 1px solid #7fc98f; color: #1e5c2e;
  padding: 16px 20px; margin-bottom: 26px; font-size: 0.95rem;
}
