/* =========================================================
   CodeMarket Theme - main.css
   Basic modern styling for a digital products store
   ======================================================= */

/* ------------------------------
   CSS Variables / Theme Tokens
   --------------------------- */

:root {
  --cm-font-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --cm-font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --cm-color-bg: #050816;
  --cm-color-surface: #0b1020;
  --cm-color-surface-alt: #0f172a;
  --cm-color-border: rgba(148, 163, 184, 0.35);
  --cm-color-border-subtle: rgba(148, 163, 184, 0.2);

  --cm-color-text: #e5e7eb;
  --cm-color-text-muted: #9ca3af;
  --cm-color-heading: #f9fafb;

  --cm-color-primary: #22c55e;
  --cm-color-primary-soft: rgba(34, 197, 94, 0.12);
  --cm-color-primary-strong: #16a34a;

  --cm-color-accent: #38bdf8;
  --cm-color-accent-soft: rgba(56, 189, 248, 0.12);

  --cm-radius-sm: 0.5rem;
  --cm-radius-md: 0.75rem;
  --cm-radius-lg: 1.25rem;
  --cm-radius-xl: 1.75rem;

  --cm-shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.8);
  --cm-shadow-subtle: 0 12px 30px rgba(15, 23, 42, 0.6);

  --cm-container-width: 1200px;
  --cm-gutter: 1.5rem;

  --cm-transition-fast: 150ms ease-out;
  --cm-transition-med: 220ms ease-out;
}

/* ------------------------------
   Reset / Base
   --------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--cm-font-base);
  background: radial-gradient(circle at top, #020617 0, #020617 40%, #020617 100%);
  color: var(--cm-color-text);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

button {
  font-family: inherit;
}

ul,
ol {
  padding-left: 1.2rem;
}

/* ------------------------------
   Layout helpers
   --------------------------- */

.cm-container {
  width: 100%;
  max-width: var(--cm-container-width);
  margin: 0 auto;
  padding-left: var(--cm-gutter);
  padding-right: var(--cm-gutter);
}

.cm-main {
  min-height: 60vh;
  padding-bottom: 4rem;
}

/* ------------------------------
   Typography
   --------------------------- */

h1,
h2,
h3,
h4 {
  color: var(--cm-color-heading);
  margin-top: 0;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.9rem, 3vw, 2.3rem);
  line-height: 1.2;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
}

p {
  margin-top: 0;
  margin-bottom: 0.9rem;
  color: var(--cm-color-text-muted);
  line-height: 1.6;
}

/* ------------------------------
   Buttons
   --------------------------- */

.cm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color var(--cm-transition-med),
    color var(--cm-transition-med),
    border-color var(--cm-transition-med),
    transform var(--cm-transition-fast),
    box-shadow var(--cm-transition-fast);
}

.cm-btn--primary {
  background: var(--cm-color-primary);
  color: #022c22;
  border-color: transparent;
  box-shadow: 0 10px 25px rgba(34, 197, 94, 0.22);
}

.cm-btn--primary:hover {
  background: var(--cm-color-primary-strong);
  transform: translateY(-1px);
  box-shadow: 0 15px 35px rgba(34, 197, 94, 0.3);
}

.cm-btn--ghost {
  background: transparent;
  color: var(--cm-color-text);
  border-color: var(--cm-color-border);
}

.cm-btn--ghost:hover {
  border-color: var(--cm-color-primary);
  background: rgba(15, 23, 42, 0.9);
}

/* ------------------------------
   Header
   --------------------------- */

.cm-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.92),
    rgba(15, 23, 42, 0.8),
    transparent
  );
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.cm-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  gap: 1rem;
}

.cm-header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cm-header__title {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: var(--cm-color-heading);
}

.cm-header__nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.cm-nav {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0;
  margin: 0;
  font-size: 0.95rem;
}

.cm-nav li a {
  color: var(--cm-color-text-muted);
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
  transition:
    color var(--cm-transition-fast),
    border-color var(--cm-transition-fast),
    transform var(--cm-transition-fast);
}

.cm-nav li a:hover {
  color: var(--cm-color-heading);
  border-color: rgba(148, 163, 184, 0.4);
  transform: translateY(-1px);
}

