/* ==========================================================================
   MRsoft Coupon System product page (show-coupon-system.php) — web application only.
   Loaded after crm-page.css and product-premium.css, whose approved components (intro stage, purple
   tabs, workflow chart, gallery, lightbox) are reused unchanged. Everything here is scoped to .cs-*
   classes. Plain CSS; V2 tokens; sharp corners for site UI.
   ========================================================================== */

.cs-hero, .cs-modules, .cs-show, .cs-gallery-section, #prm-lightbox {
  --cs-navy: #0E1330;
  --cs-ink: #4B5563;
  --cs-display: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  /* Tokens read by reused crm-page.css components inside these sections. */
  --crm-brand: #6D28D9; --crm-brand-600: #7C3AED; --crm-brand-800: #5B21B6; --crm-brand-900: #4C1D95;
  --crm-soft: #F5F3FF; --crm-lilac: #DDD6FE; --crm-lilac-2: #C4B5FD; --crm-navy: #0E1330; --crm-ink: #4B5563;
  --crm-line: #E5E7EB; --crm-display: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
}

/* ── Desktop browser frame (size container: the toolbar scales with the window) ── */
.cs-win {
  position: relative; display: block; margin: 0; overflow: hidden; container-type: inline-size;
  background: #fff; border: 1px solid #D9DCE6; border-radius: 10px;
  box-shadow: 0 50px 80px -40px rgba(46, 16, 101, .5), 0 18px 36px -20px rgba(14, 19, 48, .3);
}
.cs-win__bar {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr) minmax(0, 1fr); align-items: center;
  height: clamp(15px, 3cqw, 34px); padding: 0 clamp(6px, 1.2cqw, 14px);
  background: linear-gradient(#F8F8FB, #EEF0F5); border-bottom: 1px solid #E1E3EB;
}
.cs-win__ctrl { display: flex; align-items: center; min-width: 0; }
.cs-win__dots { display: flex; align-items: center; gap: clamp(3px, .6cqw, 7px); }
.cs-win__dots i { width: clamp(5px, .85cqw, 11px); aspect-ratio: 1; border-radius: 50%; background: #F0716B; }
.cs-win__dots i:nth-child(2) { background: #F5BF4F; }
.cs-win__dots i:nth-child(3) { background: #5BC46F; }
.cs-win__nav { display: none; }
.cs-win__url {
  display: flex; align-items: center; justify-content: center; gap: .5em; min-width: 0; height: 66%;
  padding: 0 1em; font-size: clamp(7px, 1.05cqw, 12px); font-weight: 600; letter-spacing: .01em; color: #6B7280;
  background: #fff; border: 1px solid #E3E5EC; border-radius: 999px; white-space: nowrap;
}
.cs-win__url span { overflow: hidden; text-overflow: ellipsis; }
.cs-win__url svg, .cs-win__nav svg { flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cs-win__url svg { width: 1.2em; height: 1.2em; color: #7C3AED; }
.cs-win img { display: block; width: 100%; height: auto; background: #F5F5FA; }
@container (min-width: 520px) {
  .cs-win__nav { display: inline-flex; margin-left: 1.2cqw; gap: .35cqw; color: #9CA3AF; }
  .cs-win__nav svg { width: 1.4cqw; height: 1.4cqw; max-width: 18px; max-height: 18px; }
}
@container (max-width: 300px) { .cs-win__url span { display: none; } }
.cs-win--compact { border-radius: 8px; }
.cs-win--large { border-radius: 12px; box-shadow: 0 60px 90px -44px rgba(46, 16, 101, .5), 0 22px 40px -24px rgba(14, 19, 48, .3), 0 0 0 1px rgba(109, 40, 217, .06); }

/* Labels and notes */
.cs-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; white-space: nowrap;
  font-size: 11px; line-height: 16px; font-weight: 700; color: #0E1330;
  background: #fff; border: 1px solid #E5E7EB; box-shadow: 0 8px 16px -10px rgba(14, 19, 48, .4);
}
.cs-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #7C3AED; }
.cs-note { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; line-height: 16px; font-weight: 600; color: #6B7280; }
.cs-note svg { width: 14px; height: 14px; flex-shrink: 0; fill: none; stroke: #7C3AED; stroke-width: 2; stroke-linecap: round; }
.cs-note--center { display: block; max-width: 760px; margin: 22px auto 0; text-align: center; }
.cs-note--center svg, .cs-note--below svg { display: inline-block; vertical-align: -2px; margin-right: 6px; }
.cs-note--below { display: block; margin-top: 18px; text-align: center; }

/* Section heading */
.cs-head { max-width: 780px; }
.cs-head--center { margin-inline: auto; text-align: center; }
.cs-head--center .eyebrow-v2 { justify-content: center; }
.cs-head--split { max-width: none; display: flex; flex-direction: column; gap: 16px; justify-content: space-between; }
.cs-head__title { margin-top: 16px; font-family: var(--cs-display); font-weight: 700; color: var(--cs-navy); font-size: 32px; line-height: 39px; letter-spacing: -.02em; }
.cs-head__lead { margin-top: 14px; font-size: 17px; line-height: 28px; color: var(--cs-ink); }
@media (min-width: 768px) {
  .cs-head__title { font-size: 40px; line-height: 47px; }
  .cs-head--split { flex-direction: row; align-items: flex-end; }
}
@media (min-width: 1024px) { .cs-head__title { font-size: 44px; line-height: 52px; } .cs-head__lead { font-size: 18px; line-height: 30px; } }

/* ==========================================================================
   01 · Hero — Create Coupon (main window) + "Common coupon design" card in front
   ========================================================================== */
.cs-hero__title { font-size: 34px; line-height: 41px; letter-spacing: -.03em; }
.cs-hero__grid { grid-template-columns: minmax(0, 1fr); }
.cs-hero__visual { padding: 34px 16px 56px; overflow: hidden; }
.cs-hero__stage {
  position: relative; width: 100%; max-width: 600px; margin: 0 auto; aspect-ratio: 1 / .74;
  transform: perspective(1800px) rotateX(3deg) rotateY(-6deg);   /* static depth; JS takes over */
}
.cs-hero__glow { position: absolute; left: 4%; right: 2%; top: 2%; bottom: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(196, 181, 253, .6), rgba(245, 243, 255, 0)); }
.cs-hero__main { position: absolute; z-index: 1; left: 0; top: 4%; width: 92%; }
.cs-hero__main .cs-win { box-shadow: 0 50px 76px -36px rgba(46, 16, 101, .55), 0 16px 30px -18px rgba(14, 19, 48, .32), 0 0 0 1px rgba(109, 40, 217, .08); }
.cs-hero__main .cs-win::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, #7C3AED, #A78BFA); }
.cs-hero__panel { position: absolute; z-index: 3; right: 0; bottom: 2%; width: 44%; margin: 0; }
.cs-hero__panel img {
  display: block; width: 100%; height: auto; border-radius: 12px; background: #4C1D95;
  box-shadow: -22px 46px 64px -28px rgba(46, 16, 101, .65), 0 16px 30px -16px rgba(14, 19, 48, .45), 0 0 0 1px rgba(255, 255, 255, .5);
}
.cs-hero__tag { position: absolute; z-index: 4; top: -12px; left: 14px; }
.cs-hero__shadow { position: absolute; z-index: 0; border-radius: 50%; pointer-events: none; filter: blur(5px);
  background: radial-gradient(closest-side, rgba(46, 16, 101, .3), rgba(46, 16, 101, 0)); }
.cs-hero__shadow--main { left: 4%; width: 70%; top: 60%; height: 9%; }
.cs-hero__shadow--panel { right: -2%; width: 46%; bottom: -5%; height: 9%; }
.cs-hero__note { position: absolute; z-index: 6; left: 14px; bottom: 14px; padding: 4px 10px; background: rgba(255, 255, 255, .95); border: 1px solid #E5E7EB; }
.cs-hero__stage.is-animated .cs-hero__main, .cs-hero__stage.is-animated .cs-hero__panel, .cs-hero__stage.is-animated .cs-hero__shadow { will-change: transform; }
@media (max-width: 639px) {
  .cs-tag { gap: 5px; padding: 2px 7px; font-size: 10px; line-height: 14px; }
  .cs-hero__tag { top: -9px; left: 8px; }
  .cs-hero__panel img { border-radius: 8px; }
}
@media (min-width: 768px) {
  .cs-hero__title { font-size: 46px; line-height: 53px; }
  .cs-hero__visual { padding: 46px 34px 66px; }
}
@media (min-width: 1024px) {
  .cs-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 600px); }
  .cs-hero__visual { padding: 52px 26px 70px; }
}
@media (min-width: 1280px) {
  .cs-hero__title { font-size: 50px; line-height: 57px; }
  .cs-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 640px); }
}

/* ==========================================================================
   02 · What is … ? (stage, tiles and parallax from crm-page)
   ========================================================================== */
.cs-intro-stage .cs-intro-win { position: absolute; z-index: 2; left: 50%; top: 50%; width: 84%; translate: -50% -50%; }
.cs-intro__points { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cs-intro__points li {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px;
  font-size: 14px; line-height: 20px; font-weight: 600; color: #0E1330; background: #fff; border: 1px solid #E5E7EB;
}
.cs-intro__icon { display: grid; place-items: center; width: 30px; height: 30px; color: #6D28D9; background: #F5F3FF; }
.cs-intro__icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================================
   03 · Tab illustrations (inside the approved purple section)
   ========================================================================== */
.cs-art { overflow: visible; }
.cs-art .cs-art__fill { fill: rgba(255, 255, 255, .12); }
.cs-art .cs-art__soft { stroke: rgba(255, 255, 255, .45); }
.cs-art .cs-art__chip { fill: rgba(255, 255, 255, .28); }
.cs-art .cs-art__dash { stroke-dasharray: 2 6; animation: cs-dash 1.4s linear infinite; }
.cs-art .cs-art__pulse { fill: none; stroke: #C4B5FD; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: cs-pulse 2.6s ease-in-out infinite; }

/* ==========================================================================
   04 · Core modules
   ========================================================================== */
.cs-modules { background: #F8FAFC; border-block: 1px solid #E5E7EB; padding: 64px 0; }
.cs-modules__grid { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 16px; }
.cs-module {
  position: relative; display: flex; flex-direction: column; padding: 26px 24px; overflow: hidden;
  background: #fff; border: 1px solid #E5E7EB; transition: border-color .25s ease, box-shadow .25s ease, translate .25s ease;
}
.cs-module::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, #6D28D9, #A78BFA);
  transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.cs-module:hover { border-color: #C4B5FD; box-shadow: 0 26px 44px -30px rgba(76, 29, 149, .5); translate: 0 -3px; }
.cs-module:hover::before { transform: scaleX(1); }
.cs-module__icon { display: grid; place-items: center; width: 52px; height: 52px; color: #fff; background: linear-gradient(145deg, #7C3AED, #5B21B6); box-shadow: 0 14px 24px -14px rgba(76, 29, 149, .7); }
.cs-module__icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cs-module__title { margin-top: 20px; font-family: var(--cs-display); font-size: 19px; line-height: 25px; font-weight: 700; color: var(--cs-navy); }
.cs-module__text { margin-top: 8px; font-size: 14.5px; line-height: 23px; color: var(--cs-ink); }
@media (min-width: 640px) { .cs-modules__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) { .cs-modules { padding: 96px 0; } }
@media (min-width: 1024px) { .cs-modules__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } .cs-module { padding: 30px 28px; } }

/* ==========================================================================
   05 · Product showcases
   ========================================================================== */
.cs-show { position: relative; background: #fff; padding: 72px 0; overflow: hidden; }
.cs-show--right { background: linear-gradient(180deg, #FBFAFF 0%, #fff 100%); border-top: 1px solid #F1EEFB; }
.cs-show--left { border-top: 1px solid #F1F2F6; }
.cs-show--wide { border-top: 1px solid #F1F2F6; }
/* Wide (full-width) showcase */
.cs-wide__stage { position: relative; max-width: 1100px; margin: 40px auto 0; }
.cs-wide__stage::before {
  content: ""; position: absolute; inset: -8% -12% -4%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, #EFEAFF, rgba(245, 243, 255, 0));
}
.cs-wide__frame { position: relative; z-index: 2; }
.cs-points { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 14px; }
.cs-point { display: flex; gap: 14px; padding: 20px; background: #fff; border: 1px solid #E5E7EB; transition: border-color .2s ease; }
.cs-point:hover { border-color: #C4B5FD; }
.cs-point__icon { width: 42px; height: 42px; }
.cs-point__icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cs-point strong { display: block; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--cs-navy); }
.cs-point > span:last-child > span { display: block; margin-top: 2px; font-size: 14px; line-height: 21px; color: var(--cs-ink); }
/* Split showcase */
.cs-show__grid { display: grid; gap: 44px; align-items: center; }
.cs-show__visual { position: relative; width: 100%; max-width: 720px; margin: 0 auto; }
.cs-show__visual::before {
  content: ""; position: absolute; inset: -6% -4% 4%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, #F1EDFF, rgba(245, 243, 255, 0));
}
.cs-show__frame { position: relative; z-index: 1; }
.cs-show .crm-mobile__actions { margin-top: 30px; }
.cs-checks { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .cs-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) { .cs-show { padding: 96px 0; } .cs-wide__stage { margin-top: 52px; } }
@media (min-width: 1024px) {
  .cs-show { padding: 112px 0; }
  .cs-points { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cs-show__grid { grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); gap: 60px; }
  .cs-show--right .cs-show__grid { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); }
  .cs-show--right .cs-show__visual { order: 2; }
}

/* ==========================================================================
   06 · Screenshot gallery (marquee engine and lightbox in product-premium.js)
   ========================================================================== */
.cs-gallery__note { max-width: 720px; }
.cs-gallery__win { transition: translate .25s ease, box-shadow .25s ease; box-shadow: 0 30px 50px -30px rgba(46, 16, 101, .45), 0 10px 20px -14px rgba(14, 19, 48, .25); }
.crm-gallery__open:hover .cs-gallery__win { translate: 0 -6px; box-shadow: 0 40px 60px -30px rgba(76, 29, 149, .55), 0 12px 24px -14px rgba(14, 19, 48, .3); }
.cs-gallery__win img { pointer-events: none; -webkit-user-drag: none; }
@media (max-width: 639px) { .cs-gallery .crm-gallery__item { flex-basis: 88%; } }
@media (min-width: 640px) { .cs-gallery .crm-gallery__item { --per: 1.5; } }
@media (min-width: 1024px) { .cs-gallery .crm-gallery__item { --per: 2.1; } }
.cs-lightbox__note { margin-top: 10px; text-align: center; font-size: 12px; line-height: 16px; font-weight: 600; color: #C4B5FD; }

/* Benefits: subtle hover lift (translate keeps GSAP's reveal transform intact) */
.cs-benefit { transition: border-color .2s ease, box-shadow .2s ease, translate .2s ease; }
.cs-benefit:hover { border-color: #A78BFA; box-shadow: 0 22px 40px -30px rgba(76, 29, 149, .5); translate: 0 -2px; }

/* ==========================================================================
   Motion
   ========================================================================== */
@keyframes cs-dash { to { stroke-dashoffset: -16; } }
@keyframes cs-pulse { 0%, 100% { opacity: .25; scale: .85; } 50% { opacity: .9; scale: 1.08; } }
.cs-anim-off *, .cs-anim-off *::before, .cs-anim-off *::after { animation-play-state: paused !important; }
.cs-show [data-prm-float] { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .cs-art .cs-art__dash, .cs-art .cs-art__pulse { animation: none; }
  .cs-module, .cs-module::before, .cs-point, .cs-gallery__win, .cs-benefit { transition: none; }
  .cs-module:hover, .crm-gallery__open:hover .cs-gallery__win, .cs-benefit:hover { translate: none; }
  .cs-show [data-prm-float] { will-change: auto; }
}
