.slider-page-wrap {
  margin: 0 auto;
  background: #f1f1f1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.slider-container {
  height: 35rem;
  width: 100vw;
  max-width: 1200px;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  position: relative;
  margin-top: 2rem;
}

.slider-title{
  position: absolute;
  top: 0;
  font-family: 'Papyrus', Fantasy;
  font-size: 20px;
}

.left-arrow,
.right-arrow {
  height: 100%;
  width: 10%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.slider-content {
  height: 100%;
  width: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  overflow: hidden;
  position: relative;
  perspective: 100px;
}
.slider-content-background {
  height: 100%;
  width: 102%;
  position: absolute;
  top: 0;
  left: -1%;
  background: linear-gradient(
    to left,
    #f1f1f1,
    transparent,
    transparent,
    transparent,
    #f1f1f1
  );
  z-index: 3;
}
.slider-content .slide {
  position: absolute;
  left: 50%;
  height: 24rem;
  max-height: 400px;
  width: 14rem;
  min-width: 270px;
  background: #999;
/*   border: 1px solid; */ 
  border-radius: 25px;
  left: 50%;
  z-index: 0;
/*   opacity: 0; */
  transform: translate(-50%, 0) rotateY(0deg) scale(1,1);
  transform-style: preserve-3d;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out, left 0.5s ease-in-out,
    z-index 0s 0.25s ease-in-out, box-shadow 0.5s ease-in-out, filter 0.5s ease-in-out;
}

.slide.position-1 {
  left: 20% !important;
  z-index: 1 !important;
  transform: translate(-50%, 0) rotateY(-2deg) scale(0.8, 0.8) !important;
  opacity: 1 !important;
  box-shadow: 0px 0.4rem 1.6rem rgba(0, 0, 0, 0.1) !important;
  filter: blur(5px);
  
}
.slide.position-2 {
  left: 35% !important;
  z-index: 2 !important;
  transform: translate(-50%, 0) rotateY(-1deg) scale(0.9, 0.9) !important;
  opacity: 1 !important;
  box-shadow: 0px 0.4rem 1.6rem rgba(0, 0, 0, 0.3) !important;
  filter: blur(2px);
  
  
}
.slide.position-3 {
  left: 50% !important;
  z-index: 4 !important;
  transform: translate(-50%, 0) rotateY(0deg) scale(1, 1) !important;
  opacity: 1 !important;
  box-shadow: 0px 0.4rem 1.6rem rgba(0, 0, 0, 0.5) !important;
  cursor: pointer;
  filter: blur(0px);
}
.slide.position-3:hover {
  /*box-shadow: 0px 0rem 1.8rem rgba(0, 0, 0, 0.7) !important;*/
  transform: translate(-50%, 0) rotateY(0deg) scale(1.05, 1.05) !important;
}
.slide.position-4 {
  left: 65% !important;
  z-index: 2 !important;
  transform: translate(-50%, 0) rotateY(1deg) scale(0.9, 0.9) !important;
  opacity: 1 !important;
  box-shadow: 0px 0.4rem 1.6rem rgba(0, 0, 0, 0.3) !important;
  filter: blur(2px);
  
/*   animation: center-animation 1s 1s linear 1 forwards; */
}
/* @keyframes center-animation{ */
/*   0%{
    left: 70% !important;
    transform: translate(-50%, 0) rotateY(1deg) scale(0.9, 0.9) !important;
  }
  50%{
    left: 75% !important;
    transform: translate(-50%, 0) rotateY(-2deg) scale(1.1, 1.1) !important;
  }
  100%{
    left: 50% !important;
    transform: translate(-50%, 0) rotateY(0deg) scale(1, 1) !important;
  }
} */
.slide.position-5 {
  left: 80% !important;
  z-index: 1 !important;
  transform: translate(-50%, 0) rotateY(2deg) scale(0.8, 0.8) !important;
  opacity: 1 !important;
  box-shadow: 0px 0.4rem 1.6rem rgba(0, 0, 0, 0.1) !important;
  filter: blur(5px);
  
  
}

.slide.position-none{
   left: 50%;
  z-index: 0;
  transform: translate(-50%, 0) rotateY(0deg) scale(0.7, 0.7);
  opacity: 1;
  box-shadow: 0px 0.4rem 1.6rem rgba(0, 0, 0, 0);
}

.slider-container i{
  width: 3rem;
  height: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: 50%;
}
.slider-container .left-arrow:hover i, .slider-container .right-arrow:hover i{
  background: rgba(22,22,220,0.1);
  color: #fff;
}


.slider-content .slide .card-sections .upper-section, .slider-content .slide .card-button{
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.slider-content .slide.position-3 .card-sections .upper-section, .slider-content .slide.position-3 .card-button{
  opacity: 1;
  transition: opacity 0.6s ease-in-out;
}

.slide > *{
  color: white;
  font-family: 'Inter';
  font-size: 90%;
  letter-spacing: -0.001em;
}

.media, .card-sections{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 25px;
  overflow: hidden;
}
.media{
  display: flex;
  align-items: center;
  justify-content: center;
}

.media img{
  position: absolute;
  height: 30rem;
}

.card-sections{
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.upper-section{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.lower-section{
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-sections .lower-section .card-button{
  border: 0.5px solid #fff;
  width: 35%;
  padding: 0.5rem;
  border-radius: 2rem;
  font-size: 60%;
  text-align: center;
  background: rgba(0,0,0,0.3);
}
.upper-section .wishlist, .upper-section .cart{
  background: rgba(0,0,0,0.3);
  border-radius: 50%;
  transition: color 0.2s ease-in-out, background 0.2s ease-in-out ;
}
.upper-section .cart:hover{
  color: rgb(252, 163, 60);
  background: rgba(0,0,0,0.4);
} 
.upper-section .wishlist:hover{
  color: rgb(244, 129, 129);
  background: rgba(0,0,0,0.4);
}

@media screen and (max-width:620px){
.slide.position-1, .slide.position-5 {
  opacity: 0.5 !important;
  }
  .slide.position-2, .slide.position-4 {
  opacity: 0.95 !important;
}
} 
  
@media screen and (max-width: 445px){
  
  .slide.position-1, .slide.position-5 {
  opacity: 0 !important;
  }
.slide.position-2, .slide.position-4 {
  opacity: 0.5 !important;
}
}
@media screen and (max-width: 415px){
  .slide{
    opacity: 0 !important;
    box-shadow: none !important;
  }
  .slide.position-3{
    box-shadow: none !important;
    opacity: 1 !important;
  }
  .slide.position-1, .slide.position-2 {
    left: -50% !important;
    transform: translate(-50%, 0) rotateY(0deg) scale(0.7, 0.7) !important;
  }
  .slide.position-4, .slide.position-5 {
    left: 150% !important;
    transform: translate(-50%, 0) rotateY(0deg) scale(0.7, 0.7) !important;
  }
}

/* ========================================================= */
/* گرید تصاویر کوچک تو خودِ صفحه (قبل از باز شدن لایت‌باکس)     */
/* ========================================================= */
.is-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  width: 100%;
}
.is-thumb-item {
  cursor: zoom-in;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: block;
  position: relative;
}
.is-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.is-thumb-item:hover img {
  transform: scale(1.06);
}

/* ========================================================= */
/* حالت تمام‌صفحه (لایت‌باکس) با پس‌زمینه‌ی تیره و محو          */
/* ========================================================= */
.is-slider-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: transparent;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.is-slider-overlay.active {
  display: block;
}

/* اسلایدر داخل حالت تمام‌صفحه، تمام عرض و ارتفاع صفحه رو می‌گیره */
.is-slider-overlay .slider-container {
  height: 100vh;
  width: 100vw;
  max-width: none;
  margin-top: 0;
}
.is-slider-overlay .slider-content {
  width: 90%;
  perspective: 300px;
}
.is-slider-overlay .slider-content-background {
  background: transparent;
}

/* تصاویر با اندازه‌ی فول و واقعی نمایش داده بشن، نه کارت کوچیک */
.is-slider-overlay .slide {
  height: 85vh;
  max-height: none;
  width: 60vw;
  min-width: unset;
  background: transparent;
  box-shadow: none !important;
}
.is-slider-overlay .slide .media {
  border-radius: 12px;
}
.is-slider-overlay .slide .media img {
  position: static;
  height: auto;
  width: auto;
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
}

.is-slider-overlay .left-arrow i,
.is-slider-overlay .right-arrow i {
  color: #fff;
  background: rgba(0, 0, 0, .35);
}

/* دکمه‌ی بستن لایت‌باکس */
.is-slider-close {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 100001;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #a6a6a6;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.is-slider-close:hover {
  background: rgba(22, 22, 220, 0.1)
}

@media screen and (max-width: 600px) {
  .is-slider-overlay .slide {
    width: 92vw;
    height: 70vh;
  }
  .is-slider-overlay .slide .media img {
    max-height: 70vh;
  }
  .is-slider-close {
    top: 12px;
    left: 12px;
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1.2rem;
  }
}