.cm-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.cm-header__cart {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--cm-color-border-subtle);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.76);
  transition:
    border-color var(--cm-transition-fast),
    background var(--cm-transition-fast),
    transform var(--cm-transition-fast),
    box-shadow var(--cm-transition-fast);
}

.cm-header__cart-count {
  min-width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  background: var(--cm-color-primary-soft);
  color: var(--cm-color-primary);
  font-size: 0.7rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cm-header__cart:hover {
  border-color: var(--cm-color-primary);
  background: rgba(15, 23, 42, 0.98);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.9);
}

/* Header scrolled state */
.cm-header--scrolled {
  border-bottom-color: rgba(148, 163, 184, 0.3);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.95));
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

/* Mobile header adjustments */

@media (max-width: 768px) {
  .cm-header__inner {
    align-items: center;
  }

  .cm-header__nav {
    display: none; /* implement mobile menu later with JS if needed */
  }

  .cm-header__actions {
    margin-left: auto;
  }
}

/* ------------------------------
   Hero Section
   --------------------------- */

.cm-hero {
  padding: 3.5rem 0 3rem;
}

.cm-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  gap: 2.5rem;
  align-items: center;
}

.cm-hero__content {
  max-width: 620px;
}

.cm-hero__content p {
  font-size: 1rem;
  max-width: 540px;
}

.cm-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.7rem 0 1rem;
}

.cm-hero__bullets {
  list-style: none;
  padding-left: 0;
  margin: 0.25rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.85rem;
  color: var(--cm-color-text-muted);
}

.cm-hero__visual {
  display: flex;
  justify-content: flex-end;
}

.cm-hero__card {
  position: relative;
  background: radial-gradient(circle at top left, #1e293b 0, #020617 55%);
  border-radius: var(--cm-radius-xl);
  padding: 1.4rem 1.4rem 1.4rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: var(--cm-shadow-soft);
  max-width: 360px;
  width: 100%;
  color: var(--cm-color-text);
  overflow: hidden;
}

.cm-hero__badge {
  position: absolute;
  top: 1rem;
  right: 1.15rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--cm-color-primary-soft);
  color: var(--cm-color-primary);
  border: 1px solid rgba(50, 80, 120);
}

.cm-hero__card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.cm-hero__card p {
  font-size: 0.9rem;
  max-width: 260px;
}

.cm-hero__mini-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--cm-color-text-muted);
}

.cm-hero__mini-list li::before {
  content: '';
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: var(--cm-color-primary);
  margin-right: 0.4rem;
}

/* Hero responsiveness */

@media (max-width: 960px) {
  .cm-hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .cm-hero__visual {
    justify-content: flex-start;
  }

  .cm-hero {
    padding-top: 2.5rem;
  }
}

/* ------------------------------
   Generic Sections
   --------------------------- */

.cm-section {
  padding: 3rem 0;
}

.cm-section--alt {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.06), transparent 50%);
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.cm-section__head {
  text-align: left;
  margin-bottom: 1.8rem;
}

.cm-section__head p {
  max-width: 520px;
}

.cm-section__two-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.15fr);
  gap: 2.4rem;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .cm-section__two-cols {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------
   Features
   --------------------------- */

.cm-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
}

