/* Front Page Premium Styling for Cosmo Man */

@font-face {
  font-family: 'Cakra';
  src: url('../fonts/Cakra-Normal.woff2') format('woff2'),
       url('../fonts/Cakra-Normal.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --cm-bg: #0d1117;
  --cm-surface: #161b22;
  --cm-accent: #14b8a6;
  --cm-accent-soft: rgba(20, 184, 166, 0.1);
  --cm-copper: #b45309;
  --cm-text-primary: #f8fafc;
  --cm-text-muted: #94a3b8;
  --cm-shadow-dark: rgba(0, 0, 0, 0.5);
  --cm-shadow-light: rgba(255, 255, 255, 0.03);
  --cm-font-heading: 'Cakra', 'Manrope', sans-serif;
  --cm-heading-color: rgba(248, 250, 252, 0.8);
  --cm-heading-glow: 0 0 20px rgba(20, 184, 166, 0.32), 0 0 44px rgba(20, 184, 166, 0.14);
}

.cm-front-page-wrapper h1,
.cm-front-page-wrapper h2,
.cm-front-page-wrapper h3,
.cm-front-page-wrapper h4,
.cm-logo,
.cm-footer-logo {
  font-family: var(--cm-font-heading);
  color: var(--cm-heading-color);
  text-shadow: var(--cm-heading-glow);
}

/* Hide WP Default Header/Footer on front page to isolate custom premium design */
body.home .wp-block-template-part,
body.home .wp-block-post-title,
body.home #wp-skip-link,
body.home #wpadminbar-placeholder,
body.home header.wp-block-template-part,
body.home footer.wp-block-template-part,
body.cm-legal-route .wp-block-template-part,
body.cm-legal-route .wp-block-post-title,
body.cm-legal-route header.wp-block-template-part,
body.cm-legal-route footer.wp-block-template-part {
  display: none !important;
}

body.home,
body.cm-legal-route {
  background-color: var(--cm-bg) !important;
  color: var(--cm-text-primary) !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: 'Manrope', sans-serif;
  overflow-x: hidden;
  --wp--style--global--content-size: 100% !important;
  --wp--style--global--wide-size: 100% !important;
}

body.home .wp-site-blocks,
body.home .wp-block-group,
body.home .wp-block-group.alignfull,
body.home main,
body.home .wp-block-post-content,
body.home .entry-content,
body.home .is-layout-constrained,
body.home .is-layout-constrained > *,
body.home .wp-block-group-is-layout-constrained,
body.cm-legal-route .wp-site-blocks,
body.cm-legal-route .wp-block-group,
body.cm-legal-route .wp-block-group.alignfull,
body.cm-legal-route main,
body.cm-legal-route .wp-block-post-content,
body.cm-legal-route .entry-content,
body.cm-legal-route .is-layout-constrained,
body.cm-legal-route .is-layout-constrained > *,
body.cm-legal-route .wp-block-group-is-layout-constrained {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

body.home .has-global-padding,
body.cm-legal-route .has-global-padding {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.cm-front-page-wrapper {
  background-color: var(--cm-bg);
  min-height: 100vh;
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Custom Navigation Header */
.cm-main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.75rem clamp(0.75rem, 2vw, 1.25rem);
  background: transparent;
  border-bottom: none;
  pointer-events: none;
  transition: padding 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.cm-main-header.scrolled {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.cm-header-container {
  width: 100%;
  max-width: 1180px;
  height: 52px;
  margin: 0 auto;
  padding: 0 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: auto;
  border-radius: 999px;
  background: rgba(22, 27, 34, 0.52);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.cm-main-header.scrolled .cm-header-container {
  background: rgba(22, 27, 34, 0.72);
  border-color: rgba(20, 184, 166, 0.18);
  box-shadow:
    0 10px 36px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cm-logo {
  flex-shrink: 0;
  margin-left: 0.85rem;
  font-size: 1.15rem;
  font-weight: normal;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.cm-logo:hover {
  color: rgba(20, 184, 166, 0.9);
  text-shadow: 0 0 24px rgba(20, 184, 166, 0.45), 0 0 48px rgba(20, 184, 166, 0.2);
}

.cm-nav-menu {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.15rem;
  margin-right: 0.35rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(13, 17, 23, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cm-nav-link {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--cm-text-muted);
  text-decoration: none;
  transition: color 0.25s ease, background-color 0.25s ease;
  position: relative;
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  white-space: nowrap;
}

.cm-nav-link::after {
  display: none;
}

.cm-nav-link:hover,
.cm-nav-link:focus-visible {
  color: var(--cm-text-primary);
  background: rgba(20, 184, 166, 0.12);
}

.cm-nav-link:active {
  background: rgba(20, 184, 166, 0.2);
}

/* B0: Hero Block */
.cm-section-hero {
  min-height: 100vh;
  padding-top: 100px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.cm-section-hero .cm-canvas-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#cm-hero-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.cm-hero-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 2rem clamp(1rem, 2.5vw, 2rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
  box-sizing: border-box;
}

.cm-hero-left {
  min-width: 0;
}

.cm-hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cm-accent);
  background-color: var(--cm-accent-soft);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.cm-hero-h1 {
  font-size: clamp(3rem, 6.5vw, 5.5rem);
  line-height: 1.02;
  font-weight: normal;
  letter-spacing: 0;
  margin: 0 0 1.5rem;
}

.cm-hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--cm-text-muted);
  line-height: 1.6;
  margin: 0 0 2rem;
  max-width: 480px;
}

.cm-hero-actions {
  display: flex;
  gap: 1rem;
}

.cm-hero-right {
  position: relative;
  height: clamp(320px, 52vh, 550px);
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* B1: Routine Block */
.cm-section-routine {
  padding: 6rem 0;
  background-color: rgba(22, 27, 34, 0.4);
  position: relative;
}

.cm-container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 clamp(1rem, 2.5vw, 2rem);
  box-sizing: border-box;
}

.cm-section-title {
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  text-align: center;
  margin: 0 0 0.5rem;
  font-weight: normal;
  letter-spacing: 0;
  line-height: 1.08;
}

.cm-section-subtitle {
  font-size: 1rem;
  color: var(--cm-text-muted);
  text-align: center;
  margin: 0 auto 4rem;
  max-width: 720px;
  line-height: 1.6;
}

/* Shared product block typography */
.cm-product-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  justify-content: flex-start;
  align-self: start;
}

.cm-product-tag,
.cm-product-h2,
.cm-product-description,
.cm-product-bullets,
.cm-price-row,
.cm-product-actions {
  text-align: left;
  width: 100%;
}

.cm-routine-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
  z-index: 2;
}

.cm-routine-card {
  background-color: var(--cm-surface);
  border-radius: 16px;
  padding: 2.25rem 1.5rem;
  box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.03);
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.cm-routine-card:hover {
  transform: translateY(-5px);
  border-color: var(--cm-accent);
}

.cm-step-num {
  font-size: 4.5rem;
  font-weight: normal;
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 1rem;
  color: var(--cm-accent);
  opacity: 0.15;
  transition: opacity 0.3s ease;
}

.cm-routine-card:hover .cm-step-num {
  opacity: 0.6;
}

.cm-step-title {
  font-size: 1.3rem;
  font-weight: normal;
  letter-spacing: 0;
  margin: 0 0 0.75rem;
}

.cm-step-desc {
  font-size: 0.9rem;
  color: var(--cm-text-muted);
  line-height: 1.5;
  margin: 0;
}

.cm-routine-svg-line {
  position: absolute;
  top: 180px;
  left: clamp(1rem, 2.5vw, 2rem);
  right: clamp(1rem, 2.5vw, 2rem);
  width: auto;
  height: 50px;
  z-index: 1;
  pointer-events: none;
}

.cm-routine-faq {
  max-width: 720px;
  margin: 4rem auto 0;
  background: var(--cm-surface);
  border-radius: 12px;
  padding: 2rem;
  border-left: 3px solid var(--cm-accent);
}

.cm-routine-faq h4 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: normal;
  letter-spacing: 0;
}

.cm-routine-faq p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--cm-text-muted);
  line-height: 1.6;
}

/* B2, B5, B6: Product blocks */
.cm-section-product {
  padding: 7rem 0;
}

.cm-seo-copy {
  padding: 5rem 0;
  background: linear-gradient(180deg, rgba(20, 184, 166, 0.05), rgba(13, 17, 23, 0.12));
}

.cm-seo-copy .cm-product-info {
  max-width: 980px;
  margin: 0 auto;
}

.cm-seo-copy .cm-product-description + .cm-product-description {
  margin-top: 0.75rem;
}

.cm-product-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.cm-product-split--reverse {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.cm-product-split--reverse .cm-product-visual {
  grid-column: 2;
  grid-row: 1;
}

.cm-product-split--reverse .cm-product-info {
  grid-column: 1;
  grid-row: 1;
}

.cm-product-visual {
  display: flex;
  justify-content: center;
  position: relative;
  min-width: 0;
  width: 100%;
  align-self: start;
}

.cm-product-img-wrap {
  width: 100%;
  max-width: min(580px, 100%);
  background-color: var(--cm-surface);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.02);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.cm-product-img-wrap img {
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.6));
}

