/*
  Global UI modernization layer.
  Goals: modern typography/spacing, accessible focus, better forms/buttons,
  without relying on a build step.
*/

:root {
  --coh-bg: #ffffff;
  --coh-surface: #ffffff;
  --coh-surface-2: #f7f7f6;
  --coh-text: #111111;
  --coh-muted: #5a5a5a;
  --coh-border: rgba(17, 17, 17, 0.12);
  --coh-border-strong: rgba(17, 17, 17, 0.18);
  --coh-primary: #005f1b;
  --coh-accent: #f28300;
  --coh-accent-contrast: #ffffff;
  --coh-radius: 14px;
  --coh-radius-sm: 10px;
  --coh-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --coh-shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.08);
  --coh-ring: 0 0 0 3px rgba(0, 95, 27, 0.26);

  --coh-container: 1120px;
  --coh-gutter: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --coh-bg: #0f0f10;
    --coh-surface: #151516;
    --coh-surface-2: #1a1a1c;
    --coh-text: #f4f4f5;
    --coh-muted: rgba(244, 244, 245, 0.75);
    --coh-border: rgba(244, 244, 245, 0.14);
    --coh-border-strong: rgba(244, 244, 245, 0.18);
    --coh-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
    --coh-shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.4);
    --coh-ring: 0 0 0 3px rgba(242, 131, 0, 0.3);
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  background:
    linear-gradient(
      180deg,
      rgba(0, 95, 27, 0.1),
      transparent 38%,
      rgba(242, 131, 0, 0.07)
    ),
    var(--coh-bg);
  color: var(--coh-text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

/*
  Brand utility fallbacks.
  Tailwind CDN generates these when the `primary`/`accent` colors are registered.
  If the CDN config fails to register for any reason, these ensure the site still
  shows the brand colors instead of defaulting to black.
*/
.text-primary {
  color: var(--coh-primary);
}
.text-accent {
  color: var(--coh-accent);
}
.bg-primary {
  background-color: var(--coh-primary);
}
.bg-accent {
  background-color: var(--coh-accent);
}
.border-primary {
  border-color: var(--coh-primary);
}
.border-accent {
  border-color: var(--coh-accent);
}

/* Tailwind-first pages: keep a premium baseline even without extra classes */
.site-header.is-scrolled {
  transform: translateY(-1px);
}

/* Scroll reveal */
.coh-reveal {
  opacity: 0;
  transform: translateY(10px);
  filter: blur(2px);
  transition:
    opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 700ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.coh-reveal.coh-reveal--in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  .coh-reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* Rich text (DB HTML) */
.coh-prose {
  color: rgba(15, 23, 42, 0.85);
  line-height: 1.8;
}

.coh-prose a {
  color: var(--coh-primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.coh-prose h2,
.coh-prose h3,
.coh-prose h4 {
  color: rgba(15, 23, 42, 0.98);
  line-height: 1.2;
  margin-top: 1.2em;
  margin-bottom: 0.55em;
  letter-spacing: -0.01em;
}

.coh-prose h2 {
  font-size: 1.6rem;
}

.coh-prose h3 {
  font-size: 1.25rem;
}

.coh-prose p {
  margin: 0.8em 0;
}

.coh-prose ul,
.coh-prose ol {
  padding-left: 1.2em;
  margin: 0.8em 0;
}

.coh-prose li {
  margin: 0.35em 0;
}

.coh-prose blockquote {
  margin: 1.2em 0;
  padding: 0.9em 1em;
  border-left: 3px solid rgba(0, 95, 27, 0.35);
  background: rgba(2, 6, 23, 0.03);
  border-radius: 12px;
}

.coh-prose img {
  border-radius: 18px;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

a {
  text-underline-offset: 3px;
}

:focus-visible {
  outline: none;
  box-shadow: var(--coh-ring);
  border-radius: 8px;
}

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

/* Skip link */
.coh-skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-140%);
  background: var(--coh-surface);
  border: 1px solid var(--coh-border);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: var(--coh-shadow-sm);
  z-index: 10000;
}

.coh-skip-link:focus {
  transform: translateY(0);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--coh-border);
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background: rgba(15, 15, 16, 0.78);
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-brand img {
  width: 164px;
  height: 38px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  color: var(--coh-text);
  font-weight: 600;
  letter-spacing: 0.1px;
}

.site-nav__link:hover {
  background: var(--coh-surface-2);
  border-color: var(--coh-border);
}

.site-nav__link[aria-current="page"] {
  background: var(--coh-surface-2);
  border-color: var(--coh-border-strong);
}

.site-nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--coh-border);
  background: var(--coh-surface);
}

.site-nav__toggle:hover {
  background: var(--coh-surface-2);
}

.site-nav__toggle svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 980px) {
  .site-nav__toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--coh-bg);
    border-bottom: 1px solid var(--coh-border);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 180ms ease,
      opacity 180ms ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 16px var(--coh-gutter) 20px;
  }

  .site-nav__link {
    justify-content: space-between;
    height: 46px;
    border-radius: 14px;
    border-color: var(--coh-border);
    background: var(--coh-surface);
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--coh-border);
  background: var(--coh-surface);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 22px;
  padding: 28px 0;
}

