/* ECG design pass 2026-10-25 — implements notes/design-recommendations.md (site-wide items).
   Loaded by mu-plugins/ecg-design.php. Tokens: navy #1C244B, gold #D5B26E, body #4B6981. */

/* ---------- 1. Post / product H1 cap (was 65px, 3–4 lines pushed hero below fold) ---------- */
body.single-post h1.elementor-heading-title,
body.single-product h1.product_title.elementor-heading-title {
  font-size: 44px !important;
  line-height: 1.2em !important;
  overflow-wrap: anywhere;
}
@media (max-width: 1024px) {
  body.single-post h1.elementor-heading-title,
  body.single-product h1.product_title.elementor-heading-title { font-size: 34px !important; }
}
@media (max-width: 767px) {
  body.single-post h1.elementor-heading-title,
  body.single-product h1.product_title.elementor-heading-title { font-size: 26px !important; line-height: 1.15em !important; }
}

/* ---------- 2. Left-align body copy on mobile (theme justifies; wide word gaps at 390px) ---------- */
@media (max-width: 767px) {
  .elementor-widget-theme-post-content, .elementor-widget-theme-post-content *,
  .elementor-widget-woocommerce-product-content, .elementor-widget-woocommerce-product-content *,
  .woocommerce-product-details__short-description, .woocommerce-product-details__short-description *,
  .ecg-cat-content, .ecg-cat-content *, .ecg-shop-content, .ecg-shop-content *,
  .elementor-location-single .elementor-widget-text-editor p,
  .elementor-location-single h1.elementor-heading-title {
    text-align: left !important;
  }
}
/* category / shop intros: readable measure, never a centred wall */
.ecg-cat-content, .ecg-shop-content { max-width: 960px; margin-left: auto; margin-right: auto; }
.ecg-cat-content p, .ecg-shop-content p { text-align: left; }

/* ---------- 3. Lists breathe; images never overflow; no separator noise before headings ---------- */
.elementor-widget-theme-post-content ul, .elementor-widget-theme-post-content ol,
.elementor-widget-woocommerce-product-content ul, .elementor-widget-woocommerce-product-content ol,
.woocommerce-product-details__short-description ul, .woocommerce-product-details__short-description ol {
  margin-bottom: 1.25em;
}
.elementor-widget-theme-post-content figure.wp-block-image,
.elementor-widget-theme-post-content figure.wp-block-image img,
.elementor-widget-theme-post-content img,
.elementor-widget-woocommerce-product-content img {
  max-width: 100%; height: auto;
}
.elementor-widget-theme-post-content figure.wp-block-image { width: auto; }
.elementor-widget-theme-post-content hr.wp-block-separator:has(+ h2),
.elementor-widget-theme-post-content hr.wp-block-separator:has(+ .wp-block-heading),
.elementor-widget-theme-post-content hr:has(+ h2) { display: none; }
.elementor-widget-theme-post-content h2, .elementor-widget-woocommerce-product-content h2 { margin-top: 1.6em; }

/* ---------- 4. Featured image: never covers the first paragraph (small images were stretched) ---------- */
.elementor-widget-theme-post-featured-image img {
  width: 100%; height: auto !important; max-height: 560px; object-fit: cover; display: block;
}
.elementor-widget-theme-post-featured-image > .elementor-widget-container { margin-bottom: 28px; }
.elementor-widget-theme-post-featured-image img[width="300"],
.elementor-widget-theme-post-featured-image img[width="225"] { max-width: 640px; margin: 0 auto; }