.cm-feature {
  background: linear-gradient(to bottom right, rgba(15, 23, 42, 0.9), #020617);
  border-radius: var(--cm-radius-lg);
  border: 1px solid var(--cm-color-border-subtle);
  padding: 1.4rem 1.4rem 1.3rem;
  box-shadow: var(--cm-shadow-subtle);
}

.cm-feature h3 {
  margin-bottom: 0.45rem;
}

.cm-feature p {
  font-size: 0.9rem;
}

@media (max-width: 960px) {
  .cm-features {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------
   Products Grid (landing section)
   --------------------------- */

.cm-products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.4rem;
}

@media (max-width: 1100px) {
  .cm-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .cm-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .cm-products-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Slightly unify WooCommerce product cards with our style */
.cm-products-grid .product,
.woocommerce ul.products li.product {
  background: radial-gradient(circle at top, #020617 0, #020617 55%);
  border-radius: var(--cm-radius-md);
  border: 1px solid rgba(30, 64, 175, 0.5);
  padding: 0.9rem 0.9rem 1rem;
  box-shadow: 0 15px 36px rgba(15, 23, 42, 0.9);
  overflow: hidden;
  position: relative;
  transition:
    transform var(--cm-transition-med),
    box-shadow var(--cm-transition-med),
    border-color var(--cm-transition-med),
    background var(--cm-transition-med);
}

.cm-products-grid .product:hover,
.woocommerce ul.products li.product:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 1);
  border-color: var(--cm-color-primary);
  background: radial-gradient(circle at top, #020617 0, #020617 60%);
}

.woocommerce ul.products li.product a img {
  border-radius: calc(var(--cm-radius-md) - 0.35rem);
  margin-bottom: 0.7rem;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--cm-color-heading);
  margin-bottom: 0.2rem;
}

.woocommerce ul.products li.product .price {
  color: var(--cm-color-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.woocommerce ul.products li.product .button {
  margin-top: 0.7rem;
  width: 100%;
  border-radius: 999px;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  border: none;
  background: radial-gradient(circle at top left, var(--cm-color-primary) 0, #22c55e 50%);
  color: #022c22;
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--cm-transition-fast),
    transform var(--cm-transition-fast),
    box-shadow var(--cm-transition-fast);
}

.woocommerce ul.products li.product .button:hover {
  background: var(--cm-color-primary-strong);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(34, 197, 94, 0.32);
}

/* ------------------------------
   Shop Archive
   --------------------------- */

.cm-shop-archive {
  padding: 3rem 0;
}

.cm-shop-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.cm-shop-header h1 {
  font-size: 1.6rem;
}

/* WooCommerce ordering dropdown */
.woocommerce-ordering select {
  background: var(--cm-color-surface);
  border-radius: 999px;
  border: 1px solid var(--cm-color-border-subtle);
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  color: var(--cm-color-text-muted);
}

/* ------------------------------
   Single Product Page
   --------------------------- */

.cm-single-product {
  padding: 3rem 0;
}

.cm-product {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 2.4rem;
  align-items: flex-start;
}

.cm-product__gallery {
  background: radial-gradient(circle at top, #020617 0, #020617 60%);
  border-radius: var(--cm-radius-lg);
  padding: 1.2rem;
  border: 1px solid rgba(30, 64, 175, 0.5);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 1);
}

/* WooCommerce gallery in our wrapper */
.cm-product__gallery .woocommerce-product-gallery {
  margin: 0;
}

.cm-product__summary {
  padding: 0.3rem 0;
}

.cm-product__title {
  font-size: 1.7rem;
  margin-bottom: 0.2rem;
}

.cm-product__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.cm-product__tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--cm-color-border-subtle);
  color: var(--cm-color-text-muted);
  background: rgba(15, 23, 42, 0.85);
}

.cm-product__price {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--cm-color-primary);
  margin-bottom: 0.7rem;
}

.cm-product__short {
  margin-bottom: 1.1rem;
}

.cm-product__actions {
  margin-bottom: 1.3rem;
}

/* WooCommerce add to cart on single product */
.single-product .cart {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
}

.single-product .cart .quantity input[type="number"] {
  width: 80px;
  padding: 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--cm-color-border-subtle);
  background: var(--cm-color-surface);
  color: var(--cm-color-text);
}

.single-product .cart button.single_add_to_cart_button {
  border-radius: 999px;
  padding: 0.6rem 1.3rem;
  border: none;
  background: radial-gradient(circle at top left, var(--cm-color-primary) 0, #22c55e 50%);
  color: #022c22;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  transition:
    background var(--cm-transition-fast),
    transform var(--cm-transition-fast),
    box-shadow var(--cm-transition-fast);
}

.single-product .cart button.single_add_to_cart_button:hover {
  background: var(--cm-color-primary-strong);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(34, 197, 94, 0.32);
}

.cm-product__license-info {
  margin-top: 0.7rem;
  padding: 0.9rem 0.95rem;
  border-radius: var(--cm-radius-md);
  border: 1px dashed rgba(34, 197, 94, 0.35);
  background: rgba(15, 23, 42, 0.85);
}

.cm-product__license-info h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
  color: var(--cm-color-text-muted);
}