@media (max-width: 980px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

.site-footer__title {
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coh-muted);
  margin: 0 0 10px;
}

.site-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.site-footer__links a {
  text-decoration: none;
  color: var(--coh-text);
  opacity: 0.9;
}

.site-footer__links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.site-footer__meta {
  padding: 12px 0 22px;
  color: var(--coh-muted);
  font-size: 14px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.site-footer__social {
  display: flex;
  gap: 10px;
}

.site-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--coh-border);
  text-decoration: none;
}

.site-footer__social a:hover {
  background: var(--coh-surface-2);
}

/* Buttons / inputs (covers existing Woo-ish classes too) */
button,
input,
select,
textarea {
  font: inherit;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--coh-border);
  background: var(--coh-surface);
  color: var(--coh-text);
}

input[type="number"] {
  max-width: 140px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.coh-page button:not(.coh-btn),
.button,
.wp-element-button,
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.single_add_to_cart_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--coh-border);
  background: var(--coh-surface);
  color: var(--coh-text);
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}

.coh-page button:not(.coh-btn):hover,
.button:hover,
.wp-element-button:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover,
.single_add_to_cart_button:hover {
  background: var(--coh-surface-2);
}

/* Primary / CTA-style button in Woo template */
.woocommerce .button.alt,
.single_add_to_cart_button.button.alt {
  background: var(--coh-primary);
  border-color: rgba(0, 0, 0, 0);
  color: var(--coh-accent-contrast);
}

.woocommerce .button.alt:hover,
.single_add_to_cart_button.button.alt:hover {
  filter: brightness(1.04);
}

/* Cards + spacing helpers (usable without changing markup a lot) */
.coh-card {
  background: var(--coh-surface);
  border: 1px solid var(--coh-border);
  border-radius: var(--coh-radius);
  box-shadow: var(--coh-shadow-sm);
}

.coh-card--padded {
  padding: 18px;
}

/* Better readability inside old template wrappers */
.entry-content,
.cmsmasters-widget-content .entry-content {
  color: var(--coh-text);
}

.entry-content p {
  margin: 0 0 1em;
}

/* Product page polish */
.woocommerce .price {
  font-size: 22px;
  font-weight: 800;
}

.woocommerce del {
  opacity: 0.6;
}

.woocommerce ins {
  text-decoration: none;
}

.woocommerce .quantity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--coh-border);
  text-align: left;
}

table th {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coh-muted);
}

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

/* Guard rails: ensure legacy theme styles can't "un-hide" the menu UI */
html.coh-js .site-nav__list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

html.coh-js .site-nav__toggle {
  display: inline-grid !important;
  place-items: center !important;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  min-width: 44px !important;
  min-height: 44px !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1 !important;
}

/* ========================================================================== */
/* COH Premium Redesign (V2)
   Goal: dramatic, modern, premium visual identity while keeping functionality.
   Strategy: override tokens + restyle shared surfaces + recompose pages via
   the `.coh-shell` + `.coh-hero` wrapper without needing to rewrite logic.
*/

