/* ============================================================
   STACY BEST SELLERS / PRODUCT CAROUSEL
   Slider shell only. Product cards come from the approved Shop CSS.
   ============================================================ */
.stacy-best-sellers,
.stacy-best-sellers *{box-sizing:border-box}

.stacy-best-sellers{
  --stacy-best-cream:#f4f0eb;
  --stacy-best-brown:#806854;
  --stacy-best-ink:#2c2524;
  width:100%;
  max-width:100%;
  margin:var(--stacy-best-desktop-margin-top,0) var(--stacy-best-desktop-margin-right,0) var(--stacy-best-desktop-margin-bottom,0) var(--stacy-best-desktop-margin-left,0);
  padding:var(--stacy-best-desktop-padding-top,112px) var(--stacy-best-desktop-padding-right,0) var(--stacy-best-desktop-padding-bottom,122px) var(--stacy-best-desktop-padding-left,0);
  overflow:hidden;
  background:var(--stacy-best-cream);
  color:var(--stacy-best-ink);
  font-family:"Hanken Grotesk",Arial,sans-serif;
  line-height:1.5;
}

/* shop.css deliberately zeroes .stshop page padding for archive pages; this
   shortcode is not an archive, so restore only this section's own spacing. */
.stacy-best-sellers.stshop{
  left:auto!important;
  transform:none!important;
  margin:var(--stacy-best-desktop-margin-top,0) var(--stacy-best-desktop-margin-right,0) var(--stacy-best-desktop-margin-bottom,0) var(--stacy-best-desktop-margin-left,0)!important;
  padding:var(--stacy-best-desktop-padding-top,112px) var(--stacy-best-desktop-padding-right,0) var(--stacy-best-desktop-padding-bottom,122px) var(--stacy-best-desktop-padding-left,0)!important;
}

.stacy-best-container{
  width:min(calc(100% - 48px),1440px);
  margin-inline:auto;
}

.stacy-best-header{
  margin-bottom:48px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}

.stacy-best-heading{
  max-width:1120px;
  display:flex;
  flex-direction:column;
  align-items:center;
}

.stacy-best-eyebrow{
  margin:0 0 17px;
  color:var(--stacy-best-brown);
  font-size:11px;
  line-height:1.4;
  font-weight:700;
  letter-spacing:.18em;
  text-transform:uppercase;
}

.stacy-best-heading h2{
  max-width:1040px;
  margin:0;
  color:var(--stacy-best-ink);
  font-family:"Castoro",Georgia,serif;
  font-size:clamp(42px,3.9vw,58px);
  font-weight:400;
  line-height:1.08;
  letter-spacing:-.045em;
}

.stacy-best-heading h2 em{
  color:var(--stacy-best-brown);
  font-weight:400;
  font-style:italic;
}

.stacy-best-subtext{
  max-width:790px;
  margin:24px auto 0;
  color:#665850;
  font-size:17px;
  line-height:1.7;
}

.stacy-best-carousel{width:100%;min-width:0}

/* Keep the Shop grid class so all approved Shop-card CSS continues to apply,
   then turn only this particular grid into a horizontal slider. */
.stacy-best-sellers .stacy-best-track.stshop-grid{
  width:100%;
  padding:0 0 10px;
  display:flex!important;
  grid-template-columns:none!important;
  align-items:stretch!important;
  gap:18px!important;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-inline:contain;
  scroll-behavior:smooth;
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}

.stacy-best-sellers .stacy-best-track::-webkit-scrollbar{display:none}

/* Five visible cards on desktop, using the exact .stshop-card component. */
.stacy-best-sellers .stacy-best-track > .stshop-card{
  flex:0 0 calc((100% - 72px) / 5)!important;
  width:auto!important;
  max-width:none!important;
  height:auto!important;
  scroll-snap-align:start;
  scroll-snap-stop:normal;
}

.stacy-best-sellers .stacy-best-track:focus-visible,
.stacy-best-sellers .stacy-best-dot:focus-visible{
  outline:2px solid var(--stacy-best-brown);
  outline-offset:4px;
}

.stacy-best-empty{
  flex:0 0 100%;
  width:100%;
  padding:34px 20px;
  text-align:center;
}

