.checkout-page,
.checkout-details {
  color: #171a20;
  background: #fff;
}

.checkout-page__container,
.checkout-details {
  width: min(100% - 48px, 1280px);
  margin: 0 auto;
}

.checkout-page {
  padding: 72px 0 64px;
}

.checkout-page__eyebrow {
  margin: 0 0 12px;
  color: #9c7b1f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .13em;
}

.checkout-page h1 {
  margin: 0 0 48px;
  color: #171a20;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.15;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: start;
  gap: clamp(48px, 8vw, 120px);
}

.cart-item {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding: 0 0 28px;
  margin: 0 0 28px;
  border: 0;
  border-bottom: 1px solid #e6e7e8;
  border-radius: 0;
}

.cart-item__image {
  width: 128px;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f4f4f4;
  border-radius: 4px;
}

.cart-item__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item__name {
  margin: 2px 0 8px;
  color: #171a20;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

.cart-item__unit-price {
  margin: 0 0 18px;
  color: #5c5e62;
  font-size: 14px;
}

.cart-item__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #393c41;
  font-size: 14px;
}

.checkout-page input.cart-item__quantity {
  width: 66px;
  min-height: 38px;
  padding: 5px 8px;
  color: #171a20;
  background: #fff;
  border: 1px solid #d0d1d2;
  border-radius: 5px;
}

.cart-item__remove {
  min-height: 38px;
  margin-left: 8px;
  padding: 0 2px;
  color: #393c41;
  background: transparent;
  border: 0;
  border-radius: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.cart-item__total {
  margin: 2px 0 0;
  color: #171a20;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.cart-summary {
  padding: 36px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(23, 26, 32, .1);
}

.cart-summary h2,
.checkout-details h2,
.cart-empty h2 {
  margin: 0 0 28px;
  color: #171a20;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 18px;
  color: #393c41;
  font-size: 15px;
}

.cart-summary__row span:last-child {
  text-align: right;
}

.cart-summary__total {
  margin: 24px 0;
  padding-top: 24px;
  border-top: 1px solid #e6e7e8;
  color: #171a20;
  font-size: 20px;
  font-weight: 600;
}

.cart-summary__action,
.cart-empty a,
.checkout-details .submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 24px;
  color: #171a20;
  background: #d4af37;
  border: 0;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.cart-summary__action {
  width: 100%;
}

.cart-summary__action:hover,
.cart-empty a:hover,
.checkout-details .submit-button:hover {
  color: #171a20;
  background: #e5c15a;
}

.cart-summary__action:focus-visible,
.cart-empty a:focus-visible,
.cart-item__remove:focus-visible,
.cart-item__quantity:focus-visible,
.checkout-details :focus-visible {
  outline: 3px solid #b8963a;
  outline-offset: 3px;
}

.cart-summary__unavailable {
  display: none;
  margin: 0;
  color: #5c5e62;
  font-size: 14px;
}

#detail_cart[data-checkout-form="unavailable"] .cart-summary__action {
  display: none;
}

#detail_cart[data-checkout-form="unavailable"] .cart-summary__unavailable {
  display: block;
}

.cart-empty {
  max-width: 500px;
  padding: 40px 0 80px;
}

.cart-empty h2 {
  margin-bottom: 12px;
}

.cart-empty p {
  margin-bottom: 24px;
  color: #5c5e62;
}

.checkout-details {
  padding-bottom: 80px;
  scroll-margin-top: 100px;
}

.checkout-details__form {
  max-width: 700px;
  padding: 0;
  background: #fff;
  scroll-margin-top: 100px;
}

.checkout-details h2 {
  margin-bottom: 20px;
}

.delivery-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 5px;
  margin: 0 0 28px;
  background: #f2f2f2;
  border: 0;
  border-radius: 14px;
}

.checkout-details .delivery-option {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.delivery-option input {
  position: absolute;
  opacity: 0;
}

.delivery-option span {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  border-radius: 10px;
  color: #393c41;
  font-size: 15px;
  font-weight: 600;
}

.delivery-option input:checked + span {
  color: #171a20;
  background: #fff;
  box-shadow: 0 2px 8px rgba(23, 26, 32, .14);
}

.delivery-option input:focus-visible + span {
  outline: 3px solid #b8963a;
  outline-offset: -3px;
}

.checkout-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.checkout-field--full {
  grid-column: 1 / -1;
}

.checkout-details label {
  display: block;
  margin-bottom: 8px;
  color: #393c41;
  font-size: 14px;
  font-weight: 600;
}

.checkout-details .form-control {
  min-height: 56px;
  padding: 12px 14px;
  color: #171a20;
  background: #fff;
  border: 1px solid #d0d1d2;
  border-radius: 10px;
}

.checkout-details__shipping-notice,
.pickup-notice {
  margin: 8px 0 0;
  color: #875b00;
  font-size: 14px;
}

.pickup-notice {
  margin: 0 0 24px;
  padding: 16px;
  color: #393c41;
  background: #f7f7f7;
  border: 1px solid #e6e7e8;
  border-radius: 10px;
}

.pickup-notice[hidden],
.delivery-address[hidden] {
  display: none;
}

.checkout-details .checkout-details__checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}

.checkout-details__checkbox input {
  width: 18px;
  height: 18px;
  accent-color: #b8963a;
}

.checkout-details .shipping-details {
  margin: 24px 0;
}

.checkout-details .submit-button {
  margin-top: 24px;
  min-width: 220px;
}

@media (max-width: 800px) {
  .checkout-page {
    padding: 48px 0;
  }

  .checkout-page h1 {
    margin-bottom: 32px;
  }

  .cart-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cart-summary {
    padding: 28px;
  }
}

@media (max-width: 480px) {
  .checkout-page__container,
  .checkout-details {
    width: calc(100% - 32px);
  }

  .cart-item {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 16px;
  }

  .cart-item__image {
    width: 84px;
  }

  .cart-item__name {
    font-size: 16px;
  }

  .cart-item__total {
    grid-column: 2;
  }

  .checkout-details__form {
    padding: 0;
  }

  .checkout-fields {
    grid-template-columns: 1fr;
  }

  .checkout-field--full {
    grid-column: auto;
  }
}