:root {
  /* Palette (midnight + aurora accent) */
  --coh-bg: #070a12;
  --coh-surface: rgba(255, 255, 255, 0.06);
  --coh-surface-2: rgba(255, 255, 255, 0.1);
  --coh-text: rgba(255, 255, 255, 0.92);
  --coh-muted: rgba(255, 255, 255, 0.68);
  --coh-border: rgba(255, 255, 255, 0.14);
  --coh-border-strong: rgba(255, 255, 255, 0.22);

  --coh-primary: #005f1b;
  --coh-accent: #f28300;
  --coh-accent-2: #f28300;
  --coh-accent-contrast: #ffffff;

  --coh-radius: 18px;
  --coh-radius-sm: 14px;

  --coh-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  --coh-shadow-sm: 0 18px 50px rgba(0, 0, 0, 0.45);
  --coh-ring: 0 0 0 3px rgba(0, 95, 27, 0.28);

  --coh-container: 1180px;
  --coh-gutter: 22px;

  --coh-h1: clamp(34px, 4.2vw, 56px);
  --coh-h2: clamp(26px, 2.8vw, 40px);
  --coh-h3: clamp(20px, 2.2vw, 28px);
  --coh-lead: clamp(16px, 1.4vw, 18px);
}

@media (prefers-color-scheme: light) {
  :root {
    --coh-bg: #f7f7fb;
    --coh-surface: rgba(255, 255, 255, 0.86);
    --coh-surface-2: rgba(255, 255, 255, 0.96);
    --coh-text: #0c1020;
    --coh-muted: rgba(12, 16, 32, 0.68);
    --coh-border: rgba(12, 16, 32, 0.12);
    --coh-border-strong: rgba(12, 16, 32, 0.18);
    --coh-shadow: 0 24px 70px rgba(12, 16, 32, 0.14);
    --coh-shadow-sm: 0 14px 42px rgba(12, 16, 32, 0.12);
    --coh-ring: 0 0 0 3px rgba(0, 95, 27, 0.22);
  }
}

html {
  scroll-padding-top: 96px;
}

body {
  background:
    linear-gradient(
      180deg,
      rgba(0, 95, 27, 0.1),
      transparent 38%,
      rgba(242, 131, 0, 0.07)
    ),
    var(--coh-bg);
}

/* Typography hierarchy override for legacy markup */
h1,
.entry-title,
.elementor-heading-title,
.cmsmasters-widget-title__heading {
  letter-spacing: -0.02em;
}

.coh-shell {
  position: relative;
  isolation: isolate;
}

.coh-hero {
  position: relative;
  padding: clamp(52px, 7vw, 96px) 0 44px;
}

.coh-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      900px 540px at 15% 10%,
      rgba(0, 95, 27, 0.24),
      transparent 65%
    ),
    radial-gradient(
      900px 540px at 85% 5%,
      rgba(242, 131, 0, 0.18),
      transparent 65%
    ),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.coh-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--coh-border);
  background: var(--coh-surface);
  box-shadow: var(--coh-shadow-sm);
  color: var(--coh-muted);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  margin: 0 0 14px;
}

.coh-hero__title {
  font-size: var(--coh-h1);
  line-height: 1.02;
  margin: 0;
}

.coh-hero__subtitle {
  margin: 14px 0 0;
  font-size: var(--coh-lead);
  color: var(--coh-muted);
  max-width: 70ch;
}

.coh-page {
  position: relative;
  padding: 0 0 56px;
}

.coh-page::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -28px;
  transform: translateX(-50%);
  width: min(
    calc(var(--coh-container) + 44px),
    calc(100% - (var(--coh-gutter) * 2))
  );
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 95, 27, 0.55),
    rgba(242, 131, 0, 0.45),
    transparent
  );
  opacity: 0.6;
}

/* Hide the old template page-title/breadcrumb hero blocks inside our shell */
.coh-shell .elementor-widget-cmsmasters-breadcrumbs,
.coh-shell .elementor-widget-cmsmasters-page-title,
.coh-shell .cmsmasters-widget-breadcrumbs,
.coh-shell .cmsmasters-widget-title {
  display: none !important;
}

