/* Campaign banners (الإعلانات): home page and the admin's live preview. Four looks; text contrast ≥ 4.5:1 on each. */
.mark { display: inline-block; aspect-ratio: 606 / 386; background: currentColor;
  -webkit-mask: url(/assets/img/mark.png) center / contain no-repeat; mask: url(/assets/img/mark.png) center / contain no-repeat; }

.campaigns { padding: 1rem 1rem 0; max-width: 1240px; margin: 0 auto; }
.campaigns[hidden] { display: none; }
.cb-stage { display: grid; }
.cb {
  --cb-bg: #C90E2D; --cb-fg: #fff; --cb-accent: #FFC93C; --cb-btn-bg: #fff; --cb-btn-fg: #C90E2D; --cb-soft: rgba(255, 255, 255, .14);
  grid-area: 1 / 1; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 1.5rem;
  min-height: 300px; padding: 2rem 2.25rem; border-radius: 28px; overflow: hidden; position: relative;
  background: var(--cb-bg); color: var(--cb-fg); isolation: isolate;
  animation: cb-in .45s cubic-bezier(.2, .7, .2, 1);
}
.cb[hidden] { display: none; }
.cb::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(520px 260px at 0% 110%, rgba(0, 0, 0, .22), transparent 70%),
              radial-gradient(420px 240px at 100% -10%, rgba(255, 255, 255, .12), transparent 70%); }
.cb-black { --cb-bg: #141012; --cb-accent: #FFC93C; --cb-btn-bg: #FFC93C; --cb-btn-fg: #141012; }
.cb-red { --cb-bg: #C90E2D; }
.cb-gold { --cb-bg: linear-gradient(135deg, #FBE29A, #E9B949 60%, #D79A2B); --cb-fg: #1C1416; --cb-accent: #9E0B23; --cb-btn-bg: #1C1416; --cb-btn-fg: #FFE7A8; --cb-soft: rgba(28, 20, 22, .1); }
.cb-green { --cb-bg: #0E6B43; --cb-accent: #FFD45C; --cb-btn-bg: #fff; --cb-btn-fg: #0E6B43; }

.cb-badge { display: inline-flex; align-items: center; padding: .3rem .9rem; border-radius: 999px; background: var(--cb-accent);
  color: #1C1416; font-family: var(--font-head, 'Rubik', sans-serif); font-weight: 800; font-size: .95rem; }
.cb-gold .cb-badge { color: #fff; }
.cb-title { margin: .7rem 0 .35rem; font-family: var(--font-head, 'Rubik', sans-serif); font-weight: 800;
  font-size: clamp(1.9rem, 4.6vw, 3.4rem); line-height: 1.1; letter-spacing: -.02em; color: inherit; }
.cb-sub { margin: 0 0 1rem; font-size: 1.08rem; opacity: .92; max-width: 32rem; }
.cb-cd { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 0 0 1.25rem; }
.cb-cd-label { display: inline-flex; align-items: center; gap: .35rem; font-size: .9rem; opacity: .9; }
.cd { display: flex; gap: .45rem; direction: ltr; }
.cd-cell { display: grid; justify-items: center; min-width: 3.4rem; padding: .45rem .4rem; border-radius: 14px; background: var(--cb-soft); }
.cd-cell[hidden] { display: none; }
.cd-cell b { font-family: 'Rubik', sans-serif; font-size: 1.55rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cd-cell small { font-size: .72rem; opacity: .85; }
.cb-btn { background: var(--cb-btn-bg); color: var(--cb-btn-fg); min-height: 48px; padding: .75rem 1.5rem; border-radius: 999px;
  font-weight: 700; display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; transition: transform .2s ease; }
.cb-btn:hover { transform: translateY(-2px); }
.cb-btn:focus-visible { outline: 3px solid var(--cb-accent); outline-offset: 3px; }

.cb-media { position: relative; height: 100%; min-height: 220px; display: grid; place-items: center; }
.cb-photo { width: 100%; height: 100%; max-height: 300px; object-fit: cover; border-radius: 20px; }
.cb-art { position: relative; width: 100%; max-width: 340px; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.cb-mark { width: 74%; color: var(--cb-fg); filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .28)); animation: cb-bob 3.2s ease-in-out infinite; }
.cb-gold .cb-mark { color: #9E0B23; }
.cb-lines { position: absolute; inset: 0; pointer-events: none; }
.cb-lines i { position: absolute; left: 0; height: 9px; border-radius: 9px; background: var(--cb-accent); opacity: 0; animation: cb-zoom 2.4s cubic-bezier(.3, .6, .2, 1) infinite; }
.cb-lines i:nth-child(1) { top: 40%; width: 34%; }
.cb-lines i:nth-child(2) { top: 52%; width: 22%; animation-delay: .5s; }
.cb-lines i:nth-child(3) { top: 64%; width: 40%; animation-delay: 1.1s; }
.cb-tag { position: absolute; top: 4%; inset-inline-end: 6%; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cb-accent); color: #1C1416; font: 800 1.9rem/1 'Rubik', sans-serif; transform: rotate(-12deg); box-shadow: 0 10px 18px -6px rgba(0, 0, 0, .35); }
.cb-gold .cb-tag { color: #fff; }

.cb-dots { display: flex; justify-content: center; gap: .5rem; padding: .75rem 0 0; }
.cb-dot { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.cb-dot::before { content: ""; width: 10px; height: 10px; border-radius: 999px; background: #D8CDC9; transition: width .25s ease, background .25s ease; }
.cb-dot[aria-current="true"]::before { width: 28px; background: #C90E2D; }

.offer-row[hidden] { display: none; }

@keyframes cb-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes cb-bob { 50% { transform: translateY(-8px); } }
@keyframes cb-zoom { 0% { transform: translateX(-30px); opacity: 0; } 25% { opacity: .9; } 100% { transform: translateX(70px); opacity: 0; } }

@media (max-width: 760px) {
  .cb { grid-template-columns: 1fr; padding: 1.4rem 1.2rem 1.5rem; gap: .5rem; border-radius: 22px; min-height: 0; }
  .cb-media { order: -1; min-height: 0; }
  .cb-art { max-width: 210px; }
  .cb-tag { width: 48px; height: 48px; font-size: 1.4rem; }
  .cd-cell { min-width: 3rem; }
  .cd-cell b { font-size: 1.3rem; }
  .cb-btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .cb, .cb-mark, .cb-lines i { animation: none; }
  .cb-lines i { opacity: .7; }
}

/* «خصم 20% على كل المنتجات»: a red block under the title (white on the red look). */
.cb-off { display: inline-block; margin: 0; padding: .45rem .95rem; border-radius: 12px; background: var(--red); color: #fff;
  font-family: var(--font-head); font-weight: 800; font-size: clamp(15px, 1.6vw, 19px); justify-self: start; }
.cb-red .cb-off { background: #fff; color: var(--red); }
