/* BOXMAP | Custom CSS: Announcement Bar, Footer, WhatsApp, Product Cards */

/* 1. Announcement Bar */

[data-announcement-bar] { background: #4C267D !important; color: #fff !important; }

[data-announcement-bar] .announcement-marquee { padding: 12px 0 !important; }

/* 2. Footer */

.boxmap-footer-pro {
  direction: rtl;
  color: #28232f;
  border-top: 1px solid #eee8f3;
  background: radial-gradient(circle at 90% 10%, rgba(76, 38, 125, .08), transparent 24%), linear-gradient(180deg, #fff 0%, #faf7fd 100%);
}

.boxmap-footer-pro__inner { max-width: 1400px; margin: 0 auto; padding: 56px 32px 24px; }

.boxmap-footer-pro__top {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.boxmap-footer-pro__brand img { width: 180px; height: auto; margin-bottom: 18px; }

.boxmap-footer-pro__brand p {
  max-width: 380px;
  margin: 0 0 20px;
  color: #5b5470;
  font-size: 14px;
  line-height: 1.9;
}

.boxmap-footer-pro h3 {
  margin: 0 0 16px;
  color: #4C267D;
  font-size: 18px;
  font-weight: 700;
}

.boxmap-footer-pro__col { display: flex; flex-direction: column; gap: 12px; }

.boxmap-footer-pro__col a, .boxmap-footer-pro__col > div {
  color: #28232f;
  text-decoration: none;
  transition: color .2s ease;
}

.boxmap-footer-pro__col a:hover { color: #4C267D; }

.boxmap-footer-pro__col span {
  display: block;
  margin-bottom: 2px;
  color: #837a8f;
  font-size: 12px;
}

.boxmap-footer-pro__col strong { font-size: 14px; font-weight: 600; }

.boxmap-footer-pro__social { display: flex; align-items: center; gap: 10px; }

.boxmap-footer-pro__social a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1ebf8;
  color: #4C267D;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.boxmap-footer-pro__social a:hover { background: #4C267D; color: #fff; transform: translateY(-2px); }

.boxmap-footer-pro__social svg { width: 20px; height: 20px; fill: currentColor; }

.boxmap-footer-pro__legal {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid #e7def6;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 56px;
}

.boxmap-legal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
}

.boxmap-legal-item img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
}

.boxmap-legal-item > div { display: flex; flex-direction: column; align-items: flex-start; }

.boxmap-legal-item span { margin-bottom: 4px; color: #837a8f; font-size: 12px; }

.boxmap-legal-item strong {
  direction: ltr;
  color: #4C267D;
  font-size: 15px;
  font-weight: 700;
}

.boxmap-footer-pro__bottom {
  min-height: 86px;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: linear-gradient(90deg, #351752, #4C267D);
  color: #fff;
}

.boxmap-footer-pro__copyright {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.boxmap-footer-pro__payment-methods {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.boxmap-footer-pro__payment-methods::-webkit-scrollbar { display: none; }

.boxmap-footer-pro__payment-methods img {
  width: auto;
  max-width: 110px;
  height: 44px;
  padding: 6px 10px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  flex-shrink: 0;
}

@media (max-width: 768px) {

  .boxmap-footer-pro__inner { padding: 36px 20px 22px; }

  .boxmap-footer-pro__top { grid-template-columns: 1fr; gap: 30px; text-align: center; }

  .boxmap-footer-pro__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .boxmap-footer-pro__brand img { width: 150px; margin: 0 auto 16px; }

  .boxmap-footer-pro__brand p {
    max-width: 340px;
    margin: 0 auto 18px;
    font-size: 13px;
    line-height: 1.8;
    text-align: center;
  }

  .boxmap-footer-pro h3 { font-size: 17px; text-align: center; }

  .boxmap-footer-pro__social { justify-content: center; }

  .boxmap-footer-pro__social a { width: 44px; height: 44px; }

  .boxmap-footer-pro__col { align-items: center; gap: 11px; text-align: center; }

  .boxmap-footer-pro__col a, .boxmap-footer-pro__col > div { width: 100%; text-align: center; }

  

  .boxmap-footer-pro__legal {
    margin-top: 28px;
    padding-top: 20px;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 22px;
  }

  .boxmap-legal-item {
    flex: 1;
    max-width: 150px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-align: center;
  }

  .boxmap-legal-item img { width: 46px; height: 46px; }

  .boxmap-legal-item > div { align-items: center; }

  .boxmap-legal-item span { font-size: 11px; text-align: center; }

  .boxmap-legal-item strong { font-size: 12px; text-align: center; word-break: break-all; }

  .boxmap-footer-pro__bottom {
    min-height: auto;
    padding: 14px 12px 16px;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
  }

  .boxmap-footer-pro__payment-methods {
    width: 100%;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: hidden;
    gap: 4px;
  }

  .boxmap-footer-pro__payment-methods img {
    width: auto;
    max-width: 50px;
    height: 27px;
    padding: 3px 4px;
    border-radius: 5px;
    flex-shrink: 1;
  }

  .boxmap-footer-pro__copyright {
    width: 100%;
    font-size: 12px;
    text-align: center;
    white-space: normal;
  }
}

@media (max-width: 390px) {

  .boxmap-footer-pro__legal { gap: 12px; }

  .boxmap-legal-item { max-width: 145px; }

  .boxmap-legal-item img { width: 42px; height: 42px; }

  .boxmap-legal-item strong { font-size: 11px; }

  .boxmap-footer-pro__payment-methods { gap: 3px; }

  .boxmap-footer-pro__payment-methods img { max-width: 46px; height: 25px; padding: 2px 3px; }
}

/* 3. WhatsApp floating button */

a[href*="wa.me"] { bottom: 108px !important; }

@media (max-width: 768px) {

  a[href*="wa.me"] { bottom: 112px !important; }
}

/* 4. Product cards */

[data-product-card] {
  position: relative !important;
  background: #ffffff !important;
  border: 1px solid #eee8f3 !important;
  border-radius: 16px !important;
  padding: 10px !important;
  gap: 12px !important;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(76, 38, 125, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
}

@media (hover: hover) {

  [data-product-card]:hover {
    transform: translateY(-4px);
    border-color: rgba(76, 38, 125, 0.20) !important;
    box-shadow: 0 10px 30px rgba(76, 38, 125, 0.10), 0 3px 8px rgba(0, 0, 0, 0.04);
  }
}

[data-product-card] > a {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  background: #faf9fb !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  aspect-ratio: 1 / 1 !important;
}

[data-product-card] > a > img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
  transition: transform 0.30s ease !important;
}

@media (hover: hover) {

  [data-product-card]:hover > a > img { transform: scale(1.025) !important; }
}

[data-product-card] [data-wishlist-btn] {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  bottom: auto !important;
  left: auto !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: #4C267D !important;
  border: 1px solid rgba(76, 38, 125, 0.08) !important;
  border-radius: 50% !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.10) !important;
  backdrop-filter: blur(6px);
  z-index: 5 !important;
  transition: color 0.20s ease, background-color 0.20s ease, transform 0.20s ease, box-shadow 0.20s ease !important;
}

[data-product-card] [data-wishlist-btn] svg {
  width: 20px !important;
  height: 20px !important;
  color: inherit !important;
  transition: color 0.20s ease, transform 0.20s ease !important;
}

@media (hover: hover) {

  [data-product-card] [data-wishlist-btn]:hover {
    color: #e53935 !important;
    background: #ffffff !important;
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(229, 57, 53, 0.18) !important;
  }

  [data-product-card] [data-wishlist-btn]:hover svg { color: #e53935 !important; }

  [data-product-card] [data-wishlist-btn]:hover svg path { fill: #e53935 !important; }
}

[data-product-card] > div:nth-of-type(1) { gap: 8px !important; }

[data-product-card] h3 {
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.55 !important;
  color: #28232F !important;
  min-height: 47px;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  overflow: hidden !important;
}

[data-product-card] h3 a {
  color: inherit !important;
  text-decoration: none !important;
  transition: color 0.20s ease;
}

@media (hover: hover) {

  [data-product-card] h3 a:hover { color: #4C267D !important; }
}

[data-product-card] h3 + div, [data-product-card] p.text-foreground { color: #28232F !important; }

[data-product-card] p.text-foreground.text-sm {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
  color: #4C267D !important;
}

[data-product-card] .riyal-svg { width: 13px !important; height: 15px !important; margin-right: 2px; }

[data-product-card] p.text-muted {
  color: #77717d !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
}

[data-product-card] > div:last-child { margin-top: auto !important; }

[data-product-card] [data-add-to-cart] {
  width: 100% !important;
  min-height: 44px !important;
  padding: 8px 14px !important;
  background: #ffffff !important;
  color: #4C267D !important;
  border: 1.5px solid #4C267D !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  transition: background-color 0.20s ease, color 0.20s ease, border-color 0.20s ease, transform 0.20s ease, box-shadow 0.20s ease !important;
}

@media (hover: hover) {

  [data-product-card] [data-add-to-cart]:hover {
    background: #4C267D !important;
    color: #ffffff !important;
    border-color: #4C267D !important;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(76, 38, 125, 0.18) !important;
  }
}

[data-product-card] [data-quantity-section] { width: 100% !important; }

[data-product-card] .qty-input {
  width: 100% !important;
  border-radius: 10px !important;
  overflow: hidden;
}

[data-product-card] .qty-input-btn { color: #4C267D !important; }

[data-product-card] .qty-input-field { font-weight: 700 !important; }

@media (max-width: 768px) {

  [data-product-card] {
    padding: 7px !important;
    gap: 8px !important;
    border-radius: 12px !important;
    border-color: #eee8f3 !important;
    box-shadow: 0 2px 7px rgba(76, 38, 125, 0.05) !important;
  }

  [data-product-card] > a {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 9px !important;
  }

  [data-product-card] > a > img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }

  [data-product-card] [data-wishlist-btn] {
    top: 6px !important;
    right: 6px !important;
    left: auto !important;
    bottom: auto !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    border-radius: 50% !important;
  }

  [data-product-card] [data-wishlist-btn] svg { width: 17px !important; height: 17px !important; }

  [data-product-card] h3 {
    font-size: 12.5px !important;
    line-height: 1.5 !important;
    min-height: 38px !important;
    -webkit-line-clamp: 2 !important;
  }

  [data-product-card] p.text-foreground.text-sm {
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
  }

  [data-product-card] .riyal-svg { width: 11px !important; height: 13px !important; }

  [data-product-card] [data-add-to-cart] {
    width: 100% !important;
    min-height: 38px !important;
    padding: 5px 6px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
  }

  [data-product-card] > div:nth-of-type(1) { gap: 5px !important; }
}

@media (max-width: 390px) {

  [data-product-card] { padding: 6px !important; gap: 7px !important; }

  [data-product-card] h3 { font-size: 12px !important; min-height: 36px !important; }

  [data-product-card] p.text-foreground.text-sm { font-size: 13px !important; }

  [data-product-card] [data-add-to-cart] { min-height: 36px !important; font-size: 11.5px !important; }

  [data-product-card] [data-wishlist-btn] {
    top: 5px !important;
    right: 5px !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
  }

  [data-product-card] [data-wishlist-btn] svg { width: 16px !important; height: 16px !important; }
}

/*=================بوكس ماب بالاخير====*/

/* BOXMAP | Footer Bottom */

.boxmap-footer-pro__bottom {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  text-align: center !important;
}

.boxmap-footer-pro__copyright {
  width: 100%;
  text-align: center !important;
  font-size: 14px;
  font-weight: 600;
}

.boxmap-footer-pro__payment-methods {
  width: 100%;
  justify-content: center !important;
}


/* BOXMAP | Wishlist Button - Bottom Right */

[data-product-card] [data-wishlist-btn] {
  top: auto !important;
  right: 10px !important;
  bottom: 20px !important;
  left: auto !important;
}

/* Mobile */
@media (max-width: 768px) {
  [data-product-card] [data-wishlist-btn] {
    top: auto !important;
    right: 6px !important;
    bottom: 16px !important;
    left: auto !important;
  }
}

/* Small Mobile */
@media (max-width: 390px) {
  [data-product-card] [data-wishlist-btn] {
    top: auto !important;
    right: 5px !important;
    bottom: 15px !important;
    left: auto !important;
  }
}

/*================اخفاء قسم الشراء الثابت ===========*/

/* BOXMAP | Hide Sticky Add to Cart */

#sticky-cta,
[data-sticky-cta] {
  display: none !important;
}

/* BOXMAP | Mobile Footer - Vertical Layout */
@media (max-width: 768px) {
  .boxmap-footer-pro__top {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 26px !important;
    text-align: center !important;
  }

  .boxmap-footer-pro__brand,
  .boxmap-footer-pro__col {
    width: 100% !important;
    min-width: 0 !important;
    align-items: center !important;
    text-align: center !important;
  }

  .boxmap-footer-pro__brand p {
    font-size: 13px !important;
    line-height: 1.8 !important;
    max-width: 340px;
    margin-inline: auto !important;
    display: block !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
  }

  /* Important policies: three plain-text links in one row */
  .boxmap-footer-pro__top > .boxmap-footer-pro__col:last-child {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
    padding: 0 !important;
    border: 0 !important;
    align-items: start !important;
  }

  .boxmap-footer-pro__top > .boxmap-footer-pro__col:last-child h3 {
    grid-column: 1 / -1;
    margin: 0 0 2px !important;
    text-align: center !important;
  }

  .boxmap-footer-pro__top > .boxmap-footer-pro__col:last-child a {
    width: 100% !important;
    padding: 3px 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 11px !important;
    line-height: 1.6 !important;
    text-align: center !important;
    overflow-wrap: anywhere;
  }

  /* Contact details and social icons */
  .boxmap-footer-pro__col:has(a[href^="mailto:"]) {
    flex-direction: column !important;
    gap: 9px !important;
  }

  .boxmap-footer-pro__col:has(a[href^="mailto:"]) :is(h3, a, p, span, strong, div) {
    text-align: center !important;
  }

  .boxmap-footer-pro__col a[href^="mailto:"],
  .boxmap-footer-pro__col a[href^="tel:"],
  .boxmap-footer-pro__col strong {
    font-size: 11px !important;
    line-height: 1.6 !important;
    overflow-wrap: anywhere;
  }

  .boxmap-footer-pro__social { justify-content: center !important; gap: 8px !important; }
  .boxmap-footer-pro__social a { width: 34px !important; height: 34px !important; }
  .boxmap-footer-pro__social svg { width: 17px !important; height: 17px !important; }
}

@media (max-width: 768px) {
  .boxmap-footer-pro__col:has(a[href^="mailto:"]) {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px !important;
    width: 100%;
    text-align: center !important;
  }

  .boxmap-footer-pro__col:has(a[href^="mailto:"]) h3 {
    grid-column: 1 / -1;
    text-align: center !important;
  }

  .boxmap-footer-pro__col:has(a[href^="mailto:"]) > div {
    min-width: 0;
    text-align: center !important;
  }

  .boxmap-footer-pro__col:has(a[href^="mailto:"]) strong {
    font-size: 10px !important;
    overflow-wrap: anywhere;
  }
}
@media (max-width: 768px) {
  /* التعريف بالمؤسسة تحت الشعار */
  .boxmap-footer-pro__brand p {
    font-size: 14px !important;
    line-height: 1.8 !important;
  }

  /* البريد والهاتف والموقع */
  .boxmap-footer-pro__col:has(a[href^="mailto:"]) strong,
  .boxmap-footer-pro__col:has(a[href^="mailto:"]) a {
    font-size: 12px !important;
  }

  /* روابط السياسات الثلاثة */
  .boxmap-footer-pro__top > .boxmap-footer-pro__col:last-child a {
    font-size: 13px !important;
    line-height: 1.6 !important;
  }
}
@media (max-width: 768px) {
  .boxmap-footer-pro__col:has(a[href^="mailto:"]) > div {
    align-self: start !important;
    margin: 0 !important;
  }

  .boxmap-footer-pro__col:has(a[href^="mailto:"]) span {
    margin: 0 0 6px !important;
    line-height: 1.5 !important;
  }
}
@media (max-width: 768px) {
  .boxmap-footer-pro__col:has(a[href^="mailto:"]) {
    align-items: start !important;
  }

  .boxmap-footer-pro__col:has(a[href^="mailto:"]) > :not(h3) {
    align-self: start !important;
    justify-content: flex-start !important;
    margin-top: 0 !important;
  }
}

/**************************/
/**********************/


/* BOXMAP | Native Preloader */
.aigc-preloader:not(.aigc-preloader--hidden) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #fff !important;
}

.aigc-preloader--hidden {
  pointer-events: none !important;
}

/**********************/
/*********************/

/* BOXMAP | Footer Reveal */
.boxmap-footer-pro.boxmap-animate
.boxmap-footer-pro__top > *,
.boxmap-footer-pro.boxmap-animate
.boxmap-footer-pro__legal > *,
.boxmap-footer-pro.boxmap-animate
.boxmap-footer-pro__bottom {
  opacity: 0;
  translate: 0 25px;
  transition: opacity .8s ease,
              translate .8s cubic-bezier(.22,1,.36,1);
}

.boxmap-footer-pro.boxmap-animate.is-visible
.boxmap-footer-pro__top > *,
.boxmap-footer-pro.boxmap-animate.is-visible
.boxmap-footer-pro__legal > *,
.boxmap-footer-pro.boxmap-animate.is-visible
.boxmap-footer-pro__bottom {
  opacity: 1;
  translate: 0 0;
}

.boxmap-footer-pro__top > :nth-child(2) { transition-delay: 120ms !important; }
.boxmap-footer-pro__top > :nth-child(3) { transition-delay: 240ms !important; }
.boxmap-footer-pro__legal > :nth-child(1) { transition-delay: 300ms !important; }
.boxmap-footer-pro__legal > :nth-child(2) { transition-delay: 420ms !important; }
.boxmap-footer-pro__legal > :nth-child(3) { transition-delay: 540ms !important; }
.boxmap-footer-pro__bottom { transition-delay: 600ms !important; }

@media (prefers-reduced-motion: reduce) {
  .boxmap-footer-pro.boxmap-animate * {
    transition-delay: 0ms !important;
  }
  .boxmap-footer-pro.boxmap-animate
  .boxmap-footer-pro__top > *,
  .boxmap-footer-pro.boxmap-animate
  .boxmap-footer-pro__legal > *,
  .boxmap-footer-pro.boxmap-animate
  .boxmap-footer-pro__bottom {
    opacity: 1 !important;
    translate: none !important;
  }
}

/**************************/
/*************************/


/* BOXMAP | Hero Slider - Mobile Only */
@media (max-width: 767px) {
  .aigc-hero-slider {
    --aigc-slide-w-mobile: 100% !important;
    --aigc-slide-gap: 0px !important;
  }

  .aigc-hero-slider__inner,
  .aigc-hero-slider__viewport {
    width: 100% !important;
    overflow: hidden !important;
  }

  .aigc-hero-slider__track {
    gap: 0 !important;
  }

  .aigc-hero-slider__slide {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/***************************/