/* Premium header: floating glass command bar */
.site-header {
  background: transparent;
  border-bottom: 0;
  padding: 14px 0;
  backdrop-filter: none;
}

.site-header__inner {
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--coh-border);
  background: linear-gradient(180deg, var(--coh-surface-2), var(--coh-surface));
  box-shadow: var(--coh-shadow-sm);
}

.site-header.is-scrolled .site-header__inner {
  border-color: var(--coh-border-strong);
  box-shadow: var(--coh-shadow);
}

.site-brand img {
  width: 156px;
  height: 36px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}

.site-nav__link {
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--coh-text);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.site-nav__link:hover {
  background: rgba(0, 95, 27, 0.12);
  border-color: rgba(0, 95, 27, 0.25);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.site-nav__link[aria-current="page"] {
  background: linear-gradient(
    135deg,
    rgba(0, 95, 27, 0.28),
    rgba(242, 131, 0, 0.18)
  );
  border-color: rgba(255, 255, 255, 0.22);
}

.site-nav__toggle {
  border-radius: 999px;
  background: var(--coh-surface);
  border-color: var(--coh-border);
  transition:
    transform 160ms ease,
    background-color 160ms ease;
}

.site-nav__toggle:hover {
  transform: translateY(-1px);
  background: var(--coh-surface-2);
}

@media (max-width: 980px) {
  .site-nav {
    top: 92px;
    background: linear-gradient(
      180deg,
      var(--coh-surface-2),
      var(--coh-surface)
    );
    border-bottom: 1px solid var(--coh-border);
    box-shadow: var(--coh-shadow-sm);
  }
}

/* Footer: richer + more intentional */
.site-footer {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    transparent 85%
  );
  border-top: 1px solid var(--coh-border);
}

.site-footer__title {
  letter-spacing: 0.18em;
}

.site-footer__links a {
  opacity: 0.86;
}

.site-footer__social a {
  background: var(--coh-surface);
}

/* Buttons & inputs: more premium / app-like */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  background: linear-gradient(180deg, var(--coh-surface-2), var(--coh-surface));
  border-color: var(--coh-border);
  border-radius: 14px;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  transition:
    box-shadow 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: var(--coh-ring);
  border-color: rgba(0, 95, 27, 0.45);
}

.coh-page button:not(.coh-btn),
.button,
.wp-element-button,
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.single_add_to_cart_button {
  background: linear-gradient(180deg, var(--coh-surface-2), var(--coh-surface));
  border-color: var(--coh-border);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease,
    border-color 160ms ease;
}

.coh-page button:not(.coh-btn):hover,
.button:hover,
.wp-element-button:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover,
.single_add_to_cart_button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
  filter: brightness(1.02);
}

.woocommerce .button.alt,
.single_add_to_cart_button.button.alt {
  background: linear-gradient(
    135deg,
    rgba(0, 95, 27, 0.92),
    rgba(242, 131, 0, 0.78)
  );
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--coh-accent-contrast);
}

.woocommerce .button.alt:hover,
.single_add_to_cart_button.button.alt:hover {
  filter: brightness(1.05);
}

/* Elementor/CMSMasters containers: make them feel like custom, spaced sections */
.coh-page .elementor,
.coh-page .elementor-inner,
.coh-page .elementor-section-wrap {
  width: 100%;
}

.coh-page .e-con-inner {
  width: 100%;
  max-width: var(--coh-container);
  margin-inline: auto;
  padding-inline: var(--coh-gutter);
}

.coh-page .e-con-boxed > .e-con-inner {
  padding-inline: var(--coh-gutter);
}

/* Give legacy content a modern “section rhythm” */
.coh-page .e-con.e-parent {
  margin: 0;
}

.coh-page .elementor-widget-heading h1,
.coh-page .elementor-widget-heading h2,
.coh-page .elementor-widget-heading h3 {
  margin: 0;
}

