/* HOME PAGE SPECIFIC STYLES */



/* HERO */
.hero {
  padding: 14px 0 22px;
}

.hero-slider {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(146, 127, 187, 0.35);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
  background: #fff;
  perspective: 1200px;
}

.hero-slides {
  position: relative;
  min-height: 270px;
  transform-style: preserve-3d;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: rotateY(90deg) scale(1.01);
  transform-origin: center;
  transition: opacity 200ms ease;
  display: grid;
  align-items: center;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

/* Mobile: increase hero height so buttons don't get cut off */
@media (max-width: 640px) {
  .hero-slides {
    min-height: 350px;
  }

  .hero-overlay {
    margin-right: 0;
    padding: 18px 14px;
    width: 100%;
  }

  .hero-percent {
    font-size: clamp(40px, 14vw, 64px);
    margin: 4px 0 10px;
  }

  .hero-headline {
    font-size: 20px;
  }

  .hero-cta-row {
    gap: 8px;
  }
}

.hero-slide.is-active {
  opacity: 1;
  transform: rotateY(0deg) scale(1);
  z-index: 1;
}

.hero-slide.is-entering {
  animation: heroFlipIn 520ms ease both;
}

.hero-slide.is-exiting {
  animation: heroFlipOut 520ms ease both;
}

@keyframes heroFlipIn {
  from {
    opacity: 0.2;
    transform: rotateY(90deg) scale(1.01);
  }

  to {
    opacity: 1;
    transform: rotateY(0deg) scale(1);
  }
}

@keyframes heroFlipOut {
  from {
    opacity: 1;
    transform: rotateY(0deg) scale(1);
  }

  to {
    opacity: 0.2;
    transform: rotateY(-90deg) scale(0.99);
  }
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(270deg,
      rgba(255, 255, 255, 0.94) 0%,
      rgba(255, 255, 255, 0.82) 38%,
      rgba(255, 255, 255, 0.25) 70%,
      rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  width: min(540px, 100%);
  padding: 24px 24px;
  margin-right: 28px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #a21caf;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(242, 216, 226, 0.95);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(162, 28, 175, 0.08);
}

.hero-headline {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #1e1b4b;
  margin-bottom: 4px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.hero-percent {
  font-size: clamp(54px, 8vw, 88px);
  font-weight: 900;
  line-height: 0.95;
  color: #db2777;
  margin: 6px 0 14px;
  text-shadow: 0 2px 10px rgba(219, 39, 119, 0.15);
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.14);
  cursor: pointer;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.12s, background 0.12s;
}

.hero-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.03);
}

.hero-arrow-next {
  right: 14px;
}

.hero-arrow-prev {
  left: 14px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 6;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  padding: 6px 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(17, 24, 39, 0.22);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, width 0.15s;
}

.hero-dot.is-active {
  background: var(--primary);
  width: 24px;
}

/* Backgrounds with high-res luxury banners */
.hero-bg-care {
  background-image: url('../image/hero-banner-care.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-bg-perfume,
.hero-bg-hajj {
  background-image: url('../image/hero-banner-perfume.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-bg-makeup {
  background-image: url('../image/hero-banner-makeup.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Product sections heading card */
#all-products .section-header,
#bestsellers .section-header,
#discounts .section-header {
  justify-content: center;
  text-align: center;
  margin-bottom: 16px;
}

#all-products .section-header>div,
#bestsellers .section-header>div,
#discounts .section-header>div {
  position: relative;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(242, 216, 226, 0.95);
  border-radius: 16px;
  padding: 12px 18px;
  min-width: min(100%, 360px);
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.06);
}

#all-products .section-header>div::before,
#all-products .section-header>div::after,
#bestsellers .section-header>div::before,
#bestsellers .section-header>div::after,
#discounts .section-header>div::before,
#discounts .section-header>div::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  background: #FDE2DA;
  border-radius: 999px;
  transform: translateY(-50%);
}

#all-products .section-header>div::before,
#bestsellers .section-header>div::before,
#discounts .section-header>div::before {
  right: -7px;
}