.cm-product-img-wrap:hover img {
  transform: scale(1.04);
}

.cm-product-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cm-accent);
  margin-bottom: 1rem;
}

.cm-product-h2 {
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  font-weight: normal;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0 0 1.5rem;
}

.cm-product-description {
  font-size: 1rem;
  color: var(--cm-text-muted);
  line-height: 1.6;
  margin: 0 0 2rem;
}

.cm-product-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cm-product-bullets li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.cm-bullet-marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--cm-accent);
  flex-shrink: 0;
  margin-top: 0.5rem;
}

.cm-product-bullets li div {
  font-size: 0.95rem;
  color: var(--cm-text-muted);
  line-height: 1.4;
}

.cm-product-bullets li strong {
  color: var(--cm-text-primary);
}

.cm-price-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
}

.cm-price {
  font-size: 2rem;
  font-weight: 300;
  color: var(--cm-text-primary);
}

.cm-volume {
  font-size: 0.9rem;
  color: var(--cm-text-muted);
}

.cm-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

/* B3: Analyzer Inline Wrap */
.cm-section-analyzer-container {
  padding: 4rem 0;
  background-color: rgba(22, 27, 34, 0.2);
}

.cm-chat-mode-tabs {
  display: flex;
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
  flex-wrap: wrap;
}