.coh-page .elementor-widget-heading h1 {
  font-size: var(--coh-h2);
  line-height: 1.08;
}

.coh-page .elementor-widget-heading h2 {
  font-size: var(--coh-h3);
  line-height: 1.2;
  color: var(--coh-muted);
}

/* Featured-boxes become premium cards */
.coh-page .elementor-widget-cmsmasters-featured-box__wrapper {
  border-radius: var(--coh-radius);
  border: 1px solid var(--coh-border);
  background: linear-gradient(180deg, var(--coh-surface-2), var(--coh-surface));
  box-shadow: var(--coh-shadow-sm);
  padding: 18px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.coh-page .elementor-widget-cmsmasters-featured-box__wrapper:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 131, 0, 0.35);
  box-shadow: var(--coh-shadow);
}

/* WooCommerce: product grid becomes a modern card gallery */
.coh-page .woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 980px) {
  .coh-page .woocommerce ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .coh-page .woocommerce ul.products {
    grid-template-columns: 1fr;
  }
}

.coh-page .woocommerce ul.products li.product {
  border-radius: var(--coh-radius);
  border: 1px solid var(--coh-border);
  background: linear-gradient(180deg, var(--coh-surface-2), var(--coh-surface));
  box-shadow: var(--coh-shadow-sm);
  padding: 16px;
  margin: 0;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.coh-page .woocommerce ul.products li.product:hover {
  transform: translateY(-3px);
  border-color: rgba(242, 131, 0, 0.35);
  box-shadow: var(--coh-shadow);
}

.coh-page .woocommerce ul.products li.product a img {
  border-radius: calc(var(--coh-radius) - 6px);
}

.coh-page .woocommerce ul.products li.product .price {
  font-size: 18px;
  font-weight: 800;
}

/* Pagination polish */
.coh-page .page-numbers,
.coh-page .woocommerce-pagination .page-numbers {
  display: inline-flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.coh-page .page-numbers a,
.coh-page .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--coh-border);
  background: var(--coh-surface);
  text-decoration: none;
}

