/* ============================================================
   SB Premium Product Slider  v3
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --sb-radius    : 16px;
  --sb-img-ratio : 75%;
  --sb-ink       : #151515;
  --sb-muted     : #888;
  --sb-surface   : #fff;
  /* --sb-ground    : #f7f4f0; */
  --sb-ground    : #ffffff;
  --sb-line      : #e8e3dd;
  --sb-gold      : #c8a96e;
  --sb-red       : #b83232;
  --sb-green     : #1a6b4a;
  --sb-ease      : 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --sb-serif     : 'Cormorant Garamond', Georgia, serif;
  --sb-sans      : 'DM Sans', system-ui, sans-serif;
}

/* ── Section — position:relative so arrows can anchor to it ── */
.sb-slider-section {
  position: relative;
  font-family: var(--sb-sans);
  /* horizontal padding makes room so arrows don't overlap slides */
  /* padding: 0 54px 52px; */
}

/* ── Swiper ────────────────────────────────────────────────── */
.sb-product-slider {
  overflow: hidden;
}

.sb-product-slider .swiper-wrapper {
  align-items: stretch;
}

.sb-product-slider .swiper-slide {
  height: auto;
  display: flex;
}

/* ── Card ──────────────────────────────────────────────────── */
.sb-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--sb-surface);
  border-radius: var(--sb-radius);
  border: 1px solid var(--sb-line);
  overflow: hidden;
  transition: transform var(--sb-ease), box-shadow var(--sb-ease);
}

.sb-product-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 2px 8px  rgba(0,0,0,.04),
    0 14px 36px rgba(0,0,0,.10);
}

/* ── Badge ─────────────────────────────────────────────────── */
.sb-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  padding: 5px 11px 4px;
  border-radius: 40px;
  line-height: 1;
  pointer-events: none;
}

.sb-badge--sale { background: var(--sb-red);   color: #fff; }
.sb-badge--new  { background: var(--sb-green); color: #fff; }

/* ── Image ─────────────────────────────────────────────────── */
.sb-card-image {
  display: block;
  position: relative;
  width: 100%;
  padding-top: var(--sb-img-ratio);   /* 4:3 locked ratio */
  background: var(--sb-ground);
  overflow: hidden;
  flex-shrink: 0;
  text-decoration: none;
}

.sb-card-image img,
.sb-card-image .woocommerce-placeholder {
  position: absolute !important;
  margin: 0 auto;
  inset: 0;
  /* width: 100%  !important; */
  width: auto;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  transition: transform var(--sb-ease);
}

.sb-product-card:hover .sb-card-image img {
  transform: scale(1.05);
}

/* ── Card body ─────────────────────────────────────────────── */
.sb-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
  gap: 5px;
}

.sb-card-cat {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--sb-muted);
  margin: 0;
}

.sb-card-title {
  font-family: var(--sb-serif);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--sb-ink);
  margin: 0;
  min-height: 2.6em;          /* lock height so footers align */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sb-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--sb-ease);
}

.sb-card-title a:hover { color: #555; }

/* Stars */
.sb-card-rating {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sb-stars {
  position: relative;
  display: inline-block;
  font-size: 13px;
  letter-spacing: 2px;
  line-height: 1;
  color: #ddd;
  user-select: none;
}

.sb-stars-fill {
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: var(--sb-gold);
  white-space: nowrap;
}

.sb-card-reviews {
  font-size: 11px;
  color: #bbb;
}

/* Footer */
.sb-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--sb-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Price ─────────────────────────────────────────────────── */
.sb-price .price {
  font-family: var(--sb-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--sb-ink);
  line-height: 1;
}

.sb-price .price del {
  font-size: 13px;
  font-weight: 400;
  color: #bbb;
  display: block;
  line-height: 1.5;
}

.sb-price .price ins {
  text-decoration: none;
  color: var(--sb-red);
}

/* ── Add-to-cart ───────────────────────────────────────────── */
.sb-product-card .button,
.sb-product-card a.button,
.sb-product-card .add_to_cart_button,
.sb-product-card .single_add_to_cart_button {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sb-sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--sb-ink);
  background: transparent;
  border: 1.5px solid var(--sb-ink);
  border-radius: 40px;
  padding: 9px 17px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
  transition:
    background var(--sb-ease),
    color     var(--sb-ease),
    transform .14s;
}

.sb-product-card .button:hover,
.sb-product-card a.button:hover,
.sb-product-card .add_to_cart_button:hover {
  background: var(--sb-ink);
  color: #fff;
  transform: translateY(-1px);
}

.sb-product-card .button:active,
.sb-product-card a.button:active {
  transform: translateY(0) scale(.97);
}

/* added / loading states */
.sb-product-card .added,
.sb-product-card a.added {
  background: var(--sb-green) !important;
  border-color: var(--sb-green) !important;
  color: #fff !important;
}

.sb-product-card .loading {
  opacity: .65;
  pointer-events: none;
}

/* ── Arrows — absolutely centred on the left/right edges ────── */
.sb-nav-btn {
  position: absolute;
  top: 50%;
  /* vertically centred over the slider, not the whole section;
     subtract half the pagination height (≈26px) from the translation */
  transform: translateY(calc(-50% - 26px));
  z-index: 20;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--sb-line);
  background: var(--sb-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--sb-ink);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  transition:
    background var(--sb-ease),
    border-color var(--sb-ease),
    transform .14s,
    box-shadow var(--sb-ease);
}

.sb-nav-prev { left: -4.5%; }
.sb-nav-next { right: -4.5%; }

.sb-nav-btn svg {
  width: 17px;
  height: 17px;
  pointer-events: none;
  display: block;
}

.sb-nav-btn:hover {
  background: var(--sb-ink);
  border-color: var(--sb-ink);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  transform: translateY(calc(-50% - 26px)) scale(1.07);
}

.sb-nav-btn:active {
  transform: translateY(calc(-50% - 26px)) scale(.95);
}

.sb-nav-btn:disabled {
  opacity: .3;
  pointer-events: none;
}

/* ── Pagination — centred below slider ──────────────────────── */
.sb-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-top: 22px;
  /* Swiper overrides position:absolute — undo it */
  position: static !important;
  width: 100%  !important;
  bottom: auto !important;
  left:   auto !important;
}

.sb-pagination .swiper-pagination-bullet {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ccc;
  opacity: 1;
  margin: 0 !important;
  flex-shrink: 0;
  cursor: pointer;
  transition:
    width       var(--sb-ease),
    border-radius var(--sb-ease),
    background  var(--sb-ease);
}

.sb-pagination .swiper-pagination-bullet-active {
  width: 28px;
  border-radius: 4px;
  background: var(--sb-ink);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sb-slider-section { 
	padding: 0 44px 48px; 
  }
}

@media (max-width: 640px) {
  .sb-slider-section   { 
	/* padding: 0 36px 44px;  */
	padding: 0; 
	height: 46%;
  }
  .sb-nav-btn          { width: 36px; height: 36px; }
  .sb-nav-btn svg      { width: 15px; height: 15px; }
  .sb-card-title       { font-size: 17px; }
  .sb-price .price     { font-size: 19px; }
}