#all-products .section-header>div::after,
#bestsellers .section-header>div::after,
#discounts .section-header>div::after {
  left: -7px;
}

#all-products .section-header .section-subtitle,
#bestsellers .section-header .section-subtitle,
#discounts .section-header .section-subtitle {
  margin-top: 2px;
}

#all-products .section-header .link-more,
#bestsellers .section-header .link-more,
#discounts .section-header .link-more {
  display: none;
}

/* CATEGORY GRID */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}

.category-card {
  position: relative;
  border-radius: 20px;
  padding: 18px 14px;
  background: linear-gradient(145deg, #ffffff 0%, #fff7fb 100%);
  border: 1px solid rgba(242, 216, 226, 0.85);
  box-shadow: 0 10px 25px rgba(233, 30, 140, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 35px rgba(233, 30, 140, 0.14);
  border-color: rgba(233, 30, 140, 0.4);
  background: linear-gradient(145deg, #ffffff 0%, #fff0f7 100%);
}

.category-img-wrap {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, rgba(233, 30, 140, 0.25) 0%, rgba(156, 39, 176, 0.25) 100%);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  box-shadow: 0 8px 18px rgba(233, 30, 140, 0.1);
}

.category-card:hover .category-img-wrap {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 12px 26px rgba(233, 30, 140, 0.22);
}

.category-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #fff;
  display: block;
}

.category-name {
  font-size: 15px;
  font-weight: 800;
  color: #1e1b4b;
  margin-bottom: 4px;
  transition: color 0.2s ease;
}

.category-card:hover .category-name {
  color: #db2777;
}

.category-count {
  font-size: 11.5px;
  color: #6b7280;
  margin-bottom: 10px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #db2777;
  background: rgba(219, 39, 119, 0.08);
  border: 1px solid rgba(219, 39, 119, 0.2);
  padding: 4px 12px;
  border-radius: 999px;
  transition: all 0.25s ease;
}

.category-card:hover .category-tag {
  background: #db2777;
  color: #fff;
  border-color: #db2777;
  transform: scale(1.04);
}

/* Mobile improvements for category cards */
@media (max-width: 768px) {
  .category-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 12px;
    padding: 6px 4px 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .category-grid::-webkit-scrollbar {
    display: none;
  }

  .category-card {
    flex: 0 0 125px;
    min-width: 125px;
    padding: 12px 8px 14px;
    border-radius: 16px;
    scroll-snap-align: start;
  }

  .category-img-wrap {
    width: 68px;
    height: 68px;
    margin-bottom: 8px;
  }

  .category-name {
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
  }

  .category-count {
    display: none;
  }

  .category-tag {
    font-size: 10px;
    padding: 2px 8px;
  }
}



/* تحسين قسم التصنيفات ورأس القسم */
#categories .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  border-bottom: 1.5px solid rgba(146, 127, 187, 0.08);
  padding-bottom: 16px;
}

#categories .section-title {
  font-size: 24px;
  font-weight: 800;
  color: #1a1a2e;
  position: relative;
  letter-spacing: -0.3px;
}

#categories .section-title::after {
  content: '';
  position: absolute;
  bottom: -18px;
  right: 0;
  width: 48px;
  height: 3px;
  background: var(--primary);
  border-radius: 99px;
}

#categories .section-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

#categories .link-more {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  border: 1px solid rgba(146, 127, 187, 0.25) !important;
  color: var(--primary) !important;
  background: #fff !important;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: 0 4px 10px rgba(146, 127, 187, 0.05);
}

#categories .link-more:hover {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 8px 20px rgba(146, 127, 187, 0.25);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  #categories .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 20px;
  }

  #categories .section-title::after {
    display: none;
    /* إخفاء الخط السفلي على الموبايل لمظهر أنظف وأكثر بساطة */
  }

  #categories .link-more {
    align-self: stretch;
    justify-content: center;
  }
}

