/* =========================================================
   Ferry Chem Ltd — site stylesheet
   Brand palette sampled from the company logo.
   ========================================================= */

:root {
  --blue:        #2a5790;   /* primary brand blue */
  --blue-dark:   #1d3e68;   /* darker shade for hovers / headers */
  --blue-deep:   #15294a;   /* footer / deep sections */
  --steel:       #6e87bd;   /* mid steel blue */
  --steel-light: #94a3c4;   /* light steel blue accent */
  --tint:        #eef2f8;   /* very light blue tint background */
  --tint-2:      #f6f8fb;
  --ink:         #1f2733;   /* body text */
  --ink-soft:    #54606f;   /* secondary text */
  --line:        #dfe4ec;   /* borders */
  --white:       #ffffff;
  --accent:      #f5a623;   /* warm CTA accent for contrast */
  --accent-dark: #d98c0c;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 1px 3px rgba(21,41,74,.08), 0 8px 24px rgba(21,41,74,.07);
  --shadow-lg:   0 12px 40px rgba(21,41,74,.16);
  --maxw:        1140px;
  --font:        "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
/* default inline icon size (overridden where larger icons are needed) */
svg { width: 1.05em; height: 1.05em; vertical-align: -.16em; flex-shrink: 0; }
.card .ico svg { width: 28px; height: 28px; }
.info-row .ico svg { width: 22px; height: 22px; }
.info-row .ico { display: inline-flex; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--blue-dark); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1rem; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  padding: .8rem 1.5rem;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .18s ease;
  text-decoration: none !important;
  line-height: 1.2;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: #2a2000; }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-outline { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }

/* ---------- top bar ---------- */
.topbar {
  background: var(--blue-deep);
  color: #cfdaee;
  font-size: .9rem;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; flex-wrap: wrap; }
.topbar a { color: #fff; }
.topbar .tb-items { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar .tb-items span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 0; }
.brand img { height: 52px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links > li > a {
  display: block; padding: 10px 14px; border-radius: 8px;
  color: var(--ink); font-weight: 600; font-size: .98rem; text-decoration: none;
}
.nav-links > li > a:hover, .nav-links > li.active > a { background: var(--tint); color: var(--blue-dark); }

/* dropdown */
.has-drop { position: relative; }
.has-drop > a::after { content: " ▾"; font-size: .8em; color: var(--steel); }
.dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 248px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 8px; list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .16s ease;
}
.has-drop:hover .dropdown, .has-drop:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: 9px 12px; border-radius: 6px; color: var(--ink); font-size: .95rem; text-decoration: none; }
.dropdown a:hover { background: var(--tint); color: var(--blue-dark); }

/* mobile toggle */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--blue-dark); border-radius: 3px; margin: 5px 0; transition: .2s; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 55%, var(--steel) 130%);
  color: #fff; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.12), transparent 38%),
    radial-gradient(circle at 10% 90%, rgba(255,255,255,.08), transparent 40%);
}
.hero .container { position: relative; z-index: 1; padding: 84px 24px 92px; max-width: 820px; }
.hero h1 { color: #fff; margin-bottom: .4em; }
.hero p { font-size: 1.2rem; color: #e6edf8; margin-bottom: 1.8rem; max-width: 640px; }
.hero .btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 700; color: var(--steel-light); margin-bottom: 1rem; }

/* page banner (inner pages) */
.page-banner { background: linear-gradient(135deg, var(--blue-dark), var(--blue)); color: #fff; }
.page-banner .container { padding: 54px 24px 58px; }
.page-banner h1 { color: #fff; margin: 0; }
.page-banner p { color: #dbe5f5; margin: .6rem 0 0; font-size: 1.1rem; max-width: 680px; }
.breadcrumb { font-size: .85rem; color: var(--steel-light); margin-bottom: .8rem; }
.breadcrumb a { color: #cfdaee; }

/* ---------- sections ---------- */
section { padding: 64px 0; }
section.tint { background: var(--tint-2); }
.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }
.lead { font-size: 1.18rem; color: var(--ink-soft); }

/* two-column intro */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.split.reverse { grid-template-columns: .9fr 1.1fr; }

/* feature / value cards */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .ico {
  width: 52px; height: 52px; border-radius: 12px; background: var(--tint);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--blue);
}
.card .ico svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--ink-soft); margin: 0; font-size: .98rem; }

/* clickable category / link cards */
a.card { color: inherit; text-decoration: none !important; display: block; }
a.card .more { color: var(--blue); font-weight: 600; font-size: .95rem; margin-top: 12px; display: inline-block; }
a.card:hover .more { text-decoration: underline; }

/* product tag chips */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  display: inline-block; text-decoration: none !important;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--steel);
  border-radius: var(--radius-sm); padding: 12px 18px; font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow); transition: .16s; font-size: .98rem; cursor: pointer;
}
.chip:hover { border-left-color: var(--accent); color: var(--blue-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* bullet list with ticks */
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding: 8px 0 8px 34px; border-bottom: 1px solid var(--line); }
.ticks li:last-child { border-bottom: 0; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 12px; width: 20px; height: 20px;
  background: var(--blue); border-radius: 50%;
}
.ticks li::after {
  content: ""; position: absolute; left: 6px; top: 15px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* areas served pills */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { background: var(--tint); color: var(--blue-dark); border-radius: 50px; padding: 7px 16px; font-weight: 600; font-size: .92rem; }

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; text-align: center; }
.stats .num { font-size: 2.6rem; font-weight: 800; color: var(--blue); line-height: 1; }
.stats .lbl { color: var(--ink-soft); margin-top: 6px; font-size: .98rem; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #dbe5f5; max-width: 620px; margin: 0 auto 1.6rem; font-size: 1.1rem; }

/* info / contact cards */
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.info-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row .ico { color: var(--blue); flex: 0 0 auto; margin-top: 2px; }
.info-row strong { display: block; color: var(--blue-dark); }

/* forms */
.form-grid { display: grid; gap: 16px; }
label { font-weight: 600; color: var(--blue-dark); display: block; margin-bottom: 6px; font-size: .95rem; }
input, textarea, select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: #fff;
}
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(42,87,144,.18); border-color: var(--blue); }
textarea { min-height: 150px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--ink-soft); }

