/* Qoffa Smart — Home banner brand direction v2
   Moroccan fresh-market identity: deep green, warm gold, real Qoffa basket, clear shopping intent. */

:root {
  --qoffa-ink: #14271e;
  --qoffa-green: #1b6b49;
  --qoffa-green-light: #2f8c63;
  --qoffa-lime: #d6ed80;
  --qoffa-gold: #e5bf68;
  --qoffa-cream: #f7f4ec;
}

body.index-page {
  background: var(--qoffa-cream);
}

body.index-page .banner-carousel {
  position: relative;
  width: min(calc(100% - 32px), 1400px);
  margin: 20px auto 54px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 38px;
  background: var(--qoffa-ink);
  box-shadow: 0 26px 70px rgba(21, 65, 45, .16);
}

body.index-page .banner-carousel::before {
  content: '';
  position: absolute;
  z-index: 4;
  inset-inline-start: 5.4%;
  top: 9%;
  width: 98px;
  height: 98px;
  border: 1px solid rgba(229, 191, 104, .26);
  border-radius: 50%;
  box-shadow: 0 0 0 15px rgba(229, 191, 104, .05), 0 0 0 30px rgba(229, 191, 104, .025);
  pointer-events: none;
}

body.index-page .banner-slide {
  min-height: clamp(340px, 42vw, 580px);
  animation: qoffaBannerReveal .72s cubic-bezier(.16, 1, .3, 1);
}

@keyframes qoffaBannerReveal {
  from { opacity: 0; transform: scale(1.025); }
  to { opacity: 1; transform: scale(1); }
}

body.index-page .banner-media {
  min-height: clamp(340px, 42vw, 580px);
  aspect-ratio: 2048 / 1143;
  background-color: #172c22;
  background-image: url('../images/qoffa-smart-basket-banner.png');
  background-position: left 4% bottom;
  background-repeat: no-repeat;
  background-size: auto 92%;
}

body.index-page .banner-media::before {
  content: 'طازجة  •  مختارة بعناية  •  واصلة لباب دارك';
  position: absolute;
  z-index: 3;
  right: 7%;
  top: 34%;
  width: min(40%, 510px);
  border-inline-end: 3px solid var(--qoffa-gold);
  border-radius: 0 14px 14px 0;
  background: linear-gradient(90deg, rgba(20, 39, 30, .18), rgba(20, 39, 30, .78));
  color: #fffdf6;
  padding: 13px 17px;
  font-size: clamp(.76rem, 1.3vw, 1.02rem);
  font-weight: 800;
  letter-spacing: .015em;
  line-height: 1.75;
  text-align: right;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .48);
  pointer-events: none;
}

body.index-page .banner-media::after {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 39, 30, .06) 0%, rgba(20, 39, 30, .16) 31%, rgba(20, 39, 30, .72) 66%, rgba(20, 39, 30, .95) 100%),
    linear-gradient(180deg, rgba(20, 39, 30, .06) 55%, rgba(20, 39, 30, .46) 100%);
  pointer-events: none;
}

/* The six supplied campaign visuals: one desktop/mobile pair per story slide. */
body.index-page .banner-slide[data-index='0'] .banner-media {
  background-image: url('../images/qoffa-slide-01-brand-desktop.webp');
  background-position: center center;
  background-size: cover;
}

body.index-page .banner-slide[data-index='1'] .banner-media,
body.index-page .banner-slide[data-index='2'] .banner-media {
  background-position: center center;
  background-size: cover;
  background-image: url('../images/qoffa-slide-02-delivery-desktop.webp');
}

body.index-page .banner-slide[data-index='2'] .banner-media {
  background-image: url('../images/qoffa-slide-03-categories-desktop.webp');
}

body.index-page .banner-slide[data-index='1'] .banner-media::after,
body.index-page .banner-slide[data-index='2'] .banner-media::after {
  background:
    linear-gradient(90deg, rgba(20, 39, 30, .94) 0%, rgba(20, 39, 30, .72) 33%, rgba(20, 39, 30, .16) 74%, rgba(20, 39, 30, .08) 100%),
    linear-gradient(180deg, rgba(20, 39, 30, .08) 55%, rgba(20, 39, 30, .42) 100%);
}

body.index-page .banner-slide[data-index='1'] .banner-media::before,
body.index-page .banner-slide[data-index='2'] .banner-media::before {
  right: auto;
  left: 7%;
  border-inline-end: 0;
  border-inline-start: 3px solid var(--qoffa-gold);
  border-radius: 14px 0 0 14px;
  background: linear-gradient(90deg, rgba(20, 39, 30, .78), rgba(20, 39, 30, .18));
  text-align: left;
}

body.index-page .banner-media img,
body.index-page .banner-media video,
body.index-page .banner-media iframe {
  display: none !important;
  visibility: hidden;
  opacity: 0;
  filter: none;
}

body.index-page .banner-overlay {
  z-index: 5;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
  padding: clamp(30px, 6vw, 76px) 7%;
  background: transparent;
}

body.index-page .banner-overlay::before {
  content: 'QOFFA SMART';
  position: absolute;
  right: 7%;
  top: 10%;
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  border: 1px solid rgba(229, 191, 104, .42);
  border-radius: 999px;
  background-color: rgba(20, 39, 30, .72);
  color: var(--qoffa-gold);
  padding: 7px 14px;
  font: 900 .64rem/.95 'DM Sans', sans-serif;
  letter-spacing: .14em;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
}

body.index-page .banner-slide[data-index='1'] .banner-overlay::before,
body.index-page .banner-slide[data-index='2'] .banner-overlay::before {
  right: auto;
  left: 7%;
}

body.index-page .banner-overlay::after {
  display: none;
}

