/* =====================================================
   الكاروسيل الرئيسي المخصص — الصفحة الرئيسية فقط
===================================================== */

body.index .brh-home-carousel {
  position: relative;
  width: min(calc(100% - 28px), 1120px);
  margin: 14px auto 16px;
  overflow: hidden;
  border-radius: 16px;
  background: #f7eee8;
  box-shadow: 0 10px 25px rgba(42, 36, 34, 0.08);
}

body.index .brh-home-carousel-track {
  display: flex;
  width: 100%;
  aspect-ratio: 8 / 3;
  direction: ltr;
  transition: transform 450ms ease;
  will-change: transform;
}

body.index .brh-home-carousel-slide {
  display: block;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  direction: rtl;
}

body.index .brh-home-carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

body.index .brh-home-carousel-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #292321;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 5px 16px rgba(42, 36, 34, 0.16);
  cursor: pointer;
  transform: translateY(-50%);
}

body.index .brh-home-carousel-arrow--next {
  right: 14px;
}

body.index .brh-home-carousel-arrow--prev {
  left: 14px;
}

body.index .brh-home-carousel-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

body.index .brh-home-carousel-dots {
  position: absolute;
  z-index: 3;
  bottom: 10px;
  left: 50%;
  display: flex;
  gap: 6px;
  transform: translateX(-50%);
}

body.index .brh-home-carousel-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease;
}

body.index .brh-home-carousel-dot.is-active {
  width: 22px;
  background: #a94767;
}

/* =====================================================
   البانرات المضافة بالـ JavaScript — الرئيسية فقط
===================================================== */

body.index .brh-visual-duo,
body.index .brh-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(calc(100% - 28px), 1120px);
  gap: 12px;
}

body.index .brh-visual-duo {
  margin: 0 auto 28px;
}

body.index .brh-visual-grid {
  margin: 22px auto;
}

body.index .brh-visual-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #f7eee8;
  box-shadow: 0 8px 22px rgba(42, 36, 34, 0.08);
}

body.index .brh-visual-duo .brh-visual-card,
body.index .brh-visual-card--small {
  aspect-ratio: 2 / 1;
}

body.index .brh-visual-card--wide {
  grid-column: 1 / -1;
  aspect-ratio: 8 / 3;
}

body.index .brh-visual-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

