/* =========================================================
   TOP CAR - Smooth Hover Animation
   كروت المنتجات + قسم تصفح حسب التصنيفات
========================================================= */

:root {
  --tc-hover-lift: -6px;
  --tc-hover-scale: 1.03;
  --tc-hover-shadow:
    0 10px 24px rgba(9, 35, 51, 0.08),
    0 3px 10px rgba(9, 35, 51, 0.05);
  --tc-hover-border: rgba(55, 187, 253, 0.16);
  --tc-hover-duration: 0.55s;
  --tc-hover-ease: cubic-bezier(0.25, 0.9, 0.3, 1);
  --tc-shine-duration: 1.1s;
  --tc-radius: 18px;
}

/* =========================================
   كروت المنتجات
========================================= */
.tc-hover-card,
.s-product-card-entry,
.s-product-card-vertical,
.best-offers .s-product-card-entry,
salla-products-slider .s-product-card-entry {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform, box-shadow;
  border: 1px solid transparent;
  transition:
    transform var(--tc-hover-duration) var(--tc-hover-ease),
    box-shadow var(--tc-hover-duration) var(--tc-hover-ease),
    border-color var(--tc-hover-duration) var(--tc-hover-ease),
    background-color var(--tc-hover-duration) var(--tc-hover-ease);
}

.tc-hover-card .s-product-card-image,
.s-product-card-entry .s-product-card-image,
.s-product-card-vertical .s-product-card-image {
  position: relative;
  overflow: hidden;
  border-radius: inherit;
}

.tc-hover-card .s-product-card-image img,
.tc-hover-card .s-product-card-image-cover,
.s-product-card-entry .s-product-card-image img,
.s-product-card-entry .s-product-card-image-cover,
.s-product-card-vertical .s-product-card-image img,
.s-product-card-vertical .s-product-card-image-cover {
  transform: scale(1.001);
  will-change: transform;
  transition:
    transform 0.7s var(--tc-hover-ease),
    filter 0.45s ease,
    opacity 0.35s ease;
}

.tc-hover-card::before,
.s-product-card-entry::before,
.s-product-card-vertical::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-130%);
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 35%,
    rgba(255, 255, 255, 0.12) 45%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0.10) 55%,
    transparent 70%,
    transparent 100%
  );
}

.tc-hover-card .s-product-card-image::after,
.s-product-card-entry .s-product-card-image::after,
.s-product-card-vertical .s-product-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--tc-hover-duration) ease;
  background: linear-gradient(
    to top,
    rgba(9, 35, 51, 0.06),
    rgba(9, 35, 51, 0) 50%
  );
}

.tc-hover-card .s-product-card-content-title,
.tc-hover-card .s-product-card-price,
.tc-hover-card .s-product-card-footer,
.tc-hover-card .s-product-card-wishlist-btn,
.s-product-card-entry .s-product-card-content-title,
.s-product-card-entry .s-product-card-price,
.s-product-card-entry .s-product-card-footer,
.s-product-card-entry .s-product-card-wishlist-btn,
.s-product-card-vertical .s-product-card-content-title,
.s-product-card-vertical .s-product-card-price,
.s-product-card-vertical .s-product-card-footer,
.s-product-card-vertical .s-product-card-wishlist-btn {
  transition:
    transform 0.35s var(--tc-hover-ease),
    opacity 0.35s ease,
    color 0.35s ease,
    background-color 0.35s ease;
}

.tc-hover-card:hover,
.tc-hover-card:focus-within,
.s-product-card-entry:hover,
.s-product-card-entry:focus-within,
.s-product-card-vertical:hover,
.s-product-card-vertical:focus-within {
  z-index: 10;
  transform: translateY(var(--tc-hover-lift));
  box-shadow: var(--tc-hover-shadow);
  border-color: var(--tc-hover-border);
}

