/* ============================================================
   امرتات استور — Custom design page (طراحی اختصاصی فروشگاه)
   Uses :root tokens + shared components from styles.css
   ============================================================ */

/* ---- Intro: copy + design-studio mockup ---- */
.cd-intro { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.cd-intro .ci-copy { max-width: 540px; }
.cd-intro .ci-copy h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 16px; letter-spacing: -0.02em; }
.cd-intro .ci-copy > p { color: var(--text-2); font-size: 16.5px; line-height: 1.95; margin-bottom: 22px; }
.cd-points { display: flex; flex-direction: column; gap: 14px; }
.cd-point { display: flex; align-items: flex-start; gap: 13px; }
.cd-point .cp-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); display: grid; place-items: center; flex-shrink: 0; }
.cd-point .cp-ico i { font-size: 23px; color: var(--primary); }
.cd-point .cp-title { font-weight: 700; font-size: 15.5px; }
.cd-point .cp-desc { font-size: 13.5px; color: var(--text-2); margin-top: 2px; line-height: 1.7; }

/* ---- Design-studio mockup ---- */
.design-stage { position: relative; padding: 26px 14px 40px; }
.design-frame {
  background: #fff; border-radius: var(--r-xl); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); overflow: hidden; position: relative; z-index: 2;
}
.df-bar { display: flex; align-items: center; gap: 11px; padding: 7px 13px; border-bottom: 1px solid var(--border); background: #fff; direction: ltr; }
.df-dots { display: flex; gap: 6px; }
.df-dots span { width: 10px; height: 10px; border-radius: 50%; }
.df-dots span:nth-child(1){ background: #FF5F57; } .df-dots span:nth-child(2){ background: #FEBC2E; } .df-dots span:nth-child(3){ background: #28C840; }
.df-url { flex: 1; justify-content: center; display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-3); background: var(--surface); padding: 5px 12px; border-radius: 7px; font-family: var(--font-en); direction: ltr; }
.df-url i { font-size: 14px; color: var(--primary); }
.df-url i { color: var(--green); }
.df-refresh { color: var(--text-3); font-size: 14px; display: grid; place-items: center; }
.df-canvas { position: relative; aspect-ratio: 16 / 11; background: #fff; display: flex; flex-direction: column; overflow: hidden; }

/* storefront mock inside the frame (looks like YourShop.com) */
.store-head { display: flex; align-items: center; gap: 12px; padding: 11px 15px; border-bottom: 1px solid var(--border); background: #fff; }
.store-logo { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 15px; color: var(--text); white-space: nowrap; letter-spacing: -0.01em; }
.store-logo i { color: var(--primary); font-size: 18px; }
.store-search { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 100px; padding: 7px 13px; color: var(--text-3); font-size: 12px; }
.store-search i { font-size: 14px; flex-shrink: 0; }
.store-search span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-actions { display: flex; align-items: center; gap: 8px; }
.store-ic { position: relative; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--text-2); }
.store-ic i { font-size: 16px; }
.store-cart b { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 100px; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.store-nav { display: flex; align-items: center; gap: 18px; padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); background: #fff; }
.store-nav .on { color: var(--primary); font-weight: 700; position: relative; }
.store-nav .on::after { content: ''; position: absolute; bottom: -11px; inset-inline: 0; height: 2px; background: var(--primary); border-radius: 2px; }
.store-banner { position: relative; flex: 1; min-height: 0; background: var(--surface-2); overflow: hidden; }
.store-banner image-slot { width: 100%; height: 100%; display: block; }

/* selection handles + label (the "in design" cue) */
.df-select { position: absolute; inset: 14px; border: 1.5px solid var(--primary); border-radius: 6px; pointer-events: none; z-index: 3; }
.df-handle { position: absolute; width: 11px; height: 11px; background: #fff; border: 2px solid var(--primary); border-radius: 3px; }
.df-handle.tl { top: -6px; right: -6px; }
.df-handle.tr { top: -6px; left: -6px; }
.df-handle.bl { bottom: -6px; right: -6px; }
.df-handle.br { bottom: -6px; left: -6px; }
.df-dim { position: absolute; top: -12px; inset-inline-start: 12px; background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 700; font-family: var(--font-en); direction: ltr; padding: 3px 10px; border-radius: 6px; white-space: nowrap; box-shadow: var(--shadow-primary); }

/* design toolbar (floats top) */
.design-toolbar {
  position: absolute; top: -6px; right: 30px; z-index: 4;
  display: flex; align-items: center; gap: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-md); padding: 7px 9px;
}
.dt-tool { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--text-2); }
.dt-tool i { font-size: 19px; }
.dt-tool.active { background: var(--primary-soft); color: var(--primary); }
.dt-sep { width: 1px; height: 22px; background: var(--border); margin-inline: 4px; }
.dt-swatch { width: 18px; height: 18px; border-radius: 6px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); }

/* IDE code slice (floats bottom-left) — "every pixel is hand-coded" */
.code-panel {
  position: absolute; bottom: 0; left: -16px; z-index: 5; width: 282px;
  background: #15131F; border: 1px solid rgba(255,255,255,.08); border-radius: 14px;
  box-shadow: 0 26px 54px -18px rgba(15,14,23,.55); overflow: hidden;
  animation: floaty 6s ease-in-out infinite .6s;
}
.code-tabs { display: flex; align-items: stretch; background: #100E18; border-bottom: 1px solid rgba(255,255,255,.06); }
.code-tab { display: flex; align-items: center; gap: 6px; padding: 9px 13px; font-family: var(--font-en); font-size: 11.5px; font-weight: 500; color: rgba(255,255,255,.42); border-inline-end: 1px solid rgba(255,255,255,.06); }
.code-tab i { font-size: 14px; }
.code-tab.active { color: #fff; background: #15131F; }
.code-tab.active i { color: #8B5CF6; }
.code-body { margin: 0; padding: 12px 14px 14px; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 11.5px; line-height: 1.95; color: rgba(255,255,255,.85); background: #15131F; overflow: hidden; }
.cline { display: block; white-space: pre; }
.cnum { display: inline-block; width: 17px; color: rgba(255,255,255,.25); user-select: none; }
.t-sel { color: #FCD34D; }
.t-prop { color: #A5B4FC; }
.t-val { color: #6EE7B7; }
.t-fn { color: #7DD3FC; }
.t-var { color: #C4B5FD; }
.t-pseudo { color: #F0ABFC; }
.ccaret { display: inline-block; width: 6px; height: 12px; background: #8B5CF6; margin-inline-start: 1px; vertical-align: -1px; animation: blink 1.1s steps(1) infinite; }

@keyframes floaty { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-9px); } }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .code-panel { animation: none !important; } .ccaret { animation: none !important; } }

/* ---- Stats band ---- */
.cd-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 30px;
}
.cd-stat { text-align: center; }
.cd-stat .cs-num { font-size: 32px; font-weight: 800; color: var(--text); line-height: 1; letter-spacing: -0.02em; }
.cd-stat .cs-num small { font-size: 19px; color: var(--primary); font-weight: 700; }
.cd-stat .cs-lab { font-size: 13.5px; color: var(--text-2); margin-top: 9px; }
.cd-stat + .cd-stat { border-inline-start: 1px solid var(--border); }

/* ---- Benefits (custom cards: tilted corner icon + watermark + hover motion) ---- */
.cd-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cd-benefit {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(165deg, #fff 45%, var(--surface));
  border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 30px 26px 28px;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s, border-color .3s, background .3s;
}
.cd-benefit:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary); }

/* big faint watermark glyph bleeding from the top-left corner */
.cd-benefit .cd-watermark {
  position: absolute; top: -30px; left: -22px; z-index: -1;
  font-size: 158px; line-height: 1; color: var(--primary); opacity: .06;
  transform: rotate(-14deg);
  transition: transform .55s cubic-bezier(.2,.7,.2,1), opacity .35s;
  pointer-events: none;
}
.cd-benefit:hover .cd-watermark { transform: rotate(-3deg) translate(10px, -8px) scale(1.04); opacity: .11; }

/* solid tilted icon chip */
.cd-benefit .cd-chip {
  width: 62px; height: 62px; border-radius: 19px;
  background: linear-gradient(140deg, var(--primary), var(--primary-dark));
  display: grid; place-items: center; color: #fff;
  box-shadow: var(--shadow-primary);
  transform: rotate(-9deg); margin-bottom: 22px;
  transition: transform .4s cubic-bezier(.34,1.4,.5,1);
}
.cd-benefit .cd-chip i { font-size: 33px; }
.cd-benefit:hover .cd-chip { transform: rotate(2deg) translateX(-7px) scale(1.06); }
.cd-benefit h3 { font-size: 17.5px; margin-bottom: 9px; }
.cd-benefit p { font-size: 14.5px; color: var(--text-2); line-height: 1.78; }

/* ---- قالب آماده vs اختصاصی ---- */
.vs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; max-width: 920px; margin-inline: auto; }
.vs-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 30px 28px; display: flex; flex-direction: column; position: relative;
}
.vs-card.feat { border: 1.5px solid var(--primary); box-shadow: var(--shadow-lg); }
.vs-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(120deg, var(--primary), var(--primary-dark)); color: #fff;
  font-size: 12.5px; font-weight: 700; padding: 6px 18px; border-radius: 100px;
  display: flex; align-items: center; gap: 6px; box-shadow: var(--shadow-primary); white-space: nowrap;
}
.vs-badge i { font-size: 15px; }
.vs-head { display: flex; align-items: center; gap: 13px; margin-bottom: 8px; }
.vs-ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.vs-card .vs-ico { background: var(--surface-2); }
.vs-card .vs-ico i { font-size: 28px; color: var(--text-2); }
.vs-card.feat .vs-ico { background: var(--primary-soft); }
.vs-card.feat .vs-ico i { color: var(--primary); }
.vs-head h3 { font-size: 19px; }
.vs-card > p { font-size: 13.5px; color: var(--text-2); margin-bottom: 20px; line-height: 1.7; }
.vs-list { display: flex; flex-direction: column; gap: 13px; }
.vs-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--text); line-height: 1.6; }
.vs-list li i { font-size: 19px; flex-shrink: 0; margin-top: 1px; }
.vs-list li.yes i { color: var(--green); }
.vs-list li.no { color: var(--text-3); }
.vs-list li.no i { color: var(--text-3); }

/* ---- Process steps ---- */
.cd-process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; position: relative; }
.cd-process::before {
  content: ''; position: absolute; top: 36px; right: 9%; left: 9%; height: 2px;
  background: repeating-linear-gradient(to left, var(--border-strong) 0 8px, transparent 8px 16px); z-index: 0;
}
.cd-step { text-align: center; position: relative; z-index: 1; }
.cd-step-ic {
  width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 20px;
  background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: grid; place-items: center; position: relative;
}
.cd-step-ic i { font-size: 32px; color: var(--primary); }
.cd-step-ic .badge {
  position: absolute; top: -9px; right: -9px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff; display: grid; place-items: center;
  font-family: var(--font-en); font-weight: 700; font-size: 13px; box-shadow: var(--shadow-primary);
}
.cd-step h3 { font-size: 16.5px; margin-bottom: 8px; }
.cd-step p { color: var(--text-2); font-size: 13.5px; line-height: 1.7; max-width: 200px; margin-inline: auto; }

/* sequenced entrance: steps pop right→left, line fills, rocket launches */
.cd-progress { display: none; }
html.anim .cd-process .cd-progress {
  display: block; position: absolute; top: 36px; right: 9%; width: 0; height: 2px; z-index: 0;
  background: linear-gradient(to left, var(--primary), var(--primary-dark)); border-radius: 2px;
}
html.anim .cd-process .cd-step-ic { opacity: 0; transform: scale(.55); }
html.anim .cd-process .cd-step h3,
html.anim .cd-process .cd-step p { opacity: 0; transform: translateY(9px); }

html.anim .cd-process.in .cd-step-ic { animation: stepPop .55s cubic-bezier(.34,1.5,.45,1) forwards; }
html.anim .cd-process.in .cd-step h3,
html.anim .cd-process.in .cd-step p { animation: stepText .5s ease forwards; }
html.anim .cd-process.in .cd-progress { animation: lineFill 2.1s cubic-bezier(.4,0,.2,1) .4s forwards; }
html.anim .cd-process.in .cd-step:last-child .cd-step-ic i { animation: rocketLaunch 1s cubic-bezier(.34,1.3,.5,1) 2.5s; }

html.anim .cd-process.in .cd-step:nth-child(1) .cd-step-ic { animation-delay: .1s; }
html.anim .cd-process.in .cd-step:nth-child(2) .cd-step-ic { animation-delay: .55s; }
html.anim .cd-process.in .cd-step:nth-child(3) .cd-step-ic { animation-delay: 1s; }
html.anim .cd-process.in .cd-step:nth-child(4) .cd-step-ic { animation-delay: 1.45s; }
html.anim .cd-process.in .cd-step:nth-child(5) .cd-step-ic { animation-delay: 1.9s; }
html.anim .cd-process.in .cd-step:nth-child(1) h3, html.anim .cd-process.in .cd-step:nth-child(1) p { animation-delay: .25s; }
html.anim .cd-process.in .cd-step:nth-child(2) h3, html.anim .cd-process.in .cd-step:nth-child(2) p { animation-delay: .7s; }
html.anim .cd-process.in .cd-step:nth-child(3) h3, html.anim .cd-process.in .cd-step:nth-child(3) p { animation-delay: 1.15s; }
html.anim .cd-process.in .cd-step:nth-child(4) h3, html.anim .cd-process.in .cd-step:nth-child(4) p { animation-delay: 1.6s; }
html.anim .cd-process.in .cd-step:nth-child(5) h3, html.anim .cd-process.in .cd-step:nth-child(5) p { animation-delay: 2.05s; }
/* fallback: if force-shown without entering view, just reveal */
html.anim .cd-process.force-show:not(.in) .cd-step-ic,
html.anim .cd-process.force-show:not(.in) .cd-step h3,
html.anim .cd-process.force-show:not(.in) .cd-step p { opacity: 1; transform: none; }

@keyframes stepPop { to { opacity: 1; transform: scale(1); } }
@keyframes stepText { to { opacity: 1; transform: none; } }
@keyframes lineFill { to { width: 82%; } }
@keyframes rocketLaunch {
  0% { transform: translateY(0) rotate(0); }
  28% { transform: translateY(-4px) rotate(-7deg); }
  60% { transform: translateY(-16px) rotate(0); }
  100% { transform: translateY(0) rotate(0); }
}

/* ---- Showcase (browser-frame design samples) ---- */
.cd-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cd-sample {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s, border-color .28s;
}
.cd-sample:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.cd-sample-bar { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.cd-sample-dots { display: flex; gap: 5px; }
.cd-sample-dots span { width: 9px; height: 9px; border-radius: 50%; }
.cd-sample-dots span:nth-child(1){ background: #FF5F57; } .cd-sample-dots span:nth-child(2){ background: #FEBC2E; } .cd-sample-dots span:nth-child(3){ background: #28C840; }
.cd-sample-url { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-3); background: #fff; border: 1px solid var(--border); padding: 4px 11px; border-radius: 7px; font-family: var(--font-en); direction: ltr; }
.cd-sample-url i { font-size: 12px; color: var(--green); }
.cd-shot { position: relative; aspect-ratio: 16 / 11; background: var(--surface-2); overflow: hidden; }
.cd-shot image-slot { width: 100%; height: 100%; display: block; }
.cd-shot .shot-tag { position: absolute; top: 12px; right: 12px; z-index: 2; font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(15,14,23,0.55); backdrop-filter: blur(6px); padding: 5px 12px; border-radius: 100px; }
.cd-sample-foot { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 16px 18px; }
.cd-sample-foot .s-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.cd-sample-foot .s-meta { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.cd-sample-foot .s-arrow { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; background: var(--primary-soft); display: grid; place-items: center; color: var(--primary); transition: background .2s, color .2s, transform .2s; }
.cd-sample:hover .s-arrow { background: var(--primary); color: #fff; transform: translateX(-3px); }
.cd-sample-foot .s-arrow i { font-size: 19px; }

/* ---- Packages note ---- */
.cd-pkg-note { display: flex; align-items: center; gap: 9px; justify-content: center; margin-top: 22px; font-size: 13.5px; color: var(--text-2); }
.cd-pkg-note i { font-size: 18px; color: var(--primary); }

/* ---- Plan start label ---- */
.plan-start { font-size: 13px; color: var(--text-2); margin-bottom: 6px; text-align: center; font-weight: 500; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .cd-intro { grid-template-columns: 1fr; gap: 56px; }
  .cd-intro .ci-copy { max-width: 620px; }
  .cd-benefits { grid-template-columns: repeat(2, 1fr); }
  .cd-process { grid-template-columns: repeat(5, 1fr); gap: 10px; }
  .cd-process .cd-step p { font-size: 12.5px; }
  .cd-gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .cd-stats { grid-template-columns: 1fr 1fr; gap: 26px; }
  .cd-stat:nth-child(3) { border-inline-start: none; }
  .vs-grid { grid-template-columns: 1fr; }
  .cd-process { grid-template-columns: 1fr; gap: 36px; }
  .cd-process::before { display: none; }
  html.anim .cd-process .cd-progress { display: none; }
  .cd-gallery { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .cd-benefits { grid-template-columns: 1fr; }
  .cd-stats { grid-template-columns: 1fr; }
  .cd-stat + .cd-stat { border-inline-start: none; border-top: 1px solid var(--border); padding-top: 26px; }
  .design-toolbar { right: 12px; }
  .style-panel { width: 150px; }
}