/* map */
.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.map-wrap iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }
.map-consent { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; min-height: 380px; padding: 30px; background: var(--tint); }
.map-consent p { margin: 0; max-width: 360px; }
.map-consent .btn { margin-top: 4px; }

/* ---------- product gallery ---------- */
.gallery-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.gfilter {
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  border-radius: 50px; padding: 8px 18px; font-weight: 600; font-size: .92rem; cursor: pointer; transition: .16s;
}
.gfilter:hover { border-color: var(--blue); color: var(--blue); }
.gfilter.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.gitem { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.gitem:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.gthumb { display: block; width: 100%; border: 0; padding: 0; background: #fff; cursor: zoom-in; }
.gthumb img { width: 100%; aspect-ratio: 1/1; object-fit: contain; padding: 14px; background: #fff; }
.gitem figcaption { padding: 12px 14px 16px; border-top: 1px solid var(--line); font-weight: 600; color: var(--blue-dark); font-size: .98rem; }
.gitem figcaption span { display: block; font-weight: 500; color: var(--ink-soft); font-size: .82rem; margin-top: 2px; }
.glightbox { position: fixed; inset: 0; z-index: 200; background: rgba(21,41,74,.88); display: flex; align-items: center; justify-content: center; padding: 30px; }
.glightbox[hidden] { display: none; }
.glightbox figure { margin: 0; max-width: 720px; background: #fff; border-radius: var(--radius); overflow: hidden; }
.glightbox img { max-width: 100%; max-height: 72vh; object-fit: contain; background: #fff; display: block; }
.glightbox figcaption { padding: 16px 20px; font-weight: 700; color: var(--blue-dark); text-align: center; }
.glb-close { position: absolute; top: 20px; right: 26px; background: none; border: 0; color: #fff; font-size: 2.6rem; line-height: 1; cursor: pointer; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 640px) { .gallery-grid { grid-template-columns: repeat(2,1fr); gap: 14px; } }

/* ---------- footer ---------- */
.site-footer { background: var(--blue-deep); color: #b9c6dd; padding: 56px 0 28px; font-size: .96rem; }
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.site-footer a { color: #cfdaee; }
.site-footer a:hover { color: #fff; }
.footer-logo { background:#fff; padding:12px 14px; border-radius:10px; display:inline-block; margin-bottom:16px; }
.footer-logo img { height: 44px; }
.foot-list { list-style: none; padding: 0; margin: 0; }
.foot-list li { margin-bottom: 9px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .86rem; color: #8ea0bd; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .split, .split.reverse { grid-template-columns: 1fr; gap: 32px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .stats { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(80vw, 320px);
    background: #fff; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 80px 18px 24px; box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; z-index: 60;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links > li > a { padding: 12px 14px; }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border: 0; border-left: 2px solid var(--line); border-radius: 0; margin: 2px 0 6px 14px; padding: 0;
  }
  .has-drop > a::after { content: ""; }
  body.nav-open { overflow: hidden; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(21,41,74,.5); z-index: 55; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar .container { justify-content: center; text-align: center; }
  .hero .container { padding: 60px 24px 64px; }
}