.coh-page .page-numbers .current {
  background: linear-gradient(
    135deg,
    rgba(0, 95, 27, 0.28),
    rgba(242, 131, 0, 0.18)
  );
  border-color: rgba(255, 255, 255, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  .site-nav__link,
  .site-nav__toggle,
  button,
  .button,
  .woocommerce ul.products li.product,
  .coh-page .elementor-widget-cmsmasters-featured-box__wrapper {
    transition: none !important;
  }
}

/* ========================================================================== */
/* COH Premium Redesign (V3)
   Goal: a cohesive, production-ready “modern product” UI across ALL pages,
   even when the underlying markup is legacy Elementor/CMSMasters/Woo.
   Notes:
   - Backend behavior/endpoints remain unchanged.
   - Theme colors remain: primary #005f1b, accent #f28300.
*/

:root {
  /* Dark-first, premium neutrals */
  --coh-bg: #06070b;
  --coh-surface: rgba(255, 255, 255, 0.06);
  --coh-surface-2: rgba(255, 255, 255, 0.1);
  --coh-surface-3: rgba(255, 255, 255, 0.14);
  --coh-text: rgba(255, 255, 255, 0.92);
  --coh-muted: rgba(255, 255, 255, 0.7);
  --coh-border: rgba(255, 255, 255, 0.14);
  --coh-border-strong: rgba(255, 255, 255, 0.22);

  --coh-primary: #005f1b;
  --coh-accent: #f28300;
  --coh-accent-contrast: #ffffff;

  --coh-radius: 20px;
  --coh-radius-sm: 14px;
  --coh-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  --coh-shadow-sm: 0 18px 55px rgba(0, 0, 0, 0.45);
  --coh-ring: 0 0 0 3px rgba(242, 131, 0, 0.28);

  --coh-container: 1200px;
  --coh-gutter: 22px;

  --coh-h1: clamp(36px, 4.6vw, 60px);
  --coh-h2: clamp(26px, 3vw, 42px);
  --coh-h3: clamp(20px, 2.2vw, 30px);
  --coh-lead: clamp(16px, 1.5vw, 18px);
  --coh-stack: clamp(14px, 2vw, 24px);
}

@media (prefers-color-scheme: light) {
  :root {
    --coh-bg: #f7f7fb;
    --coh-surface: rgba(255, 255, 255, 0.92);
    --coh-surface-2: rgba(255, 255, 255, 0.98);
    --coh-surface-3: rgba(255, 255, 255, 1);
    --coh-text: #0c1020;
    --coh-muted: rgba(12, 16, 32, 0.7);
    --coh-border: rgba(12, 16, 32, 0.12);
    --coh-border-strong: rgba(12, 16, 32, 0.18);
    --coh-shadow: 0 28px 80px rgba(12, 16, 32, 0.16);
    --coh-shadow-sm: 0 16px 48px rgba(12, 16, 32, 0.12);
    --coh-ring: 0 0 0 3px rgba(0, 95, 27, 0.22);
  }
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    linear-gradient(
      180deg,
      rgba(0, 95, 27, 0.1),
      transparent 38%,
      rgba(242, 131, 0, 0.07)
    ),
    var(--coh-bg);
}

::selection {
  background: rgba(242, 131, 0, 0.28);
}

/* Make content links feel intentional without breaking existing anchors */
.coh-page a {
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(242, 131, 0, 0.38);
}

.coh-page a:hover {
  text-decoration-color: rgba(242, 131, 0, 0.7);
}

/* Hero: slightly tighter + higher contrast */
.coh-hero {
  padding: clamp(48px, 6.5vw, 92px) 0 38px;
}

.coh-hero__kicker {
  border-color: var(--coh-border-strong);
  background: linear-gradient(180deg, var(--coh-surface-2), var(--coh-surface));
}

.coh-hero__title {
  text-shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

.coh-hero__subtitle {
  color: var(--coh-muted);
}

/* Page surface: adds structure so legacy content reads like an app */
.coh-page {
  padding: 0 0 72px;
}

.coh-page > main,
.coh-page > .elementor,
.coh-page > .elementor-inner {
  width: 100%;
}

.coh-page .e-con-inner {
  width: 100%;
  max-width: var(--coh-container);
  margin-inline: auto;
  padding-inline: var(--coh-gutter);
}

/* Elementor essentials: the exported markup expects these utilities */
.coh-page .e-con,
.coh-page .e-con-inner,
.coh-page .elementor-element {
  position: relative;
}

.coh-page .elementor-absolute {
  position: static !important;
}

.coh-page .elementor-invisible {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

@media (max-width: 767px) {
  .coh-page .elementor-hidden-mobile {
    display: none !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .coh-page .elementor-hidden-tablet {
    display: none !important;
  }
}

@media (min-width: 1025px) {
  .coh-page .elementor-hidden-desktop {
    display: none !important;
  }
}

/* Core “section rhythm” for Elementor containers (keep subtle; Elementor already spaces a lot) */
.coh-page .e-con.e-parent {
  padding-block: clamp(10px, 2.2vw, 22px);
}

/* Make boxed sections look intentionally “product” without touching layout */
.coh-page .e-con.e-parent.e-con-boxed::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--coh-radius);
  border: 1px solid var(--coh-border);
  background: linear-gradient(180deg, var(--coh-surface-2), var(--coh-surface));
  box-shadow: var(--coh-shadow-sm);
  pointer-events: none;
}

.coh-page .e-con.e-parent.e-con-boxed > .e-con-inner {
  padding-block: clamp(14px, 2.4vw, 26px);
}

/* Common CMSMasters “card” wrappers */
.coh-page .cmsmasters-blog__post-inner,
.coh-page .cmsmasters-widget-image__wrap,
.coh-page .cmsmasters-content,
.coh-page .woocommerce,
.coh-page .woocommerce-ordering,
.coh-page .woocommerce-notices-wrapper {
  color: var(--coh-text);
}

/* Give common Elementor “boxed” containers a premium surface without changing layout */
.coh-page .e-con-boxed > .e-con-inner {
  padding-inline: var(--coh-gutter);
}

.coh-page .e-con.e-parent[data-settings*="background_background"],
.coh-page .elementor-element[data-settings*="background_background"] {
  background: transparent !important;
}

/* CMSMasters featured blocks + generic widgets get subtle card surfaces */
.coh-page .elementor-widget,
.coh-page .cmsmasters-blog__post,
.coh-page .woocommerce ul.products li.product {
  scroll-margin-top: 110px;
}

.coh-page .elementor-widget-container {
  color: inherit;
}

/* Reduce “randomly huge gaps” when legacy sections include spacer widgets */
.coh-page .elementor-spacer,
.coh-page .elementor-widget-spacer {
  max-height: 32px;
}

/* Images: ensure they read as designed content blocks */
.coh-page .elementor-widget-image img,
.coh-page .cmsmasters-widget-image img,
.coh-page img.attachment-full,
.coh-page img.attachment-large,
.coh-page img.attachment-medium_large {
  border-radius: calc(var(--coh-radius) - 6px);
}

.coh-page .elementor-widget-image:not(.elementor-absolute) img,
.coh-page .cmsmasters-widget-image:not(.elementor-absolute) img {
  box-shadow: var(--coh-shadow-sm);
  border: 1px solid var(--coh-border);
}

/* JS-enhanced grids (keeps legacy markup intact) */
.coh-page .coh-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 18px);
  align-items: start;
}

