.sw-deals {
  --sw-accent: #111;
  --sw-bg: #fff;
  --sw-text: #111;
  --sw-radius: 8px;
  --sw-soft: color-mix(in srgb, var(--sw-accent) 30%, transparent);
  --sw-muted: color-mix(in srgb, var(--sw-text) 70%, transparent);
  margin-block: 16px;
  color: var(--sw-text);
  font-size: 16px;
  line-height: 1.4;
}

.sw-deals *,
.sw-sticky * {
  box-sizing: border-box;
}

.sw-deals__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-block-end: 10px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.sw-deals__head::before,
.sw-deals__head::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--sw-soft);
}

.sw-deals__timer {
  margin-block-end: 10px;
  padding: 8px 12px;
  border-radius: var(--sw-radius);
  background: color-mix(in srgb, var(--sw-accent) 10%, var(--sw-bg));
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.sw-deals__list {
  display: grid;
  gap: var(--sw-gap, 10px);
}

/* A bar: tinted with a hairline while idle, plain with a 2px accent ring once chosen. */
.sw-tier {
  position: relative;
  border-radius: var(--sw-radius);
  background: color-mix(in srgb, var(--sw-text) 7%, var(--sw-bg));
  box-shadow: inset 0 0 0 1px var(--sw-border, var(--sw-soft));
  transition: box-shadow 0.15s, background-color 0.15s;
}

.sw-tier.is-selected {
  background: var(--sw-sel-bg, var(--sw-bg));
  box-shadow: inset 0 0 0 2px var(--sw-accent);
}

.sw-tier__row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 17px 20px;
  cursor: pointer;
}

.sw-tier__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sw-tier__radio {
  flex: none;
  width: 20px;
  height: 20px;
  border: 3px solid var(--sw-bg);
  border-radius: 50%;
  background: var(--sw-bg);
  box-shadow: 0 0 0 2px var(--sw-soft);
}

.sw-tier.is-selected .sw-tier__radio {
  background: var(--sw-accent);
  box-shadow: 0 0 0 2px var(--sw-accent);
}

.sw-tier__input:focus-visible + .sw-tier__radio {
  outline: 2px solid var(--sw-accent);
  outline-offset: 4px;
}

.sw-tier__main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sw-tier__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  color: var(--sw-title, inherit);
  font-size: var(--sw-title-size, 20px);
  font-weight: 700;
  line-height: 1.4;
}

.sw-tier__save {
  padding: 4px 8px;
  border-radius: var(--sw-radius);
  background: var(--sw-label-bg, color-mix(in srgb, var(--sw-text) 10%, transparent));
  color: var(--sw-label-text, var(--sw-text));
  font-size: var(--sw-label-size, 12px);
  font-weight: 400;
  line-height: 1.4;
}

.sw-tier__sub {
  color: var(--sw-sub, var(--sw-muted));
  font-size: var(--sw-sub-size, 14px);
}

.sw-tier__price {
  display: grid;
  justify-items: end;
  white-space: nowrap;
}

.sw-tier__price b {
  color: var(--sw-price, inherit);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.sw-tier__price s {
  color: var(--sw-was, var(--sw-muted));
  font-size: 14px;
}

.sw-tier__price s:empty {
  display: none;
}

/* ---------- badges ---------- */

.sw-tier__badge {
  position: absolute;
  inset-block-start: -11px;
  inset-inline-start: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--sw-badge-bg, var(--sw-accent));
  color: var(--sw-badge-text, var(--sw-bg));
  font-size: 12px;
  font-weight: 700;
}

/* A tab hanging over the bar's top edge, with two folded corners behind it. */
.sw-tier__badge--ribbon {
  inset-block-start: -8px;
  inset-inline-start: auto;
  right: 16px;
  padding: 6px 8px;
  border-radius: 0 0 5px 5px;
  line-height: 1;
}

