.cart-menu { position: relative; display: flex; align-items: center; gap: 3px; flex: 0 0 auto; font-size: .82rem; color: #b5c3da; }
.cart-menu [hidden] { display: none !important; }
.cart-menu > .cart-nav-link { min-height: 44px; }
.cart-mobile-icon { display: none; }
.cart-preview { position: absolute; top: 100%; right: 0; z-index: 101; width: min(350px, calc(100vw - 32px)); margin-top: 8px; padding: 18px; border: 1px solid #37517b; border-radius: 13px; background: #0e1a2f; color: #edf3ff; box-shadow: 0 18px 48px #0008; }
.cart-preview::before { content: ""; position: absolute; top: -9px; height: 9px; left: 0; right: 0; }
.cart-preview h2 { margin: 0 0 12px; font-size: 1rem; letter-spacing: 0; }
.cart-preview-status, .cart-preview-more { margin: 0 0 14px; color: #b5c3da; font-size: .8rem; }
.cart-preview-items { list-style: none; margin: 0 0 12px; padding: 0; max-height: min(50vh, 370px); overflow-y: auto; overscroll-behavior: contain; }
.cart-preview-items li { padding: 10px 0; border-bottom: 1px solid #293c59; overflow-wrap: anywhere; }
.cart-preview-items strong, .cart-preview-items span { display: block; }
.cart-preview-items strong { font-size: .86rem; }
.cart-preview-details { margin-top: 4px; font-size: .74rem; color: #b5c3da; }
.cart-preview-price { margin-top: 5px; font-size: .82rem; color: #9fc1ff; font-weight: 650; }
.cart-preview-open, .cart-preview-checkout { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 10px 12px; border-radius: 7px; background: #244a81; font-weight: 650; }
.cart-preview-open:hover { background: #2e5e9f; }
.cart-preview-checkout { margin-bottom: 8px; background: #67e8c1; color: #092b24; animation: cart-checkout-pulse 1.4s ease-in-out 3; }
.cart-preview-checkout:hover { background: #91f3d5; }
@keyframes cart-checkout-pulse { 50% { box-shadow: 0 0 0 4px #67e8c13b, 0 0 18px #67e8c133; } }
@media (prefers-reduced-motion: reduce) { .cart-preview-checkout { animation: none; } }
@media (max-width: 1000px) { .topbar { gap: 20px; } .cart-menu { font-size: .75rem; } }
@media (max-width: 650px) {
  .topbar { position: relative; gap: 10px; }
  .cart-menu { position: static; margin-left: auto; gap: 0; }
  .cart-menu .cart-link-label { display: none; }
  .cart-mobile-icon { display: block; }
  .cart-menu > .cart-nav-link { min-width: 32px; gap: 3px; }
  .cart-preview { top: 100%; right: 0; width: min(350px, 100%); }
  .topbar .cart-menu + .account-menu { margin-left: 0; }
}

.cart-preview-edit { display: block; padding: 8px; margin: -4px 0; border-radius: 7px; }
.cart-preview-edit:hover, .cart-preview-edit:focus-visible { background: #1c3355; }
.cart-preview-edit:focus-visible { outline-offset: -2px; }
.cart-preview-edit-hint { margin-top: 7px; color: #b5d1ff; font-size: .73rem; text-decoration: underline; text-underline-offset: 3px; }

.cart-preview { width: min(400px, calc(100vw - 32px)); max-height: calc(100dvh - 100px); overflow-y: auto; }
.cart-preview-items { max-height: min(48dvh, 400px); }
.cart-preview-remove { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 8px; margin-top: 4px; border: 0; border-radius: 6px; background: transparent; color: #ffb5bc; font: inherit; cursor: pointer; }
.cart-preview-remove:hover, .cart-preview-remove:focus-visible { background: #613343; color: #fff; }
.cart-preview-remove:disabled { opacity: .6; cursor: wait; }
.cart-saving { cursor: progress; opacity: .75; }
.cart-toast { position: fixed; z-index: 250; bottom: 24px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 18px; padding: 14px 18px; background: #12382f; border: 1px solid #67e8c1; border-radius: 12px; box-shadow: 0 8px 40px #0008; color: #f0fff9; font-size: .9rem; }
.cart-toast[hidden] { display: none !important; }
.cart-toast a { color: #9dffe0; white-space: nowrap; font-weight: 700; }
.cart-toast button { background: transparent; color: inherit; border: 0; font-size: 1.5rem; cursor: pointer; min-width: 40px; min-height: 40px; }
.cart-toast.is-error { background: #462332; border-color: #ff9fae; }
@media (max-width: 650px) { .cart-preview { width: calc(100vw - 32px); right: 0; } .cart-toast { bottom: max(16px, env(safe-area-inset-bottom)); flex-wrap: wrap; gap: 4px 12px; } .cart-toast > span { flex-basis: calc(100% - 52px); } .cart-toast > button { position: absolute; right: 8px; top: 8px; } }

/* Full cart stays on the shop; only checkout opens the customer flow. */
.shop-cart-open { overflow: hidden; }
.shop-cart { width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0; border: 1px solid #37517b; border-radius: 18px; background: #101e34; color: #edf3ff; box-shadow: 0 24px 90px #0009; }
.shop-cart[open] { display: flex; flex-direction: column; }
.shop-cart::backdrop { background: #020916bd; backdrop-filter: blur(5px); }

.shop-cart-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px 18px; border-bottom: 1px solid #293c59; flex-shrink: 0; }
.shop-cart-heading .eyebrow { margin: 0 0 6px; font-size: .65rem; }
.shop-cart h2 { margin: 0; font-size: 1.55rem; }
.shop-cart-close { border: 1px solid #37517b; border-radius: 9px; background: #192d48; color: #dceaff; width: 44px; height: 44px; cursor: pointer; font-size: 1.7rem; }
.shop-cart-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 24px; }
.shop-cart .cart-preview-items { max-height: none; overflow: visible; margin-bottom: 20px; }
.shop-cart .cart-preview-items strong { font-size: 1rem; }
.shop-cart .cart-preview-details { font-size: .83rem; }
.shop-cart .cart-preview-price { font-size: .95rem; }
.shop-cart .cart-preview-items li { padding: 14px 0; }
.shop-cart-code label { display: block; margin-bottom: 8px; font-weight: 600; font-size: .88rem; }
.shop-cart-code > div { display: flex; gap: 8px; }
.shop-cart-code input { flex: 1; min-width: 0; width: 100%; padding: 12px; background: #081426; border: 1px solid #45648b; border-radius: 8px; color: #fff; font: inherit; font-size: 16px; }
.shop-cart-code button { background: #2e6edb; color: white; border: 0; border-radius: 8px; padding: 10px 14px; font: inherit; font-size: .85rem; font-weight: 650; cursor: pointer; }
.shop-cart button:disabled { opacity: .6; cursor: wait; }
.shop-cart-code-active { padding: 12px 14px; background: #163731; border: 1px solid #387a69; border-radius: 9px; }
.shop-cart-code-active > span { display: block; overflow-wrap: anywhere; color: #a5f5d9; }
.shop-cart-code-active p { margin: 6px 0 0; color: #c0d9d2; font-size: .82rem; line-height: 1.6; }
.shop-cart-message { margin: 10px 0; color: #9de4cf; font-size: .85rem; }
.shop-cart-message:empty { display: none; }
.shop-cart-message.is-error { color: #ffb5bc; }
.shop-cart-footer { border-top: 1px solid #293c59; padding: 18px 24px; flex-shrink: 0; }
.shop-cart-totals { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; }
.shop-cart-term { font-size: .85rem; color: #bacce5; }
.shop-cart-total { font-size: 1.4rem; white-space: nowrap; }
.shop-cart-totals p, .shop-cart-footnote { font-size: .72rem; color: #a9bcd7; line-height: 1.5; margin: 0 0 14px; grid-column: 1 / -1; }
.shop-cart-footnote { margin: 10px 0 0; }
.shop-cart .cart-preview-checkout { animation: none; }

.cart-toast { bottom: calc(var(--cart-nav-height, 0px) + 18px); }

@media (max-width: 650px) {
  .shop-cart { max-height: calc(100dvh - 24px); width: calc(100vw - 20px); border-radius: 13px; }
  .shop-cart-heading { padding: 16px; }
  .shop-cart-body { padding: 10px 16px; }
  .shop-cart-footer { padding: 14px 16px; }
  .shop-cart-totals { gap: 6px 12px; }
  .shop-cart-term { font-size: .76rem; }

}
@media (max-height: 500px) { .shop-cart-footer { padding: 10px 16px; } .shop-cart-footnote, .shop-cart-totals p { display: none; } .shop-cart-heading { padding: 10px 16px; } }


.shop-cart [hidden] { display: none !important; }
@media (max-width:650px) { :root { --cart-nav-height: calc(65px + env(safe-area-inset-bottom)); } }