@media (min-width: 980px) {
  .coh-page .coh-image-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.coh-page .coh-image-grid > .elementor-widget-image {
  border-radius: var(--coh-radius);
  border: 1px solid var(--coh-border);
  background: linear-gradient(180deg, var(--coh-surface-2), var(--coh-surface));
  box-shadow: var(--coh-shadow-sm);
  overflow: hidden;
}

.coh-page .coh-image-grid > .elementor-widget-image img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

.coh-page .coh-counter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 18px);
}

@media (max-width: 980px) {
  .coh-page .coh-counter-grid {
    grid-template-columns: 1fr;
  }
}

.coh-page .coh-counter-grid .elementor-widget-counter {
  border-radius: var(--coh-radius);
  border: 1px solid var(--coh-border);
  background: linear-gradient(180deg, var(--coh-surface-2), var(--coh-surface));
  box-shadow: var(--coh-shadow-sm);
  padding: 16px;
}

/* Disable theme-demo popup widget if present */
.coh-page .elementor-widget-cmsmasters-time-popup,
.coh-page .cmsmasters-elementor-popup {
  display: none !important;
}

/* Social icons: render as premium icon buttons */
.coh-page .elementor-social-icons-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.coh-page .elementor-social-icons-wrapper a.elementor-icon,
.coh-page
  .elementor-social-icons-wrapper
  a.elementor-icon.elementor-social-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--coh-border);
  background: linear-gradient(180deg, var(--coh-surface-2), var(--coh-surface));
  text-decoration: none;
  box-shadow: var(--coh-shadow-sm);
  padding: 0 !important;
  font-size: 0 !important;
}

.coh-page .elementor-social-icons-wrapper a.elementor-icon:hover {
  border-color: rgba(242, 131, 0, 0.35);
  transform: translateY(-1px);
}

.coh-page .elementor-social-icons-wrapper svg,
.coh-page svg.e-font-icon-svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}

/* Blog grid: modern editorial cards */
.coh-page .cmsmasters-blog__posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

@media (max-width: 980px) {
  .coh-page .cmsmasters-blog__posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .coh-page .cmsmasters-blog__posts {
    grid-template-columns: 1fr;
  }
}

.coh-page .cmsmasters-blog__post-inner,
.coh-page .cmsmasters-blog__post {
  border-radius: var(--coh-radius);
  border: 1px solid var(--coh-border);
  background: linear-gradient(180deg, var(--coh-surface-2), var(--coh-surface));
  box-shadow: var(--coh-shadow-sm);
  overflow: hidden;
}

.coh-page .cmsmasters-blog__post a {
  text-decoration: none;
}

.coh-page .cmsmasters-blog__post .entry-title a:hover {
  text-decoration: underline;
}

