/* ================================
   SALE CAROUSEL (Shortcode widget)
   Clean + reliable layout
==================================*/

/* Reset just inside widget */
.sale-carousel,
.sale-carousel * {
  box-sizing: border-box;
}

.sale-carousel{
  --sale-primary:   #333;
  --sale-secondary: var(--e-global-color-secondary, #e2498a);
  --sale-text:      var(--e-global-color-text, #6D8989);
  --sale-accent:    var(--e-global-color-accent, var(--sale-primary));
  --sale-muted:     var(--e-global-color-text, #777);
  --sale-border:    rgba(0,0,0,.06);
}

/* Track handles layout (more stable than display:contents) */
.sale-carousel__track{
  display:flex;
  flex-wrap:wrap;
  gap:22px;
  align-items:stretch;
}

/* 3 across desktop */
.sale-carousel__track .sale-carousel__col{
  flex:0 0 calc((100% - (22px * 2)) / 3);
  max-width:calc((100% - (22px * 2)) / 3);
  display:flex;
  width:auto !important;
}

/* 1 across mobile */
@media (max-width:767px){
  .sale-carousel__track .sale-carousel__col{
    flex-basis:100%;
    max-width:100%;
  }
}

/* ================================
   Card + content
==================================*/
.sale-carousel .sale-product.sale-product--classic{
  display:flex !important;
  flex-direction:column !important;
  justify-content:center;
  padding:45px 40px !important;
  border-radius:8px !important;
  background:#dae6e6 !important;
  box-shadow:0 0 16px 4px rgba(0,0,0,0.10);
}

.sale-carousel .sale-product__img{
  position:relative;
  text-align:center;
  transition:all .35s ease !important;
}

.sale-carousel .sale-product:hover .sale-product__img{
  transform:translateY(-4px);
}

.sale-carousel .sale-product__feature-img img{
  width:100% !important;
  height:auto !important;
  object-fit:cover;
  aspect-ratio:1/1;
  max-height:300px;

  border-radius:4px !important;
  border:1px dotted #00000005;
  box-shadow:0 0 10px 4px rgba(0,0,0,0.10);
  transition:all .35s ease !important;
}

/* Title + clamp */
.sale-carousel .sale-product__title{
  font-size:1rem !important;
  font-weight:600;
}

.sale-carousel .sale-product__title > a{
  color:var(--sale-text) !important;
  text-decoration:none;

  overflow:hidden;
  text-overflow:ellipsis;
  display:-webkit-box;
  -webkit-line-clamp:1;
  -webkit-box-orient:vertical;
}

.sale-carousel .sale-product__title > a:hover{
  color:#130F0F !important;
}

/* Category */
.sale-carousel .sale-product__category{
  padding-top:15px;
  font-size:.75rem;
  font-weight:400;
}

.sale-carousel .sale-product__category a{
  color:var(--sale-muted) !important;
  text-decoration:none;
}

.sale-carousel .sale-product__category a:hover{
  color:var(--sale-primary) !important;
}

/* Button */
.sale-carousel .sale-product__atc-btn{
  top:-12px !important;
}

.sale-carousel .sale-product__atc-btn a.button{
  border:2px solid var(--sale-border) !important;
  background:#fff !important;
  color:var(--sale-text) !important;
  border-radius:3px !important;
  box-shadow:none !important;
  transition:all .3s ease !important;
}

.sale-carousel .sale-product__atc-btn a.button:hover{
  border-color:var(--sale-primary) !important;
  background:var(--sale-primary) !important;
  color:#fff !important;
}

.sale-carousel .sale-product__atc-btn a.button i{
  color:inherit !important;
}

/* ================================
   Badges (stacked)
==================================*/
.sale-carousel .sale-badges{
  position:absolute;
  top:12px;
  left:12px;
  right:auto;

  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:flex-start;

  pointer-events:none;
  z-index:5;
}

.sale-carousel .sale-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:8px 12px;
  border-radius:4px;

  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  font-size:.7rem;
  line-height:1;

  color:#fff;
  background:#d61010cc; /* sale default */
  box-shadow:0 2px 8px rgba(50,50,50,.35);
  white-space:nowrap;
}

.sale-carousel .sale-badge--giclee{
  background:#14a8c8 !important;
  font-size:.63rem;
}

.sale-carousel .sale-badge--sale{
  background:#d60000 !important;
}

/* ================================
   Responsive tweaks
==================================*/
@media (max-width:1100px){
  .sale-carousel .sale-product.sale-product--classic{ padding:25px 25px !important; }

  .sale-carousel .sale-product__atc-btn{ top:-18px !important; }
}

@media (max-width:1024px){
  .sale-carousel .sale-product__category,
  .sale-carousel .sale-product__title{
    display:block;
    text-align:left;
    padding:0;
    margin:0;
    transform:translateX(0);
  }

  .sale-carousel .sale-product__category{ padding-top:8px; }

  .sale-carousel .sale-product__price{
    display:flex;
    padding:8px 0;
    justify-content:center;
  }

  .sale-carousel .sale-product__atc-btn a.button{
    text-wrap:nowrap;
    letter-spacing:-.15px;
  }

  .sale-carousel .sale-product.sale-product--classic{
    padding:22px 22px 10px !important;
    border-radius:6px !important;
    box-shadow:0 0 10px 4px rgba(0,0,0,0.08);
  }

  .sale-carousel .sale-product:hover .sale-product__feature-img img{ transform:translateY(-3px); }

  .sale-carousel .sale-badges{
    top:8px;
    left:8px;
    gap:4px;
  }

  .sale-carousel .sale-badge{
    padding:6px 8px;
    font-weight:600;
    font-size:.65rem;
  }
}

.sale-product__atc-btn .button i {
  margin-right: 6px;
  font-size: 0.9em;
}

@media (max-width:767px){
  .sale-carousel .sale-product.sale-product--classic{
    padding:28px 30px 16px !important;
    box-shadow:0 0 8px 4px rgba(0,0,0,0.06);
  }


  .sale-carousel .sale-product__category,
  .sale-carousel .sale-product__title,
  .sale-carousel .sale-product__price{
    display:flex;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:0;
    margin:0;
    transform:translateX(0);
  }

  .sale-carousel .sale-product__category{ padding-top:8px; }
  .sale-carousel .sale-product__price{ padding:8px 0; }

  .sale-carousel .sale-badges{ gap:3px; }
}



.sale-carousel .sale-product__img{ position:relative; }

.sale-carousel .sale-badges{
  position:absolute;
  top:12px;
  left:12px;
  right:12px;
  display:flex;
  flex-direction: column;
  gap:8px;
  text-align: center;
  align-items:flex-start;
  pointer-events:none;
  z-index:5;
}

.sale-carousel .sale-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:4px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  font-size:.7rem;
  line-height:1;
  color:#fff;
  background:#d61010CC!important;
  box-shadow:0 2px 8px rgba(50,50,50,.35);
  white-space:nowrap;
}

.sale-carousel .sale-badge--giclee{ background:#14a8c8!important; font-size:.63rem; }
.sale-carousel .sale-badge--sale{ background:#d60000!important; }

/* --- SALE CAROUSEL: mobile-first horizontal swipe --- */
.sale-carousel {
  width: 100%;
  overflow: hidden; /* hides any accidental overflow */
}

.sale-carousel__track {
  display: flex !important;
  flex-wrap: nowrap !important;   /* prevents stacking */
  gap: 16px;

  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;

  scroll-snap-type: x mandatory;
  scroll-padding-left: 16px;

  padding: 0 16px 12px; /* a little breathing room + space for scrollbar */
}


/* Each slide */
.sale-carousel__col {
  flex: 0 0 calc(100% - 32px) !important; /* 1 full card on mobile */
  max-width: calc(100% - 32px) !important;
  width: clamp(220px, 25vw, 320px); /* optional responsive sizing */
  scroll-snap-align: start;
}

/* Elementor containers sometimes inject min-width / stretching */
.sale-carousel__col.e-con {
  min-width: 0 !important;
}

/* Optional: hide scrollbar (still scrollable) */
.sale-carousel__track::-webkit-scrollbar { height: 0; }
.sale-carousel__track { scrollbar-width: none; }

/* --- Tablet: 2 cards --- */
@media (min-width: 768px) {
  .sale-carousel__col {
    flex-basis: calc(50% - 16px) !important;
    max-width: calc(50% - 16px) !important;
  }
}

/* --- Desktop: 3 cards (adjust if you want 4) --- */
@media (min-width: 1024px) {
  .sale-carousel__col {
    flex-basis: calc(33.333% - 16px) !important;
    max-width: calc(33.333% - 16px) !important;
  }
}
.sale-product__img {
  aspect-ratio: inherit;
}
.sale-product__img img {
  aspect-ratio: 1/1;
  object-fit: cover;
}



.sale-carousel.is-loading .sale-carousel__track {
  opacity: 0;
  pointer-events: none;
}

.sale-carousel.is-ready .sale-carousel__track {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 240ms ease;
}
.sale-carousel.is-loading { min-height: 220px; } /* tweak */





/* --- Allow card shadows to render outside without being clipped --- */
/* Let shadows show */
.sale-carousel {
  overflow: visible !important; /* was hidden */
}

/* Track should scroll horizontally, but not clip vertically */
.sale-carousel__track {
  overflow-x: auto !important;
  overflow-y: visible !important; /* key */
  padding: 24px 24px 16px !important; /* more breathing room for shadow */
}

/* Each slide also must not clip its contents */
.sale-carousel__col,
.sale-carousel__col.e-con,
.sale-carousel__col.e-child {
  overflow: visible !important;
}

/* The card itself: give it a little margin so shadow isn't tight */
.sale-carousel .sale-product.sale-product--classic {
  margin: 6px 0 !important;
}