.cm-chat-mode-btn {
  background: var(--cm-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  color: var(--cm-text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
}

.cm-chat-mode-btn.active {
  background: var(--cm-accent-soft);
  border-color: var(--cm-accent);
  color: var(--cm-text-primary);
}

.cm-chat-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.cm-chat-hint {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--cm-text-muted);
}

.cm-hero-lifestyle-img,
.cm-hero-main-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 16px;
  opacity: 1;
  z-index: 2;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.cm-mask-lifestyle-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.cm-mask-product-fallback {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100% - 5rem);
  object-fit: contain;
}

/* B5: Mask block — image + timer as one unit */
.cm-mask .cm-product-visual {
  width: 100%;
}

.cm-mask .cm-product-img-wrap {
  position: relative;
  width: 100%;
  max-width: min(580px, 100%);
  margin: 0 auto;
  aspect-ratio: 4 / 5;
  min-height: 360px;
  padding: 2rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cm-mask .cm-product-img-wrap img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100% - 5rem);
  object-fit: contain;
  transform: none !important;
}

.cm-mask .cm-product-img-wrap:hover img {
  transform: none !important;
}

.cm-mask-timer-overlay {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 2;
  background-color: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.cm-timer-num {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--cm-accent);
  font-family: monospace;
}

.cm-timer-label {
  font-size: 0.75rem;
  color: var(--cm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Footer & Car Animation (IDEA-01) */
.cm-premium-footer {
  background-color: #07090e;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 5rem 0 2rem;
  position: relative;
}

.cm-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.cm-footer-logo {
  font-size: 1.5rem;
  font-weight: normal;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  display: block;
}

.cm-footer-tagline {
  font-size: 0.88rem;
  color: var(--cm-text-muted);
  line-height: 1.6;
  max-width: 320px;
}

.cm-footer-h4 {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1.25rem;
  color: var(--cm-text-primary);
}

.cm-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cm-footer-links a {
  font-size: 0.88rem;
  color: var(--cm-text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.cm-footer-links a:hover {
  color: var(--cm-accent);
}

.cm-footer-contact-info {
  font-size: 0.88rem;
  color: var(--cm-text-muted);
  line-height: 1.6;
}

.cm-footer-contact-info a {
  color: var(--cm-accent);
  text-decoration: none;
}

.cm-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cm-copyright {
  font-size: 0.8rem;
  color: var(--cm-text-muted);
  margin: 0;
}

.cm-footer-bottom .cm-disclaimer {
  font-size: 0.72rem;
  color: rgba(148, 163, 184, 0.4);
  margin: 0;
  line-height: 1.4;
}

/* Base button styles */
.cm-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--cm-accent);
  color: #000 !important;
  font-weight: 700;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.35);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.cm-btn-primary:hover {
  background-color: var(--cm-text-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
}

.cm-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--cm-text-primary) !important;
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.cm-btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--cm-text-primary);
  transform: translateY(-2px);
}

