/* ========== Tokens ========== */
:root {
  --violet: #91288f;
  --green: #b3d233;
  --text-dark: #222;
  --text-mid: #333;
  --muted: #888;
  --card: #f8f8f8;
  --input-bg: #f7f7f7;
  --hover-bg: #f5e8ff;
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
}

/* ========== Forms ========== */
input[type="search"]{
  background-color: var(--input-bg) !important;
  border: 2px solid var(--violet) !important;
  border-radius: 30px !important;
  padding: 10px 45px 10px 20px !important;
  font-size: 15px !important;
  color: var(--text-mid) !important;
  width: 100% !important;
}
input[type="search"]::placeholder{
  color: var(--muted) !important;
  font-size: 14px !important;
}

/* ========== Header/Nav (ضيّقي السلكتور) ========== */
/* استهدفي أيقونات الهيدر فقط */
.header-btn__icon{
  color: var(--violet) !important;
  fill: var(--violet) !important;
  font-size: 25px;
}

/* استهدفي روابط القائمة الرئيسية بدل كل li a في الموقع */
.header .main-nav li > a{
  color: var(--violet) !important;
  font-weight: 700 !important;
  transition: color .3s ease, text-decoration-color .3s ease;
  text-decoration: none;
}
.header .main-nav li > a:hover{
  color: var(--green) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ========== Submenu ========== */
.sub-menu{
  /* لو في overflow */
}
.sub-menu::-webkit-scrollbar{ width: 6px; }
.sub-menu::-webkit-scrollbar-track{ background: #eee; }
.sub-menu::-webkit-scrollbar-thumb{
  background-color: var(--violet);
  border-radius: 3px;
}
/* Hover على روابط السوبمينيو */
.sub-menu a:hover{
  color: var(--green) !important;
  background-color: rgba(145,40,143,.1);
}

/* ========== Banners ========== */
/* قللي التعميم: استهدفي البانر بدل أي div عنده صورة خلفية */
.banner-entry::before,
.banner-entry::after{
  content: none !important;
  background: none !important;
  opacity: 0 !important;
}

/* لروابط/عناصر البانر */
a[class*="banner-entry"]{
  display: block;
  border-radius: 12px;
  background-size: cover !important;
  background-position: center !important;
  transition: transform .4s ease, box-shadow .3s ease;
  /* بديل للأبعاد الثابتة: نسبة أبعاد سلسة */
  aspect-ratio: 1 / 1;
  width: min(100%, 320px);
  margin: auto;
}
a[class*="banner-entry"]:hover{
  transform: scale(1.05);
  box-shadow: 0 5px 5px rgba(0,0,0,.2);
  z-index: 2;
}

/* عنوان فوق البانر */
.banner-entry h3{
  position: relative;
  display: inline-block;
  font-weight: 700;
  color: #fff !important;
  z-index: 2;
  transition: .3s ease;
}
.banner-entry:hover h3::before{
  content: '';
  position: absolute;
  inset: auto -6px 0 -6px;
  height: 25px;
  background-color: var(--violet);
  border-radius: 6px;
  z-index: -1;
}

/* ========== Brands ========== */
.brand-item{
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease;
}
.brand-item:hover{
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,.1);
  background-color: #f4f4f4;
}
.brand-item img{ transition: transform .3s ease; }
.brand-item:hover img{ transform: scale(1.1); }

/* Label يظهر عند الهوفر */
.brand-name{
  display: none;
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  background-color: var(--violet);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  z-index: 2;
}
.brand-item:hover .brand-name{ display: block; }

/* ========== Product Card ========== */
.s-product-card-entry{
  background: var(--card) !important;
  border-radius: 18px !important;
  padding: 15px !important;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
  position: relative !important;
}
.s-product-card-entry:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.s-product-card-image-cover{
  border-radius: 12px !important;
  margin-bottom: 10px !important;
  max-width: 100% !important;
}
.s-product-card-entry h2,
.s-product-card-entry h3{
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--text-dark) !important;
  margin: 10px 0 5px !important;
  text-align: center !important;
}
.s-product-card-price .price{
  color: var(--violet) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}
.s-product-card-entry .salla-button{
  background-color: var(--green) !important;
  color: #fff !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  padding: 10px 18px !important;
  margin-top: 10px !important;
  width: auto !important;
  display: inline-block !important;
  font-size: 15px !important;
}

/* Wishlist */
.s-product-card-wishlist-btn{
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  background-color: #fff !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.1) !important;
  padding: 6px !important;
  z-index: 3 !important;
}

/* ========== Category Tiles (slide-cat-entry) ========== */
.slide-cat-entry{
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 12px;
  position: relative;
  background-color: #fff;
  transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease;
}
.slide-cat-entry:hover{
  background-color: var(--hover-bg) !important;
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 5px 20px rgba(145,40,118,.3);
}
.slide-cat-entry:hover img{
  transform: scale(1.1);
  transition: .3s ease-in-out;
}

/* ========== Custom Category Banner ========== */
.custom-category-banner img{
  max-width: 100%;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

/* ========== Mobile ========== */
@media (max-width: 767px){
  .swiper-slide,
  .swiper-slide-active{
    min-height: 180px !important;
    background-size: cover !important;
    background-position: center center !important;
  }
  .swiper-slide img{
    max-height: 180px !important;
    width: 100% !important;
    object-fit: cover !important;
  }

  .swiper-slide-active .flex.flex-col.items-start{
    align-items: center !important;
    text-align: center !important;
  }
  .swiper-slide-active h2,
  .swiper-slide-active p{
    font-size: 16px !important;
    padding: 0 15px;
    line-height: 1.4;
  }
  .swiper-slide-active .btn{
    font-size: 14px !important;
    padding: 10px 20px !important;
    margin-top: 10px !important;
  }
  .swiper-slide,
  .swiper-slide-active{ min-height: 300px !important; }

  .slide-cat-entry{ margin-bottom: 16px !important; }

  .store-footer__inner{
    padding: 20px 10px !important;
    text-align: center !important;
  }

  .full-banner-entry img,
  .full-banner-entry{
    height: auto !important;
    max-height: 300px !important;
    object-fit: cover;
  }
  .full-banner-entry .flex.items-center.justify-center{
    padding-top: 1rem !important;
    padding-bottom: 2rem !important;
  }
  .full-banner-entry::before{ display: none !important; }
}

/* ========== Accessibility & Motion ========== */
.header .main-nav li > a:focus-visible,
.s-product-card-entry .salla-button:focus-visible,
.brand-item a:focus-visible{
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce){
  *{
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}