.cm-product__license-info ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--cm-color-text-muted);
}

/* Tabs area */
.cm-product__tabs {
  margin-top: 2.4rem;
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--cm-radius-lg);
  padding: 1.1rem 1.3rem;
  border: 1px solid rgba(15, 23, 42, 1);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.95);
}

/* Adjust WooCommerce tabs */
.woocommerce-tabs ul.tabs {
  padding-left: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 1);
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.woocommerce-tabs ul.tabs li {
  list-style: none;
  margin: 0;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
}

.woocommerce-tabs ul.tabs li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  color: var(--cm-color-text-muted);
}

.woocommerce-tabs ul.tabs li.active {
  border-color: var(--cm-color-primary-soft);
  background: rgba(15, 23, 42, 1);
}

.woocommerce-tabs ul.tabs li.active a {
  color: var(--cm-color-primary);
}

.woocommerce-Tabs-panel {
  padding: 0.5rem 0 0;
  font-size: 0.92rem;
  color: var(--cm-color-text-muted);
}

/* Single product responsiveness */

@media (max-width: 960px) {
  .cm-product {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------
   Testimonials & FAQ
   --------------------------- */

.cm-testimonials {
  list-style: none;
  padding-left: 0;
  margin: 1.2rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cm-testimonials li {
  padding: 1rem 1rem 0.8rem;
  border-radius: var(--cm-radius-md);
  border: 1px solid var(--cm-color-border-subtle);
  background: rgb(211, 224, 226);
}

.cm-testimonials strong {
  font-size: 0.9rem;
  color: var(--cm-color-heading);
}

.cm-testimonials p {
  margin-top: 0.4rem;
  font-size: 0.9rem;
}

.cm-faq {
  margin: 1.2rem 0 0;
}

.cm-faq dt {
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 0.7rem;
  color: var(--cm-color-heading);
}

.cm-faq dd {
  margin-left: 0;
  margin-top: 0.15rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--cm-color-text-muted);
}

/* ------------------------------
   Footer
   --------------------------- */

.cm-footer {
  border-top: 1px solid rgba(15, 23, 42, 1);
  padding: 1.7rem 0 2.1rem;
  background: radial-gradient(circle at bottom, #020617 0, #020617 55%);
}

.cm-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--cm-color-text-muted);
}

.cm-footer-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
}

.cm-footer-nav li a {
  color: var(--cm-color-text-muted);
}

.cm-footer-nav li a:hover {
  color: var(--cm-color-heading);
}

/* ------------------------------
   My Account - "My Licenses"
   --------------------------- */

.cm-myaccount {
  padding: 2.5rem 0;
}

.cm-myaccount__title {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.cm-myaccount__intro {
  font-size: 0.95rem;
  color: var(--cm-color-text-muted);
  max-width: 640px;
  margin-bottom: 1.5rem;
}

.cm-myaccount__box {
  margin-bottom: 1.25rem;
  padding: 1.4rem 1.5rem;
  border-radius: var(--cm-radius-lg);
  border: 1px solid var(--cm-color-border-subtle);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.06), #020617);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
  overflow-x: auto;
}

/* If the license shortcode outputs a table, make it fit the card nicely */
.cm-myaccount__box table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.cm-myaccount__box th,
.cm-myaccount__box td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.cm-myaccount__box th {
  text-align: left;
  font-weight: 600;
  color: var(--cm-color-text);
  background: rgba(15, 23, 42, 0.9);
}

.cm-myaccount__box tr:last-child td {
  border-bottom: none;
}

.cm-myaccount__hint {
  font-size: 0.85rem;
  color: var(--cm-color-text-muted);
  max-width: 520px;
}

/* ------------------------------
   Small utilities & tweaks
   --------------------------- */

/* WooCommerce notices */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  border-radius: var(--cm-radius-md);
  border: 1px solid var(--cm-color-border);
  background: rgba(15, 23, 42, 0.95);
  color: var(--cm-color-text);
}

/* Form fields */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea {
  background: var(--cm-color-surface);
  border-radius: var(--cm-radius-sm);
  border: 1px solid var(--cm-color-border-subtle);
  padding: 0.5rem 0.7rem;
  color: var(--cm-color-text);
}

