/* Cart drawer, cart page, quick-add, and no-js affordances.
   Drawer/item/summary styles follow Horizon cart-drawer + cart-products + cart-summary. */

html.no-js add-to-cart-component [data-add-to-cart-button] {
  pointer-events: none;
  opacity: 0.5;
}

html.no-js .product-card__quick-add {
  display: none;
}

.product-card {
  position: relative;
}

.product-card__link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.product-card__quick-add {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  display: block;
}

.product-card__quick-add-button {
  min-height: 2.5rem;
  padding-inline: 0.75rem;
}

.variant-option__button-label.is-unavailable .variant-option__button-label__text {
  text-decoration: line-through;
  opacity: 0.55;
}

/* --- Drawer shell --- */

html.cart-open {
  overflow: hidden;
}

html.cart-open .page-wrapper {
  filter: blur(10px);
}

.page-wrapper {
  transition: filter 0.25s ease;
}

cart-drawer {
  display: contents;
}

.theme-drawer__dialog.cart-drawer {
  --cart-drawer-inset: 8px;
  --cart-drawer-radius: 16px;
  --cart-ink: #111110;
  --cart-muted: #6b6b66;
  --cart-line: #e2e2de;
  --cart-soft: #eceae5;
  --cart-hero: #1e1e1b;
  --cart-hero-unlocked: #143d24;
  --cart-accent: #143d24;
  --cart-accent-hover: #0f2e1b;
  --cart-accent-wash: #eef3ef;
  --cart-accent-line: #d4ddd6;
  --cart-accent-ink: #143d24;
  --cart-accent-muted: #5c6f63;

  z-index: calc(var(--layer-overlay) + 1);
  position: fixed;
  inset: var(--cart-drawer-inset) var(--cart-drawer-inset) var(--cart-drawer-inset) auto;
  inset-inline-start: auto;
  inset-inline-end: var(--cart-drawer-inset);
  top: var(--cart-drawer-inset);
  right: var(--cart-drawer-inset);
  bottom: var(--cart-drawer-inset);
  left: auto;
  display: none;
  flex-direction: column;
  width: min(440px, calc(100vw - (var(--cart-drawer-inset) * 2)));
  max-width: 100%;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: none;
  border-radius: var(--cart-drawer-radius);
  background: var(--cart-hero);
  color: var(--cart-ink);
  box-shadow:
    0 24px 48px -28px rgb(17 17 16 / 0.35),
    0 18px 40px rgb(17 17 16 / 0.18);
}

.theme-drawer__dialog.cart-drawer[open] {
  display: flex;
}

.theme-drawer__dialog.cart-drawer.cart-drawer--unlocked {
  background: var(--cart-hero-unlocked);
}

.theme-drawer__dialog--opening {
  animation: cart-drawer-slide-in var(--animation-speed-slow) var(--animation-easing, ease);
}

.theme-drawer__dialog--closing {
  animation: cart-drawer-slide-out var(--animation-speed-slow) var(--animation-easing, ease) forwards;
}

@keyframes cart-drawer-slide-in {
  from {
    transform: translateX(calc(100% + var(--cart-drawer-inset)));
  }
}

@keyframes cart-drawer-slide-out {
  to {
    transform: translateX(calc(100% + var(--cart-drawer-inset)));
  }
}

.theme-drawer__dialog.cart-drawer::backdrop {
  background: rgb(17 17 16 / 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cart-drawer__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: transparent;
}

.cart-drawer__hero {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px 14px;
  background: var(--cart-hero);
  color: #fff;
}

.cart-drawer__hero--unlocked {
  background: var(--cart-hero-unlocked);
}

.cart-drawer__hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-drawer__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}

.cart-drawer__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #e6e5e0;
  color: var(--cart-hero);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}

.cart-drawer__hero--unlocked .cart-drawer__badge {
  background: #dfeadf;
  color: var(--cart-hero-unlocked);
}

.cart-drawer__badge[hidden] {
  display: none;
}

.cart-drawer__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.28);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.cart-drawer__close .svg-wrapper,
.cart-drawer__close svg {
  width: 14px;
  height: 14px;
}

.cart-drawer .cart-drawer__empty {
  flex: 1;
  display: flex;
  min-height: 0;
  background: #fff;
}

.cart-drawer .cart-drawer__empty[hidden],
.cart-drawer .cart-items[data-cart-empty][hidden] {
  display: none;
}

.cart-items__wrapper--drawer-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 32px 24px;
}

.cart-items__empty-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.cart-items__empty-button {
  margin-top: 1rem;
  margin-inline: auto;
  padding-inline: 2rem;
  padding-block: 1rem;
}