.sw-tier__badge--ribbon::before,
.sw-tier__badge--ribbon::after {
  content: '';
  position: absolute;
  top: 0;
  border-bottom: 8px solid color-mix(in srgb, var(--sw-badge-bg, var(--sw-accent)) 65%, #000);
}

.sw-tier__badge--ribbon::before {
  right: 100%;
  border-left: 8px solid transparent;
}

.sw-tier__badge--ribbon::after {
  left: 100%;
  border-right: 8px solid transparent;
}

/* Room above the card so the sticker sits on the corner without covering the title. */
.sw-tier--sticker {
  margin-block-start: 18px;
}

.sw-tier__badge--sticker {
  inset-block-start: -26px;
  inset-inline-start: -10px;
  inset-inline-end: auto;
  z-index: 1;
  max-width: 88px;
  padding: 9px 14px;
  border-radius: 58% 42% 55% 45% / 52% 46% 54% 48%;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 13px;
  font-style: italic;
  line-height: 1.05;
  text-align: center;
  transform: rotate(-8deg);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.sw-tier__badge--sticker::before,
.sw-tier__badge--sticker::after {
  content: '\2726';
  position: absolute;
  font-style: normal;
  line-height: 1;
}

.sw-tier__badge--sticker::before {
  inset-block-start: 5px;
  inset-inline-end: 9px;
  font-size: 11px;
}

.sw-tier__badge--sticker::after {
  inset-block-end: 6px;
  inset-inline-start: 8px;
  font-size: 8px;
}

/* ---------- per-unit variant pickers and gift, inside the chosen bar ---------- */

.sw-tier__extra {
  display: none;
  gap: 7px;
  margin-block-start: -10px;
  padding: 0 20px 14px;
}

.sw-tier__extra.is-open {
  display: grid;
}

.sw-unit-names {
  color: var(--sw-sub, var(--sw-muted));
  font-size: 12px;
}

.sw-unit {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.sw-unit__num {
  flex: none;
  min-width: 20px;
  font-size: 12px;
}

.sw-unit__selects {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.sw-unit__field {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}

.sw-unit__dot {
  flex: none;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 50%;
}

.sw-unit__field .sw-unit__dot {
  position: absolute;
  inset-block-start: 9px;
  inset-inline-start: 8px;
  pointer-events: none;
}

.sw-deals .sw-unit__select,
.sw-unit__static {
  width: auto;
  max-width: 100%;
  height: 34px;
  min-height: 0;
  margin: 0;
  padding: 7px 25px 7px 8px;
  border: 0;
  border-radius: 4px;
  outline: 0;
  background: #fff
    url("data:image/svg+xml;utf8,<svg width='10' height='4' viewBox='0 0 10 4' xmlns='http://www.w3.org/2000/svg'><path d='M5 4L0.67 0.25h8.66L5 4Z' fill='black'/></svg>")
    no-repeat right 9px center;
  box-shadow: inset 0 0 0 1px var(--sw-soft);
  color: #000;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.sw-deals--rtl .sw-unit__select {
  padding: 7px 8px 7px 25px;
  background-position: left 9px center;
}

.sw-deals .sw-unit__select:focus-visible {
  box-shadow: inset 0 0 0 2px var(--sw-accent);
}

.sw-unit__field--dot .sw-unit__select {
  padding-inline-start: 30px;
}

.sw-unit__static {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  background-image: none;
  cursor: default;
}

.sw-gift {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px dashed var(--sw-accent);
  border-radius: calc(var(--sw-radius) * 0.6);
  font-size: 13px;
}

.sw-gift img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
}

.sw-gift__label {
  color: var(--sw-accent);
  font-weight: 700;
}

.sw-deals__error {
  margin-block-start: 10px;
  color: #b42318;
  font-size: 13px;
}

/* ---------- other layouts ---------- */

.sw-deals--horizontal .sw-deals__list,
.sw-deals--grid .sw-deals__list {
  margin-block-start: 22px;
}

.sw-deals--horizontal .sw-deals__list {
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}

.sw-deals--grid .sw-deals__list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sw-deals--horizontal .sw-tier__row,
.sw-deals--grid .sw-tier__row {
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  height: 100%;
  padding: 22px 8px 14px;
  text-align: center;
}

.sw-deals--horizontal .sw-tier__radio,
.sw-deals--grid .sw-tier__radio {
  display: none;
}

.sw-deals--horizontal .sw-tier__title,
.sw-deals--grid .sw-tier__title {
  justify-content: center;
  font-size: var(--sw-title-size, 16px);
}

.sw-deals--horizontal .sw-tier__price,
.sw-deals--grid .sw-tier__price {
  justify-items: center;
  white-space: normal;
}

.sw-deals--horizontal .sw-tier__price b,
.sw-deals--grid .sw-tier__price b {
  font-size: 17px;
}

.sw-deals--horizontal .sw-tier--sticker,
.sw-deals--grid .sw-tier--sticker {
  margin-block-start: 0;
}

.sw-deals--horizontal .sw-tier__badge--ribbon,
.sw-deals--grid .sw-tier__badge--ribbon {
  right: 50%;
  transform: translateX(50%);
  white-space: nowrap;
}

.sw-deals__below {
  margin-block-start: 10px;
}

.sw-deals__below .sw-tier__extra {
  margin: 0;
  padding: 0;
}

.sw-deals--compact .sw-deals__list {
  gap: 0;
}

.sw-deals--compact .sw-tier,
.sw-deals--compact .sw-tier.is-selected {
  border-radius: 0;
  background: none;
  box-shadow: inset 0 -1px 0 var(--sw-border, var(--sw-soft));
}

.sw-deals--compact .sw-tier__row {
  padding: 12px 4px;
}

.sw-deals--compact .sw-tier__extra {
  padding-inline: 4px;
}

/* ---------- add-ons ---------- */

.sw-deals__summary {
  margin-block-start: 10px;
  padding: 8px 12px;
  border-radius: var(--sw-radius);
  background: var(--sw-label-bg, color-mix(in srgb, var(--sw-text) 10%, transparent));
  color: var(--sw-label-text, inherit);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.sw-deals__stock {
  margin-block-start: 8px;
  color: #b42318;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.sw-sticky {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--sw-bg, #fff);
  color: var(--sw-text, #111);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
  font-size: 14px;
}

.sw-sticky[hidden] {
  display: none;
}

.sw-sticky__info {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sw-sticky__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sw-sticky__button {
  flex: none;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--sw-radius, 8px);
  background: var(--sw-accent, #111);
  color: var(--sw-bg, #fff);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- bought together ---------- */

.sw-bt {
  --sw-accent: #111;
  --sw-bg: #fff;
  --sw-text: #111;
  --sw-radius: 10px;
  margin-block: 16px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--sw-text) 15%, transparent);
  border-radius: var(--sw-radius);
  background: var(--sw-bg);
  color: var(--sw-text);
  font-size: 15px;
  line-height: 1.35;
}

.sw-bt__heading {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.sw-bt__items {
  display: grid;
  gap: 10px;
}

.sw-bt__item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sw-bt__item input[type='checkbox'] {
  flex: none;
  width: 18px;
  height: 18px;
  accent-color: var(--sw-accent);
}

.sw-bt__item img {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: calc(var(--sw-radius) * 0.6);
  object-fit: cover;
}

.sw-bt__info {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.sw-bt__title {
  font-weight: 600;
}

.sw-bt__info select {
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--sw-text) 25%, transparent);
  border-radius: 6px;
  background: var(--sw-bg);
  color: inherit;
  font: inherit;
  font-size: 13px;
}

.sw-bt__price {
  display: grid;
  justify-items: end;
  white-space: nowrap;
}

.sw-bt__price s {
  font-size: 13px;
  opacity: 0.6;
}

.sw-bt__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block-start: 14px;
  padding-block-start: 14px;
  border-block-start: 1px solid color-mix(in srgb, var(--sw-text) 15%, transparent);
}

/* inline-block keeps the two prices from merging into one left-to-right run on RTL pages */
.sw-bt__total b,
.sw-bt__total s {
  display: inline-block;
}

.sw-bt__total b {
  font-size: 18px;
}

.sw-bt__total s {
  margin-inline-start: 6px;
  opacity: 0.6;
}

.sw-bt__button {
  flex: 1;
  min-width: 180px;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--sw-radius);
  background: var(--sw-accent);
  color: var(--sw-bg);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.sw-bt__button[disabled] {
  opacity: 0.6;
  cursor: default;
}
