@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@600&display=swap');

.modal.lv-cart-modal {
  --bs-modal-width: 1040px;
  --bs-modal-border-radius: 0;
  --bs-modal-border-width: 0;
  --bs-modal-bg: var(--lv-header-paper);
  --bs-modal-color: var(--lv-header-ink);
  --lv-cart-padding: clamp(18px, 3.4vw, 42px);
  color: var(--lv-header-ink);
  font-family: var(--lv-header-font);
  outline: none;
}

body:has(.lv-cart-modal.show) > .modal-backdrop {
  --bs-backdrop-bg: #162337;
  --bs-backdrop-opacity: .66;
  backdrop-filter: blur(5px);
}

.lv-cart-modal .modal-content {
  box-shadow: 0 16px 52px rgb(17 29 47 / 24%);
}

.lv-cart-modal .modal-header {
  justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 2.6vw, 32px) var(--lv-cart-padding) 12px;
  border: 0;
}

.lv-cart-modal .modal-title {
  color: var(--lv-header-ink);
  font: 600 clamp(26px, 3.5vw, 36px)/1.15 Oswald, "Arial Narrow", sans-serif;
}

.lv-cart-modal .modal-body {
  flex-grow: 0;
  padding: 0 var(--lv-cart-padding);
}

.lv-cart-modal .modal-footer {
  justify-content: space-between;
  gap: 14px 20px;
  margin-inline: var(--lv-cart-padding);
  padding: 20px 0 clamp(18px, 2.6vw, 32px);
  border-top: 1px solid var(--lv-header-line);
}

.lv-cart-modal .modal-footer > * {
  margin: 0;
}

.lv-cart-close,
.lv-cart-stepper button,
.lv-cart-remove {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  color: var(--lv-header-ink);
  background: transparent;
  border: 0;
}

.lv-cart-close svg,
.lv-cart-remove svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lv-cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 22px;
  padding: 18px 0;
}

.lv-cart-item + .lv-cart-item {
  border-top: 1px solid var(--lv-header-line);
}

.lv-cart-item-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  color: var(--lv-header-ink);
  text-decoration: none;
}

.lv-cart-photo {
  display: block;
  width: clamp(54px, 8vw, 80px);
  aspect-ratio: 4 / 5;
  background: #fff;
}

.lv-cart-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lv-cart-item-detail {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.lv-cart-item-name {
  font-size: clamp(14px, 2vw, 17px);
  line-height: 1.35;
}

.lv-cart-item-link:hover .lv-cart-item-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lv-cart-attribute,
.lv-cart-empty {
  color: #555c65;
}

.lv-cart-attribute {
  font-size: 13px;
}

.lv-cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.lv-cart-line-total {
  white-space: nowrap;
}

.lv-cart-stepper {
  display: inline-grid;
  grid-template-columns: 38px minmax(24px, auto) 38px;
  align-items: center;
  border: 1px solid var(--lv-header-line);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.lv-cart-stepper button {
  min-width: 38px;
  font-size: 19px;
  line-height: 1;
}

.lv-cart-close:hover,
.lv-cart-stepper button:hover {
  background: rgb(24 44 70 / 7%);
}

.lv-cart-remove {
  display: inline-flex;
  gap: 6px;
  padding-inline: 9px;
  color: var(--lv-header-red);
  font-size: 14px;
  font-weight: 700;
  border: 1px solid currentColor;
}

/* The cart module listens on the button and reads the actual click target. */
.lv-cart-remove > * {
  pointer-events: none;
}

.lv-cart-remove:hover {
  color: #fff;
  background: var(--lv-header-red);
  border-color: var(--lv-header-red);
}

.lv-cart-total {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin: 0;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 700;
}

.lv-cart-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lv-cart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid var(--lv-header-ink);
  border-radius: 0;
  background: transparent;
  color: var(--lv-header-ink);
  font: 700 var(--lv-text-button, 16px)/1.3 var(--lv-header-font);
  text-align: center;
  text-decoration: none;
}

.lv-cart-primary {
  background: var(--lv-header-ink);
  color: #fff;
}

.lv-cart-button:hover {
  border-color: #294b70;
  background: #294b70;
  color: #fff;
}

.lv-cart-modal :is(a, button):focus-visible {
  outline: 2px solid var(--lv-header-red);
  outline-offset: 2px;
}

.lv-cart-empty {
  margin: 0;
  padding: 10px 0 22px;
}

.lv-cart-modal:has(.lv-cart-item) :is(.lv-cart-empty, .lv-cart-browse),
.lv-cart-modal:not(:has(.lv-cart-item)) :is(.lv-cart-summary, .lv-cart-footer-actions) {
  display: none;
}

@media (max-width: 660px) {
  .lv-cart-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .lv-cart-item-actions {
    justify-content: space-between;
    gap: 8px;
  }

  .lv-cart-remove {
    padding-inline: 6px;
  }

  .lv-cart-footer-actions {
    width: 100%;
  }

  .lv-cart-footer-actions > a {
    flex: 1 1 135px;
  }
}
