.sf-home-bestsellers-v1 {
  --sf-bestsellers-accent:var(--sf-brand);
  --sf-bestsellers-text:var(--sf-text);
  --sf-bestsellers-muted:var(--sf-muted);
  --sf-bestsellers-border:var(--sf-border);
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding-block: clamp(3.2rem, 5.6vw, 5.7rem);
  color: var(--sf-bestsellers-text);
  background: transparent;
}

.sf-home-bestsellers-v1,
.sf-home-bestsellers-v1 *,
.sf-home-bestsellers-v1 *::before,
.sf-home-bestsellers-v1 *::after {
  box-sizing: border-box;
}

.sf-home-bestsellers-v1__inner {
  width: min(1480px, calc(100% - 72px));
  max-width: 100%;
  margin-inline: auto;
}

.sf-home-bestsellers-v1__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(1.7rem, 2.6vw, 2.4rem);
}

.sf-home-bestsellers-v1__header h2 {
  margin: 0;
  color: var(--sf-bestsellers-text);
  font-family: inherit;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 780;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.sf-home-bestsellers-v1__header p {
  margin: 0.75rem 0 0;
  color: var(--sf-bestsellers-muted);
  font-size: clamp(0.98rem, 1.3vw, 1.18rem);
  line-height: 1.5;
}

.sf-home-bestsellers-v1__all {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 8px;
  color:var(--sf-brand);
  font-size: 0.96rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease;
}

.sf-home-bestsellers-v1__all svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sf-home-bestsellers-v1__all:hover {
  color:var(--sf-brand);
  transform: translateX(2px);
}

.sf-home-bestsellers-v1__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 1.5vw, 1.35rem);
}

.sf-home-product-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--sf-bestsellers-border);
  border-radius: 20px;
  background:var(--sf-surface);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.14);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  flex-direction: column;
}

.sf-home-product-card:hover {
  border-color:color-mix(in srgb, var(--sf-brand) 42%, transparent);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px);
}

.sf-home-product-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.08 / 1;
  overflow: hidden;
  padding: 0;
  color: inherit;
  background:var(--sf-surface);
  text-decoration: none;
}

.sf-home-product-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
}

.sf-home-product-card:hover .sf-home-product-card__image {
  transform: scale(1.035);
}

.sf-home-product-card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color:var(--sf-muted);
  background:linear-gradient(135deg, color-mix(in srgb, var(--sf-surface) 3.5%, transparent), transparent 48%),
    radial-gradient(circle at 75% 22%, color-mix(in srgb, var(--sf-brand) 9%, transparent), transparent 34%),
    var(--sf-surface);
}

.sf-home-product-card__placeholder svg {
  width: 4.3rem;
  height: 4.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sf-home-product-card__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  max-width: calc(100% - 2rem);
  padding: 0.42rem 0.7rem;
  border:1px solid color-mix(in srgb, var(--sf-brand) 52%, transparent);
  border-radius: 999px;
  color:var(--sf-brand);
  background:color-mix(in srgb, var(--sf-surface) 78%, transparent);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1;
}

.sf-home-product-card__badge svg {
  width: 0.92rem;
  height: 0.92rem;
  flex: 0 0 auto;
  fill: currentColor;
  stroke: none;
}

.sf-home-product-card__body {
  display: flex;
  flex: 1 1 auto;
  min-height: 198px;
  padding: clamp(1.1rem, 1.45vw, 1.4rem);
  flex-direction: column;
}

