/* components.css: brand accents, buttons, cards, lists, contact strip */

/* ---------- Brand accents (set on <body>) ---------- */
.brand-chemicals { --accent: var(--green);  --accent-strong: var(--green-dark); }
.brand-sailing   { --accent: var(--teal);   --accent-strong: var(--teal); }

/* Hero photos. A missing file falls back to the gradient in layout.css */
.brand-home      .hero { --hero-img: url("../images/shared/hero-coast.jpg"); }
.brand-chemicals .hero { --hero-img: url("../images/chemicals/hero-plant.jpg"); }
.brand-sailing   .hero { --hero-img: url("../images/sailing/hero-boat-underway.jpg"); }

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: var(--radius);
  font-weight: 700; text-decoration: none; line-height: 1.2;
  background: var(--accent-strong); color: var(--white); border: 2px solid var(--accent-strong);
}
.btn:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-outline { background: transparent; color: var(--accent-strong); }
.btn-outline:hover { color: var(--white); }

/* ---------- Business cards (homepage) ---------- */
.biz-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column;
  border-top: 4px solid var(--accent);
}
.biz-card .media {
  aspect-ratio: 16 / 9;
  background-image: var(--card-img, none), linear-gradient(135deg, var(--navy), var(--accent));
  background-size: cover; background-position: center;
}
.biz-card .body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.biz-card h3 { margin-bottom: 4px; }
.biz-card .tagline { color: var(--accent-strong); font-weight: 600; margin-bottom: 10px; }
.biz-card p { color: var(--muted); }
.biz-card .more { margin-top: auto; font-weight: 700; color: var(--accent-strong); text-decoration: none; }
.biz-card .more:hover { text-decoration: underline; }

.card-chemicals { --card-img: url("../images/chemicals/card-lab-glassware.jpg"); }
.card-sailing   { --card-img: url("../images/sailing/card-coastal-sailing.jpg"); }

/* ---------- Feature points ---------- */
.point { padding-left: 18px; border-left: 3px solid var(--accent); }
.point h3 { font-size: 1.1rem; margin-bottom: 6px; }
.point p { color: var(--muted); margin: 0; }

/* ---------- Service tiles ---------- */
.tile {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.tile h3 { font-size: 1.1rem; margin-bottom: 6px; }
.tile p { color: var(--muted); margin: 0; }

/* ---------- Check list ---------- */
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: .5em; width: 12px; height: 7px;
  border-left: 3px solid var(--accent-strong); border-bottom: 3px solid var(--accent-strong);
  transform: rotate(-45deg);
}

/* ---------- Info panel ---------- */
.panel {
  background: var(--bg); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line);
}
.panel h3 { font-size: 1.1rem; }
.panel dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.panel dt { font-weight: 700; color: var(--navy); }
.panel dd { margin: 0; }

/* ---------- Photo slot (until real photos arrive) ---------- */
.photo {
  aspect-ratio: 4 / 3; border-radius: var(--radius);
  background-image: var(--photo-img, none), linear-gradient(135deg, var(--navy), var(--accent));
  background-size: cover; background-position: center;
}

/* ---------- Contact strip ---------- */
.cta {
  background: var(--accent-strong); color: var(--white); padding: 48px 0;
}
.cta .container { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.cta h2 { color: var(--white); margin: 0 0 4px; }
.cta p { margin: 0; color: rgba(255,255,255,.9); }
.cta .btn { background: var(--white); color: var(--navy); border-color: var(--white); }
.cta .btn:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ---------- Contact cards ---------- */
.contact-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; border-top: 4px solid var(--accent); }
.contact-card h3 { margin-bottom: 8px; }
.contact-card p { margin-bottom: 6px; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* ---------- Partner cards (chemicals principals) ---------- */
.partner-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  border-top: 4px solid var(--accent); display: flex; flex-direction: column;
}
.partner-card h3 { margin-bottom: 4px; }
.partner-card .tagline { color: var(--accent-strong); font-weight: 600; margin-bottom: 12px; }
.partner-card p { color: var(--muted); }
.partner-card .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Product table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.spec-table { width: 100%; border-collapse: collapse; background: var(--white); font-size: .97rem; }
.spec-table th, .spec-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.spec-table thead th { background: var(--bg); color: var(--navy); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.spec-table tbody th { color: var(--navy); }
.spec-table td:nth-child(2), .spec-table td:nth-child(3) { white-space: nowrap; } /* supplier, CAS */
.spec-table tbody tr:last-child > * { border-bottom: 0; }
@media (max-width: 760px) { .spec-table { min-width: 640px; } }

/* ---------- Notices, subheads, gallery (sailing page) ---------- */
.notice {
  background: var(--bg); border-left: 4px solid var(--accent); border-radius: var(--radius);
  padding: 14px 18px; margin: 0 0 18px;
}
.notice p { margin: 0; }
.notice-inline { font-size: 1.05rem; }
.subhead { margin: 48px 0 18px; }
.tile-link { display: block; text-decoration: none; color: inherit; border-top: 3px solid var(--accent); }
.tile-link h3 { color: var(--accent-strong); }
.tile-link:hover { box-shadow: var(--shadow); border-color: var(--accent); }
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery { grid-template-columns: 1fr; } }
.emblem {
  margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; justify-content: center;
}
.emblem img { width: auto; max-width: 100%; max-height: 440px; height: auto; }
#salty-sally .panel { margin-top: 24px; background: var(--white); }
