/* Sticky ATC — theme color-scheme aware */

.sticky-atc {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 10px 0 15px;
  z-index: 40;
  box-shadow: 0 -1px 10px rgba(var(--color-shadow, 0, 0, 0), 0.18);
  background: rgb(var(--color-background, var(--color-page-background, 255, 255, 255)));
  color: rgb(var(--color-text, 0, 0, 0));
  box-sizing: border-box;
}

.sticky-atc *,
.sticky-atc *::before,
.sticky-atc *::after {
  box-sizing: border-box;
}

.sticky-atc[data-after-scroll="true"] {
  transform: translateY(100%);
  transition: transform 0.15s ease-in-out;
  pointer-events: none;
}

.sticky-atc[data-after-scroll="true"].is-visible {
  transform: none;
  pointer-events: auto;
}

.sticky-atc-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  column-gap: 10px;
  width: 100%;
  max-width: var(--page-width, 1200px);
  margin: 0 auto;
  padding-inline: var(--page-padding, 16px);
}

.sticky-atc__left {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-grow: 1;
  min-width: 0;
  gap: 10px;
}

.sticky-atc__left__content {
  min-width: 0;
  flex: 1 1 auto;
}

.sticky-atc__left__content > * {
  margin: 0;
}

.sticky-atc__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  color: rgb(var(--color-text));
}

.sticky-atc__price {
  margin-top: 2px;
}

.sticky-atc__price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 5px;
  row-gap: 2px;
}

.sticky-atc__price-current {
  font-size: 13px;
  font-weight: 700;
  color: rgb(var(--color-sale, var(--color-button-background, var(--color-text))));
  line-height: 1.1;
}

.sticky-atc__price-compare {
  font-size: 13px;
  text-decoration: line-through;
  color: rgb(var(--color-light-text, var(--color-text)));
  opacity: 0.85;
  line-height: 1.1;
}

.sticky-atc__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.4;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgb(var(--color-tag-background, var(--color-discount, 227, 38, 25)));
  color: rgb(var(--color-tag-text, 255, 255, 255));
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.sticky-atc__badge .icon-discount-tag {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.sticky-atc__badge .nowrap {
  white-space: nowrap;
}

.sticky-atc__picker {
  flex-shrink: 0;
  max-width: 100%;
}

.sticky-atc__select-wrap {
  position: relative;
  display: block;
  min-width: 96px;
}

.sticky-atc__variant-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 96px;
  max-width: 180px;
  height: 34px;
  padding: 0 28px 0 10px;
  border: 1px solid rgba(var(--color-entry-line, var(--color-text)), 0.55);
  border-radius: var(--variant-picker-radius, 8px);
  background: rgb(var(--color-card-background, var(--color-background, 255, 255, 255)));
  color: rgb(var(--color-text));
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.sticky-atc__select-caret {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%) rotate(90deg);
  pointer-events: none;
  opacity: 0.7;
  color: rgb(var(--color-text));
}

.sticky-atc__button {
  flex-shrink: 0;
  background: transparent;
  border-radius: var(--button-radius, 8px);
}

.sticky-atc .sticky-atc__submit {
  padding: 0 10px;
  min-height: auto;
  min-width: auto;
  line-height: 2.75em;
  font-size: 15px;
  white-space: nowrap;
  /* primary fill inherits --color-button-background / --color-button-text from color scheme */
}

.sticky-atc .mobile-hidden {
  /* keep for desktop-only toggles below */
}

@media screen and (min-width: 400px) {
  .sticky-atc__price-current,
  .sticky-atc__price-compare {
    font-size: 16px;
  }

  .sticky-atc__title {
    font-size: 17px;
  }

  .sticky-atc__badge {
    font-size: 10px;
  }

  .sticky-atc .sticky-atc__submit {
    font-size: 17px;
    padding: 0 1.1em;
  }
}

@media screen and (min-width: 500px) {
  .sticky-atc__badge {
    font-size: 12px;
  }
}

@media screen and (min-width: 750px) {
  .sticky-atc {
    padding: 10px 0;
  }

  .sticky-atc-container {
    column-gap: 15px;
  }

  .sticky-atc__left {
    padding-right: 10px;
  }

  .sticky-atc__select-wrap,
  .sticky-atc__variant-select {
    width: 220px;
    max-width: 220px;
  }

  .sticky-atc__variant-select {
    height: 40px;
    font-size: 14px;
  }

  .sticky-atc__price-current,
  .sticky-atc__price-compare {
    font-size: 18px;
  }

  .sticky-atc__title {
    font-size: 19px;
  }

  .sticky-atc__badge {
    font-size: 13px;
  }

  .sticky-atc .sticky-atc__submit {
    font-size: 19px;
    padding: 0 1.5em;
  }

  .sticky-atc--desktop-no-badge .sticky-atc__badge {
    display: none;
  }

  .sticky-atc .desktop-hidden {
    display: none !important;
  }
}

@media screen and (max-width: 749px) {
  .sticky-atc--mobile-no-badge .sticky-atc__badge {
    display: none;
  }

  .sticky-atc__left {
    flex-direction: column;
    align-items: flex-start;
  }

  .sticky-atc__picker {
    width: 100%;
    padding-right: 5px;
  }

  .sticky-atc--small-mobile-select .sticky-atc__picker,
  .sticky-atc--has-mobile-meta .sticky-atc__picker {
    padding-top: 5px;
    max-width: 170px;
  }

  .sticky-atc--small-mobile-select .sticky-atc__variant-select {
    font-size: 12px;
    height: 28px;
    padding: 0 25px 0 10px;
    max-width: 170px;
  }

  .sticky-atc .mobile-hidden {
    display: none !important;
  }
}
