.sf-home-bestsellers-v1 {
  --sf-bestsellers-accent: var(--swefood-main-color, #ea580c);
  --sf-bestsellers-text: #f8fafc;
  --sf-bestsellers-muted: #a8b1c0;
  --sf-bestsellers-border: rgba(148, 163, 184, 0.2);
  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: #fb923c;
  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: #fdba74;
  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: #09121f;
  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: rgba(251, 146, 60, 0.42);
  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: #0d1827;
  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: #66758a;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 48%),
    radial-gradient(circle at 75% 22%, rgba(251, 146, 60, 0.09), transparent 34%),
    #0d1827;
}

.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 rgba(251, 146, 60, 0.52);
  border-radius: 999px;
  color: #fdba74;
  background: rgba(5, 11, 19, 0.78);
  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: #fb923c;
  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: #fb923c;
  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: #fff;
  background: linear-gradient(135deg, var(--sf-bestsellers-accent), #ff8a24);
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.23);
  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: #fff;
  box-shadow: 0 13px 29px rgba(234, 88, 12, 0.32);
  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 rgba(255, 150, 70, 0.92);
  outline-offset: 3px;
}

body.sf-theme-light .sf-home-bestsellers-v1 {
  --sf-bestsellers-text: #111827;
  --sf-bestsellers-muted: #64748b;
  --sf-bestsellers-border: rgba(100, 116, 139, 0.2);
}

body.sf-theme-light .sf-home-product-card {
  background: #fffaf5;
  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, rgba(255, 255, 255, 0.75), transparent 48%),
    radial-gradient(circle at 75% 22%, rgba(249, 115, 22, 0.12), transparent 34%),
    #eadfd3;
}

body.sf-theme-light .sf-home-product-card__placeholder {
  color: #8b7564;
}

@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: rgba(251, 146, 60, 0.48) 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;
  }
}