.sf-home-product-card__copy h3 {
  margin: 0;
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.sf-home-product-card__copy h3 a {
  padding: 0;
  color: var(--sf-bestsellers-text);
  text-decoration: none;
}

.sf-home-product-card__copy p {
  display: -webkit-box;
  min-height: 2.7em;
  overflow: hidden;
  margin: 0.55rem 0 0;
  color: var(--sf-bestsellers-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sf-home-product-card__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem;
  margin-top: auto;
  padding-top: 1.2rem;
}

.sf-home-product-card__meta {
  display: grid;
  min-width: 0;
  gap: 0.45rem;
}

.sf-home-product-card__price {
  position: relative;
  color: var(--sf-bestsellers-text);
  font-size: 1.05rem;
  font-weight: 780;
  line-height: 1.2;
}

.sf-home-product-card__price .screen-reader-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.sf-home-product-card__price del {
  color: var(--sf-bestsellers-muted);
  font-size: 0.78em;
  font-weight: 550;
  opacity: 0.75;
}

.sf-home-product-card__price ins {
  color:var(--sf-brand);
  text-decoration: none;
}

.sf-home-product-card__rating {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--sf-bestsellers-muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.sf-home-product-card__rating svg {
  width: 0.92rem;
  height: 0.92rem;
  fill: none;
  stroke:var(--sf-brand);
  stroke-width: 1.9;
  stroke-linejoin: round;
}

.sf-home-product-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  min-height: 44px;
  margin: 0;
  padding: 0.7rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 13px;
  color:var(--sf-brand-contrast);
  background:var(--sf-brand);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--sf-brand) 23.0%, transparent);
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.sf-home-product-card__cta:hover {
  color:var(--sf-brand-hover-contrast);
  box-shadow: 0 13px 29px color-mix(in srgb, var(--sf-brand) 32.0%, transparent);
  transform: translateY(-1px);
}

.sf-home-product-card__cta.is-disabled {
  border-color: var(--sf-bestsellers-border);
  color: var(--sf-bestsellers-muted);
  background: transparent;
  box-shadow: none;
  cursor: not-allowed;
}

.sf-home-bestsellers-v1 a:focus-visible,
.sf-home-product-card__cta:focus-visible {
  outline:3px solid color-mix(in srgb, var(--sf-focus-ring) 92%, transparent);
  outline-offset: 3px;
}

body.sf-theme-light .sf-home-bestsellers-v1 {
  --sf-bestsellers-text:var(--sf-text);
  --sf-bestsellers-muted:var(--sf-muted);
  --sf-bestsellers-border:var(--sf-border);
}

body.sf-theme-light .sf-home-product-card {
  background:var(--sf-surface);
  box-shadow: 0 16px 38px rgba(67, 48, 33, 0.1);
}

body.sf-theme-light .sf-home-product-card__media,
body.sf-theme-light .sf-home-product-card__placeholder {
  background:linear-gradient(135deg, color-mix(in srgb, var(--sf-surface) 75%, transparent), transparent 48%),
    radial-gradient(circle at 75% 22%, color-mix(in srgb, var(--sf-brand) 12%, transparent), transparent 34%),
    var(--sf-surface);
}

body.sf-theme-light .sf-home-product-card__placeholder {
  color:var(--sf-muted);
}

@media (max-width: 1180px) {
  .sf-home-bestsellers-v1__inner {
    width: min(1480px, calc(100% - 48px));
  }
}

@media (max-width: 1100px) {
  .sf-home-bestsellers-v1__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .sf-home-bestsellers-v1 {
    padding-block: 3rem 3.5rem;
  }

  .sf-home-bestsellers-v1__inner {
    width: calc(100% - 32px);
  }

  .sf-home-bestsellers-v1__header {
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.45rem;
  }

  .sf-home-bestsellers-v1__header h2 {
    font-size: 1.8rem;
  }

  .sf-home-bestsellers-v1__header p {
    max-width: 240px;
    margin-top: 0.55rem;
    font-size: 0.9rem;
  }

  .sf-home-bestsellers-v1__all {
    max-width: 102px;
    font-size: 0.82rem;
    text-align: right;
  }

  .sf-home-bestsellers-v1__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    margin-inline: -16px;
    padding-inline: 16px;
    padding-bottom: 0.65rem;
    scrollbar-width: thin;
    scrollbar-color:color-mix(in srgb, var(--sf-brand) 48.0%, transparent) transparent;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
  }

  .sf-home-bestsellers-v1__grid {
    display: flex;
    width: max-content;
    padding-right: 16px;
  }

  .sf-home-product-card {
    width: min(82vw, 330px);
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .sf-home-product-card__body {
    min-height: 190px;
  }
}

@media (max-width: 370px) {
  .sf-home-bestsellers-v1__inner {
    width: calc(100% - 24px);
  }

  .sf-home-bestsellers-v1__viewport {
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .sf-home-product-card {
    width: 82vw;
  }

  .sf-home-product-card__footer {
    gap: 0.6rem;
  }

  .sf-home-product-card__cta {
    min-width: 101px;
    padding-inline: 0.75rem;
    font-size: 0.84rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sf-home-bestsellers-v1__all,
  .sf-home-product-card,
  .sf-home-product-card__image,
  .sf-home-product-card__cta {
    scroll-behavior: auto;
    transition-duration: 0.01ms !important;
  }
}
