/* Examination card product pages. Scoped under .cp and .cp-modal so other pages are untouched. */
.cp, .cp-modal {
  --cp-green: #1a7345;
  --cp-green-dark: #135934;
  --cp-green-tint: #edf7f1;
  --cp-ink: #17231c;
  --cp-text: #47524c;
  --cp-line: #dfe5e1;
  --cp-red: #b42318;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--cp-text);
}

.cp { padding: 76px 0 48px; background: #fff; }
.cp-container { max-width: 1080px; }
.cp section { margin-top: 44px; }
.cp section.cp-hero { margin-top: 12px; }
.cp a { color: var(--cp-green-dark); text-decoration: underline; }
.cp a:hover, .cp a:focus { color: var(--cp-ink); }

.cp h1, .cp h2, .cp h3, .cp-modal h2 {
  font-family: "Open Sans", Arial, sans-serif;
  color: var(--cp-ink);
  letter-spacing: 0;
  text-transform: none;
}
.cp h1 { margin: 0 0 10px; font-size: 32px; font-weight: 700; line-height: 1.2; }
.cp h2 { margin: 0 0 14px; font-size: 24px; font-weight: 700; line-height: 1.3; }
.cp h3 { margin: 20px 0 8px; font-size: 18px; font-weight: 600; line-height: 1.4; }
.cp p { margin: 0 0 12px; font-size: 16px; line-height: 1.6; }

/* Breadcrumb */
.cp-breadcrumb { display: flex; flex-wrap: wrap; margin: 0 0 12px; padding: 0; list-style: none; font-size: 14px; }
.cp-breadcrumb li + li::before { content: "/"; margin: 0 8px; color: #8a948e; }
.cp-breadcrumb li[aria-current] { color: var(--cp-text); }

/* Hero */
.cp-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; align-items: start; }
.cp-media { padding: 16px; border: 1px solid var(--cp-line); border-radius: 12px; background: #fff; }
.cp-media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; }
.cp-lead { font-size: 17px; }

.cp-price-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 12px 0; }
.cp p.cp-price { margin: 0; font-size: 32px; font-weight: 700; line-height: 1.2; color: var(--cp-ink); }
.cp-price span { font-size: 14px; font-weight: 400; color: var(--cp-text); }
.cp p.cp-stock { margin: 0; font-size: 14px; font-weight: 600; }
.cp-stock-in { color: var(--cp-green-dark); }
.cp-stock-out { color: var(--cp-red); }
.cp-unavailable { padding: 14px; border-radius: 8px; background: #fef3f2; color: var(--cp-ink); }

/* Quantity */
.cp-qty-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--cp-line); }
.cp-qty-row label { margin: 0; font-weight: 600; color: var(--cp-ink); }
.cp-qty { display: flex; }
.cp-qty button, .cp-qty input {
  height: 44px;
  border: 1px solid #8a948e;
  background: #fff;
  color: var(--cp-ink);
  font-size: 18px;
  text-align: center;
}
.cp-qty button { width: 44px; cursor: pointer; }
.cp-qty button:first-child { border-radius: 8px 0 0 8px; }
.cp-qty button:last-child { border-radius: 0 8px 8px 0; }
.cp-qty button:hover { background: var(--cp-green-tint); }
.cp-qty input { width: 56px; border-width: 1px 0; -moz-appearance: textfield; appearance: textfield; }
.cp-qty input::-webkit-outer-spin-button, .cp-qty input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }

/* Order summary, shared with the purchase form */
.cp-summary { margin: 0 0 16px; }
.cp-summary div { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; font-size: 15px; }
.cp-summary dt { font-weight: 400; }
.cp-summary dd { margin: 0; color: var(--cp-ink); }
.cp-summary .cp-summary-total { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--cp-line); font-size: 18px; font-weight: 700; color: var(--cp-ink); }
.cp-summary .cp-summary-total dt { font-weight: 700; }

/* "Buy Now" on the store page links here: keeps it clear of the fixed navbar. */
#cp-buybox { scroll-margin-top: 70px; }

