/* Roomier checkout summaries on desktop and phones. */
#orderContainer .checkout-summary-intro{padding:10px 10px 0;width:100%;max-width:600px;margin:0 auto;}
#orderContainer #col-md-6-checkout-page{position:static!important;top:auto!important;}
@media(min-width:992px){
 #orderContainer #col-md-6-checkout-page > .card{margin-top:6px;}
}
body #checkoutItemsList .checkout-item{display:flex;align-items:flex-start;gap:24px;padding:20px;border-radius:14px;width:100%;box-sizing:border-box}
body #checkoutItemsList .checkout-item-image{width:140px!important;height:150px!important;max-width:none;flex:0 0 140px;object-fit:contain;object-position:center top;border-radius:10px}
body #checkoutItemsList .checkout-item-info{flex:1;min-width:0;width:auto}
body #checkoutItemsList .checkout-item-info p{font-size:16px;line-height:1.5;margin-bottom:8px;overflow-wrap:anywhere}
body #checkoutItemsList .checkout-item-controls{gap:14px;margin-top:16px}
body #checkoutItemsList .checkout-quantity-stepper{display:flex;align-items:center;width:156px;height:44px;border:1px solid #cbd8e8;border-radius:10px;overflow:hidden;background:white;flex-shrink:0}
body #checkoutItemsList .checkout-quantity-stepper button{flex:0 0 44px;width:44px!important;height:44px!important;padding:0!important;border:0;border-radius:0;background:transparent;color:black;font-size:24px}
body #checkoutItemsList .checkout-quantity-stepper input{flex:1;min-width:0;width:68px!important;padding:0!important;height:44px!important;text-align:center;border:0!important;border-radius:0;background:transparent;appearance:textfield;-moz-appearance:textfield}
body #checkoutItemsList .checkout-quantity-stepper input::-webkit-inner-spin-button,
body #checkoutItemsList .checkout-quantity-stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
body #checkoutItemsList .checkout-quantity-stepper button:disabled{opacity:.3}
body #checkoutItemsList .checkout-quantity-stepper button:hover:not(:disabled){background:#edf4ff}
@media(max-width:600px){
 body #checkoutItemsList .checkout-item{gap:14px;padding:16px;align-items:flex-start;flex-wrap:wrap}
 body #checkoutItemsList .checkout-item-image{width:105px!important;height:130px!important;flex-basis:105px}
 body #checkoutItemsList .checkout-item-info{flex:1 1 0}
 body #checkoutItemsList .checkout-item-info p{font-size:15px}
 body #checkoutItemsList .checkout-item-controls{gap:10px;margin-top:12px}
}
/* Extend Remove to the same right edge as the product-name area. */
body #checkoutItemsList .checkout-item-controls{display:flex;align-items:center;flex-wrap:wrap;width:100%;box-sizing:border-box}
body #checkoutItemsList .checkout-item-controls>[data-cart-remove]{flex:1 1 100px;min-width:90px;min-height:44px;max-width:100%;margin:0;text-align:center}
/* A little breathing room between desktop checkout estimate rows. */
@media(min-width:992px){
 body #totalSection>div:has(>#subtotalAmount,>#taxAmount,>#shippingAmount){margin-bottom:6px!important}
}
/* Wider shipping form and balanced controls on portrait phones. */
@media(max-width:575px) and (orientation:portrait){
 body #orderContainer{width:100%!important;max-width:100%!important;padding-left:12px!important;padding-right:12px!important;box-sizing:border-box}
 body #orderContainer>.row{margin-left:0!important;margin-right:0!important}
 body #orderContainer #col-md-6-checkout-page{width:100%!important;max-width:100%!important;padding-left:0!important;padding-right:0!important;box-sizing:border-box}
 body #orderContainer #col-md-6-checkout-page>.card>.card-body{padding:16px 12px!important}
 body #orderContainer #shippingForm{width:100%!important;max-width:none!important;margin-inline:0!important;box-sizing:border-box}
 body #checkoutItemsList .checkout-item-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 body #checkoutItemsList .checkout-item-controls>.checkout-quantity-stepper,
 body #checkoutItemsList .checkout-item-controls>[data-cart-remove]{width:100%!important;min-width:0!important;max-width:none;box-sizing:border-box}
 body #checkoutItemsList .checkout-quantity-stepper button{flex:0 0 36px;width:36px!important}
 body #checkoutItemsList .checkout-quantity-stepper input{width:0!important;flex:1;min-width:0}
}
/* Match the mobile cart's wider layout, with one shared edge for checkout panels. */
@media(max-width:575px) and (orientation:portrait){
 body:is(.checkout-page,.buy-now-page) #orderContainer.container{width:100%!important;max-width:100%!important;padding-inline:12px!important;box-sizing:border-box}
 body:is(.checkout-page,.buy-now-page) #orderContainer.container>.row{margin-inline:0!important}
 body:is(.checkout-page,.buy-now-page) #orderContainer.container>.row>[class*="col-"]{padding-inline:0!important;width:100%!important;max-width:100%!important;min-width:0;box-sizing:border-box}
 body #orderContainer #checkoutSummary{width:100%!important;max-width:none!important;padding-inline:0!important;margin-inline:0!important;box-sizing:border-box}
 body #orderContainer .delivery-info-card{width:100%!important;max-width:none!important;box-sizing:border-box;margin-inline:0!important}
 body #orderContainer #col-md-6-checkout-page>.card{width:100%!important;max-width:none!important;padding:0!important;margin-inline:0!important;box-sizing:border-box}
 body #orderContainer #col-md-6-checkout-page>.card>.card-body{padding:16px 12px!important}
}

