/* ===== Full Salla Store Dark Mode ===== */

/* Dark Mode */
body.dark-mode {
  background-color: #121212 !important;
  color: #16b73c !important;
}
.s-product-card-sale-price h4{
color: #16b73c !important;
}
/*
.s-product-card-promotion-title {
  position: absolute;
  top: 17px;
  right: -60px;
  transform: rotate(45deg);
  background: #991b1b !important;
  color: #fff !important;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 80px;
  min-width: 140px;
  line-height: 1.2rem;
  text-align: center;
  z-index: 10;
  border-radius: 0 !important;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
  white-space: nowrap;
}
*/

/* PopUp Animation for Counter */
@keyframes popUp {
  0% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.count-anim {
  display: inline-block;
  animation: popUp 0.4s ease;
}

/* Star Entry Shine */
@keyframes starShine {
  0%   { transform: scale(0.3) rotate(-20deg); opacity: 0; fill: #ffe066; }
  50%  { transform: scale(1.4) rotate(10deg); opacity: 1; fill: #ffd700; }
  100% { transform: scale(1) rotate(0); opacity: 1; fill: #fbbf24; }
}

/* Continuous Pulse */
@keyframes starPulse {
  0%, 100% { transform: scale(1); fill: #fbbf24; }
  50%      { transform: scale(1.2); fill: #ffd700; }
}

/* Apply to all stars */
.s-rating-stars-btn-star {
  display: inline-block;
  opacity: 1;
  animation: starShine 0.6s ease forwards;
}

/* Stagger animation for each star */
.s-rating-stars-btn-star:nth-child(1) { animation-delay: 0s; }
.s-rating-stars-btn-star:nth-child(2) { animation-delay: 0.2s; }
.s-rating-stars-btn-star:nth-child(3) { animation-delay: 0.4s; }
.s-rating-stars-btn-star:nth-child(4) { animation-delay: 0.6s; }
.s-rating-stars-btn-star:nth-child(5) { animation-delay: 0.8s; }

/* Stars pulse for 5 seconds only */
.s-rating-stars-btn-star.shine {
  animation: starPulse 1.5s ease-in-out 5;
}

/* Star without movement */
.sicon-star2 {
  transition: all 0.3s ease;
}

/* Hover effect on product card */
.s-product-card-entry:hover .sicon-star2 {
  animation: blinkStar 1s infinite alternate;
  color: #ffd700;
}

/* Blink animation */
@keyframes blinkStar {
  from {
    opacity: 0.5;
    text-shadow: 0 0 5px #ffd700;
  }
  to {
    opacity: 1;
    text-shadow: 0 0 20px #fff176;
  }
}

/* Header and Footer */
body.dark-mode .store-header,
body.dark-mode .top-navbar,
body.dark-mode .main-nav-container,
body.dark-mode .store-footer {
  background-color: #1c1c1c !important;
  color: #ffffff !important;
  border-color: #2c2c2c !important;
}

/* Cards and Elements */
body.dark-mode .product-item,
body.dark-mode .card,
body.dark-mode .s-product-card,
body.dark-mode .product-card,
body.dark-mode .s-product-card-content,
body.dark-mode .s-product-card-entry,
body.dark-mode .s-product-card-image,
body.dark-mode .s-reviews-testimonial,
body.dark-mode .s-comments-product,
body.dark-mode .sub-menu,
body.dark-mode .s-user-settings-section-deactivate-user,
body.dark-mode .s-user-settings-section,
body.dark-mode .s-orders-table-tbody-tr,
body.dark-mode .s-orders-table-head,
body.dark-mode .product-entry,
body.dark-mode .btn--collapse,
body.dark-mode .s-user-menu-dropdown-list,
body.dark-mode .s-user-menu-dropdown {
  background-color: #1a1a1a !important;
  border: 1px solid #333 !important;
  color: #ffffff !important;
  border-radius: 8px !important;
}

/* General Areas */
body.dark-mode nav,
body.dark-mode .bg-white,
body.dark-mode .profile-header,
body.dark-mode .gradient-bg,
body.dark-mode .s-quantity-input-input {
  background-color: #121212 !important;
  color: #ffffff !important;
}

/* Buttons */
body.dark-mode .s-user-menu-trigger,
body.dark-mode .s-button-element {
  background-color: #121212 !important;
}
body.dark-mode button.header-btn {
  border: none !important;
  background-color: none !important;
}

body.dark-mode .btn,
body.dark-mode .add-to-cart,
body.dark-mode .btn-cart,
body.dark-mode .salla-button,
body.dark-mode .form-input {
  background-color: #2c2c2c !important;
  color: #ffffff !important;
  border: 1px solid #444 !important;
  transition: all 0.3s ease;
}
body.dark-mode button:hover,
body.dark-mode .btn:hover,
body.dark-mode .add-to-cart:hover,
body.dark-mode .btn-cart:hover,
body.dark-mode .salla-button:hover {
  background-color: #3a3a3a !important;
}

/* Headings and Text */
body.dark-mode .product-title,
body.dark-mode .card-title,
body.dark-mode .banner__title,
body.dark-mode .s-block__title h2,
body.dark-mode h3,
body.dark-mode .s-cart-summary-total,
body.dark-mode .text-gray-800,
body.dark-mode b,
body.dark-mode strong,
body.dark-mode .s-user-profile-field-label,
body.dark-mode .s-user-settings-section-title,
body.dark-mode p,
body.dark-mode span,
body.dark-mode .banner__description {
  color: rgb(255 255 255) !important;
}
body.dark-mode strong {
  background-color: #121212 !important;
}

body.dark-mode .s-modal-entering {
  background-color: rgba(255, 255, 255, 0.8) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 20px rgba(33, 33, 77, 0.6) !important;
}

body.dark-mode button {
  background-color: rgba(0, 0, 0, 0.1) !important;
}

/* Prices */
body.dark-mode .price,
body.dark-mode .product-price {
  color: #ff4d4d !important;
}
body.dark-mode .old-price,
body.dark-mode del {
  color: #999 !important;
}

/* Search */
body.dark-mode .header-search input,
body.dark-mode .salla-search input {
  background-color: #2c2c2c !important;
  color: #fff !important;
}

/* Links */
body.dark-mode a {
  color: #bbb !important;
}
body.dark-mode a:hover {
  color: #ffffff !important;
}

/* Reviews */
body.dark-mode .s-reviews-container {
  background-color: #1a1a1a !important;
  color: #f1f1f1 !important;
  border: 1px solid #333 !important;
  border-radius: 8px !important;
  padding: 15px !important;
}
body.dark-mode .s-reviews-container h3,
body.dark-mode .s-reviews-container p,
body.dark-mode .s-reviews-container span {
  color: #ffffff !important;
}
body.dark-mode .s-reviews-container .rating,
body.dark-mode .s-reviews-container .sicon-star {
  color: #ffcc00 !important;
}

/* Banners */
.banner-entry {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  transform: perspective(1000px) rotateX(0) rotateY(0);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.banner-entry:hover {
  transform: perspective(1000px) rotateX(4deg) rotateY(-4deg);
  box-shadow: 0 12px 25px rgba(0,0,0,0.35);
}
.banner-entry::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
  transform: skewX(-25deg);
  opacity: 0;
}
.banner-entry:hover::after {
  opacity: 1;
  animation: shine 0.8s ease forwards;
}
@keyframes shine {
  from { left: -75%; }
  to   { left: 125%; }
}

/* Product Cards */
.s-product-card-entry {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  transform: perspective(1000px) rotateX(0) rotateY(0);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.s-product-card-entry:hover {
  transform: perspective(1000px) rotateX(3deg) rotateY(-3deg);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.s-product-card-entry::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  transform: skewX(-25deg);
  opacity: 0;
}
.s-product-card-entry:hover::after {
  opacity: 1;
  animation: shineCard 0.8s ease forwards;
}
@keyframes shineCard {
  from { left: -75%; }
  to   { left: 125%; }
}

/* Reviews/Comments */
.s-reviews-container .s-reviews-testimonial {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
}
.s-reviews-container .swiper-slide-active .s-reviews-testimonial {
  animation: reviewEnter 0.8s ease forwards;
}
@keyframes reviewEnter {
  0%   { opacity: 0; transform: translateY(40px) scale(0.95); }
  60%  { opacity: 1; transform: translateY(-10px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Dark Mode Toggle Button */
#darkModeToggle {
  background: #2c2c2c;
  color: #fff;
  border: 1px solid #444;
  border-radius: 50%;
  width: 45px; height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  bottom: 20px;
  left: 20px;
  cursor: pointer;
  font-size: 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
  z-index: 999999;
  transition: transform 0.4s ease, background 0.3s ease;
}
#darkModeToggle.spin {
  transform: rotate(360deg);
}
#darkModeToggle:hover {
  transform: scale(1.15) rotate(10deg);
  background: #444;
}

/* Loader */
body.no-scroll { overflow: hidden !important; }
.loader-init {
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #0f1115 !important;
  z-index: 100000 !important;
  transition: opacity .6s ease, visibility .6s ease !important;
}
.loader-init::before {
  content: "";
  position: absolute;
  width: 140px; height: 140px;
  border: 3px solid #2a2a2a;
  border-top-color: #bdbdbd;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.loader-init::after {
  content: "";
  position: absolute;
  width: 110px; height: 110px;
  background: url("https://cdn.salla.sa/dgyEz/IdDlD211Zg6CvJdVKh5G7P09Dz48BcWdnNWgSeiq.png") center/contain no-repeat;
  animation: pulse 1.6s ease-in-out infinite;
}
.loader-init--hidden {
  opacity: 0 !important;
  visibility: hidden !important;
}
@keyframes spin { from{transform:rotate(0deg);} to{transform:rotate(360deg);} }
@keyframes pulse {
  0%{ transform: scale(1); opacity: 1; }
  50%{ transform: scale(1.08); opacity: .82; }
  100%{ transform: scale(1); opacity: 1; }
}

/* Ad Bar Container */
.s-advertisement {
  overflow: hidden !important;
  position: relative !important;
  height: 40px;
  line-height: 40px;
  background: #111;
  color: #fff;
}

/* Moving Content */
.s-advertisement-content {
  display: inline-block;
  white-space: nowrap;
  position: absolute;
  will-change: transform;
  animation: adsMove 12s linear infinite;
}

/* Ad Movement */
@keyframes adsMove {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}
.s-advertisement-action {
  display: none !important;
}