.tc-hover-card:hover .s-product-card-image img,
.tc-hover-card:hover .s-product-card-image-cover,
.tc-hover-card:focus-within .s-product-card-image img,
.tc-hover-card:focus-within .s-product-card-image-cover,
.s-product-card-entry:hover .s-product-card-image img,
.s-product-card-entry:hover .s-product-card-image-cover,
.s-product-card-entry:focus-within .s-product-card-image img,
.s-product-card-entry:focus-within .s-product-card-image-cover,
.s-product-card-vertical:hover .s-product-card-image img,
.s-product-card-vertical:hover .s-product-card-image-cover,
.s-product-card-vertical:focus-within .s-product-card-image img,
.s-product-card-vertical:focus-within .s-product-card-image-cover {
  transform: scale(var(--tc-hover-scale));
  filter: saturate(1.03) contrast(1.02);
}

.tc-hover-card:hover .s-product-card-image::after,
.tc-hover-card:focus-within .s-product-card-image::after,
.s-product-card-entry:hover .s-product-card-image::after,
.s-product-card-entry:focus-within .s-product-card-image::after,
.s-product-card-vertical:hover .s-product-card-image::after,
.s-product-card-vertical:focus-within .s-product-card-image::after {
  opacity: 1;
}

.tc-hover-card:hover::before,
.tc-hover-card:focus-within::before,
.s-product-card-entry:hover::before,
.s-product-card-entry:focus-within::before,
.s-product-card-vertical:hover::before,
.s-product-card-vertical:focus-within::before {
  opacity: 1;
  animation: tcShine var(--tc-shine-duration) var(--tc-hover-ease) 1;
}

.tc-hover-card:hover .s-product-card-content-title,
.tc-hover-card:hover .s-product-card-price,
.tc-hover-card:hover .s-product-card-footer,
.tc-hover-card:focus-within .s-product-card-content-title,
.tc-hover-card:focus-within .s-product-card-price,
.tc-hover-card:focus-within .s-product-card-footer,
.s-product-card-entry:hover .s-product-card-content-title,
.s-product-card-entry:hover .s-product-card-price,
.s-product-card-entry:hover .s-product-card-footer,
.s-product-card-entry:focus-within .s-product-card-content-title,
.s-product-card-entry:focus-within .s-product-card-price,
.s-product-card-entry:focus-within .s-product-card-footer,
.s-product-card-vertical:hover .s-product-card-content-title,
.s-product-card-vertical:hover .s-product-card-price,
.s-product-card-vertical:hover .s-product-card-footer,
.s-product-card-vertical:focus-within .s-product-card-content-title,
.s-product-card-vertical:focus-within .s-product-card-price,
.s-product-card-vertical:focus-within .s-product-card-footer {
  transform: translateY(-2px);
}

.tc-hover-card:hover button,
.tc-hover-card:hover .btn,
.s-product-card-entry:hover button,
.s-product-card-entry:hover .btn,
.s-product-card-vertical:hover button,
.s-product-card-vertical:hover .btn {
  transform: translateY(-1px);
  transition:
    transform 0.3s var(--tc-hover-ease),
    box-shadow 0.3s ease,
    background-color 0.3s ease;
}

/* =========================================
   قسم تصفح حسب التصنيفات
========================================= */
#squares-1,
#squares-1 .swiper,
#squares-1 .swiper-wrapper,
#squares-1 .swiper-slide,
salla-products-slider,
.best-offers,
.swiper,
.swiper-wrapper,
.swiper-slide {
  overflow: visible !important;
}

.swiper-slide .s-product-card-entry,
.swiper-slide .s-product-card-vertical {
  margin-top: 10px;
  margin-bottom: 14px;
}

#squares-1 .swiper-slide {
  padding-top: 8px;
  padding-bottom: 12px;
}

#squares-1 .banner-square {
  position: relative;
  overflow: visible;
}

#squares-1 .banner-square > div {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid transparent;
  border-radius: var(--tc-radius);
  transform: translateZ(0);
  backface-visibility: hidden;
  transition:
    transform var(--tc-hover-duration) var(--tc-hover-ease),
    box-shadow var(--tc-hover-duration) var(--tc-hover-ease),
    border-color var(--tc-hover-duration) ease,
    background-color 0.45s ease;
}