.checkout-item-price-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin-block: 2px 6px;
  font-size: 14px;
}
#checkoutItemsList .cart-sale-price { color: #b51d32; font-size: 16px; font-weight: 750; }
#checkoutItemsList .cart-original-price { color: #576574; font-size: .875em; }
#checkoutItemsList .cart-sale-discount {
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff0f1;
  color: #a6192d;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.45;
}

body #checkoutItemsList .checkout-item-info .checkout-item-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  margin-top: 0;
}

@media (max-width:359px) {
  body #checkoutItemsList .checkout-item-image { width:84px !important; height:104px !important; flex-basis:84px; }
}

body #checkoutItemsList .checkout-quantity-label {
  display: block;
  margin-top: 10px;
  color: #465a6e;
  font-size: 12px;
  font-weight: 650;
}
body #checkoutItemsList .checkout-quantity-label + .checkout-item-controls { margin-top: 4px; }


#checkoutSummary {
  container-type: inline-size;
}

.checkout-order-delivery {
  display: grid;
  gap: 14px;
}

.checkout-order-delivery > * {
  min-width: 0;
}

.checkout-shipping-summary {
  align-self: start;
  padding: 14px;
  border: 1px solid #dce5ef;
  border-radius: 12px;
  background: #f5f8fc;
  color: #24384e;
  overflow-wrap: anywhere;
}

.checkout-item-shipping-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: #174b8c;
  font-size: 14px;
  font-weight: 700;
}

.checkout-shipping-summary .checkout-item-delivery {
  font-size: 13px;
  font-weight: 600;
}


body #checkoutItemsList .checkout-order-delivery + .checkout-order-delivery {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid #d7e2ef;
}

body #checkoutItemsList .checkout-order-delivery .checkout-item {
  flex-wrap: nowrap;
  gap: 12px;
  padding: 14px;
}

body #checkoutItemsList .checkout-order-delivery .checkout-item-image {
  width: clamp(52px, 15cqw, 72px) !important;
  height: 82px !important;
  flex-basis: clamp(52px, 15cqw, 72px);
}

body #checkoutItemsList .checkout-order-delivery .checkout-item-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-width: 248px;
}

body #checkoutItemsList .checkout-order-delivery .checkout-item-controls > :is(.checkout-quantity-stepper, [data-cart-remove]) {
  width: 100% !important;
  min-width: 0;
}

body #checkoutItemsList .checkout-order-delivery .checkout-quantity-stepper button {
  flex: 0 0 32%;
  width: 32% !important;
  font-size: 20px;
}

body #checkoutItemsList .checkout-order-delivery .checkout-quantity-stepper input {
  width: 0 !important;
}

@container (min-width: 520px) {
  .checkout-order-delivery {
    grid-template-columns: minmax(0, 3fr) minmax(224px, 2fr);
    align-items: start;
  }

  .checkout-shipping-summary {
    padding: 16px;
  }
}

@container (max-width: 519px) {
  .checkout-order-delivery {
    gap: 6px;
  }

  .checkout-shipping-summary {
    padding: 11px 14px;
  }

  .checkout-item-shipping-title {
    margin-bottom: 4px;
  }
}

@media (min-width: 992px) {
  body:is(.checkout-page, .buy-now-page) #orderContainer.container {
    width: calc(100% - 40px);
    max-width: 1440px;
  }

  body:is(.checkout-page, .buy-now-page) #orderContainer #checkoutSummary {
    max-width: none !important;
  }

  #orderContainer .checkout-summary-intro {
    max-width: none;
  }
}


@media (min-width: 992px) and (pointer: fine) {
  body #checkoutItemsList .checkout-order-delivery .checkout-item-controls > :is(.checkout-quantity-stepper, [data-cart-remove]) {
    box-sizing: border-box;
    height: 36px !important;
    min-height: 36px;
  }

  body #checkoutItemsList .checkout-order-delivery .checkout-quantity-stepper :is(button, input) {
    height: 100% !important;
  }
}


/* The checkout panel has its own inset inside the card body. */
body:is(.checkout-page, .buy-now-page) #orderContainer #col-md-6-checkout-page > .card {
  padding: 0 !important;
}

body:is(.checkout-page, .buy-now-page) #orderContainer #col-md-6-checkout-page > .card > .card-body {
  min-width: 0;
  padding: 16px clamp(10px, 1.25vw, 18px) !important;
}
