/* ==========================================================================
   DH Aquarium — shared styles (tokens, layout, header/footer, components)
   ========================================================================== */

:root {
  /* palette */
  --c-ink: #0e2837;
  --c-text: #3d5260;
  --c-faint: #56707f;
  --c-brand: #0e7490;
  --c-brand-deep: #155e75;
  --c-aqua: #6fe3d2;
  --c-dark: #0a2331;
  --c-dark-2: #103447;
  --c-mist: #f2f7f8;
  --c-sand: #f6f1e7;
  --c-line: #dce6ea;
  --c-card: #ffffff;
  --c-danger: #b3261e;
  --c-ok: #1b6e4b;

  /* type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* shape */
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --shadow-1: 0 1px 2px rgba(10, 35, 49, 0.06), 0 4px 14px rgba(10, 35, 49, 0.06);
  --shadow-2: 0 2px 6px rgba(10, 35, 49, 0.10), 0 14px 34px rgba(10, 35, 49, 0.12);

  --container: 1160px;
}

/* ---------- reset ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html { overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--c-text);
  background: #fff;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
h3 { font-size: 1.18rem; }

p { margin: 0 0 1em; }

a { color: var(--c-brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--c-brand-deep); }

:focus-visible {
  outline: 2px solid var(--c-brand);
  outline-offset: 2px;
  border-radius: 2px;
}

button { font: inherit; }

::selection { background: var(--c-aqua); color: var(--c-dark); }

/* ---------- utilities ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

main,
section,
.container {
  min-width: 0;
}

h1,
h2,
h3,
p,
a,
span {
  overflow-wrap: anywhere;
}

.section { padding-block: clamp(48px, 7vw, 84px); }
.section-mist { background: var(--c-mist); }
.section-sand { background: var(--c-sand); }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-brand);
  margin: 0 0 10px;
}

.section-head { margin-bottom: clamp(22px, 4vw, 38px); }
.section-head .between {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.section-head h2 { margin-bottom: 0.2em; }
.section-head p { max-width: 56ch; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--c-dark);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 10px 10px;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

.mobile-copy { display: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--c-brand); color: #fff; }
.btn-primary:hover { background: var(--c-brand-deep); color: #fff; }

.btn-dark { background: var(--c-dark); color: #fff; }
.btn-dark:hover { background: var(--c-dark-2); color: #fff; }

.btn-ghost { background: transparent; color: var(--c-brand-deep); border-color: var(--c-brand); }
.btn-ghost:hover { background: rgba(14, 116, 144, 0.08); }

.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.btn-lg { padding: 14px 28px; font-size: 1.02rem; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

.btn[disabled],
.btn[aria-disabled="true"] {
  background: #c7d4da;
  color: #51626c;
  cursor: not-allowed;
  border-color: transparent;
}

.btn-block { width: 100%; }

/* ---------- header ---------- */

.topbar {
  background: var(--c-dark);
  color: #cfe6e9;
  font-size: 0.82rem;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 36px;
  flex-wrap: wrap;
  padding-block: 4px;
}
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar a:hover { color: var(--c-aqua); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 74px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
}
.brand-mark { flex: 0 0 auto; }
.brand-word {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-ink);
  letter-spacing: 0.01em;
}
.brand-word small {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-faint);
  margin-top: 3px;
}

.site-nav { display: flex; gap: 6px; }
.site-nav a {
  text-decoration: none;
  color: var(--c-ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 9px 14px;
  border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { background: var(--c-mist); color: var(--c-brand-deep); }
.site-nav a[aria-current="page"] { background: var(--c-dark); color: #fff; }

.header-actions { display: flex; align-items: center; gap: 6px; }

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--c-ink);
  transition: background-color 0.15s ease;
}
.cart-link:hover { background: var(--c-mist); color: var(--c-brand-deep); }
.cart-link svg { display: block; }

.cart-count {
  position: absolute;
  top: 1px;
  right: -2px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--c-brand);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  color: var(--c-ink);
}
.nav-toggle svg { display: block; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 880px) {
  .header-inner { gap: 12px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    background: #fff;
    border-bottom: 1px solid var(--c-line);
    padding: 10px 16px 16px;
    box-shadow: var(--shadow-2);
  }
  .site-nav a { border-radius: 10px; padding: 12px 14px; }
  .site-header.nav-open .site-nav { display: flex; }
}

/* ---------- product cards ---------- */

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

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.product-card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-3px);
  border-color: transparent;
}

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-bottom: 1px solid var(--c-line);
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
}

.media-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--c-brand) 0%, var(--c-dark) 90%);
}
.media-placeholder svg { width: 42%; height: auto; opacity: 0.85; }

.ribbon {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  background: var(--c-dark);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.ribbon-out { background: #842029; }

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
  padding: 16px 16px 18px;
}
.product-cat {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-faint);
}
.product-name {
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}
.product-name a {
  color: var(--c-ink);
  text-decoration: none;
}
.product-name a:hover { color: var(--c-brand-deep); text-decoration: underline; }
.product-name a::after { content: ""; position: absolute; inset: 0; }
.product-card { position: relative; }
.product-card .btn, .product-card .product-cat { position: relative; z-index: 1; }

.product-price {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--c-ink);
  margin-top: auto;
  padding-top: 6px;
}
.product-foot { padding-top: 10px; }

/* ---------- forms ---------- */

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--c-ink);
  margin-bottom: 6px;
}
.field .hint { font-size: 0.8rem; color: var(--c-faint); margin: 4px 0 0; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="search"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--c-line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: var(--c-ink);
  transition: border-color 0.15s ease;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--c-brand);
  outline-offset: 1px;
  border-color: var(--c-brand);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--c-danger); }
