/* ==================================================
   EPC Near Me — CPD store: product pages, generic
   course shell and buy modal. enm design language:
   deep green #043D24, CTA green #25C146, accent
   #4ade80, ink #16241d, soft shadows.
   Scoped under .enm-cpdp (product wrapper) plus the
   .enm-cpd-modal overlay injected by cpd.js.
   ================================================== */

.enm-cpdp {
  --enm-deep: #043D24;
  --enm-deep-2: #0a5233;
  --enm-cta: #25C146;
  --enm-accent: #4ade80;
  --enm-ink: #16241d;
  --enm-muted: #4b5f55;
  --enm-body: #3d4f46;
  --enm-tint: #f2faf5;
  --enm-line: #dcebe2;
  --enm-radius: 20px;
  --enm-shadow: 0 16px 38px rgba(4, 61, 36, 0.10);
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 20px 30px;
  color: var(--enm-ink);
}
.enm-cpdp section { margin: 46px 0; }
.enm-cpdp h1 {
  font-size: 34px !important;
  font-weight: 800;
  line-height: 1.15;
  color: var(--enm-ink) !important;
  margin: 0 0 12px !important;
}
.enm-cpdp h2 {
  font-size: 28px !important;
  font-weight: 800;
  line-height: 1.2;
  color: var(--enm-ink) !important;
  margin: 0 0 12px !important;
}
.enm-cpdp h3 {
  font-size: 19px;
  font-weight: 800;
  color: var(--enm-ink);
  margin: 0 0 6px;
}
.enm-cpdp p {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--enm-body);
  margin: 0 0 14px;
}
.enm-cpdp a:not(.enm-btn) {
  color: var(--enm-deep-2);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--enm-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

/* Buttons (product pages don't load home.css, so define here) */
.enm-cpdp .enm-btn,
.enm-cpd-modal .enm-btn {
  display: inline-block;
  background: #25C146;
  border: 1px solid #25C146;
  border-radius: 10px;
  padding: 14px 26px;
  color: #fff !important;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(4, 61, 36, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.enm-cpdp .enm-btn:hover,
.enm-cpd-modal .enm-btn:hover {
  background: #31D957;
  border-color: #31D957;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(4, 61, 36, 0.26);
}

/* Check-mark bullet lists */
.enm-cpdp ul.enm-bullets {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.enm-cpdp ul.enm-bullets li {
  position: relative;
  padding: 6px 0 6px 32px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--enm-body);
}
.enm-cpdp ul.enm-bullets li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #25C146;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}

/* Breadcrumb back to the store */
.enm-cpdp-crumb { margin: 8px 0 18px; font-size: 14.5px; }
.enm-cpdp-crumb a {
  color: var(--enm-deep-2);
  font-weight: 700;
  text-decoration: none !important;
}
.enm-cpdp-crumb a:hover { text-decoration: underline !important; }

/* Hours pill (shared with the hub cards) */
.enm-cpdp .enm-cpd-hours {
  display: inline-block;
  align-self: flex-start;
  background: var(--enm-tint);
  border: 1px solid var(--enm-line);
  color: var(--enm-deep-2);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 5px 13px;
  margin-bottom: 14px;
}

/* Product hero: image left, buy panel right */
.enm-cpdp-hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 44px;
  align-items: center;
  margin-top: 10px !important;
}
.enm-cpdp-hero-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: var(--enm-shadow);
}
.enm-cpdp-blurb { font-size: 17.5px !important; }
.enm-cpdp-price {
  font-size: 30px !important;
  font-weight: 800;
  color: var(--enm-deep) !important;
  margin: 6px 0 16px !important;
}
.enm-cpdp-note {
  font-size: 13.5px !important;
  color: var(--enm-muted) !important;
  margin: 12px 0 0 !important;
}

/* Content sections */
.enm-cpdp-section {
  background: #fff;
  border: 1px solid var(--enm-line);
  border-radius: var(--enm-radius);
  box-shadow: var(--enm-shadow);
  padding: 30px 34px;
}
.enm-cpdp-desc h1, .enm-cpdp-desc h2, .enm-cpdp-desc h3 {
  font-size: 20px !important;
  margin: 18px 0 8px !important;
}
.enm-cpdp-desc ul { margin: 0 0 14px 20px; padding: 0; }
.enm-cpdp-desc li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--enm-body);
  margin: 0 0 6px;
}
.enm-cpdp-desc li p { margin: 0; }