/* ---------- 5. Template CTA line → gold-on-navy band (templates 861/1156/1157 text-editor with tel link) ---------- */
.elementor-location-single .elementor-widget-text-editor:has(> .elementor-widget-container > p > b > a[href^="tel:"]),
.elementor-location-single .elementor-widget-text-editor:has(> .elementor-widget-container > p > strong > a[href^="tel:"]),
.elementor-location-single .elementor-widget-text-editor:has(> .elementor-widget-container > p > b:only-child),
.elementor-861 .elementor-element-cba975c {
  background: #1C244B; color: #FFFFFF; border-radius: 10px;
  padding: 26px 24px; margin: 36px 0 28px;
}
.elementor-861 .elementor-element-cba975c p, .elementor-861 .elementor-element-cba975c b,
.elementor-location-single .elementor-widget-text-editor:has(a[href^="tel:"]) > .elementor-widget-container > p {
  color: #FFFFFF; font-family: "Poppins", sans-serif; font-weight: 500; font-size: 18px; line-height: 1.5; margin: 0;
}
.elementor-861 .elementor-element-cba975c a, .elementor-861 .elementor-element-cba975c b a,
.elementor-location-single .elementor-widget-text-editor:has(a[href^="tel:"]) a { color: #D5B26E; text-decoration: none; }

/* ---------- 6. Homepage conversion band + hero button contrast ---------- */
.elementor-48 .elementor-element-764d0839 .elementor-cta__description { color: #1C244B !important; }
.elementor-48 .elementor-element-764d0839 .elementor-cta__title { color: #1C244B !important; }
.elementor-48 .elementor-element-764d0839 .elementor-cta__button {
  background-color: #1C244B !important; color: #FFFFFF !important; border-color: #1C244B !important;
  padding: 14px 36px; font-weight: 600;
}
.elementor-48 .elementor-element-764d0839 .elementor-cta__button:hover { background-color: #FFFFFF !important; color: #1C244B !important; }
.elementor-48 .elementor-element-2a921c06 .elementor-button {
  background-color: #1C244B !important; color: #FFFFFF !important; border-color: #1C244B !important; font-weight: 600;
}
.elementor-48 .elementor-element-2a921c06 .elementor-button:hover { background-color: #D5B26E !important; color: #1C244B !important; }

/* ---------- 7. Header: compact on mobile, ticker single line, readable deltas ---------- */
.metal-prices { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-variant-numeric: tabular-nums; }
.metal-prices .metal-pair { white-space: nowrap; }
.metal-prices .price-up { color: #8FE0B0 !important; }
.metal-prices .price-down { color: #F4A6A0 !important; }
.metal-prices .price-flat { opacity: .75; }
@media (max-width: 767px) {
  .metal-prices { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; font-size: 13px; padding-bottom: 2px; }
  .metal-prices::-webkit-scrollbar { display: none; }
  .elementor-1126 .elementor-element-6dd9af0 h5 { display: none; }
  .elementor-1126 .elementor-element-6dd9af0 > .elementor-widget-container { padding-top: 8px; }
  .elementor-1126 .elementor-element-6dd9af0 h3 { margin: 0; }
}
/* cart total: not grey on navy */
.elementor-1126 .elementor-menu-cart__toggle .elementor-button-text { color: #FFFFFF; }

/* ---------- 8. Products: call-for-price box, hidden empty price slot, spec table ---------- */
.single-product p.price:empty { display: none; }
.single-product .call-for-availability {
  border: 1px solid #D5B26E; background: #FBF7EE; color: #1C244B; border-radius: 8px;
  padding: 14px 18px; margin: 10px 0 18px; font-family: "Poppins", sans-serif; font-weight: 500; font-size: 17px;
}
.single-product .call-for-availability a { color: #1C244B; text-decoration: underline; text-decoration-color: #D5B26E; }
.ecg-specs { margin: 0 0 28px; }
.ecg-specs h2 { font-family: "Montserrat", sans-serif; font-size: 20px; color: #1C244B; margin: 0 0 10px; }
.ecg-specs table { width: 100%; border-collapse: collapse; font-family: "Poppins", sans-serif; font-size: 15px; }
.ecg-specs th, .ecg-specs td { text-align: left; padding: 9px 12px; border-bottom: 1px solid #E6E3DB; vertical-align: top; }
.ecg-specs th { width: 34%; color: #1C244B; font-weight: 600; background: #F9FAFD; }
.ecg-specs td { color: #4B6981; }
@media (max-width: 767px) { .ecg-specs th { width: 42%; } .ecg-specs table { font-size: 14px; } }

/* ---------- 9. Related products strip at the end of articles ---------- */
.ecg-related { margin: 36px 0 8px; padding: 22px 22px 14px; border: 1px solid #E6E3DB; border-radius: 10px; background: #F9FAFD; }
.ecg-related h2 { font-family: "Montserrat", sans-serif; font-size: 20px; color: #1C244B; margin: 0 0 12px; }
.ecg-related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ecg-related li { margin: 0; }
.ecg-related a {
  display: inline-block; padding: 9px 16px; border-radius: 50px; border: 1px solid #D5B26E; background: #FFFFFF;
  color: #1C244B; font-family: "Poppins", sans-serif; font-weight: 500; font-size: 15px; text-decoration: none;
}
.ecg-related a:hover { background: #1C244B; color: #FFFFFF; border-color: #1C244B; }

/* ---------- 10. Mobile sticky tap-to-call on product pages ---------- */
.ecg-sticky-call { display: none; }
@media (max-width: 767px) {
  .ecg-sticky-call {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #1C244B;
    box-shadow: 0 -4px 16px rgba(0,0,0,.18);
  }
  .ecg-sticky-call a {
    flex: 1; text-align: center; padding: 12px 8px; border-radius: 50px; font-family: "Montserrat", sans-serif;
    font-weight: 600; font-size: 15px; text-decoration: none; background: #D5B26E; color: #1C244B;
  }
  .ecg-sticky-call a.ecg-sticky-call__alt { background: transparent; color: #FFFFFF; border: 1px solid #D5B26E; }
  body.single-product { padding-bottom: 72px; }
}

/* ---------- 11. Landing Page template (template-landing-page.php): kit tokens instead of bare text ---------- */
.ecg-landing-page { max-width: 1100px; margin: 0 auto; padding: 40px 24px 64px; font-family: "Poppins", sans-serif; font-weight: 300; color: #4B6981; line-height: 1.75; font-size: 17px; }
.ecg-landing-page section { margin: 0 0 56px; }
.ecg-landing-page h1, .ecg-landing-page h2, .ecg-landing-page h3 { font-family: "Montserrat", sans-serif; font-weight: 600; color: #1C244B; line-height: 1.2; margin: 0 0 .5em; }
.ecg-landing-page h1 { font-size: 44px; }
.ecg-landing-page h2 { font-size: 32px; margin-top: .4em; }
.ecg-landing-page h3 { font-size: 22px; }
.ecg-landing-page p { margin: 0 0 1.1em; }
.ecg-landing-page p:empty { display: none; }
.ecg-landing-page img { max-width: 100%; height: auto; border-radius: 10px; margin: 8px 0 16px; }
.ecg-landing-page ul, .ecg-landing-page ol { margin: 0 0 1.25em 1.25em; }
.ecg-landing-page p > a:only-child[href^="#"], .ecg-landing-page p > a:only-child[href*="/contact-us"], .ecg-landing-page p > a:only-child[href*="/product"] {
  display: inline-block; background: #D5B26E; color: #1C244B; padding: 13px 30px; border-radius: 50px;
  font-family: "Montserrat", sans-serif; font-weight: 600; text-decoration: none; margin-top: 6px;
}
.ecg-landing-page a { color: #1C244B; text-decoration: underline; text-decoration-color: #D5B26E; }
@media (max-width: 767px) { .ecg-landing-page { padding: 24px 18px 56px; font-size: 16px; } .ecg-landing-page h1 { font-size: 30px; } .ecg-landing-page h2 { font-size: 24px; } }

/* ---------- 12. Self-Directed IRA hero disclosure: legible over the photo ---------- */
.elementor-3533 .elementor-element-ecgdisc2026 p {
  background: rgba(255,255,255,.96) !important; border-color: #D5B26E !important; color: #1C244B !important;
}

/* ---------- 13. Mobile H2/H3 scale inside articles and product copy ---------- */
@media (max-width: 767px) {
  .elementor-widget-theme-post-content h2, .elementor-widget-woocommerce-product-content h2, .ecg-cat-content h2 { font-size: 24px !important; line-height: 1.25 !important; }
  .elementor-widget-theme-post-content h3, .elementor-widget-woocommerce-product-content h3, .ecg-cat-content h3 { font-size: 19px !important; line-height: 1.3 !important; }
}