.cart-drawer__filled {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.cart-drawer__filled[hidden],
.cart-form[hidden] {
  display: none;
}

.cart-shipping[hidden] {
  display: none;
}

.cart-shipping__headline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75em;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

.cart-shipping__unlocked {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-shipping__unlocked .cart-shipping__headline {
  flex: 1;
  min-width: 0;
}

.cart-shipping__unlocked[hidden],
.cart-shipping__locked[hidden] {
  display: none;
}

.cart-shipping__check {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #8fd6a4;
  color: #143d24;
  font-size: 14px;
  font-weight: 700;
}

.cart-shipping__headline span {
  margin-inline-start: auto;
  flex: none;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 400;
  color: #b9d6c1;
}

.cart-shipping__locked {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-shipping__track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.18);
}

.cart-shipping__fill {
  height: 100%;
  border-radius: 999px;
  background: #8fd6a4;
}

.cart-shipping--page {
  padding: 12px 0 20px;
}

.cart-shipping--page .cart-shipping__headline {
  color: var(--cart-ink);
  font-size: 16px;
}

.cart-shipping--page .cart-shipping__headline span {
  color: var(--cart-muted);
}

.cart-drawer__content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-drawer__items {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.cart-line {
  border: 1px solid var(--cart-line);
  border-radius: 12px;
  overflow: hidden;
}

.cart-line__main {
  display: flex;
  gap: 12px;
  padding: 14px;
}

.cart-line__media {
  flex: none;
  width: 76px;
  height: 88px;
  overflow: hidden;
  border-radius: 8px;
  background: repeating-linear-gradient(135deg, #eceae5 0 6px, #e3e0d9 6px 12px);
}

.cart-line__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-line__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cart-line__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.cart-line__title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--cart-ink);
  text-decoration: none;
}

.cart-line__price {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.cart-line__price .compare-at-price {
  display: none;
}

.cart-line__variant {
  margin: 0;
  font-size: 14px;
  color: var(--cart-muted);
}

.cart-line__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
}

.cart-form.is-updating .quantity-selector,
.cart-form.is-updating [data-line-remove],
.cart-form.is-updating [data-line-add-qty],
.cart-form.is-updating [data-upsell-add] {
  pointer-events: none;
  opacity: 0.55;
}

.cart-line .quantity-selector {
  --quantity-selector-width: 92px;
  --minimum-touch-target: 34px;

  display: flex;
  align-items: center;
  align-self: auto;
  flex: 0 0 var(--quantity-selector-width);
  width: var(--quantity-selector-width);
  height: 34px;
  border: 1px solid var(--cart-line);
  border-radius: 8px;
}

.cart-line .quantity-selector :is(.quantity-minus, .quantity-plus),
.cart-line .quantity-selector button {
  width: 34px;
  height: 34px;
  color: #54544f;
}

.cart-line .quantity-selector input,
.cart-line .quantity-selector input[type='number'] {
  width: 24px;
  max-width: 24px;
  padding: 0;
  border: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--cart-ink);
}

.cart-line__remove {
  padding: 0;
  border: 0;
  background: none;
  color: var(--cart-muted);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

.cart-line__break {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: var(--cart-accent-wash);
  border-top: 1px solid var(--cart-accent-line);
}

.cart-line__break[hidden] {
  display: none;
}

.cart-line__break-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-line__break-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--cart-accent-ink);
}

.cart-line__break-count {
  margin: 0;
  font-size: 12px;
  color: var(--cart-accent-muted);
}

.cart-line__break-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--cart-accent-line);
}

.cart-line__break-fill {
  height: 100%;
  background: var(--cart-accent);
}

.cart-line__break-save {
  margin: 0;
  font-size: 13px;
  color: var(--cart-accent-muted);
}

.cart-line__break-was {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: currentColor;
  opacity: 0.75;
}

.cart-line__break-each {
  color: var(--cart-accent-ink);
  font-weight: 600;
}