/* =========================================================
   FLASH SALE COUNTDOWN BANNER & TIMER
   ========================================================= */
.flash-sale-section {
  padding: 35px 0 15px;
}

.flash-sale-banner {
  position: relative;
  border-radius: 24px;
  padding: 32px 38px;
  background: linear-gradient(135deg, #180828 0%, #2e083c 45%, #4c0d50 100%);
  border: 1px solid rgba(233, 30, 140, 0.35);
  box-shadow: 0 20px 45px rgba(24, 8, 40, 0.28), 0 0 35px rgba(233, 30, 140, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  color: #fff;
}

.flash-sale-banner::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -15%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(233, 30, 140, 0.22) 0%, rgba(233, 30, 140, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.flash-sale-banner::after {
  content: "";
  position: absolute;
  bottom: -40%;
  right: -10%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(156, 39, 176, 0.25) 0%, rgba(156, 39, 176, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.flash-sale-info {
  position: relative;
  z-index: 2;
  max-width: 440px;
}

.flash-sale-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #fb7185;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
  animation: pulseBadge 2.2s infinite ease-in-out;
}

@keyframes pulseBadge {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.4);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 0 7px rgba(244, 63, 94, 0);
  }
}

.flash-sale-title {
  font-size: 23px;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 6px;
  background: linear-gradient(90deg, #ffffff 0%, #ffd6e7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.flash-sale-desc {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.flash-sale-timer-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.timer-heading {
  font-size: 12px;
  font-weight: 700;
  color: #fda4af;
  letter-spacing: 0.5px;
}

.countdown-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  direction: ltr; /* Keeps HH : MM : SS format readable */
}

.timer-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  min-width: 58px;
  padding: 8px 6px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

.timer-val {
  font-size: 24px;
  font-weight: 900;
  font-family: 'Outfit', 'Cairo', monospace, sans-serif;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

.timer-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 4px;
}

.timer-sep {
  font-size: 22px;
  font-weight: 900;
  color: #f43f5e;
  animation: blinkSep 1s infinite;
}

@keyframes blinkSep {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.flash-sale-action {
  position: relative;
  z-index: 2;
}

.btn-flash-sale {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #e11d48 0%, #db2777 50%, #9333ea 100%);
  color: #fff !important;
  font-weight: 800;
  font-size: 14.5px;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  box-shadow: 0 8px 25px rgba(225, 29, 72, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-flash-sale:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 32px rgba(225, 29, 72, 0.6);
  color: #fff !important;
}

/* Mobile responsive for Flash Sale Banner */
@media (max-width: 900px) {
  .flash-sale-banner {
    flex-direction: column;
    text-align: center;
    padding: 26px 18px;
    gap: 20px;
    border-radius: 20px;
  }

  .flash-sale-info {
    max-width: 100%;
  }

  .flash-sale-title {
    font-size: 19px;
  }

  .timer-segment {
    min-width: 52px;
    padding: 7px 4px;
  }

  .timer-val {
    font-size: 20px;
  }

  .btn-flash-sale {
    width: 100%;
    max-width: 280px;
  }
}

/* =========================================================
   OFFERS HEADER RESPONSIVE CENTERING (Mobile Only)
   ========================================================= */
.offers-header-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .offers-header {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 12px !important;
    margin-bottom: 22px !important;
  }

  .offers-title-wrap {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
  }

  .offers-title-text {
    text-align: center !important;
  }

  .offers-title-text h2 {
    text-align: center !important;
    font-size: 20px !important;
  }

  .offers-title-text p {
    text-align: center !important;
    font-size: 12px !important;
  }

  .offers-header-badges {
    justify-content: center !important;
    width: 100% !important;
    gap: 8px !important;
  }
}