.ht-stickycart {
  --ht-sticky-text: #212529;
  --ht-sticky-muted: #777;
  --ht-sticky-accent: #c34f67;
  --ht-sticky-accent-hover: #a93e55;
  --ht-sticky-buy-now: #e07a8b;
  --ht-sticky-buy-now-hover: #d96678;
  --ht-sticky-button-text: #fff;
  --ht-sticky-button-text-hover: #fff;
  --ht-sticky-promo: #c34f67;
  --ht-sticky-timer-bg: #fff0f3;
  --ht-sticky-timer-text: #c34f67;
  --ht-sticky-background: #fff;
  position: fixed;
  left: 0;
  z-index: 1000;
  width: 100%;
  color: var(--ht-sticky-text);
  background: var(--ht-sticky-background);
  box-shadow: 0 -8px 28px rgba(38, 24, 28, .09);
  opacity: 1;
  visibility: visible;
  transition: opacity .2s ease, transform .25s ease, visibility .2s ease;
}

.ht-stickycart--bottom {
  bottom: 0;
  border-top: 1px solid #f0c7cf;
}

.ht-stickycart--top {
  top: 0;
  border-bottom: 1px solid #f0c7cf;
  box-shadow: 0 8px 28px rgba(38, 24, 28, .09);
}

.ht-stickycart.remove {
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.ht-stickycart--bottom.remove {
  transform: translateY(110%);
}

.ht-stickycart--top.remove {
  transform: translateY(-110%);
}

body.beautys-cart-drawer-open .ht-stickycart,
.beautys-cart-drawer.is-open ~ * .ht-stickycart {
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.ht-stickycart__container {
  height: 60px;
  padding-top: 0;
  padding-bottom: 0;
}

.ht-stickycart__desktop {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 60px;
}

.ht-stickycart__product {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 220px;
  max-width: 480px;
}

.ht-stickycart__image-wrap {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  margin-right: 12px;
  overflow: hidden;
  background: #fbf4f5;
  border: 1px solid #f1e3e6;
  border-radius: 8px;
}

.ht-stickycart__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ht-stickycart__summary {
  min-width: 0;
}

.ht-stickycart__name,
.ht-stickycart__promo,
.ht-stickycart__timer-label {
  margin: 0;
}

.ht-stickycart__name {
  display: -webkit-box;
  max-width: 400px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ht-stickycart__prices {
  display: flex;
  align-items: baseline;
  gap: 9px;
  width: 400px;
  margin-top: 5px;
  white-space: nowrap;
}

.ht-stickycart__price {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.ht-stickycart__regular-price {
  color: var(--ht-sticky-muted);
  font-size: 13px;
  text-decoration: line-through;
}

.ht-stickycart__timer-block {
  flex: 0 0 auto;
  min-width: 230px;
}

.ht-stickycart__timer-label {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
}

.ht-stickycart__timer-label strong {
  color: var(--ht-sticky-promo);
  font-weight: 700;
}

.ht-stickycart__timer {
  display: flex;
  gap: 6px;
}

.ht-stickycart__timer-part {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 3px;
  min-width: 50px;
  padding: 5px 7px;
  color: var(--ht-sticky-timer-text);
  background: var(--ht-sticky-timer-bg);
  border-radius: 7px;
}

.ht-stickycart__timer-value {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.ht-stickycart__timer-unit {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
}

.ht-stickycart__promo {
  flex: 1 1 220px;
  max-width: 300px;
  color: var(--ht-sticky-promo);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.ht-stickycart__actions {
  display: grid;
  flex: 0 0 min(390px, 35vw);
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 10px;
  margin-left: auto;
}

/* 桌面只剩一个加购按钮：固定放在右列（原 BUY IT NOW 的位置），尺寸与原按钮一致 */
.ht-stickycart__actions .ht-stickycart__button--add {
  grid-column: 2;
}

.ht-stickycart__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 40px;
  padding: 0 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .055em;
  line-height: 1.1;
  text-transform: uppercase;
  border-radius: 25px;
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, opacity .2s ease;
}

.ht-stickycart__button--add {
  color: #fff;
  background: var(--ht-sticky-buy-now);
  border: 1px solid var(--ht-sticky-buy-now);
}

.ht-stickycart__button--add:hover:not(:disabled),
.ht-stickycart__button--add:focus-visible:not(:disabled) {
  color: #fff;
  background: var(--ht-sticky-buy-now-hover);
  border-color: var(--ht-sticky-buy-now-hover);
}

.ht-stickycart__button--buy {
  color: var(--ht-sticky-text);
  background: #fff;
  border: 1px solid #d8d8d8;
}

.ht-stickycart__button--buy:hover:not(:disabled),
.ht-stickycart__button--buy:focus-visible:not(:disabled) {
  color: var(--ht-sticky-button-text-hover);
  background: var(--ht-sticky-accent);
  border-color: var(--ht-sticky-accent);
}

.ht-stickycart__button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.ht-stickycart__mobile {
  display: none;
}

@media (max-width: 1199.98px) {
  .ht-stickycart__timer-block,
  .ht-stickycart__promo {
    display: none;
  }

  .ht-stickycart__product {
    max-width: none;
  }
}

@media (max-width: 991.98px) {
  .ht-stickycart__image-wrap {
    flex-basis: 60px;
    width: 60px;
    height: 60px;
  }

  .ht-stickycart__desktop {
    min-height: 60px;
  }

  .ht-stickycart__actions {
    flex-basis: 360px;
  }
}

@media (max-width: 767.98px) {
  .ht-stickycart__container {
    max-width: none;
    padding: 8px 12px max(8px, env(safe-area-inset-bottom));
  }

  .ht-stickycart--top .ht-stickycart__container {
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: 8px;
  }

  .ht-stickycart__desktop {
    display: none;
  }

  .ht-stickycart__mobile {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }

  .ht-stickycart__quantity {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    width: 100px;
    height: 40px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dedede;
    border-radius: 999px;
  }

  .ht-stickycart__quantity button,
  .ht-stickycart__quantity input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0;
    color: var(--ht-sticky-text);
    font: inherit;
    text-align: center;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .ht-stickycart__quantity button {
    font-size: 18px;
    cursor: pointer;
  }

  .ht-stickycart__quantity button:hover,
  .ht-stickycart__quantity button:focus-visible {
    color: var(--ht-sticky-accent);
    background: #fff0f3;
  }

  .ht-stickycart__quantity input {
    font-size: 14px;
    -moz-appearance: textfield;
  }

  .ht-stickycart__quantity input::-webkit-inner-spin-button,
  .ht-stickycart__quantity input::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
  }

  .ht-stickycart__button {
    width: 100%;
    height: 40px;
    padding: 0 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .5px;
    border-radius: 23px;
    white-space: nowrap;
  }

  .ht-stickycart__mobile .ht-stickycart__button--add {
    color: #fff;
    background: var(--ht-sticky-buy-now);
    border-color: var(--ht-sticky-buy-now);
  }

  .ht-stickycart__mobile .ht-stickycart__button--add:hover:not(:disabled),
  .ht-stickycart__mobile .ht-stickycart__button--add:focus-visible:not(:disabled) {
    color: #fff;
    background: var(--ht-sticky-buy-now-hover);
    border-color: var(--ht-sticky-buy-now-hover);
  }
}

@media (max-width: 379.98px) {
  .ht-stickycart__container {
    padding-right: 8px;
    padding-left: 8px;
  }

  .ht-stickycart__mobile {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 6px;
  }

  .ht-stickycart__quantity {
    grid-template-columns: 26px minmax(0, 1fr) 26px;
    width: 86px;
  }

  .ht-stickycart__button {
    padding: 0 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ht-stickycart,
  .ht-stickycart__button {
    transition: none;
  }
}
