/* ==========================================================================
   Home: hero (slider · "عرض اليوم" ticket · most requested stores)
   and the categories carousel. Uses the tokens from sc-header.css.
   ========================================================================== */

.sc-hero { padding-block: 20px 8px; }
/* Fit the first screen: viewport minus header/ticker, kept between 420 and 540px. */
.sc-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: stretch; height: clamp(420px, calc(100svh - 170px), 540px); }

@keyframes sc-rise { from { opacity: 0; transform: translateY(12px); } }

/* The card flying off the deck must never widen the page (no sideways
   scroll on phones); clip only horizontally so the stack still peeks up. */
.sc-hero { overflow-x: clip; }
/* Button label: full text on desktop, short one on phones (see ≤700px). */
.sc-slider__btn-short { display: none; }

/* Slider
   -------------------------------------------------------------------------- */
/* Fills its grid cell (no aspect-ratio on desktop: with the grid's stretch it
   would widen the slider past its column). */
.sc-slider { position: relative; width: 100%; min-width: 0; min-height: 400px; overflow: hidden; border-radius: 24px; background: var(--sc-sand); box-shadow: 0 12px 30px rgba(28, 43, 51, .08); }
.sc-slider__track { position: absolute; inset: 0; }
.sc-slider__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.sc-slider__slide.is-active { opacity: 1; visibility: visible; }
.sc-slider__media,
.sc-slider__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sc-slider__media img { object-position: center center; }
/* Slow zoom on the visible banner while it shows. */
.sc-slider__slide.is-active .sc-slider__media img { animation: sc-zoom 6s ease-out both; }
@keyframes sc-zoom { from { transform: scale(1.06); } to { transform: scale(1); } }

/* Banner text straight on the green banners (no card, no overlay):
   brand row · title (store name in gold) · line · coupon button.
   Colours per slide: --sc-s-text, --sc-s-accent, --sc-s-on (Customizer). */
.sc-slider__content { position: absolute; inset-block: 0 70px; inset-inline-start: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; width: min(460px, 42%); padding-inline: 84px 0; color: var(--sc-s-text, #fff); box-sizing: border-box; }
.sc-slider__slide.is-active .sc-slider__content > * { animation: sc-rise .6s ease both; }
.sc-slider__slide.is-active .sc-slider__title { animation-delay: .1s; }
.sc-slider__slide.is-active .sc-slider__text { animation-delay: .18s; }
.sc-slider__slide.is-active .sc-slider__actions { animation-delay: .26s; }

.sc-slider__brand { display: flex; align-items: center; gap: 10px; }
.sc-slider__logo { width: 44px; height: 44px; border: 2px solid rgba(255, 255, 255, .9); border-radius: 14px; box-shadow: 0 6px 14px rgba(0, 0, 0, .25); object-fit: cover; }
.sc-slider__tag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 12px; border-radius: var(--sc-pill); background: var(--sc-s-accent, var(--sc-gold)); color: var(--sc-s-on, var(--sc-ink)); font-size: 13px; font-weight: 700; }
.sc-slider__tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(28, 43, 51, .15); }
.sc-slider__title { margin: 0; font-size: clamp(28px, 3vw, 46px); font-weight: 700; line-height: 1.15; letter-spacing: -.5px; text-wrap: balance; text-shadow: 0 2px 18px rgba(0, 0, 0, .2); }
.sc-slider__hl { color: var(--sc-s-accent, var(--sc-gold)); }
.sc-slider__text { max-width: 30ch; text-shadow: 0 1px 10px rgba(0, 0, 0, .35); margin: 0; font-size: clamp(14px, 1.15vw, 17px); font-weight: 500; line-height: 1.7; opacity: .85; }