#squares-1 .banner-square .box-img {
  position: relative;
  overflow: hidden;
  border-radius: var(--tc-radius);
}

#squares-1 .banner-square .box-img img {
  display: block;
  width: 100%;
  transform: scale(1);
  will-change: transform;
  transition:
    transform 0.8s var(--tc-hover-ease),
    filter 0.5s ease,
    opacity 0.4s ease;
}

#squares-1 .banner-square > div::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-140%);
  border-radius: var(--tc-radius);
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.10) 48%,
    rgba(255, 255, 255, 0.24) 50%,
    rgba(255, 255, 255, 0.08) 52%,
    transparent 65%,
    transparent 100%
  );
}

#squares-1 .banner-square .box-img::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  border-radius: var(--tc-radius);
  transition: opacity 0.45s ease;
  background: linear-gradient(
    to top,
    rgba(9, 35, 51, 0.08),
    rgba(9, 35, 51, 0.02) 45%,
    rgba(9, 35, 51, 0) 75%
  );
}

#squares-1 .banner-square h3,
#squares-1 .banner-square p {
  transition:
    transform 0.45s var(--tc-hover-ease),
    color 0.35s ease,
    opacity 0.35s ease;
}

#squares-1 .banner-square:hover > div,
#squares-1 .banner-square:focus-within > div {
  transform: translateY(-5px);
  box-shadow:
    0 10px 22px rgba(9, 35, 51, 0.08),
    0 2px 8px rgba(9, 35, 51, 0.04);
  border-color: rgba(55, 187, 253, 0.14);
}

#squares-1 .banner-square:hover .box-img img,
#squares-1 .banner-square:focus-within .box-img img {
  transform: scale(1.04);
  filter: saturate(1.02) contrast(1.01);
}

#squares-1 .banner-square:hover .box-img::after,
#squares-1 .banner-square:focus-within .box-img::after {
  opacity: 1;
}

#squares-1 .banner-square:hover > div::before,
#squares-1 .banner-square:focus-within > div::before {
  opacity: 1;
  animation: tcSquareShine 1.15s var(--tc-hover-ease) 1;
}

#squares-1 .banner-square:hover h3,
#squares-1 .banner-square:focus-within h3 {
  transform: translateY(-2px);
}

#squares-1 .banner-square:hover p,
#squares-1 .banner-square:focus-within p {
  transform: translateY(-1px);
}

/* =========================================
   الموبايل وتقليل الحركة
========================================= */
@media (hover: none) {
  .tc-hover-card:hover,
  .s-product-card-entry:hover,
  .s-product-card-vertical:hover,
  #squares-1 .banner-square:hover > div {
    transform: none;
    box-shadow: none;
  }

  .tc-hover-card:hover::before,
  .s-product-card-entry:hover::before,
  .s-product-card-vertical:hover::before,
  #squares-1 .banner-square:hover > div::before {
    opacity: 0;
    animation: none;
  }

  .tc-hover-card:hover .s-product-card-image img,
  .tc-hover-card:hover .s-product-card-image-cover,
  .s-product-card-entry:hover .s-product-card-image img,
  .s-product-card-entry:hover .s-product-card-image-cover,
  .s-product-card-vertical:hover .s-product-card-image img,
  .s-product-card-vertical:hover .s-product-card-image-cover,
  #squares-1 .banner-square:hover .box-img img {
    transform: none;
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tc-hover-card,
  .tc-hover-card *,
  .s-product-card-entry,
  .s-product-card-entry *,
  .s-product-card-vertical,
  .s-product-card-vertical *,
  #squares-1 .banner-square,
  #squares-1 .banner-square *,
  #squares-1 .banner-square > div::before,
  #squares-1 .banner-square .box-img::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* =========================================
   Keyframes
========================================= */
@keyframes tcShine {
  0% {
    transform: translateX(-130%);
  }
  100% {
    transform: translateX(130%);
  }
}

@keyframes tcSquareShine {
  0% {
    transform: translateX(-140%);
  }
  100% {
    transform: translateX(140%);
  }
}