/* ==========================================================================
   Hocean.com — Modern Static Rebuild
   Design: Classic Red & Gold | WCAG 2.1 AA
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --red-900: #6d1010;
  --red-800: #851818;
  --red-700: #9c1f1f;
  --red-600: #b02626;
  --gold-600: #84680f;
  --gold-500: #c9a227;
  --gold-400: #d9b445;
  --gold-300: #e8d08a;
  --ink: #2b2320;
  --ink-soft: #4a403c;
  --paper: #fdfbf7;
  --cream: #f7f1e3;
  --white: #ffffff;
  --line: #e5dcc8;
  --shadow-sm: 0 1px 3px rgba(43, 35, 32, 0.12);
  --shadow-md: 0 6px 18px rgba(43, 35, 32, 0.14);
  --radius: 10px;
  --maxw: 1200px;
  --font-head: "Georgia", "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --focus-ring: 3px solid #7d6110;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-700); }
a:hover { color: var(--red-900); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.25;
  color: var(--red-900);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

/* Skip link (a11y) */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--red-800);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

/* Focus visibility (a11y) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 3.5rem 0; }
.section--cream { background: var(--cream); }

.section-title {
  text-align: center;
  margin-bottom: 2.25rem;
}
.section-title .kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.lead {
  font-size: 1.125rem;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 auto 1.5rem;
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.2;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--red-700);
  color: #fff;
}
.btn--primary:hover { background: var(--red-800); color: #fff; }

.btn--gold {
  background: var(--gold-500);
  color: #2b2320;
}
.btn--gold:hover { background: var(--gold-400); color: #2b2320; }

.btn--ghost {
  border-color: var(--red-700);
  color: var(--red-700);
  background: transparent;
}
.btn--ghost:hover { background: var(--red-700); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  max-width: var(--maxw);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  text-decoration: none;
  color: var(--red-900);
}
.brand img { height: 55px; width: auto; }
.brand .brand-text { line-height: 1.1; }
.brand .brand-name {
  font-family: var(--font-head);
  font-size: 1.62rem;
  font-weight: 700;
  display: block;
}
.brand .brand-sub {
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--red-800);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: block;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}
.main-nav a:hover { background: var(--cream); color: var(--red-800); }
.main-nav a[aria-current="page"] {
  color: var(--red-700);
  box-shadow: inset 0 -2px 0 var(--gold-500);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background: var(--red-900); /* fallback while the photo loads */
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Faces are in the upper-left of the photo (detected ~y 19-40%, x 20-55%).
     Position the crop window onto them so they are not cut off. */
  object-position: 40% 30%;
  opacity: 1; /* natural color — no color wash over the photo */
}
/* Neutral dark gradient keeps text readable without tinting the photo */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(38, 16, 10, 0.88) 0%,
    rgba(38, 16, 10, 0.6) 38%,
    rgba(38, 16, 10, 0.22) 68%,
    rgba(38, 16, 10, 0.45) 100%
  );
  pointer-events: none;
}
.hero__overlay {
  position: relative;
  z-index: 1;
  padding: 5rem 1.25rem;
  max-width: var(--maxw);
  margin: 0 auto;
}
.hero h1 { color: #fff; margin-bottom: 0.35rem; }
.hero .hero-tag {
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--gold-300);
  margin-bottom: 1rem;
}
.hero .hero-text {
  max-width: 46em;
  font-size: 1.06rem;
  color: #f5eee2;
  margin-bottom: 1.6rem;
}
.hero .hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* ---------- Category cards ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.cat-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}
.cat-card .cat-icon {
  font-size: 1.9rem;
  margin-bottom: 0.6rem;
  display: block;
}
.cat-card h3 { font-size: 1.06rem; margin-bottom: 0.2rem; color: var(--red-800); }
.cat-card .cat-count { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Brand strip (home page) ---------- */
.brand-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem 2.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.brand-strip img {
  height: 72px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  opacity: 0.92;
  transition: opacity 0.15s, transform 0.15s;
}
.brand-strip img:hover { opacity: 1; transform: translateY(-2px); }

/* ---------- Product cards ---------- */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
.prod-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}
.prod-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.prod-card .prod-img-wrap {
  background: #fff;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
}
.prod-card .prod-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.prod-card .prod-body { padding: 0.8rem 0.9rem 1rem; flex: 1; }
.prod-card .prod-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prod-card .prod-cn { font-size: 0.85rem; color: var(--ink-soft); }
.prod-card .prod-sku {
  font-size: 0.75rem;
  color: var(--gold-600);
  letter-spacing: 0.05em;
  margin-top: 0.35rem;
  font-variant-numeric: tabular-nums;
}
.prod-card .prod-barcode {
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

/* ---------- Proposition 65 warning (discreet, compliant short-form) ---------- */
.p65-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px dotted var(--line);
  padding: 0.15rem 0.1rem;
}
.p65-link:hover { color: var(--red-800); }
.p65-link svg { flex: none; }