/* Links inside content */
.cm-main a {
  color: var(--cm-color-accent);
}

.cm-main a:hover {
  color: var(--cm-color-accent);
  text-decoration: underline;
}

/* =========================================================
   Product card (content-product.php) - pills & layout
   ======================================================= */

.cm-product-card {
  /* .product styles already apply from earlier rules */
  height: 100%;
}

.cm-product-card__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Thumbnail wrapper */
.cm-product-card__thumb {
  display: block;
  margin-bottom: 0.8rem;
}

.cm-product-card__thumb-inner {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--cm-radius-md) - 0.35rem);
  background: #020617;
}

.cm-product-card__thumb-inner img {
  width: 100%;
  height: auto;
  transition: transform var(--cm-transition-med);
}

.cm-product-card:hover .cm-product-card__thumb-inner img {
  transform: translateY(-2px) scale(1.02);
}

/* WooCommerce sale badge inside our thumb */
.cm-product-card .onsale {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  margin: 0;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.7rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  background: var(--cm-color-primary);
  color: #022c22;
  border: none;
  min-width: 0;
}

/* Meta pills row */
.cm-product-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.45rem;
}

.cm-product-card__pill {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--cm-color-border-subtle);
  color: var(--cm-color-text-muted);
  background: rgba(15, 23, 42, 0.85);
  white-space: nowrap;
}

.cm-product-card__pill--stack {
  border-color: rgba(56, 189, 248, 0.6);
  color: var(--cm-color-accent);
  background: var(--cm-color-accent-soft);
}

.cm-product-card__pill--muted {
  opacity: 0.85;
}

/* Title & excerpt */
.cm-product-card__title {
  font-size: 0.98rem;
  font-weight: 500;
  margin: 0 0 0.35rem;
}

.cm-product-card__title a {
  color: var(--cm-color-heading);
}

.cm-product-card__title a:hover {
  color: var(--cm-color-primary);
}

.cm-product-card__excerpt {
  font-size: 0.87rem;
  line-height: 1.5;
  color: var(--cm-color-text-muted);
  margin: 0 0 0.8rem;
}

/* Footer: price + CTA */
.cm-product-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.cm-product-card__price {
  font-weight: 600;
  color: var(--cm-color-primary);
  font-size: 0.95rem;
}

/* Ensure button aligns nicely and uses existing .button styles */
.cm-product-card__cta .button {
  margin-top: 0;
  width: auto;
  min-width: 0;
  padding-left: 0.9rem;
  padding-right: 0.9rem;
}

/* =========================================================
   Block patterns – pricing cards
   ======================================================= */

.cm-pricing-section {
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.08), transparent 55%);
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.cm-pricing-grid {
  gap: 1.4rem;
}

.cm-pricing-card {
  background: linear-gradient(to bottom right, rgba(15, 23, 42, 0.95), #020617);
  border-radius: var(--cm-radius-lg);
  border: 1px solid var(--cm-color-border-subtle);
  padding: 1.4rem 1.4rem 1.3rem;
  box-shadow: var(--cm-shadow-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cm-pricing-card__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cm-color-text-muted);
  margin: 0 0 0.2rem;
}

.cm-pricing-card__title {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.cm-pricing-card__price {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--cm-color-primary);
  margin: 0 0 0.8rem;
}

.cm-pricing-card__features {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--cm-color-text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cm-pricing-card__badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-flex;
  align-self: flex-start;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--cm-color-primary-soft);
  color: var(--cm-color-primary);
  margin: 0 0 0.4rem;
}

.cm-pricing-card--highlight {
  border-color: var(--cm-color-primary);
  box-shadow: 0 20px 50px rgba(34, 197, 94, 0.22);
  position: relative;
  overflow: hidden;
}

.cm-pricing-card--highlight::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.16), transparent 55%);
  opacity: 0.9;
  pointer-events: none;
}

.cm-pricing-card--highlight > * {
  position: relative;
}

/* =========================================================
   Block patterns – Licenses & Docs/Changelog
   ======================================================= */

/* Licenses section */
.cm-licenses-section {
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.06), transparent 55%);
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.cm-licenses-grid {
  gap: 1.8rem;
}