.stacy-best-empty h3{margin:0 0 8px}
.stacy-best-empty p{margin:0;color:#665850}

.stacy-best-dots{
  min-height:10px;
  margin:36px auto 0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  max-width:100%;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}

.stacy-best-dots::-webkit-scrollbar{display:none}

.stacy-best-dot{
  flex:0 0 auto;
  width:9px;
  min-width:9px;
  height:9px;
  padding:0!important;
  border:1px solid rgba(128,104,84,.72)!important;
  border-radius:999px!important;
  background:transparent!important;
  box-shadow:none!important;
  color:transparent!important;
  cursor:pointer;
  transition:width .24s ease,background-color .24s ease,border-color .24s ease;
}

.stacy-best-dot:hover,
.stacy-best-dot.is-active{
  border-color:var(--stacy-best-brown)!important;
  background:var(--stacy-best-brown)!important;
}

.stacy-best-dot.is-active{width:25px;min-width:25px}

@media(max-width:1100px){
  .stacy-best-sellers .stacy-best-track > .stshop-card{
    flex-basis:calc((100% - 36px) / 3)!important;
  }
}

@media(max-width:780px){
  .stacy-best-sellers.stshop{margin:var(--stacy-best-tablet-margin-top,0) var(--stacy-best-tablet-margin-right,0) var(--stacy-best-tablet-margin-bottom,0) var(--stacy-best-tablet-margin-left,0)!important;padding:var(--stacy-best-tablet-padding-top,82px) var(--stacy-best-tablet-padding-right,0) var(--stacy-best-tablet-padding-bottom,90px) var(--stacy-best-tablet-padding-left,0)!important}
  .stacy-best-container{width:calc(100% - 36px)}
  .stacy-best-header{margin-bottom:37px}
  .stacy-best-sellers .stacy-best-track > .stshop-card{
    flex-basis:calc((100% - 18px) / 2)!important;
  }
}

@media(max-width:520px){
  .stacy-best-sellers.stshop{margin:var(--stacy-best-mobile-margin-top,0) var(--stacy-best-mobile-margin-right,0) var(--stacy-best-mobile-margin-bottom,0) var(--stacy-best-mobile-margin-left,0)!important;padding:var(--stacy-best-mobile-padding-top,66px) var(--stacy-best-mobile-padding-right,0) var(--stacy-best-mobile-padding-bottom,72px) var(--stacy-best-mobile-padding-left,0)!important}
  .stacy-best-heading h2{font-size:clamp(36px,10.5vw,46px)}
  .stacy-best-subtext{font-size:15px;line-height:1.65}
  /* Keep exactly two current Shop cards visible on small mobile. */
  .stacy-best-sellers .stacy-best-track > .stshop-card{
    flex-basis:calc((100% - 18px) / 2)!important;
  }

  /* Slider pagination stays centered below the cards. */
  .stacy-best-dots{
    margin-top:30px;
    justify-content:center!important;
    padding-inline:0;
  }
}

@media(prefers-reduced-motion:reduce){
  .stacy-best-sellers *,
  .stacy-best-sellers *::before,
  .stacy-best-sellers *::after{
    scroll-behavior:auto!important;
    transition:none!important;
    animation:none!important;
  }
}


/* ============================================================
   v2.5 — MOBILE TWO-CARD + CENTERED PAGINATION HARD LOCK
   Keep the approved Shop card component unchanged; only the
   Best Sellers carousel sizing/pagination is locked on mobile.
============================================================ */
@media(max-width:520px){
  .stacy-best-sellers .stacy-best-track.stshop-grid{
    display:flex!important;
    flex-wrap:nowrap!important;
    gap:18px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
  }

  .stacy-best-sellers .stacy-best-track.stshop-grid > .stshop-card{
    flex:0 0 calc((100% - 18px) / 2)!important;
    width:calc((100% - 18px) / 2)!important;
    min-width:calc((100% - 18px) / 2)!important;
    max-width:calc((100% - 18px) / 2)!important;
  }

  .stacy-best-sellers .stacy-best-dots{
    width:max-content!important;
    max-width:100%!important;
    min-width:0!important;
    margin:30px auto 0!important;
    padding:0!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:center!important;
    gap:9px!important;
    overflow:visible!important;
  }
}