/* Actions (first design): solid gold primary + white outline secondary. */
.sc-slider__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.sc-slider__btn { display: inline-flex; align-items: center; gap: 8px; height: 50px; padding-inline: 24px 20px; border-radius: var(--sc-pill); background: var(--sc-s-accent, var(--sc-gold)); color: var(--sc-s-on, var(--sc-ink)) !important; font-size: 15px; font-weight: 700; text-decoration: none; box-shadow: 0 12px 26px rgba(0, 0, 0, .22); box-sizing: border-box; transition: transform .2s, box-shadow .2s, background .2s; }
.sc-slider__btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(0, 0, 0, .28); }
.sc-slider__btn--ghost { padding-inline: 22px; background: transparent; color: var(--sc-s-text, #fff) !important; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7); }
.sc-slider__btn--ghost:hover { background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1.5px #fff; }
.sc-slider__btn .sc-icon { transition: transform .2s; }
.sc-slider__btn:hover .sc-icon { transform: translateX(-4px); }
[dir="ltr"] .sc-slider__btn .sc-icon { transform: scaleX(-1); }

.sc-slider__arrow { position: absolute; top: 50%; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--sc-green); box-shadow: 0 6px 16px rgba(0, 0, 0, .15); cursor: pointer; opacity: 0; transition: opacity .2s, background .2s; }
.sc-slider:hover .sc-slider__arrow,
.sc-slider__arrow:focus-visible { opacity: 1; }
.sc-slider__arrow:hover { background: var(--sc-gold); color: var(--sc-ink); }
.sc-slider__arrow--prev { inset-inline-start: 16px; }
.sc-slider__arrow--next { inset-inline-end: 16px; }
/* The chevron points to inline-start; flip it where needed. */
.sc-slider__arrow--prev .sc-icon { transform: scaleX(-1); }
[dir="ltr"] .sc-slider__arrow--prev .sc-icon { transform: none; }
[dir="ltr"] .sc-slider__arrow--next .sc-icon { transform: scaleX(-1); }

/* Pagination (first design): small dots in a glass capsule under the text;
   the active dot stretches into a pill that fills with gold over the 5s autoplay. */
.sc-slider__dots { position: absolute; bottom: 24px; inset-inline-start: 84px; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--sc-pill); background: rgba(0, 0, 0, .22); backdrop-filter: blur(6px); }
.sc-slider__dot { display: flex; padding: 0; border: 0; background: none; cursor: pointer; }
.sc-slider__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sc-slider__bar { position: relative; display: block; width: 8px; height: 8px; overflow: hidden; border-radius: var(--sc-pill); background: rgba(255, 255, 255, .5); transition: width .3s, background .3s; }
.sc-slider__dot:hover .sc-slider__bar { background: #fff; }
.sc-slider__dot.is-active .sc-slider__bar { width: 34px; background: rgba(255, 255, 255, .35); }
.sc-slider__dot.is-active .sc-slider__bar::after { content: ""; position: absolute; inset: 0; background: var(--sc-gold); transform-origin: right; animation: sc-progress 5s linear both; }
[dir="ltr"] .sc-slider__dot.is-active .sc-slider__bar::after { transform-origin: left; }
.sc-slider:has(:focus-visible) .sc-slider__dot.is-active .sc-slider__bar::after { animation-play-state: paused; }
@keyframes sc-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* First design (user's pick): tag pill only, plain white title, stacked
   buttons with soft corners, plain dots centred at the bottom. */
.sc-slider__logo { display: none; }
.sc-slider__hl { color: inherit; }
.sc-slider__content { gap: 14px; }
.sc-slider__title { font-size: clamp(26px, 2.4vw, 38px); line-height: 1.3; }
.sc-slider__actions { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 10px; }
.sc-slider__btn { white-space: nowrap; }
.sc-slider__btn { height: 50px; padding-inline: 26px 22px; border-radius: 14px; }
.sc-slider__btn--ghost { padding-inline: 26px; }
.sc-slider__dots { inset-inline-start: 50%; translate: 50% 0; bottom: 14px; padding: 0; gap: 6px; background: none; backdrop-filter: none; }
[dir="ltr"] .sc-slider__dots { translate: -50% 0; }
.sc-slider__bar { width: 8px; height: 8px; background: rgba(255, 255, 255, .6); }
.sc-slider__dot.is-active .sc-slider__bar { width: 26px; }

/* Commercial layer: discount sticker, trust row, livelier motion.
   ---------------------------------------------------------------------- */
/* Gold starburst "خصم حتى 30٪" just past the text, over the photo. */
.sc-slider__sticker { position: absolute; top: 16%; inset-inline-start: calc(100% + 12px); display: grid; place-content: center; width: 112px; aspect-ratio: 1; background: var(--sc-gold); color: var(--sc-ink); text-align: center; line-height: 1; clip-path: polygon(50% 0, 61% 10%, 75% 6%, 79% 20%, 93% 25%, 89% 39%, 100% 50%, 89% 61%, 93% 75%, 79% 80%, 75% 94%, 61% 90%, 50% 100%, 39% 90%, 25% 94%, 21% 80%, 7% 75%, 11% 61%, 0 50%, 11% 39%, 7% 25%, 21% 20%, 25% 6%, 39% 10%); filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .3)); rotate: -10deg; }
.sc-slider__sticker small { font-size: 12px; font-weight: 700; }
.sc-slider__sticker strong { margin-top: 4px; font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.sc-slider__slide.is-active .sc-slider__sticker { animation: sc-pop .7s .45s cubic-bezier(.34, 1.56, .64, 1) both, sc-wobble 3s 1.2s ease-in-out infinite; }
@keyframes sc-pop { from { opacity: 0; scale: .2; rotate: -60deg; } to { opacity: 1; scale: 1; rotate: -10deg; } }
@keyframes sc-wobble { 0%, 100% { rotate: -10deg; scale: 1; } 50% { rotate: -4deg; scale: 1.06; } }

/* Trust row: "مجرّب اليوم · 12 كوبون فعّال". */
.sc-slider__trust { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sc-slider__trust li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--sc-pill); background: rgba(255, 255, 255, .14); font-size: 13px; font-weight: 600; backdrop-filter: blur(4px); }
.sc-slider__trust .sc-icon { color: var(--sc-gold); }
.sc-slider__slide.is-active .sc-slider__trust { animation-delay: .22s; }

/* Smooth change: slow cross-fade with a soft focus pull on the image,
   then the text floats up line by line. */
.sc-slider__slide { transition: opacity 1.1s cubic-bezier(.4, 0, .2, 1), visibility 1.1s; }
.sc-slider__slide.is-active .sc-slider__media { animation: sc-soft-in 1.4s cubic-bezier(.22, .61, .36, 1) both; }
@keyframes sc-soft-in { from { opacity: 0; filter: blur(6px); transform: scale(1.04); } to { opacity: 1; filter: none; transform: none; } }
.sc-slider__slide.is-active .sc-slider__content > * { animation-name: sc-float-up; animation-duration: 1s; animation-timing-function: cubic-bezier(.22, .61, .36, 1); }
@keyframes sc-float-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.sc-slider__slide.is-active .sc-slider__brand { animation-delay: .35s; }
.sc-slider__slide.is-active .sc-slider__title { animation-delay: .45s; }
.sc-slider__slide.is-active .sc-slider__text { animation-delay: .55s; }
.sc-slider__slide.is-active .sc-slider__trust { animation-delay: .65s; }
.sc-slider__slide.is-active .sc-slider__actions { animation-delay: .75s; }
/* Ghost button + trust chips follow each banner's text colour (light banners). */
.sc-slider__btn--ghost { box-shadow: inset 0 0 0 1.5px currentColor; }
.sc-slider__trust li { background: color-mix(in srgb, var(--sc-s-text, #fff) 12%, transparent); }
/* Shine sweeping across the gold button. */
.sc-slider__btn:not(.sc-slider__btn--ghost) { position: relative; overflow: hidden; }
.sc-slider__btn:not(.sc-slider__btn--ghost)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-120%); animation: sc-shine 2.8s 1s ease-in-out infinite; }
@keyframes sc-shine { 0%, 60% { transform: translateX(120%); } 100% { transform: translateX(-120%); } }

/* Ad-style banner (user's reference): logo on top, big title with the
   store name in gold, one line, one gold pill button; stacked card edges.
   ---------------------------------------------------------------------- */
/* Stacked cards (like the reference): two solid cards peek out behind the
   banner, up and to the outer side. Drawn with shadows so the slider's own
   overflow clipping can't hide them. */
/* Cards peek out at the bottom and outer (start) side, inside the hero's
   own width, so the banner's top stays level with the side column. */
/* Stack peeks up and to the outer side (as in the earlier version the user
   liked), in two colours, with room reserved on that side so it never
   touches the page edge and the banner keeps its gap from the side column. */
.sc-slider { box-sizing: border-box; width: auto; margin-block-start: 22px; margin-inline: 30px 0; }

/* Card deck: the next banners are the cards behind (their real images),
   peeking up and to the outer side; the front card flips away on change.
   Only once JS has set the deck up (.is-deck), so no-JS stays a plain fade. */
.sc-slider.is-deck { overflow: visible; background: none; box-shadow: none; }
.sc-slider.is-deck .sc-slider__slide { --x: 1; overflow: hidden; border-radius: 24px; background: var(--sc-sand); box-shadow: 0 20px 40px rgba(28, 43, 51, .18); transform-origin: 50% 100%; transition: transform .9s cubic-bezier(.65, 0, .35, 1), opacity .9s ease, filter .9s ease, visibility 0s .9s; }
[dir="ltr"] .sc-slider.is-deck .sc-slider__slide { --x: -1; }
.sc-slider.is-deck .sc-slider__slide.is-active { z-index: 3; transform: none; transition-delay: 0s; }
.sc-slider.is-deck .sc-slider__slide.is-next { z-index: 2; opacity: 1; visibility: visible; transform: translate(calc(var(--x) * 15px), -13px); filter: brightness(.85); transition-delay: 0s; }
.sc-slider.is-deck .sc-slider__slide.is-next2 { z-index: 1; opacity: 1; visibility: visible; transform: translate(calc(var(--x) * 30px), -26px); filter: brightness(.7); transition-delay: 0s; }
/* Leaving card flips down and away like a card dealt off the deck. */
/* It keeps its new place in the deck (is-next / is-next2 / hidden) and only
   plays the fly-off on the way there, so the stack always shows two cards. */
.sc-slider.is-deck .sc-slider__slide.is-leaving { animation: sc-card-off .9s cubic-bezier(.65, 0, .35, 1) both; transition: none; }
@keyframes sc-card-off {
	0% { z-index: 4; opacity: 1; filter: none; transform: none; }
	55% { z-index: 4; opacity: 0; transform: translate(calc(var(--x) * -18%), 14%) rotate(calc(var(--x) * -7deg)) scale(.92); }
	56% { z-index: 0; opacity: 0; }
}
.sc-slider.is-deck .sc-slider__slide:not(.is-active) .sc-slider__content { opacity: 0; transition: opacity .3s; }
.sc-slider.is-deck .sc-slider__slide.is-active .sc-slider__media { animation: none; }
.sc-slider.is-deck .sc-slider__arrow, .sc-slider.is-deck .sc-slider__dots { z-index: 5; }

/* Text sized to sit in the banner's empty side without touching products. */
/* Text sits on a coupon-style glass panel: tinted from each banner's own
   colours, accent strip on the outer edge, notches + dashed tear line
   above the buttons (like a ticket). */
.sc-slider__content { width: min(430px, 38%); gap: 12px; }
/* Decoration under the heading: a hand-drawn swoosh in the banner's
   accent colour, plus a small dot, drawn in after the title. */
.sc-slider__title { position: relative; padding-bottom: 18px; }
/* Under the heading: a coupon "cut here" line — scissors in the banner's
   accent colour cutting along a dashed line. On each new banner the line
   draws in and the scissors glide along it. */
.sc-slider__title { padding-bottom: 26px; }
.sc-slider__title::after { content: ""; position: absolute; bottom: 7px; inset-inline-start: 30px; width: 190px; height: 3px; border-radius: var(--sc-pill); background: repeating-linear-gradient(90deg, var(--sc-s-accent, var(--sc-gold)) 0 10px, transparent 10px 17px); transform-origin: var(--sc-start, right); }
.sc-slider__title::before { content: ""; position: absolute; bottom: -2px; inset-inline-start: 0; width: 22px; height: 22px; background: var(--sc-s-accent, var(--sc-gold)); -webkit-mask: var(--sc-scissors) no-repeat center / contain; mask: var(--sc-scissors) no-repeat center / contain; transform: scaleX(var(--sc-flip, 1)); }
.sc-slider { --sc-scissors: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Cpath d='M8.1 8.1 20 20M8.1 15.9 20 4'/%3E%3C/svg%3E"); }
[dir="rtl"] .sc-slider__title { --sc-flip: -1; }
[dir="ltr"] .sc-slider__title { --sc-start: left; }
.sc-slider__slide.is-active .sc-slider__title::after { animation: sc-cut-line .9s .7s cubic-bezier(.22, .61, .36, 1) both; }
/* Scissors stay in place (start of the line) and just pop in; the line
   then draws out from them. */
.sc-slider__slide.is-active .sc-slider__title::before { animation: sc-cut .45s .55s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes sc-cut-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sc-cut { from { opacity: 0; scale: .4; } to { opacity: 1; scale: 1; } }

/* Button arrow: a bold SVG arrow, same on every banner. */
.sc-slider__btn .sc-icon { flex: none; width: 20px; height: 20px; stroke-width: 2.6; }
.sc-slider__title { font-size: clamp(26px, 2.5vw, 40px); line-height: 1.25; }
.sc-slider__hl { display: inline; color: var(--sc-s-accent, var(--sc-gold)); }
.sc-slider__text { font-size: clamp(15px, 1.15vw, 17px); }
/* One button shape everywhere (same as the side offer's pill): equal height,
   width, radius and weight; the second button only swaps fill for outline. */
.sc-slider__actions { gap: 10px; }
.sc-slider__btn,
.sc-slider__btn--ghost { justify-content: center; min-width: 150px; height: 48px; padding-inline: 22px; border-radius: var(--sc-pill); font-size: 15px; font-weight: 700; }
.sc-slider__btn--ghost { box-shadow: inset 0 0 0 2px currentColor; }

/* Text tuned to work on light and dark banners alike. */
.sc-slider__title { font-weight: 800; text-shadow: none; }
.sc-slider__text { font-weight: 600; opacity: 1; }
.sc-slider__tag { font-size: 13.5px; }
.sc-popular__text { min-width: 0; overflow: visible; white-space: normal; }

/* Text: a bit wider so lines don't orphan; store name on its own gold line. */
.sc-slider__text { max-width: 34ch; text-wrap: pretty; }

/* Arrows clear of the edges; dots readable on any photo. */
.sc-slider__arrow--prev { inset-inline-start: 20px; }
.sc-slider__arrow--next { inset-inline-end: 20px; }
.sc-slider__dots { padding: 7px 10px; border-radius: var(--sc-pill); background: rgba(11, 74, 56, .55); backdrop-filter: blur(6px); }

/* Side offer: gift stays inside the card; same gold main button as the banner. */
.sc-deal__gift { bottom: -4px; left: -4px; width: 100px; }
[dir="ltr"] .sc-deal__gift { right: -4px; }
.sc-deal__cta { background: var(--sc-gold) !important; color: var(--sc-ink) !important; font-weight: 700; }

/* Popular stores: long names wrap to two short lines instead of "...". */
.sc-popular__text b { display: -webkit-box; overflow: hidden; font-size: 13px; line-height: 1.3; text-align: center; white-space: normal; text-overflow: clip; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
/* Store name in gold again (two-colour title), sticker off. */
.sc-slider__hl { color: var(--sc-s-accent, var(--sc-gold)); }
.sc-slider__sticker { display: none; }

@media (max-width: 900px) {
	.sc-slider { box-shadow: none; }
	.sc-slider__sticker { display: none; }
	.sc-slider__trust li { background: var(--sc-cream); color: var(--sc-green); backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
	.sc-slider__sticker, .sc-slider__media, .sc-slider__btn::after { animation: none !important; }
}

/* Side column
   -------------------------------------------------------------------------- */
.sc-hero__side { display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; }

/* "عرض اليوم" deal card in the store's brand colour.
   Each item sets --deal-bg / --deal-fg (template-parts/home/offers.php).
   z-index keeps the overflowing gift above the card below. */
.sc-deal { position: relative; z-index: 2; display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; filter: drop-shadow(0 14px 22px rgba(28, 43, 51, .16)); }
.sc-deal__item { position: relative; display: flex; flex: 1; flex-direction: column; justify-content: center; gap: 16px; min-height: 0; padding: 20px 28px 22px; color: var(--deal-fg); }
.sc-deal__item.is-active { animation: sc-rise .35s ease; }

/* Ticket layer: brand colour + soft light, half-circle bites along both edges. */
.sc-deal__ticket { position: absolute; inset: 0; border-radius: 18px;
	background: radial-gradient(130% 100% at 80% 0%, rgba(255, 255, 255, .18), transparent 55%), var(--deal-bg);
	-webkit-mask: radial-gradient(circle 7px at 0 12px, #0000 96%, #000) 0 0 / 51% 24px repeat-y, radial-gradient(circle 7px at 100% 12px, #0000 96%, #000) 100% 0 / 51% 24px repeat-y;
	mask: radial-gradient(circle 7px at 0 12px, #0000 96%, #000) 0 0 / 51% 24px repeat-y, radial-gradient(circle 7px at 100% 12px, #0000 96%, #000) 100% 0 / 51% 24px repeat-y;
}

/* Gift box popping out of the bottom-left corner. */
.sc-deal__gift { position: absolute; bottom: -16px; left: -16px; z-index: 1; width: 124px; height: auto; pointer-events: none; transform: rotate(-8deg); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .25)); }
[dir="ltr"] .sc-deal__gift { left: auto; right: -16px; transform: rotate(8deg); }

/* ‹ › arrows in the top-left corner. */
.sc-deal__nav { position: absolute; top: 12px; left: 22px; z-index: 2; display: flex; gap: 6px; }
[dir="ltr"] .sc-deal__nav { left: auto; right: 22px; }
.sc-deal__arrow { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--sc-ink); box-shadow: 0 4px 10px rgba(0, 0, 0, .15); cursor: pointer; transition: background .2s, transform .2s; }
.sc-deal__arrow:hover { background: var(--sc-gold); transform: scale(1.08); }
.sc-deal__arrow--prev .sc-icon { transform: scaleX(-1); }
[dir="ltr"] .sc-deal__arrow--prev .sc-icon { transform: none; }
[dir="ltr"] .sc-deal__arrow--next .sc-icon { transform: scaleX(-1); }

/* Rotation dots under the ticket. */
.sc-deal__dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.sc-deal__dot { width: 7px; height: 7px; border-radius: var(--sc-pill); background: var(--sc-line-strong); transition: width .3s, background .3s; }
.sc-deal__dot.is-active { width: 22px; background: var(--sc-green); }

.sc-deal__main { position: relative; display: flex; align-items: center; gap: 16px; }
.sc-deal__logo { flex: 0 0 78px; height: 78px; overflow: hidden; border: 3px solid rgba(255, 255, 255, .85); border-radius: 18px; box-shadow: 0 10px 20px rgba(0, 0, 0, .2); transform: rotate(-5deg); transition: transform .3s; }
.sc-deal__item:hover .sc-deal__logo { transform: rotate(0deg) scale(1.05); }
.sc-deal__logo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sc-deal__value { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; min-width: 0; margin: 0; line-height: 1.35; text-align: center; }
.sc-deal__kicker { font-size: 14px; font-weight: 600; opacity: .9; }
.sc-deal__big { font-size: 44px; font-weight: 700; line-height: 1.1; }
.sc-deal__big--name { font-size: 28px; overflow-wrap: anywhere; }
.sc-deal__sub { margin-top: 2px; font-size: 13px; font-weight: 500; opacity: .9; }
.sc-deal__cta { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; margin-inline: 8px 84px; border-radius: var(--sc-pill); background: #fff; color: var(--sc-ink) !important; font-size: 15px; font-weight: 700; box-shadow: 0 8px 18px rgba(0, 0, 0, .14); transition: transform .2s; }
.sc-deal__cta:hover { transform: translateY(-2px); }
[dir="ltr"] .sc-deal__cta .sc-icon { transform: scaleX(-1); }

/* Most requested stores */
.sc-popular { padding: 14px; background: #fff; border: 1px solid var(--sc-line); border-radius: 22px; }
.sc-popular__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sc-popular__title { margin: 0; font-size: 16px; font-weight: 700; }
.sc-popular__head a { color: var(--sc-green); font-size: 13px; font-weight: 700; }
.sc-popular__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.sc-popular__item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: 14px; color: var(--sc-ink); text-align: center; transition: transform .2s; }
.sc-popular__item:hover { transform: translateY(-3px); }
.sc-popular__logo { width: 56px; height: 56px; overflow: hidden; border-radius: 16px; background: var(--sc-sand); box-shadow: 0 4px 10px rgba(28, 43, 51, .1); transition: box-shadow .2s; }
.sc-popular__item:hover .sc-popular__logo { box-shadow: 0 10px 20px rgba(28, 43, 51, .2); }
.sc-popular__logo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sc-popular__text { display: flex; flex-direction: column; min-width: 0; max-width: 100%; line-height: 1.35; }
.sc-popular__text b { overflow: hidden; font-size: 12.5px; white-space: nowrap; text-overflow: ellipsis; }
.sc-popular__text span { color: var(--sc-green); font-size: 11px; font-weight: 600; }

/* Categories carousel: coupon cards
   -------------------------------------------------------------------------- */
.sc-cats { padding-block: 36px 32px; background: #fff; }
.sc-cats__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.sc-cats__title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: clamp(20px, 2vw, 26px); font-weight: 700; }
.sc-cats__title::before { content: ""; width: 6px; height: 26px; border-radius: 4px; background: var(--sc-gold); }
.sc-cats__sub { margin: 6px 0 0; color: var(--sc-muted); font-size: 14px; }
.sc-cats__nav { display: flex; gap: 8px; }
.sc-cats__arrow { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--sc-line); border-radius: 50%; background: #fff; color: var(--sc-green); cursor: pointer; transition: background .2s, color .2s; }
.sc-cats__arrow:hover { border-color: var(--sc-green); background: var(--sc-green); color: #fff; }
.sc-cats__arrow:disabled { opacity: .35; cursor: default; background: #fff; color: var(--sc-green); }
.sc-cats__arrow--prev .sc-icon { transform: scaleX(-1); }
[dir="ltr"] .sc-cats__arrow--prev .sc-icon { transform: none; }
[dir="ltr"] .sc-cats__arrow--next .sc-icon { transform: scaleX(-1); }

/* Generous vertical padding so the cards' shadows aren't clipped by the scroller. */
.sc-cats__track { display: flex; gap: 18px; margin: -26px -12px -16px; padding: 30px 12px 50px 60px; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 60px, #000 calc(100% - 12px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 60px, #000 calc(100% - 12px), transparent 100%); list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.sc-cats__track::-webkit-scrollbar { display: none; }
/* Shadow on the slide (the card itself is masked). Accent colour cycles. */
.sc-cats__slide { --cat-accent: var(--sc-green); flex: 0 0 190px; scroll-snap-align: start; filter: drop-shadow(0 6px 11px rgba(28, 43, 51, .12)); transition: transform .25s, filter .25s; }
.sc-cats__slide:nth-child(4n+2) { --cat-accent: #D99A12; }
.sc-cats__slide:nth-child(4n+3) { --cat-accent: #C8463B; }
.sc-cats__slide:nth-child(4n+4) { --cat-accent: #3559B8; }
.sc-cats__slide:hover { transform: translateY(-5px); filter: drop-shadow(0 10px 12px rgba(28, 43, 51, .18)); }

/* The coupon: coloured top strip, perforated sides, tear line, stamp. */
.sc-catcard { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; border-top: 5px solid var(--cat-accent); border-radius: 18px; background: #fff; color: var(--sc-ink);
	-webkit-mask: radial-gradient(circle 5px at 0 9px, #0000 95%, #000) 0 0 / 51% 18px repeat-y, radial-gradient(circle 5px at 100% 9px, #0000 95%, #000) 100% 0 / 51% 18px repeat-y;
	mask: radial-gradient(circle 5px at 0 9px, #0000 95%, #000) 0 0 / 51% 18px repeat-y, radial-gradient(circle 5px at 100% 9px, #0000 95%, #000) 100% 0 / 51% 18px repeat-y;
}
.sc-catcard__media { position: relative; display: flex; align-items: center; justify-content: center; margin: 10px 12px 0; aspect-ratio: 1 / .78; overflow: hidden; border-radius: 12px; background: var(--sc-green-soft); color: var(--sc-green); }
.sc-catcard__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.sc-cats__slide:hover .sc-catcard__media img { transform: scale(1.06); }
/* "كوبونات" stamp on the image corner. */
.sc-catcard__media::after { content: "كوبونات"; position: absolute; top: 8px; inset-inline-start: 8px; padding: 3px 9px; border: 1.5px dashed #fff; border-radius: 8px; background: var(--cat-accent); color: #fff; font-size: 11px; font-weight: 700; transform: rotate(-6deg); box-shadow: 0 4px 10px rgba(0, 0, 0, .2); }
[dir="ltr"] .sc-catcard__media::after { content: "Coupons"; transform: rotate(6deg); }
/* Tear line with larger half-circle notches. */
.sc-catcard__tear { position: relative; height: 0; margin: 14px 16px 0; border-top: 2.5px dashed var(--sc-line-strong); }
.sc-catcard__tear::before,
.sc-catcard__tear::after { content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--sc-cream); }
.sc-catcard__tear::before { inset-inline-start: -28px; }
.sc-catcard__tear::after { inset-inline-end: -28px; }
.sc-catcard__body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 16px 16px; }
.sc-catcard__name { font-size: 15px; font-weight: 700; line-height: 1.35; }
.sc-catcard__count { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: var(--sc-pill); background: color-mix(in srgb, var(--cat-accent) 12%, #fff); color: var(--cat-accent); font-size: 12px; font-weight: 700; }
.sc-catcard__cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; color: var(--cat-accent); font-size: 13px; font-weight: 700; }
.sc-catcard__cta .sc-icon { transition: transform .2s; }
.sc-cats__slide:hover .sc-catcard__cta .sc-icon { transform: translateX(-3px); }
[dir="ltr"] .sc-catcard__cta .sc-icon { transform: scaleX(-1); }

/* Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
	.sc-hero__grid { grid-template-columns: 1fr; height: auto; }
	.sc-slider { min-height: 0; aspect-ratio: 12 / 5; }
	.sc-hero__side { flex-direction: row; }
	.sc-deal,
	.sc-popular { flex: 1 1 0; }
}

@media (max-width: 700px) {
	.sc-hero { padding-top: 16px; }
	.sc-hero__side { flex-direction: column; }

	/* Banner as one card: image on top, text block underneath (in flow, so
	   nothing overlaps the side column). No deck on phones: only the active
	   banner is shown, with a cross-fade. */
	.sc-slider,
	.sc-slider.is-deck { min-height: 0; height: auto; aspect-ratio: auto; margin: 0; overflow: hidden; border-radius: 20px; background: #fff; box-shadow: 0 10px 26px rgba(28, 43, 51, .1); }
	.sc-slider__track { position: relative; inset: auto; }
	.sc-slider .sc-slider__slide,
	.sc-slider.is-deck .sc-slider__slide { position: absolute; inset: 0 0 auto; border-radius: 0; box-shadow: none; filter: none; transform: none; animation: none; opacity: 0; visibility: hidden; }
	.sc-slider .sc-slider__slide.is-active,
	.sc-slider.is-deck .sc-slider__slide.is-active { position: relative; opacity: 1; visibility: visible; }
	.sc-slider__media { height: auto; aspect-ratio: 12 / 5; }
	/* A banner with its own phone image (Customizer "mobile") shows it at 3:2. */
	/* Square phone banners have an empty top: the text sits there, over
	   the image, in the banner's own colours; the buttons stay at the
	   bottom over the products' table edge is avoided by stopping at 58%. */
	.sc-slider__slide:has(source) .sc-slider__media { aspect-ratio: 4 / 5; }
	.sc-slider__slide:has(source) .sc-slider__content { position: absolute; inset: 0 0 auto; padding: 20px 18px 0; gap: 8px; align-items: center; text-align: center; background: none; color: var(--sc-s-text, #fff); }
	.sc-slider__slide:has(source) .sc-slider__title { font-size: 23px; }

	.sc-slider__slide:has(source) .sc-slider__title::after { inset-inline-start: 50%; translate: 50% 0; width: 120px; }
	[dir="ltr"] .sc-slider__slide:has(source) .sc-slider__title::after { translate: -50% 0; }
	/* Keep the whole block inside the empty top (~45% of the square):
	   no description line, compact tag, title and buttons. */
	.sc-slider__slide:has(source) .sc-slider__content { padding-top: 18px; gap: 8px; }
	.sc-slider__slide:has(source) .sc-slider__tag { padding: 5px 12px; font-size: 12px; }
	.sc-slider__slide:has(source) .sc-slider__title { padding-bottom: 16px; font-size: 24px; }
	.sc-slider__slide:has(source) .sc-slider__title::after { bottom: 4px; }
	/* Description back, kept to one line. */
	/* Up to two lines, never cut mid-sentence on normal-length text. */
	.sc-slider__slide:has(source) .sc-slider__text { display: -webkit-box; max-width: 92%; overflow: hidden; font-size: 14px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
	.sc-slider__slide:has(source) .sc-slider__actions { width: 100%; max-width: 320px; margin-top: 4px; }
	.sc-slider__slide:has(source) .sc-slider__btn { height: 42px; font-size: 14px; white-space: nowrap; }
	/* Short button label on phones ("اكشف الكود" instead of "اكشف كود أمازون"). */
	.sc-slider__btn-full { display: none; }
	.sc-slider__btn-short { display: inline; }
	/* Long store names: smaller, balanced title so the block stays above
	   the products; outline button gets a soft backing to read on photos. */
	.sc-slider__slide:has(source) .sc-slider__title { font-size: clamp(19px, 5.6vw, 24px); text-wrap: balance; }
	.sc-slider__slide:has(source) .sc-slider__btn--ghost { background: color-mix(in srgb, var(--sc-s-on, #1C2B33) 30%, transparent); backdrop-filter: blur(6px); }

	/* Side offer on phones: room under the arrows, everything centred. */
	.sc-deal__item { padding: 54px 20px 22px; gap: 14px; }
	.sc-deal__main { justify-content: center; gap: 18px; }
	.sc-deal__value { flex: 0 1 auto; }
	.sc-deal__big { font-size: 32px; }
	/* Dots over the bottom of the image (no empty white strip under it). */
	.sc-slider:has(source) .sc-slider__dots { position: absolute; bottom: 10px; inset-inline-start: 50%; z-index: 5; translate: 50% 0; margin: 0; padding: 6px 10px; border-radius: var(--sc-pill); background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px); }
	[dir="ltr"] .sc-slider:has(source) .sc-slider__dots { translate: -50% 0; }
	.sc-slider:has(source) .sc-slider__bar { background: rgba(255, 255, 255, .6); }
	.sc-slider__slide:has(source) .sc-slider__btn--ghost { color: var(--sc-s-text, #fff) !important; }

	/* Side column under the banner: natural heights, nothing squeezed. */
	.sc-hero__side { height: auto; gap: 16px; margin-top: 8px; }
	.sc-deal,
	.sc-popular { flex: none; }
	.sc-deal__item { flex: none; min-height: 200px; }
	/* Card deck on phones too, with a smaller peek: the next two banners
	   show behind the front one, and the front one flips away on change. */
	.sc-slider.is-deck { overflow: visible; margin: 22px 22px 0 0; background: none; box-shadow: none; }
	[dir="ltr"] .sc-slider.is-deck { margin: 22px 0 0 22px; }
	.sc-slider.is-deck .sc-slider__slide { overflow: hidden; border-radius: 20px; background: #fff; }
	.sc-slider.is-deck .sc-slider__slide.is-active { z-index: 3; box-shadow: 0 12px 26px rgba(28, 43, 51, .16); }
	.sc-slider.is-deck .sc-slider__slide.is-next { z-index: 2; opacity: 1; visibility: visible; transform: translate(calc(var(--x) * 11px), -11px); filter: brightness(.85); }
	.sc-slider.is-deck .sc-slider__slide.is-next2 { z-index: 1; opacity: 1; visibility: visible; transform: translate(calc(var(--x) * 22px), -22px); filter: brightness(.7); }
	.sc-slider.is-deck .sc-slider__slide.is-leaving { animation: sc-card-off .9s cubic-bezier(.65, 0, .35, 1) both; }
	/* Scissors back, at the start of the centred dashed line. */
	.sc-slider__slide:has(source) .sc-slider__title::before { display: block; bottom: -5px; inset-inline-start: calc(50% - 88px); width: 20px; height: 20px; }
	.sc-slider__slide.is-active .sc-slider__media { animation: none; }
	.sc-slider__content { padding-bottom: 14px; }
	.sc-slider__title::after { width: min(170px, 55%); }

	.sc-slider__content { position: static; inset: auto; translate: none; width: auto; height: auto; margin: 0; padding: 16px 16px 8px; gap: 10px; border: 0; border-radius: 0; background: #fff; color: var(--sc-ink); text-align: start; box-shadow: none; backdrop-filter: none; }
	.sc-slider__logo { width: 34px; height: 34px; }
	.sc-slider__tag { font-size: 12px; }
	.sc-slider__title { font-size: 21px; line-height: 1.3; }
	.sc-slider__text { max-width: none; font-size: 14px; }
	.sc-slider__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
	.sc-slider__btn,
	.sc-slider__btn--ghost { min-width: 0; height: 44px; padding-inline: 12px; font-size: 14px; }
	.sc-slider__btn--ghost { color: var(--sc-ink) !important; }
	.sc-slider__arrow { display: none; }
	/* Dots under the text, inside the card. */
	.sc-slider__dots { position: static; translate: none; justify-content: center; width: max-content; margin: 4px auto 14px; padding: 0; background: none; backdrop-filter: none; }
	.sc-slider__bar { background: var(--sc-line-strong, #D5D9D4); }

	.sc-cats__nav { display: none; }
	.sc-cats__slide { flex-basis: 150px; }
	.sc-catcard__name { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.sc-slider__slide, .sc-slider__dot { transition: none; }
	.sc-slider__slide.is-active .sc-slider__content > *,
	.sc-deal__item.is-active,
	.sc-slider__slide.is-active .sc-slider__media img { animation: none; }
	.sc-slider__dot.is-active .sc-slider__bar::after { animation: none; transform: none; }
}