/* Rules a buyer must read before paying */
.cp p.cp-notice, .cp-modal p.cp-notice {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 4px solid #b54708;
  border-radius: 4px;
  background: #fffaeb;
  color: var(--cp-ink);
  font-size: 14px;
  line-height: 1.5;
}
.cp-notice .fa { color: #b54708; }

/* Buttons */
.cp-btn {
  min-height: 48px;
  padding: 10px 22px;
  border: 0;
  border-radius: 8px;
  background: var(--cp-green);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.cp-btn:hover, .cp-btn:focus { background: var(--cp-green-dark); color: #fff; }
.cp-btn[disabled] { opacity: .7; cursor: wait; }
.cp-btn-block { display: block; width: 100%; }

.cp a:focus-visible, .cp button:focus-visible, .cp input:focus-visible, .cp summary:focus-visible,
.cp-modal button:focus-visible, .cp-modal input:focus-visible {
  outline: 3px solid #0b5cad;
  outline-offset: 2px;
}

.cp p.cp-assure { margin: 10px 0 0; font-size: 14px; }
.cp-assure .fa { width: 18px; color: var(--cp-green); }

/* Benefits */
.cp section.cp-benefits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 36px; padding: 20px; border-radius: 12px; background: var(--cp-green-tint); }
.cp-benefits .fa { font-size: 22px; color: var(--cp-green); }
.cp h2.cp-benefit-title { margin: 6px 0 4px; font-size: 15px; font-weight: 700; line-height: 1.4; }
.cp-benefits p { margin: 0; font-size: 14px; line-height: 1.5; }

/* Content */
.cp-content { max-width: 780px; }
.cp-content ul { padding-left: 20px; }
.cp-steps { margin: 0; padding: 0; list-style: none; counter-reset: cp-step; }
.cp-steps li { position: relative; min-height: 32px; margin-bottom: 12px; padding-left: 44px; counter-increment: cp-step; }
.cp-steps li::before {
  content: counter(cp-step);
  position: absolute;
  top: -1px;
  left: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--cp-green);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 30px;
  text-align: center;
}
.cp p.cp-note { padding: 12px 14px; border-left: 4px solid var(--cp-green); background: var(--cp-green-tint); font-size: 15px; }
.cp a.cp-portal { font-weight: 700; }

/* FAQ accordion */
.cp-faqs { border-top: 1px solid var(--cp-line); }
.cp-faqs details { border-bottom: 1px solid var(--cp-line); }
.cp-faqs summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 10px 0; cursor: pointer; list-style: none; }
.cp-faqs summary::-webkit-details-marker { display: none; }
.cp-faqs summary::after { content: "+"; flex: none; font-size: 24px; line-height: 1; color: var(--cp-green); }
.cp-faqs details[open] summary::after { content: "\2212"; }
.cp-faqs summary h3 { margin: 0; font-size: 16px; font-weight: 600; }
.cp-faq-answer { padding: 0 0 14px; }
.cp p.cp-more { margin-top: 14px; }

/* Related */
.cp-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cp a.cp-related-card { display: flex; flex-direction: column; padding: 12px; border: 1px solid var(--cp-line); border-radius: 12px; color: var(--cp-ink); text-decoration: none; }
.cp a.cp-related-card:hover { border-color: var(--cp-green); }
.cp-related-card img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; margin-bottom: 10px; }
.cp-related-name { flex: 1; font-size: 15px; font-weight: 600; line-height: 1.4; }
.cp-related-price { margin-top: 6px; font-weight: 700; color: var(--cp-green-dark); }
.cp-guides { padding-left: 20px; }
.cp-guides li { margin-bottom: 6px; }

/* Support */
.cp section.cp-support { padding: 24px; border: 1px solid var(--cp-line); border-radius: 12px; }
.cp-support ul { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 14px; padding: 0; list-style: none; }
.cp-support .fa { width: 18px; color: var(--cp-green); }
.cp p.cp-policy { margin: 0; font-size: 14px; }

/* Mobile purchase bar */
.cp-sticky {
  position: fixed;
  z-index: 1020;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--cp-line);
  background: #fff;
  box-shadow: 0 -4px 16px rgba(23, 35, 28, .12);
}
.cp-sticky-label { display: block; font-size: 12px; line-height: 1.2; }
.cp-sticky strong { font-size: 20px; line-height: 1.2; color: var(--cp-ink); }

/* Purchase form */
.cp-modal .modal-content { border-radius: 12px; }
.cp-modal .modal-header { padding: 16px 20px; }
.cp-modal .modal-header .close { font-size: 28px; opacity: .7; }
.cp-modal .modal-title { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.3; }
.cp-modal .modal-body { padding: 16px 20px; }
.cp-modal .modal-footer { padding: 14px 20px; }
.cp-modal p { font-size: 15px; line-height: 1.5; }
.cp-modal-product { margin: 0 0 10px; font-weight: 600; color: var(--cp-ink); }
.cp-modal label { margin-bottom: 4px; font-size: 14px; font-weight: 600; color: var(--cp-ink); text-transform: none; letter-spacing: 0; }
/* 16px text stops iOS zooming in when a field is focused. */
.cp-modal .form-control { height: 46px; border-color: #8a948e; border-radius: 8px; color: var(--cp-ink); font-size: 16px; text-transform: none; letter-spacing: 0; }
.cp-field-error { display: block; margin-top: 4px; font-size: 14px; color: var(--cp-red); }
.cp-buyer { margin: 0 0 12px; }
.cp-modal p.cp-modal-note { margin: 0; font-size: 13px; }

@media (max-width: 767px) {
  .cp { padding: 62px 0 84px; }
  .cp section { margin-top: 32px; }
  .cp h1 { font-size: 26px; }
  .cp h2 { font-size: 21px; }
  .cp-hero { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  /* Price and purchase controls come first on phones, then the image. */
  .cp-media { order: 2; padding: 8px; }
  .cp-buybox { order: 1; }
  .cp section.cp-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; }
  .cp-related { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cp-sticky:not([hidden]) { display: flex; }
  .cp-sticky .cp-btn { flex: 1; max-width: 200px; }
  /* Keeps the site's scroll-to-top button clear of the purchase bar. */
  .scroll-up { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .cp-modal .modal-dialog { margin: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .cp-btn { transition: none; }
}
