:root {
  --rukn-orange: #ff7a18;
  --rukn-orange-dark: #e66a15;
  --rukn-orange-light: #fff5ed;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: #fcfcfc;
  color: #1f2937;
}

/* Ad Section Styling */
.ad-swiper {
  width: 100%;
  height: 300px;
  border-radius: 24px;
}
@media (max-width: 768px) {
  .ad-swiper { height: 180px; }
}

/* Category Navigation */
.main-cat-btn {
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}
.main-cat-btn.active {
  color: var(--rukn-orange);
  border-bottom-color: var(--rukn-orange);
  background-color: var(--rukn-orange-light);
}

/* Sub-sub categories animation */
.expandable-content {
  max-height: 80px;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
}
.expandable-content.expanded {
  max-height: 2000px;
  transition: max-height 0.8s ease-in-out;
}

.orange-gradient {
  background: linear-gradient(135deg, #ff7a18 0%, #ff9d52 100%);
}

/* Professional shadow */
.pro-shadow {
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

/* ===== Image Ad Banner ===== */
.ad-banner-wrap {
  border-radius: 26px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 22px 55px rgba(15,23,42,.14);
  background: #fff;
}

.ad-banner-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 240px at 20% 0%, rgba(255,122,24,.20), transparent 55%),
    radial-gradient(900px 240px at 80% 0%, rgba(22,163,74,.12), transparent 55%);
  pointer-events: none;
  z-index: 1;
}

.ad-banner-img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
}
@media (min-width:640px) { .ad-banner-img { height: 260px; } }
@media (min-width:1024px) { .ad-banner-img { height: 290px; } }

.ad-banner-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, rgba(17,24,39,.78), rgba(17,24,39,.20) 55%, rgba(17,24,39,.06));
  display: flex;
  align-items: flex-end;
  padding: 18px;
}
@media (min-width:640px) { .ad-banner-overlay { padding: 24px; } }

.ad-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
  backdrop-filter: blur(8px);
}
.ad-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 13px;
  transition: .2s;
  text-decoration: none;
  white-space: nowrap;
}
.ad-cta .btn-primary { background: var(--rukn-orange); color: #fff; }
.ad-cta .btn-primary:hover { background: #e06600; }
.ad-cta .btn-ghost {
  background: #fff;
  color: #111827;
  border: 1px solid rgba(255,122,24,.22);
}
.ad-cta .btn-ghost:hover { background: #fff6ef; }

.ad-banner-slides { position: relative; }
.ad-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .45s ease, transform .45s ease;
  transform: scale(1.02);
}
.ad-slide.is-active {
  opacity: 1;
  position: relative;
  transform: scale(1.02);
}

.ad-dots {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
  pointer-events: auto;
}
@media (min-width:640px) { .ad-dots { bottom: 16px; } }

.ad-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 10px 20px rgba(0,0,0,.18);
  transition: transform .2s ease, background .2s ease, width .2s ease;
}
.ad-dot:hover { transform: scale(1.15); }
.ad-dot.is-active { width: 26px; background: rgba(255,255,255,.92); }

#mainCategoryNav {
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  touch-action: pan-x;
  cursor: grab;
}
#mainCategoryNav::-webkit-scrollbar { display: none; }
#mainCategoryNav.cursor-grabbing { cursor: grabbing; }

.main-cat-btn:focus { outline: none; }
.main-cat-btn:focus-visible { outline: none; }
.main-cat-btn img { flex-shrink: 0; }
.main-cat-btn { flex-shrink: 0; }

/* hover for sub cards */
.sub-category-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid transparent;
}
.sub-category-card:hover {
  transform: translateY(-10px);
  border-color: var(--rukn-orange);
  background-color: #fff;
  box-shadow: 0 15px 30px rgba(255, 122, 24, 0.15);
}

/* clickable cards keep normal color, but show orange on hover */
.sub-category-card h3,
.sub-category-card {
  color: inherit;
  text-decoration: none;
}

.sub-category-card:hover h3 {
  color: var(--rukn-orange);
}

/* nav main category: keep text normal, orange on hover */
.main-cat-btn {
  text-decoration: none;
}

.main-cat-btn:hover span {
  color: var(--rukn-orange);
}
