/* Cart only. The legacy checkout sheet uses !important throughout; this scoped
   page layer explicitly owns cart layout without changing checkout/thank-you.
   Cart only. Explicit item slots replace NOVA's nested Bootstrap columns.
   JTL's form, position IDs, quantity validation and price output stay intact. */
body.is-cart main#main-wrapper { max-width: 1440px !important; margin: 24px auto 40px !important; padding: 0 24px !important; }
body.is-cart #main-wrapper .rt-basket__header { display: flex !important; flex-direction: row !important; align-items: baseline !important; flex-wrap: wrap !important; gap: 8px 16px !important; margin: 0 0 22px !important; padding: 0 !important; border: 0 !important; }
body.is-cart #main-wrapper .rt-basket__title { font-size: 30px !important; line-height: 1.2 !important; }
body.is-cart #main-wrapper .rt-basket__subline { margin: 0 !important; font-size: 14px !important; color: #64748b !important; }
body.is-cart #main-wrapper .rt-basket__layout { grid-template-columns: minmax(0, 1fr) 350px !important; gap: 28px !important; }
body.is-cart #main-wrapper .rt-basket__items { padding: 0 22px !important; border: 1px solid #dfe7ef !important; border-radius: 16px !important; box-shadow: none !important; }
body.is-cart #main-wrapper .rt-basket__side { top: 24px !important; min-width: 0 !important; }
body.is-cart #main-wrapper .rt-summary { padding: 24px !important; border-radius: 16px !important; box-shadow: none !important; }
.rh-cart-summary-title { margin: 0 0 18px !important; font-size: 19px !important; font-weight: 700 !important; }
body.is-cart #main-wrapper .rt-summary-proof { margin: 0 0 20px !important; padding: 12px !important; border-radius: 10px !important; }
body.is-cart #main-wrapper .rt-summary-proof__text strong { font-size: 13px !important; }
body.is-cart #main-wrapper .rt-summary-proof__text span { font-size: 12px !important; }
body.is-cart #main-wrapper .rt-summary__total-value { font-size: 30px !important; }
body.is-cart #main-wrapper .rt-summary__total { margin-top: 16px !important; padding-top: 18px !important; }
body.is-cart #cart-checkout-btn { height: 56px !important; border-radius: 10px !important; font-size: 16px !important; box-shadow: none !important; }
body.is-cart #main-wrapper .rt-summary__next-step { font-size: 12px !important; line-height: 1.6 !important; margin: 12px 0 18px !important; text-align: center !important; }
body.is-cart #main-wrapper .rt-summary__trust { gap: 12px !important; margin: 18px 0 !important; }
body.is-cart #main-wrapper .rt-summary__trust-item small { font-size: 12px !important; }
.rh-cart-help { display: flex !important; flex-wrap: wrap !important; justify-content: space-between !important; align-items: center !important; gap: 8px !important; padding-top: 16px !important; margin-top: 18px !important; border-top: 1px solid #e5ebf1 !important; font-size: 12px !important; color: #475569 !important; }
.rh-cart-help small { display: block !important; margin-top: 2px !important; }
.rh-cart-help strong { font-size: 15px !important; color: #126db1 !important; white-space: nowrap !important; }

#cart-form { --cart-image: 88px !important; --cart-qty: 132px !important; --cart-price: 145px !important; --cart-gap: 16px !important; }
#cart-form .rh-cart-columns { display: grid !important; grid-template-columns: minmax(0, 1fr) var(--cart-qty) var(--cart-price) !important; gap: var(--cart-gap) !important; padding: 16px 0 !important; border-bottom: 1px solid #e5ebf1 !important; font-size: 12px !important; font-weight: 600 !important; color: #64748b !important; }
#cart-form .rh-cart-columns span:nth-child(2) { text-align: center !important; }
#cart-form .rh-cart-columns span:last-child { text-align: right !important; }
#cart-form .cart-items-body { display: grid !important; grid-template-columns: var(--cart-image) minmax(0, 1fr) !important; grid-template-areas: none !important; gap: var(--cart-gap) !important; align-items: start !important; margin: 0 !important; padding: 22px 0 !important; border: 0 !important; border-bottom: 1px solid #e5ebf1 !important; background: #fff !important; }
#cart-form .cart-items-body[hidden] { display: none !important; }
#cart-form .cart-items-body:last-child { border-bottom: 0 !important; }
#cart-form .cart-items-body > .col-12:has(> hr) { display: none !important; }
#cart-form .cart-items-body > .cart-items-image { grid-area: auto !important; grid-column: 1 !important; width: var(--cart-image) !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
#cart-form .cart-items-image a { display: block !important; border: 1px solid #edf1f5 !important; border-radius: 10px !important; overflow: hidden !important; }
#cart-form .cart-items-image img,
#cart-form .cart-items-image picture,
#cart-form .cart-items-image .image-wrapper { display: block !important; width: 100% !important; max-width: none !important; height: var(--cart-image) !important; max-height: none !important; object-fit: contain !important; border: 0 !important; border-radius: 0 !important; background: #f8fafc !important; }
#cart-form .cart-items-body > .rh-cart-content { grid-column: 2 !important; padding: 0 !important; margin: 0 !important; min-width: 0 !important; width: auto !important; max-width: none !important; }
#cart-form .cart-items-body > .rh-cart-content > .rh-cart-line { display: grid !important; grid-template-columns: minmax(0, 1fr) var(--cart-qty) var(--cart-price) !important; grid-template-areas: 'product quantity price' 'details details details' 'remove remove remove' !important; gap: 10px var(--cart-gap) !important; margin: 0 !important; align-items: start !important; }
#cart-form .rh-cart-line > [class*='col'] { width: auto !important; max-width: none !important; min-width: 0 !important; padding: 0 !important; margin: 0 !important; flex: none !important; }
#cart-form .rh-cart-product { grid-area: product !important; grid-column: 1 !important; }
#cart-form .cart-items-name { display: block !important; overflow: visible !important; -webkit-line-clamp: unset !important; font-size: 15px !important; font-weight: 650 !important; line-height: 1.45 !important; padding: 0 !important; margin: 0 !important; overflow-wrap: anywhere !important; color: #172638 !important; }
#cart-form .cart-items-name:hover { color: #126db1 !important; text-decoration: underline !important; }
#cart-form .rh-cart-details { grid-area: details !important; }
#cart-form .rh-cart-details ul { margin: 0 !important; font-size: 12px !important; line-height: 1.6 !important; }
#cart-form .rh-cart-details li.sku,
#cart-form .rh-cart-details li.weight { display: inline !important; font-size: 11px !important; color: #718096 !important; }
#cart-form .rh-cart-details li.weight { display: block !important; }
#cart-form .rt-basket-delivery { margin: 6px 0 2px !important; font-size: 12px !important; line-height: 1.5 !important; }
#cart-form .cart-items-quantity { grid-area: quantity !important; justify-self: center !important; }
#cart-form .qty-wrapper { width: var(--cart-qty) !important; max-width: none !important; margin: 0 !important; }
#cart-form .form-counter { display: flex !important; flex-wrap: nowrap !important; width: var(--cart-qty) !important; max-width: none !important; height: 44px !important; margin: 0 !important; border: 1px solid #cfdae5 !important; border-radius: 9px !important; overflow: hidden !important; background: #fff !important; }
#cart-form .input-group-prepend,
#cart-form .input-group-append { flex: 0 0 42px !important; margin: 0 !important; }
#cart-form .form-counter .btn { width: 42px !important; height: 42px !important; padding: 0 !important; min-width: 0 !important; border: 0 !important; border-radius: 0 !important; font-size: 12px !important; background: #f6f8fb !important; }
#cart-form .form-counter input.quantity { flex: 1 1 0 !important; width: 0 !important; min-width: 0 !important; height: 42px !important; padding: 0 2px !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; font-family: inherit !important; font-weight: 600 !important; line-height: 1.2 !important; font-size: 16px !important; color: #172638 !important; -webkit-text-fill-color: #172638 !important; text-align: center !important; appearance: textfield !important; -moz-appearance: textfield !important; }
#cart-form input.quantity::-webkit-inner-spin-button,
#cart-form input.quantity::-webkit-outer-spin-button { -webkit-appearance: none !important; margin: 0 !important; }
#cart-form .form-counter:focus-within { outline: 2px solid #126db1 !important; outline-offset: 2px !important; }
#cart-form .cart-items-price { grid-area: price !important; display: flex !important; flex-direction: column !important; gap: 4px !important; align-items: flex-end !important; justify-content: start !important; text-align: right !important; }
#cart-form .cart-items-price-text { display: none !important; }
#cart-form .rh-cart-uvp { display: flex !important; flex-wrap: wrap !important; justify-content: flex-end !important; gap: 3px 6px !important; margin: 0 !important; white-space: normal !important; order: 0 !important; }
#cart-form .rh-cart-uvp__preis { font-size: 11px !important; font-weight: 400 !important; color: #718096 !important; letter-spacing: 0 !important; white-space: nowrap !important; }
#cart-form .rh-cart-uvp__badge { font-size: 10px !important; font-weight: 600 !important; color: #12609a !important; padding: 2px 5px !important; white-space: nowrap !important; }
#cart-form .price_overall { font-size: 18px !important; line-height: 1.3 !important; font-weight: 750 !important; white-space: nowrap !important; }
#cart-form .rh-cart-unit { font-size: 11px !important; color: #64748b !important; white-space: nowrap !important; }
#cart-form .cart-items-delete { grid-area: remove !important; position: static !important; height: auto !important; width: auto !important; text-align: left !important; display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
#cart-form .cart-items-delete-button { width: auto !important; height: 32px !important; min-height: 32px !important; padding: 4px 0 !important; margin: 0 !important; border: 0 !important; border-radius: 4px !important; background: transparent !important; color: #64748b !important; font-size: 12px !important; display: inline-flex !important; gap: 7px !important; align-items: center !important; }
#cart-form .cart-items-delete-button::before { content: none !important; }
#cart-form .cart-items-delete-button .fas { display: inline-block !important; font-size: 12px !important; }
#cart-form .cart-items-delete-button:hover { color: #b42318 !important; }
#cart-form button:focus-visible,
body.is-cart #main-wrapper .rh-cart-help:focus-visible { outline: 2px solid #126db1 !important; outline-offset: 3px !important; }

/* Tablet: summary below the items rather than squeezing three controls together. */
@media (max-width: 1199px) {
  body.is-cart #main-wrapper .rt-basket__layout { grid-template-columns: minmax(0, 1fr) !important; gap: 24px !important; }
  body.is-cart #main-wrapper .rt-basket__side { position: static !important; }
  body.is-cart #main-wrapper .rt-summary { max-width: none !important; }
}
@media (max-width: 767px) {
  body.is-cart main#main-wrapper { padding: 0 14px !important; margin-top: 18px !important; }
  body.is-cart #main-wrapper .rt-basket__header { gap: 5px !important; flex-direction: column !important; margin-bottom: 16px !important; }
  body.is-cart #main-wrapper .rt-basket__title { font-size: 25px !important; }
  body.is-cart #main-wrapper .rt-basket__items { padding: 0 14px !important; border-radius: 12px !important; }
  body.is-cart #main-wrapper .rt-summary { padding: 20px 16px !important; border-radius: 12px !important; }
  #cart-form { --cart-image: 72px !important; --cart-qty: 132px !important; --cart-gap: 12px !important; }
  #cart-form .rh-cart-columns { display: none !important; }
  #cart-form .cart-items-body { grid-template-columns: 72px minmax(0, 1fr) !important; grid-template-areas: 'image product' 'details details' 'quantity price' 'remove remove' !important; padding: 18px 0 !important; }
  #cart-form .cart-items-body > .cart-items-image { grid-area: image !important; }
  #cart-form .cart-items-body > .rh-cart-content,
  #cart-form .cart-items-body > .rh-cart-content > .rh-cart-line { display: contents !important; }
  #cart-form .cart-items-name { font-size: 14px !important; line-height: 1.45 !important; }
  #cart-form .rh-cart-details ul { font-size: 12px !important; }
  #cart-form .cart-items-quantity { justify-self: start !important; grid-column: 1 / -1 !important; grid-row: 3 !important; width: var(--cart-qty) !important; align-self: end !important; }
  #cart-form .cart-items-price { grid-column: 1 / -1 !important; grid-row: 3 !important; justify-self: end !important; width: calc(100% - var(--cart-qty) - 12px) !important; min-width: 0 !important; }
  #cart-form .rh-cart-uvp { flex-basis: auto !important; }
  #cart-form .cart-items-delete-button { height: 44px !important; min-height: 44px !important; }
  #cart-form .cart-items-delete { margin-top: -8px !important; margin-bottom: -8px !important; }
  body.is-cart #main-wrapper .rt-mobile-cta { padding: 0 !important; padding-bottom: env(safe-area-inset-bottom, 0px) !important; background: #fff !important; }
  body.is-cart #main-wrapper .rt-mobile-cta__bar { min-height: 76px !important; gap: 12px !important; padding: 10px 16px !important; }
  body.is-cart #main-wrapper .rt-mobile-cta__btn { min-height: 50px !important; border-radius: 9px !important; font-size: 15px !important; padding: 12px 18px !important; }
  body.is-cart #main-wrapper .rt-mobile-cta__value { font-size: 21px !important; white-space: nowrap !important; }
}
@media (prefers-reduced-motion: reduce) {
  body.is-cart #main-wrapper .rt-mobile-cta { transition: none !important; }
}

body.is-cart #main-wrapper .rt-basket { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }
body.is-cart #main-wrapper .rt-basket__main { width: auto !important; max-width: none !important; }
body.is-cart #main-wrapper .rt-basket__side { width: auto !important; max-width: none !important; }
#cart-form .qty-wrapper { border: 0 !important; background: transparent !important; height: auto !important; border-radius: 0 !important; overflow: visible !important; }
#cart-form .rh-cart-details { border: 0 !important; }
#cart-form .cart-items-image { min-width: 0 !important; height: auto !important; }
#cart-form .cart-items-image a { width: 100% !important; height: auto !important; }
@media (max-width: 767px) { #cart-form .rh-cart-product { grid-column: 2 !important; } }
/* Reset legacy form width and absolute delete control, not the JTL behavior. */
body.is-cart #main-wrapper #cart-form { width: 100% !important; max-width: none !important; }
body.is-cart #main-wrapper .rt-basket__items { width: 100% !important; max-width: none !important; }
body.is-cart #main-wrapper .rt-basket__header { box-shadow: none !important; }
body.is-cart #main-wrapper .rt-summary { display: block !important; }
#cart-form .cart-items-delete-button { position: static !important; text-indent: 0 !important; transform: none !important; line-height: 1.4 !important; min-width: 0 !important; }
#cart-form .cart-items-delete-button .fas { width: 12px !important; text-indent: 0 !important; }
#cart-form .rt-basket-delivery { padding: 0 !important; border: 0 !important; background: transparent !important; }
body.is-cart #main-wrapper .rh-cart-summary-title { font-size: 19px !important; line-height: 1.3 !important; margin: 0 0 18px !important; }
body.is-cart #main-wrapper .rh-cart-help { text-decoration: none !important; }
body.is-cart #main-wrapper .rh-cart-status { font-size: 13px; color: #126db1; margin: 10px 0; }
body.is-cart #main-wrapper .rh-cart-status:empty { display: none; }
body.is-cart #main-wrapper .rt-summary__cta[aria-disabled='true'],
body.is-cart #main-wrapper .rt-mobile-cta__btn[aria-disabled='true'] { opacity: .65; cursor: wait; }