.p65-notice {
  max-width: var(--maxw);
  margin: 1.5rem auto 0;
  padding: 0 1.25rem;
  text-align: center;
}
.p65-notice details { max-width: 52em; margin: 0 auto; }
.p65-notice summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.p65-text {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-soft);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  text-align: left;
}
.p65-text .p65-warning-word { color: #7d5a05; font-weight: 700; }

/* ---------- Features / info strips ---------- */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.feature {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.feature .feature-icon { font-size: 1.8rem; }
.feature h3 { font-size: 1.02rem; margin: 0.5rem 0 0.25rem; }
.feature p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }

/* ---------- Page hero (interior) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--red-900), var(--red-700));
  color: #fff;
  padding: 3.2rem 1.25rem;
}
.page-hero .container { text-align: center; }
.page-hero h1 { color: #fff; margin-bottom: 0.4rem; }
.page-hero .crumb { font-size: 0.9rem; color: var(--gold-300); }
.page-hero .crumb a { color: var(--gold-300); }

/* ---------- Typography / content blocks ---------- */
.content-block {
  max-width: 76ch;
  margin: 0 auto;
}
.content-block h2 {
  margin-top: 2.2rem;
  border-bottom: 2px solid var(--gold-300);
  padding-bottom: 0.35rem;
}
.content-block ul, .content-block ol { margin: 0 0 1rem 1.4rem; }
.content-block li { margin-bottom: 0.4rem; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}
.contact-card h3 { margin-top: 0; }
.contact-card dt { font-weight: 600; color: var(--red-800); }
.contact-card dd { margin: 0 0 0.8rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: #3a1313;
  color: #e8ddd0;
  margin-top: 4rem;
}
.site-footer a { color: var(--gold-300); }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 2rem;
  padding: 3rem 1.25rem 1.5rem;
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer-grid h2, .footer-grid h3 {
  color: var(--gold-300);
  font-size: 1rem;
  margin-bottom: 0.8rem;
  font-family: var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.45rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1rem 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: #c9b7a8;
}

/* ---------- Catalog page ---------- */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  box-shadow: var(--shadow-sm);
}
.catalog-search {
  flex: 1 1 260px;
  display: flex;
  gap: 0.5rem;
}
.catalog-search input {
  flex: 1;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
}
.catalog-search input:focus { border-color: var(--gold-500); }
.catalog-count { font-size: 0.9rem; color: var(--ink-soft); white-space: nowrap; }

.cat-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.chip {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { border-color: var(--gold-500); }
.chip[aria-pressed="true"] {
  background: var(--red-700);
  border-color: var(--red-700);
  color: #fff;
}

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--ink-soft); }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 560px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold-500);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.1rem 1.3rem;
  z-index: 500;
  display: none;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner p { margin: 0 0 0.8rem; font-size: 0.92rem; }
.cookie-banner .cookie-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ---------- Misc ---------- */
.breadcrumb { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 1rem; }
.breadcrumb a { color: var(--red-700); }

.notice {
  background: var(--cream);
  border: 1px solid var(--gold-300);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

table.specs { border-collapse: collapse; width: 100%; margin-bottom: 1rem; }
table.specs th, table.specs td { border: 1px solid var(--line); padding: 0.5rem 0.7rem; text-align: left; }
table.specs th { background: var(--cream); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; padding: 0.5rem 1rem 1rem; }
  .hero__overlay { padding: 3.5rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
