:root {
  --ink: #17272c;
  --muted: #60727a;
  --soft: #f6f5f1;
  --surface: #ffffff;
  --line: #dfe5e2;
  --brand: #12616a;
  --brand-dark: #0b4750;
  --accent: #c77b5f;
  --accent-dark: #a85f45;
  --gold: #b18a54;
  --shadow: 0 14px 36px rgba(20, 40, 45, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

.nav-shell {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #344b52;
  font-size: 0.94rem;
  font-weight: 600;
}

.desktop-nav a {
  white-space: nowrap;
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible {
  color: var(--brand);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  color: var(--brand);
  background: #fff;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  color: #fff;
  background: var(--brand);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  position: relative;
}

.menu-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle span:nth-child(1) {
  top: 14px;
}

.menu-toggle span:nth-child(2) {
  top: 21px;
}

.menu-toggle span:nth-child(3) {
  top: 28px;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 39;
  background: #fff;
  padding: 20px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  color: #253b42;
  font-weight: 700;
}

.page {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.hero {
  position: relative;
  overflow: hidden;
  background: #17333a;
  color: #fff;
  border-radius: var(--radius);
  padding: 76px 48px 72px;
  background-image:
    linear-gradient(135deg, rgba(23, 51, 58, 0.94), rgba(18, 97, 106, 0.88)),
    url("assets/brand/mediheal-logo-large.png");
  background-position: center;
  background-size: cover;
}

.hero-inner {
  max-width: 760px;
}

.hero h1 {
  margin: 0 0 18px;
  max-width: 700px;
  font-size: clamp(2rem, 4.5vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero p {
  margin: 0 0 28px;
  max-width: 620px;
  color: #dcebed;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 750;
  font-size: 0.96rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.button-primary {
  background: #fff;
  color: var(--brand-dark);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #e8f3f1;
}

.button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  background: transparent;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: #fff;
}

.button-brand {
  background: var(--brand);
  color: #fff;
}

.button-brand:hover,
.button-brand:focus-visible {
  background: var(--brand-dark);
}

.section {
  margin-top: 56px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.5vw, 2.2rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 720px;
}

.link-arrow {
  flex: 0 0 auto;
  color: var(--brand);
  font-weight: 700;
}

.category-grid,
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #fff;
  border-radius: 7px;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.product-card .media-frame {
  aspect-ratio: 1 / 1;
  margin-bottom: 15px;
}

.product-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.product-card .card-body {
  flex: 1;
  min-height: 72px;
  color: var(--muted);
  font-size: 0.9rem;
}

.product-card .card-body p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .card-link {
  margin-top: 16px;
  color: var(--brand);
  font-weight: 700;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.split .media-frame {
  aspect-ratio: 5 / 4;
}

.prose h2 {
  margin-top: 0;
  font-size: 2rem;
  line-height: 1.12;
}

.prose p {
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.faq-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.faq-button::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--brand);
  font-size: 1.3rem;
}

.faq-item.open .faq-button::after {
  content: "−";
}

.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
}

.faq-item.open .faq-panel {
  max-height: 360px;
}

.faq-panel p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
}

.breadcrumb {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.88rem;
}

.breadcrumb a:hover {
  color: var(--brand);
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 38px;
  align-items: start;
}

.gallery-main {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumbnail-row {
  display: grid;
  grid-template-columns: repeat(5, 72px);
  gap: 8px;
  margin-top: 10px;
  min-height: 72px;
}

.thumbnail-row button {
  height: 72px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.thumbnail-row img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.08;
}

.product-copy .lead {
  color: var(--muted);
  margin: 0 0 18px;
}

.variant-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.variant-selector button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 650;
}

.variant-selector button[aria-pressed="true"] {
  border-color: var(--brand);
  color: var(--brand);
  background: #edf6f5;
}

.price-area {
  margin: 18px 0;
  font-size: 1.1rem;
  font-weight: 750;
}

.price-area .price-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.buy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.spec-list {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
  margin-top: 26px;
}

.spec-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.spec-row dt {
  color: var(--muted);
  font-size: 0.88rem;
}

.spec-row dd {
  margin: 0;
  font-size: 0.94rem;
}

.legal {
  max-width: 820px;
}

.legal h2 {
  margin-top: 30px;
}

.site-footer {
  background: #15343a;
  color: #dfecee;
  padding: 48px 0 28px;
}

.footer-shell {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-shell h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 0.95rem;
}

.footer-shell a {
  display: block;
  margin: 7px 0;
  color: #b9cdd0;
}

.footer-shell a:hover {
  color: #fff;
}

.footer-bottom {
  width: min(1200px, calc(100% - 40px));
  margin: 26px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #9db6ba;
  font-size: 0.85rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: var(--brand);
  padding: 10px 14px;
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
}

@media (max-width: 980px) {
  .category-grid,
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
  }

  .footer-shell {
    grid-template-columns: 1fr 1fr;
  }

  .product-layout {
    grid-template-columns: 1fr;
  }

  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-shell,
  .page,
  .footer-shell,
  .footer-bottom {
    width: min(100% - 24px, 1200px);
  }

  .hero {
    padding: 52px 24px 48px;
  }

  .category-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-layout {
    gap: 22px;
  }

  .thumbnail-row {
    grid-template-columns: repeat(4, 64px);
    gap: 6px;
  }

  .thumbnail-row button {
    height: 64px;
  }

  .spec-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .footer-shell {
    grid-template-columns: 1fr;
  }
}