.cm-buy-market-btn {
  background-color: #ffcc00;
  color: #000 !important;
  box-shadow: 0 4px 15px rgba(255, 204, 0, 0.25);
}

.cm-buy-market-btn:hover {
  background-color: #ffe033;
}

/* Mobile Responsiveness & SEO Cleanliness */

@media (max-width: 992px) {
  .cm-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .cm-hero-sub {
    margin-left: auto;
    margin-right: auto;
  }
  .cm-hero-actions {
    justify-content: center;
  }
  .cm-hero-right {
    height: 350px;
  }
  
  .cm-routine-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cm-routine-svg-line {
    display: none;
  }
  
  .cm-product-split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .cm-product-split--reverse .cm-product-visual {
    grid-column: 1;
    grid-row: 1;
  }
  .cm-product-split--reverse .cm-product-info {
    grid-column: 1;
    grid-row: 2;
  }

  .cm-mask .cm-product-split--reverse .cm-product-info {
    grid-row: 1;
  }

  .cm-mask .cm-product-split--reverse .cm-product-visual {
    grid-row: 2;
  }

  .cm-mask .cm-product-img-wrap {
    min-height: 300px;
  }
}

@media (max-width: 1100px) {
  .cm-nav-link {
    font-size: 0.72rem;
    padding: 0.4rem 0.55rem;
  }

  .cm-logo {
    font-size: 1.05rem;
    margin-left: 0.65rem;
  }
}

@media (max-width: 768px) {
  .cm-main-header {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .cm-header-container {
    height: 48px;
    justify-content: center;
  }

  .cm-nav-menu {
    display: none;
  }

  .cm-logo {
    margin-left: 0;
  }
  .cm-routine-grid {
    grid-template-columns: 1fr;
  }
  .cm-footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .cm-hero-actions,
  .cm-product-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
  }

  .cm-product-actions .cm-btn-primary,
  .cm-product-actions .cm-btn-secondary,
  .cm-product-actions .cm-btn-ghost,
  .cm-hero-actions .cm-btn-primary,
  .cm-hero-actions .cm-btn-secondary,
  .cm-buy-market-btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .cm-composition-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .cm-composition-actions .cm-btn-primary,
  .cm-composition-actions .cm-btn-secondary {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }
  .cm-product-img-wrap {
    padding: 1.5rem;
  }
  .cm-product-img-wrap img {
    max-height: 280px;
  }
}

/* Composition popup */
.cm-composition-modal[hidden] {
  display: none !important;
}

.cm-composition-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cm-composition-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.cm-composition-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(85vh, 720px);
  overflow: auto;
  background: var(--cm-surface, #161b22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1.5rem 1.25rem 1.25rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.cm-composition-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  border: none;
  background: transparent;
  color: var(--cm-text-muted, #94a3b8);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.cm-composition-title {
  margin: 0 2rem 0.35rem 0;
  font-family: 'Cakra', 'Manrope', sans-serif;
  font-size: 1.35rem;
  font-weight: normal;
  color: var(--cm-text-primary, #f8fafc);
}

.cm-composition-meta {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--cm-text-muted, #94a3b8);
}

.cm-composition-body {
  margin-bottom: 1rem;
}

.cm-composition-inci {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--cm-text-primary, #e2e8f0);
  word-break: break-word;
}

.cm-composition-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

body.cm-modal-open {
  overflow: hidden;
}