.cart-line__break-add {
  flex: none;
  padding: 8px 13px;
  border: 0;
  border-radius: 8px;
  background: var(--cart-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.cart-line__break-add:hover {
  background: var(--cart-accent-hover);
}

.cart-line__break-add[hidden] {
  display: none;
}

.cart-upsells {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-upsells[hidden] {
  display: none;
}

.cart-upsell {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-upsell--gap {
  padding: 16px;
  border: 1px dashed #d8d6cf;
  border-radius: 12px;
}

.cart-upsell__heading {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--cart-ink);
}

.cart-upsell__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.cart-upsell__kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a8a83;
}

.cart-upsell__all {
  font-size: 13px;
  color: var(--cart-muted);
  text-decoration: underline;
}

.cart-upsell__rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.cart-upsell__row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-upsell__row--card {
  padding: 10px;
  border: 1px solid var(--cart-soft);
  border-radius: 10px;
}

.cart-upsell__thumb {
  flex: none;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: repeating-linear-gradient(135deg, #eceae5 0 6px, #e3e0d9 6px 12px);
}

.cart-upsell__thumb--lg {
  width: 56px;
  height: 56px;
}

.cart-upsell__copy {
  flex: 1;
  min-width: 0;
}

.cart-upsell__name,
.cart-upsell__meta,
.cart-upsell__price {
  margin: 0;
}

.cart-upsell__media {
  position: relative;
  flex: none;
}

.cart-upsell__preview {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.92);
  color: var(--cart-ink);
  box-shadow: 0 1px 4px rgb(17 17 16 / 0.16);
  cursor: pointer;
}

.cart-upsell__preview:hover {
  background: #fff;
}

.cart-upsell__preview .svg-wrapper,
.cart-upsell__preview svg {
  width: 14px;
  height: 14px;
}

.cart-upsell__row .cart-upsell__preview {
  width: 24px;
  height: 24px;
}

.cart-upsell__name {
  font-size: 14px;
  color: var(--cart-ink);
  line-height: 1.3;
  text-decoration: none;
}

.cart-upsell__meta {
  margin-top: 2px;
  font-size: 13px;
  color: var(--cart-muted);
}

.cart-upsell__add {
  flex: none;
  padding: 8px 12px;
  border: 1px solid var(--cart-ink);
  border-radius: 8px;
  background: #fff;
  color: var(--cart-ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.cart-upsell__add:hover {
  background: var(--cart-ink);
  color: #fff;
}

.cart-upsell__add--sold {
  border-color: #d8d6cf;
  color: var(--cart-muted);
  cursor: default;
}

.cart-upsell__add--sold:hover {
  background: #fff;
  color: var(--cart-muted);
}

.cart-upsell__add--block {
  display: block;
  box-sizing: border-box;
  width: 100%;
  text-align: center;
  border-color: #d8d6cf;
}

.cart-upsell__add--block:hover {
  border-color: var(--cart-ink);
  background: #fff;
  color: var(--cart-ink);
}

.cart-upsell__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  align-items: stretch;
}

.cart-upsell__tile {
  display: flex;
  flex-direction: column;
  gap: 7px;
  height: 100%;
}

.cart-upsell__tile .cart-upsell__price {
  margin-top: auto;
}

.cart-upsell__shot {
  display: block;
  width: 100%;
  height: 104px;
  object-fit: cover;
  border-radius: 8px;
  background: repeating-linear-gradient(135deg, #eceae5 0 6px, #e3e0d9 6px 12px);
}

.cart-upsell__price {
  font-size: 13px;
  font-weight: 600;
}

.cart-drawer__summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 20px 16px;
  border-top: 1px solid var(--cart-soft);
  background: #fff;
}

.cart-page__summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-block-start: 1.5rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--cart-soft);
}

.cart-totals {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.cart-totals__row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #54544f;
}

.cart-totals__row--free {
  color: #1f6b3a;
}

.cart-totals__total {
  align-items: baseline;
  padding-top: 8px;
  border-top: 1px solid var(--cart-soft);
  color: var(--cart-ink);
}

.cart-totals__total-label {
  font-size: 17px;
  font-weight: 600;
}

.cart-totals__total-value {
  font-size: 26px;
  font-weight: 600;
}

.cart-totals__tax-note {
  margin: 0;
  color: #8a8a83;
  font-size: 13px;
  text-align: center;
}

.cart__ctas {
  width: 100%;
}

.cart__ctas .cart__checkout-button {
  --button-color: #fff;
  --button-background-color: #111110;

  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  margin-top: 2px;
  border: 0;
  border-radius: 8px;
  background: var(--cart-ink);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  text-transform: none;
}

.cart__ctas .cart__checkout-button:hover {
  background: #2c2c28;
}

.cart-status {
  margin: 0;
  font-size: 13px;
  text-align: center;
  color: var(--cart-muted);
}

.cart-status[hidden] {
  display: none;
}

.cart-status.is-error {
  color: #b42318;
}

.cart-page [data-cart-lines] {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
}

.cart-page {
  display: block;
  max-width: var(--narrow-content-width, 36rem);
  margin-inline: auto;
}

.cart-page .cart-items[data-cart-empty] {
  text-align: center;
}

.cart-page h1 {
  margin-bottom: 1.5rem;
}

.add-to-cart-status:not(:empty) {
  margin: 0.5rem 0 0;
}

.cart-preview {
  position: relative;
  width: min(400px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: var(--cart-ink, #111110);
  box-shadow: 0 24px 48px rgb(17 17 16 / 0.28);
}

.cart-preview::backdrop {
  background: rgb(17 17 16 / 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cart-preview__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgb(17 17 16 / 0.12);
  border-radius: 999px;
  background: #fff;
  color: #111110;
  cursor: pointer;
}

.cart-preview__close svg {
  width: 14px;
  height: 14px;
}

.cart-preview__image {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
  background: repeating-linear-gradient(135deg, #eceae5 0 6px, #e3e0d9 6px 12px);
}

.cart-preview__copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 24px 24px;
}

.cart-preview__title {
  margin: 0;
  padding-right: 28px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.cart-preview__options,
.cart-preview__blurb,
.cart-preview__status {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #6b6b66;
}

.cart-preview__price {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.cart-preview__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.cart-preview__add,
.cart-preview__add--link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: #111110;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.cart-preview__sold {
  text-align: center;
  font-size: 14px;
  color: #6b6b66;
}

.cart-preview__link {
  text-align: center;
  font-size: 13px;
  color: #6b6b66;
  text-decoration: underline;
}

.cart-preview__status {
  padding: 48px 24px;
  text-align: center;
}