body.index-page .banner-cta {
  right: 7%;
  bottom: 10%;
  z-index: 7;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 15px;
  background: var(--qoffa-lime);
  color: var(--qoffa-ink);
  box-shadow: 0 17px 32px rgba(0, 0, 0, .23);
  padding: 13px 22px;
  font-size: .9rem;
  font-weight: 900;
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), background .25s ease, box-shadow .25s ease;
}

body.index-page .banner-cta::after {
  content: '  ↗';
  color: var(--qoffa-green);
  font-size: 1.1em;
}

body.index-page .banner-cta:hover {
  background: #ebfaad;
  box-shadow: 0 22px 42px rgba(0, 0, 0, .28);
  transform: translateY(-5px) scale(1.02);
}

body.index-page .banner-slide[data-index='1'] .banner-cta,
body.index-page .banner-slide[data-index='2'] .banner-cta {
  right: auto;
  left: 7%;
}

body.index-page .banner-text,
body.index-page .banner-text h2,
body.index-page .banner-text h3,
body.index-page .banner-text p {
  color: #fffdf6;
  text-shadow: 0 3px 16px rgba(0, 0, 0, .48);
}

body.index-page .banner-dots {
  right: 50%;
  left: auto;
  bottom: 15px;
  transform: translateX(50%);
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 999px;
  background: rgba(20, 39, 30, .52);
  padding: 8px 11px;
  backdrop-filter: blur(12px);
}

body.index-page .banner-dot {
  width: 8px;
  height: 8px;
  border: 0;
  background: rgba(255, 255, 255, .52);
  transition: width .35s cubic-bezier(.16, 1, .3, 1), background .25s ease, transform .25s ease;
}

body.index-page .banner-dot.active {
  width: 24px;
  border-radius: 999px;
  background: var(--qoffa-lime);
  transform: none;
}

body.index-page .banner-slide[data-index='1'] .banner-media::before {
  content: 'قفة مناسبة لكل دار  •  اختار اللي كيناسبك';
}

body.index-page .banner-slide[data-index='2'] .banner-media::before {
  content: 'منتجات طازجة  •  جودة كتـبان من أول نظرة';
}

@media (max-width: 820px) {
  body.index-page .banner-carousel {
    width: calc(100% - 16px);
    margin-top: 12px;
    border-radius: 27px;
  }

  body.index-page .banner-slide,
  body.index-page .banner-media {
    min-height: 0;
    aspect-ratio: 1143 / 2048;
  }

  body.index-page .banner-media {
    background-position: center center;
    background-size: cover;
  }

  body.index-page .banner-slide[data-index='0'] .banner-media {
    background-image: url('../images/qoffa-slide-01-brand-mobile.webp');
  }

  body.index-page .banner-slide[data-index='1'] .banner-media {
    background-image: url('../images/qoffa-slide-02-delivery-mobile.webp');
  }

  body.index-page .banner-slide[data-index='2'] .banner-media {
    background-image: url('../images/qoffa-slide-03-categories-mobile.webp');
  }

  body.index-page .banner-media::before {
    right: 7%;
    left: 7%;
    top: 13%;
    width: auto;
    border-inline: 0;
    border-top: 2px solid var(--qoffa-gold);
    border-radius: 0 0 14px 14px;
    background: linear-gradient(180deg, rgba(20, 39, 30, .82), rgba(20, 39, 30, .24));
    padding: 11px 14px;
    font-size: .77rem;
    text-align: center;
  }

  body.index-page .banner-slide[data-index='1'] .banner-media::before,
  body.index-page .banner-slide[data-index='2'] .banner-media::before {
    right: 7%;
    left: 7%;
    border-inline: 0;
    border-top: 2px solid var(--qoffa-gold);
    border-radius: 0 0 14px 14px;
    background: linear-gradient(180deg, rgba(20, 39, 30, .82), rgba(20, 39, 30, .24));
    text-align: center;
  }

  body.index-page .banner-media::after {
    background:
      linear-gradient(180deg, rgba(20, 39, 30, .10) 0%, rgba(20, 39, 30, .33) 44%, rgba(20, 39, 30, .93) 83%),
      linear-gradient(90deg, rgba(20, 39, 30, .22), rgba(20, 39, 30, .30));
  }

  body.index-page .banner-overlay {
    justify-content: flex-end;
    padding: 30px 7% 62px;
  }

  body.index-page .banner-overlay::before {
    top: 8%;
    right: 7%;
  }

  body.index-page .banner-slide[data-index='1'] .banner-overlay::before,
  body.index-page .banner-slide[data-index='2'] .banner-overlay::before {
    right: 7%;
    left: auto;
  }

  body.index-page .banner-cta {
    right: 7%;
    bottom: 7%;
  }

  body.index-page .banner-slide[data-index='1'] .banner-cta,
  body.index-page .banner-slide[data-index='2'] .banner-cta {
    right: 7%;
    left: auto;
  }
}

@media (max-width: 480px) {
  body.index-page .banner-slide,
  body.index-page .banner-media {
    min-height: 0;
    aspect-ratio: 1143 / 2048;
  }

  body.index-page .banner-media::before {
    top: 25%;
    width: 63%;
    font-size: .68rem;
  }

  body.index-page .banner-overlay::before {
    min-height: 30px;
    padding: 5px 10px;
    font-size: .53rem;
  }

  body.index-page .banner-cta {
    bottom: 7%;
    min-height: 43px;
    padding: 10px 14px;
    font-size: .72rem;
  }

  body.index-page .banner-dots {
    bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.index-page .banner-slide,
  body.index-page .banner-slide * {
    animation: none !important;
    transition: none !important;
  }
}