/* Certificate band */
.enm-cpdp-cert {
  background: var(--enm-deep);
  border-radius: var(--enm-radius);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.22);
  padding: 36px 40px;
}
.enm-cpdp-cert h2 { color: #fff !important; }
.enm-cpdp-cert p { color: rgba(255, 255, 255, 0.85); }
.enm-cpdp-cert p strong { color: #fff; }

/* More CPD courses */
.enm-cpdp-more h2 { text-align: center; }
.enm-cpdp-more-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 22px;
}
.enm-cpdp-more-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--enm-line);
  border-radius: 18px;
  box-shadow: var(--enm-shadow);
  padding: 16px;
  text-decoration: none !important;
  color: var(--enm-ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.enm-cpdp-more-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(4, 61, 36, 0.16);
}
.enm-cpdp-more-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
}
.enm-cpdp-more-card h3 { font-size: 16.5px; margin: 0 0 6px; }
.enm-cpdp-more-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--enm-deep-2);
}
.enm-cpdp-more-meta .enm-cpdp-more-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--enm-deep);
}

/* Dismissible note (e.g. checkout cancelled) */
.enm-cpd-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: #fff7e0;
  border: 1px solid #f0dc9a;
  border-radius: 12px;
  color: #6b5310;
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 16px;
  margin: 12px 0 4px;
}
.enm-cpd-note button {
  background: none;
  border: none;
  color: #6b5310;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

/* 'Course not found' shell state on /cpd/course/ */
.enm-cpdp-notfound {
  text-align: center;
  padding: 60px 0 30px;
}

/* ---------- Buy modal (built by cpd.js) ---------- */
.enm-cpd-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 25, 15, 0.55);
  padding: 20px;
}
.enm-cpd-modal-box {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow: auto;
  padding: 28px 30px;
  position: relative;
}
.enm-cpd-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  font-weight: 800;
  color: #4b5f55;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.enm-cpd-modal-box h3 {
  font-size: 21px;
  font-weight: 800;
  color: #16241d;
  margin: 0 0 8px;
}
.enm-cpd-modal-box .enm-cpd-modal-lead {
  font-size: 14.5px;
  line-height: 1.6;
  color: #4b5f55;
  margin: 0 0 16px;
}
.enm-cpd-modal-tabs {
  display: flex;
  gap: 6px;
  background: #f2faf5;
  border: 1px solid #dcebe2;
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 16px;
}
.enm-cpd-modal-tabs button {
  flex: 1;
  background: none;
  border: none;
  border-radius: 9px;
  font-size: 14.5px;
  font-weight: 800;
  color: #0a5233;
  padding: 9px 6px;
  cursor: pointer;
}
.enm-cpd-modal-tabs button.active {
  background: #043D24;
  color: #fff;
}
.enm-cpd-modal-box label {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  color: #16241d;
  margin: 12px 0 5px;
}
.enm-cpd-modal-box input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dcebe2;
  border-radius: 10px;
  font-size: 15.5px;
  padding: 11px 13px;
  outline: none;
}
.enm-cpd-modal-box input:focus { border-color: #25C146; }
.enm-cpd-modal-msg {
  display: none;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  padding: 10px 13px;
  margin-top: 14px;
  background: #f2faf5;
  border: 1px solid #dcebe2;
  color: #0a5233;
}
.enm-cpd-modal-msg.bad {
  background: #fde8e8;
  border-color: #f5c2c2;
  color: #9b2c2c;
}
.enm-cpd-modal-box .enm-btn {
  width: 100%;
  margin-top: 18px;
}
.enm-cpd-modal-alt {
  font-size: 13px;
  color: #4b5f55;
  text-align: center;
  margin: 14px 0 0;
}
.enm-cpd-modal-alt a { color: #0a5233; font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .enm-cpdp-more-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .enm-cpdp-hero { grid-template-columns: 1fr; gap: 26px; }
  .enm-cpdp h1 { font-size: 28px !important; }
  .enm-cpdp h2 { font-size: 24px !important; }
  .enm-cpdp-section { padding: 24px 20px; }
  .enm-cpdp-cert { padding: 26px 22px; }
}
@media (max-width: 520px) {
  .enm-cpdp-more-grid { grid-template-columns: 1fr; }
}

/* ---------- Legacy WooCommerce basics (kept so any
   remaining single-product markup stays on-brand) ---------- */
body.single-product .product .entry-title,
body.single-product .product_title {
  font-size: 32px !important;
  font-weight: 800;
  color: #16241d !important;
  line-height: 1.2;
}
body.single-product .price,
body.single-product .woocommerce-Price-amount {
  color: #043D24 !important;
  font-size: 26px !important;
  font-weight: 800 !important;
}
body.single-product .button {
  background: #25C146 !important;
  border: 1px solid #25C146 !important;
  border-radius: 10px !important;
  color: #fff !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}
body.single-product .button:hover {
  background: #31D957 !important;
  border-color: #31D957 !important;
}
body.single-product .quantity { display: none !important; }

/* ==================================================
   Hub grid card images (/cpd/). The static cards are
   a no-JS fallback; cpd.js rebuilds the grid from the
   products API with these same classes.
   ================================================== */
.enm-cpd-card { overflow: hidden; }
.enm-cpd-imglink {
  display: block;
  margin: -26px -28px 18px;
}
.enm-cpd-imglink img,
.enm-cpd-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f2faf5;
}
