
.fmcs-wrap{
  position: relative;
  padding: 18px 10px;
  border-radius: 16px;
  overflow: hidden;
  direction: rtl;
  --fmcs-img-h: 160px;
  --fmcs-icon-offset: 8px;
  --fmcs-icon-radius: 999px;
  --fmcs-card-w: 340px;
}

.fmcs-empty{
  padding: 16px;
  border: 1px dashed rgba(0,0,0,.15);
  border-radius: 12px;
  background: rgba(255,255,255,.6);
  font-size: 14px;
}

.fmcs-swiper{
  --fmcs-gap: 18px;
}

/* Ensure swipe works even if Swiper base CSS isn't loaded by the theme */
.fmcs-swiper.swiper,
.fmcs-swiper .swiper-wrapper{
  touch-action: pan-y;
  -ms-touch-action: pan-y;
}

.fmcs-swiper .swiper-slide{
  -webkit-user-select: none;
  user-select: none;
}

.fmcs-swiper .swiper-wrapper{
  align-items: stretch;
}

.fmcs-slide{
  width: var(--fmcs-card-w, 340px) !important;
  padding: 0;
}

.fmcs-swiper .swiper-slide{
  margin-left: var(--fmcs-gap);
}

.fmcs-row{
  display: flex;
  justify-content: center;
  gap: var(--fmcs-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
}
.fmcs-row .fmcs-slide{ scroll-snap-align: start; }

.fmcs-card{
  position: relative;
  height: 100%;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* removed bottom shadow so everything stays crisp */
  box-shadow: none;
  border: 1px solid rgba(0,0,0,.08);
}

.fmcs-img{
  position: relative;
  height: 160px; /* overwritten by control */
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}
.fmcs-img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform .5s ease;
}

/* Shine effect on image hover */
.fmcs-img::after{
  content: "";
  position: absolute;
  top: -40%;
  left: -60%;
  width: 50%;
  height: 180%;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 45%, rgba(255,255,255,0) 80%);
  transform: rotate(12deg);
  opacity: 0;
  transition: opacity .2s ease, left .6s ease;
  pointer-events: none;
}
.fmcs-card:hover .fmcs-img img{
  transform: scale(1.05);
}
.fmcs-card:hover .fmcs-img::after{
  opacity: 1;
  left: 120%;
}

.fmcs-icon{
  position: absolute;
  left: 50%;
  top: var(--fmcs-img-h, 160px); /* aligns with image bottom; adjusted via translate */
  transform: translate(-50%, -50%) translateY(var(--fmcs-icon-offset, 8px));
  width: 72px; /* overwritten by control */
  height: 72px;
  background: #fff;
  border-radius: var(--fmcs-icon-radius, 999px);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 25px rgba(0,0,0,.10), 0 0 0 6px rgba(255,122,0,.14), 0 0 22px rgba(255,122,0,.22);
  z-index: 3;
  transition: box-shadow .25s ease, transform .25s ease;
}

.fmcs-card:hover .fmcs-icon{
  box-shadow: 0 10px 25px rgba(0,0,0,.10), 0 0 0 8px rgba(255,122,0,.16), 0 0 30px rgba(255,122,0,.28);
}

.fmcs-icon img{
  width: 34px; /* overwritten by control */
  height: 34px;
  object-fit: contain;
  display: block;
}

.fmcs-body{
  padding: 26px 18px 14px;
  text-align: center;
}
.fmcs-title{
  margin: 8px 0 8px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  color: #111827;
}
.fmcs-desc{
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.65;
}

.fmcs-btnbar{
  margin-top: auto;
  padding: 12px 14px;
  background: transparent;
  border-top: 1px solid rgba(0,0,0,.06);
  text-align: center;
  transition: background .25s ease;
}
.fmcs-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(17,24,39,.04);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.fmcs-btn:hover{
  transform: translateY(-1px);
  background: rgba(17,24,39,.06);
  border-color: rgba(17,24,39,.14);
}
.fmcs-btn .fmcs-btn-ic{
  font-size: 14px;
  line-height: 1;
}

.fmcs-btn-disabled{
  opacity: .7;
  cursor: default;
}

.fmcs-slide.fmcs-active .fmcs-btnbar{
  background: #f59e0b;
  border-top-color: rgba(255,255,255,.0);
}
.fmcs-slide.fmcs-active .fmcs-btn{
  color: #fff;
  background: transparent;
  border-color: rgba(255,255,255,.35);
}
.fmcs-slide.fmcs-active .fmcs-btn-disabled{
  color: #fff;
  opacity: .95;
}

/* Better mobile spacing */
@media (max-width: 767px){
  .fmcs-wrap{
    padding: 14px 6px;
  }
  .fmcs-body{
    padding: 24px 14px 12px;
  }
  .fmcs-title{
    font-size: 16px;
  }
  .fmcs-desc{
    font-size: 12.5px;
  }
}


/* Center the whole carousel area */
.fmcs-swiper{ margin-left:auto; margin-right:auto; }