.field-error {
  color: var(--c-danger);
  font-size: 0.83rem;
  font-weight: 600;
  margin: 6px 0 0;
}

fieldset {
  border: 1px solid var(--c-line);
  border-radius: var(--radius-m);
  padding: 18px 20px 8px;
  margin: 0 0 22px;
}
legend {
  font-weight: 700;
  color: var(--c-ink);
  padding-inline: 8px;
  font-size: 0.95rem;
}

.radio-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
}
.radio-row input { margin-top: 4px; accent-color: var(--c-brand); }
.radio-row label { font-weight: 600; color: var(--c-ink); }
.radio-row .hint { display: block; font-weight: 400; font-size: 0.83rem; color: var(--c-faint); }

input[type="checkbox"] { accent-color: var(--c-brand); }

/* ---------- qty stepper ---------- */

.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--c-line);
  border-radius: 999px;
  overflow: hidden;
}
.qty button {
  width: 38px;
  height: 38px;
  border: 0;
  background: #fff;
  color: var(--c-ink);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}
.qty button:hover { background: var(--c-mist); }
.qty input {
  width: 44px;
  border: 0;
  text-align: center;
  font: inherit;
  font-weight: 700;
  color: var(--c-ink);
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- breadcrumb ---------- */

.breadcrumb {
  font-size: 0.85rem;
  padding-block: 18px 6px;
  color: var(--c-faint);
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--c-line); }
.breadcrumb a { color: var(--c-faint); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-brand-deep); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--c-ink); font-weight: 600; }

/* ---------- page head band ---------- */

.page-head {
  background: linear-gradient(150deg, var(--c-dark) 0%, var(--c-dark-2) 70%, #14495f 100%);
  color: #d9ecef;
  padding-block: clamp(36px, 6vw, 64px);
}
.page-head h1 { color: #fff; margin-bottom: 0.25em; }
.page-head .eyebrow { color: var(--c-aqua); }
.page-head p { max-width: 62ch; margin-bottom: 0; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 16px);
  z-index: 300;
  background: var(--c-dark);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast a { color: var(--c-aqua); }

/* ---------- notice / empty states ---------- */

.notice {
  background: var(--c-mist);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-m);
  padding: 28px;
  text-align: center;
}
.notice h2, .notice h3 { margin-bottom: 0.4em; }
.notice p { margin-bottom: 18px; }

/* ---------- shared widgets (hours, summary card, check rows) ---------- */

.topbar p { margin: 0; }
.topbar p { min-width: 0; overflow-wrap: anywhere; }

.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th,
.hours-table td { text-align: left; padding: 7px 0; border-bottom: 1px solid rgba(127, 156, 168, 0.25); font-size: 0.92rem; }
.hours-table th { font-weight: 600; }
.hours-table td { text-align: right; }
.hours-table tr:last-child th,
.hours-table tr:last-child td { border-bottom: 0; }

.hours-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-m);
  padding: 26px 28px;
}
.hours-card h3 { color: #fff; }
.hours-card .hours-table th { color: #b9d2d8; }
.hours-card .hours-table td { color: #fff; }

.hours-card-light {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-m);
  padding: 26px 28px;
  box-shadow: var(--shadow-1);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--c-ink);
  cursor: pointer;
}

.summary-card {
  background: var(--c-mist);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-m);
  padding: 26px;
  align-self: start;
  position: sticky;
  top: 96px;
}
.summary-card h2 { font-size: 1.25rem; }
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 0.95rem;
}
.summary-row + .summary-row { border-top: 1px solid var(--c-line); }
.summary-row strong { color: var(--c-ink); }
.summary-total { font-size: 1.1rem; }
.summary-note {
  font-size: 0.83rem;
  color: var(--c-faint);
  background: #fff;
  border: 1px dashed var(--c-line);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 14px 0;
}
.summary-card .btn { margin-top: 6px; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--c-dark);
  color: #b9d2d8;
  margin-top: clamp(48px, 7vw, 84px);
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 40px;
  padding-block: clamp(40px, 6vw, 64px) 32px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.footer-demo {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  font-size: 0.8rem;
  color: #d3e7ea;
}
.site-footer h2 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-aqua);
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #e4f1f3; text-decoration: none; }
.site-footer a:hover { color: var(--c-aqua); text-decoration: underline; }
.site-footer address { font-style: normal; }

.footer-hours { width: 100%; border-collapse: collapse; }
.footer-hours th, .footer-hours td {
  text-align: left;
  font-weight: 400;
  padding: 3px 0;
  font-size: 0.88rem;
}
.footer-hours td { text-align: right; color: #e4f1f3; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 18px;
  font-size: 0.8rem;
  color: #8fb0b8;
}
.footer-bottom p { margin: 0; }

@media (max-width: 920px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .desktop-copy { display: none; }
  .mobile-copy { display: inline; }
  .container { padding-inline: 16px; }
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .topbar p,
  .topbar a {
    max-width: calc(100vw - 32px);
    white-space: normal;
  }
  .header-inner {
    min-height: 66px;
    gap: 10px;
  }
  .brand-word {
    font-size: 1.08rem;
  }
  .brand-word small {
    max-width: 160px;
    font-size: 0.58rem;
    letter-spacing: 0.09em;
  }
  .brand-mark {
    width: 38px;
    height: 38px;
  }
  .cart-link,
  .nav-toggle {
    width: 40px;
    height: 40px;
  }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