body.index .brh-pod-discount {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  background: #a94767;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

/* =====================================================
   موبايل — البانرات
===================================================== */

@media (max-width: 700px) {
  body.index .brh-home-carousel,
  body.index .brh-visual-duo,
  body.index .brh-visual-grid {
    width: calc(100% - 24px);
  }

  body.index .brh-home-carousel {
    margin: 10px auto 12px;
    border-radius: 12px;
  }

  body.index .brh-home-carousel-arrow {
    width: 31px;
    height: 31px;
  }

  body.index .brh-home-carousel-arrow--next {
    right: 8px;
  }

  body.index .brh-home-carousel-arrow--prev {
    left: 8px;
  }

  body.index .brh-home-carousel-arrow svg {
    width: 15px;
    height: 15px;
  }

  body.index .brh-home-carousel-dots {
    bottom: 6px;
  }

  body.index .brh-visual-duo,
  body.index .brh-visual-grid {
    gap: 9px;
  }

  body.index .brh-visual-card {
    border-radius: 11px;
  }
}

/* =====================================================
   هيدر الموبايل — كل صفحات الموقع
===================================================== */

@media (max-width: 767px) {
  body .f_bottom-menu,
  body .store-header .f_bottom-menu {
    display: none !important;
  }

  body {
    padding-bottom: 0 !important;
  }

  body .store-header,
  body #mainnav,
  body #mainnav .inner {
    min-height: 60px !important;
    height: 60px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }

  body #mainnav .inner {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
  }

  body #mainnav .f_start-btns,
  body #mainnav .f_end-btns {
    display: block !important;
  }

  body #mainnav .f_logo {
    position: absolute !important;
    top: 14px !important;
    left: 14px !important;
    display: flex !important;
    width: 108px !important;
    height: 32px !important;
    margin: 0 !important;
  }

  body #mainnav .f_logo .navbar-brand,
  body #mainnav .f_logo .navbar-brand img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }

  body #mainnav .f_user-icon-button[class~="-md:!hidden"] {
    display: none !important;
  }

  body #mainnav .f_user-icon-button[class~="md:!hidden"] {
    position: absolute !important;
    top: 10px !important;
    right: 156px !important;
    display: flex !important;
  }

  body #mainnav salla-cart-summary[class~="-md:hidden"] {
    position: absolute !important;
    top: 10px !important;
    right: 108px !important;
    display: flex !important;
  }

  body #mainnav .search-btn[class~="-md:hidden"] {
    position: absolute !important;
    top: 10px !important;
    right: 60px !important;
    display: flex !important;
  }

  body #mainnav .mburger {
    position: absolute !important;
    top: 10px !important;
    right: 12px !important;
    display: flex !important;
  }

  body #mainnav .header-buttons {
    display: none !important;
  }

  body #mainnav .mburger,
  body #mainnav .f_user-icon-button[class~="md:!hidden"],
  body #mainnav .search-btn,
  body #mainnav salla-cart-summary,
  body #mainnav .s-cart-summary-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #fff !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body #mainnav salla-cart-summary,
  body #mainnav .s-cart-summary-wrapper,
  body #mainnav #s-cart-icon,
  body #mainnav #s-cart-icon > i,
  body #mainnav .s-cart-summary-icon,
  body #mainnav .icon.sicon-cart2,
  body #mainnav salla-cart-summary slot-fb,
  body #mainnav salla-cart-summary slot-fb svg {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #fff !important;
  }

  body #mainnav salla-cart-summary slot-fb,
  body #mainnav .s-cart-summary-icon,
  body #mainnav .s-cart-summary-content {
    display: none !important;
  }

  body #mainnav .icon.sicon-cart2 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    font-size: 21px !important;
    line-height: 1 !important;
  }

  body #mainnav .mburger i,
  body #mainnav .f_user-icon-button i,
  body #mainnav .search-btn span,
  body #mainnav .search-btn i {
    color: #fff !important;
    background: transparent !important;
  }

  body #mainnav .mburger i {
    font-size: 24px !important;
  }

  body #mainnav .f_user-icon-button i,
  body #mainnav .search-btn span,
  body #mainnav .search-btn i {
    font-size: 21px !important;
  }

  body #mainnav .s-cart-summary-count {
    position: absolute !important;
    top: -2px !important;
    right: -2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 16px !important;
    height: 16px !important;
    padding: 0 3px !important;
    border: 1.5px solid #fff !important;
    border-radius: 999px !important;
    color: #fff !important;
    background: #c83443 !important;
    font-size: 10px !important;
    line-height: 1 !important;
  }
}

/* =====================================================
   أيقونة البروفايل الأصلية من سلة — موبايل فقط
===================================================== */

@media (max-width: 767px) {
  body #mainnav salla-user-menu.f_user-avatar-button[class~="md:hidden"] {
    position: absolute !important;
    top: 10px !important;
    right: 156px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: transparent !important;
  }

  body #mainnav
    salla-user-menu.f_user-avatar-button[class~="md:hidden"]
    slot-fb,
  body #mainnav
    salla-user-menu.f_user-avatar-button[class~="md:hidden"]
    .s-user-menu-login-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body #mainnav
    salla-user-menu.f_user-avatar-button[class~="md:hidden"]
    img {
    display: block !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    max-width: 26px !important;
    max-height: 26px !important;
    object-fit: contain !important;
    border-radius: 50% !important;
  }

  body #mainnav
    salla-user-menu.f_user-avatar-button[class~="md:hidden"]
    svg {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
  }
}