.cm-myaccount__box--pattern {
  margin-top: 0.3rem;
}

/* Docs + changelog */
.cm-docs-section {
  background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.08), transparent 55%);
}

.cm-docs-grid {
  gap: 1.6rem;
}

.cm-docs-box,
.cm-changelog-box {
  background: linear-gradient(to bottom right, rgba(15, 23, 42, 0.96), #020617);
  border-radius: var(--cm-radius-lg);
  border: 1px solid var(--cm-color-border-subtle);
  padding: 1.4rem 1.4rem 1.3rem;
  box-shadow: var(--cm-shadow-subtle);
}

.cm-docs-list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 0.8rem;
  font-size: 0.9rem;
}

.cm-docs-list li {
  margin-bottom: 0.35rem;
}

.cm-docs-list a {
  color: var(--cm-color-accent);
}

.cm-docs-list a:hover {
  text-decoration: underline;
}

.cm-changelog h4 {
  font-size: 0.95rem;
  margin: 0.9rem 0 0.25rem;
}

.cm-changelog ul {
  margin: 0 0 0.4rem 1.1rem;
  font-size: 0.9rem;
  color: var(--cm-color-text-muted);
}

/* =========================================================
   Blog / posts
   ======================================================= */

.cm-post {
  margin-bottom: 2rem;
  padding: 1.4rem 1.5rem 1.3rem;
  border-radius: var(--cm-radius-lg);
  border: 1px solid var(--cm-color-border-subtle);
  background: linear-gradient(to bottom right, rgba(15, 23, 42, 0.95), #020617);
  box-shadow: var(--cm-shadow-subtle);
}

.cm-post__title {
  font-size: 1.3rem;
  margin-bottom: 0.2rem;
}

.cm-post__title a {
  color: var(--cm-color-heading);
}

.cm-post__title a:hover {
  color: var(--cm-color-primary);
}

.cm-post__meta {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cm-color-text-muted);
  margin-bottom: 0.8rem;
}

.cm-post__content {
  font-size: 0.92rem;
  line-height: 1.7;
}

.cm-post__pagination {
  margin-top: 1.5rem;
}

/* =========================================================
   LIGHT THEME OVERRIDES
   ======================================================= */

:root {
  /* Light palette */
  --cm-color-bg: #f3f4f6;            /* page background */
  --cm-color-surface: #ffffff;       /* cards, surfaces */
  --cm-color-surface-alt: #f9fafb;
  --cm-color-border: rgba(148, 163, 184, 0.5);
  --cm-color-border-subtle: rgba(148, 163, 184, 0.35);

  --cm-color-text: #111827;
  --cm-color-text-muted: #4b5563;
  --cm-color-heading: #0f172a;

  /* păstrăm verdele de brand, dar merge și pe light */
  --cm-color-primary: #22c55e;
  --cm-color-primary-soft: rgba(34, 197, 94, 0.12);
  --cm-color-primary-strong: #16a34a;

  --cm-color-accent: #2563eb;
  --cm-color-accent-soft: rgba(37, 99, 235, 0.12);
}

/* Background general + text */
body {
  background: var(--cm-color-bg);
  color: var(--cm-color-text);
}

/* Header light */
.cm-header {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0.9),
    transparent
  );
  border-bottom: 1px solid #e5e7eb;
}

.cm-header--scrolled {
  background: #ffffff;
  border-bottom-color: #e5e7eb;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.cm-header__cart {
  background: #f9fafb;
  border-color: #e5e7eb;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

/* Secțiuni / carduri pe light */
.cm-section--alt {
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

/* Features, docs, changelog, licențe, post */
.cm-feature,
.cm-docs-box,
.cm-changelog-box,
.cm-myaccount__box,
.cm-product__gallery,
.cm-product__tabs,
.cm-post {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

/* Carduri de produs */
.cm-products-grid .product,
.woocommerce ul.products li.product {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

/* Hero card mai deschis */
.cm-hero__card {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

/* Footer light */
.cm-footer {
  background: #f9fafb;
  border-top-color: #e5e7eb;
}

.cm-footer__inner,
.cm-footer-nav li a {
  color: var(--cm-color-text-muted);
}