.coh-page .cmsmasters-widget-image__wrap img,
.coh-page .woocommerce ul.products li.product a img {
  border-radius: calc(var(--coh-radius) - 6px);
}

.coh-page .avatar-wrap img {
  border-radius: 999px;
  border: 1px solid var(--coh-border);
}

/* Checkout: production-ready summary + alerts */
.coh-page .woocommerce-message,
.coh-page .woocommerce-info,
.coh-page .woocommerce-error {
  border-radius: var(--coh-radius);
  border: 1px solid var(--coh-border);
  background: linear-gradient(180deg, var(--coh-surface-2), var(--coh-surface));
  box-shadow: var(--coh-shadow-sm);
  padding: 14px 16px;
  margin: 0;
}

.coh-page .woocommerce-message {
  border-color: rgba(0, 95, 27, 0.35);
}

.coh-page .woocommerce-error {
  border-color: rgba(242, 131, 0, 0.45);
}

.coh-page .e-checkout__container {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: clamp(14px, 2vw, 22px);
  align-items: start;
}

@media (max-width: 980px) {
  .coh-page .e-checkout__container {
    grid-template-columns: 1fr;
  }
}

.coh-page .checkout-summary .summary-card {
  border-radius: var(--coh-radius);
  border: 1px solid var(--coh-border);
  background: linear-gradient(180deg, var(--coh-surface-2), var(--coh-surface));
  box-shadow: var(--coh-shadow-sm);
  padding: 16px;
}

.coh-page .checkout-summary .summary-title {
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.coh-page .checkout-summary .summary-table {
  width: 100%;
  border-collapse: collapse;
}

.coh-page .checkout-summary .summary-table th,
.coh-page .checkout-summary .summary-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--coh-border);
}

.coh-page .checkout-summary .ta-right {
  text-align: right;
}

.coh-page .checkout-summary .money {
  font-weight: 800;
}

/* Header: slightly more “product” feel */
.site-header__inner {
  border-radius: 18px;
}

/* CMSMasters / Elementor button widgets */
.coh-page .cmsmasters-button-link,
.coh-page .elementor-widget-cmsmasters-button__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--coh-border);
  background: linear-gradient(
    135deg,
    rgba(0, 95, 27, 0.92),
    rgba(242, 131, 0, 0.78)
  );
  color: var(--coh-accent-contrast);
  text-decoration: none;
  font-weight: 800;
  box-shadow: var(--coh-shadow-sm);
  transition:
    transform 160ms ease,
    filter 160ms ease,
    box-shadow 160ms ease;
}

.coh-page .cmsmasters-button-link:hover,
.coh-page .elementor-widget-cmsmasters-button__button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: var(--coh-shadow);
}

/* Rich text: keep long-form content readable */
.coh-page .elementor-widget-text-editor,
.coh-page .entry-content,
.coh-page .cmsmasters-content {
  color: var(--coh-text);
}

.coh-page .elementor-widget-text-editor p,
.coh-page .entry-content p,
.coh-page .cmsmasters-content p {
  margin: 0 0 1em;
  color: var(--coh-muted);
}

.coh-page .elementor-widget-text-editor h1,
.coh-page .elementor-widget-text-editor h2,
.coh-page .elementor-widget-text-editor h3,
.coh-page .entry-content h1,
.coh-page .entry-content h2,
.coh-page .entry-content h3,
.coh-page .cmsmasters-content h1,
.coh-page .cmsmasters-content h2,
.coh-page .cmsmasters-content h3 {
  margin: 0 0 0.6em;
  letter-spacing: -0.02em;
}

.coh-page .elementor-widget-text-editor ul,
.coh-page .elementor-widget-text-editor ol,
.coh-page .entry-content ul,
.coh-page .entry-content ol,
.coh-page .cmsmasters-content ul,
.coh-page .cmsmasters-content ol {
  margin: 0 0 1em;
  padding-left: 1.2em;
  color: var(--coh-muted);
}

@media (prefers-reduced-motion: reduce) {
  .coh-page .elementor-social-icons-wrapper .elementor-icon:hover {
    transform: none;
  }
}
