.store-cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  visibility: hidden;
  background: rgba(5, 8, 11, .58);
  opacity: 0;
  transition: opacity .3s ease, visibility .3s ease;
}

.store-cart-backdrop.show { visibility: visible; opacity: 1; }

.store-cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 130;
  display: flex;
  width: min(500px, 100vw);
  flex-direction: column;
  background: #f4f7fa;
  box-shadow: -18px 0 54px rgba(5, 8, 11, .25);
  transform: translateX(100%);
  transition: transform .36s cubic-bezier(.22, .61, .36, 1);
}

.store-cart-drawer.open { transform: translateX(0); }

.store-cart-header {
  display: grid;
  min-height: 94px;
  grid-template-columns: 48px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  color: #fff;
  background: linear-gradient(135deg, #0284c7, #009db4);
}

.store-cart-header-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 14px;
}

.store-cart-header-icon svg { width: 25px; height: 25px; }
.store-cart-header > div { min-width: 0; }
.store-cart-header > div > span { display: block; margin-bottom: 4px; color: #d9f8ff; font-size: .64rem; font-weight: 900; letter-spacing: .13em; }
.store-cart-header h2 { margin: 0; overflow: hidden; color: #fff; font-size: 1.42rem; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.store-cart-close { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; color: #fff; background: rgba(255,255,255,.12); border: 0; border-radius: 50%; cursor: pointer; }
.store-cart-close:hover { background: rgba(255,255,255,.22); }
.store-cart-close:focus-visible { outline: 3px solid rgba(255,255,255,.42); outline-offset: 2px; }
.store-cart-close svg { width: 22px; height: 22px; }

.store-cart-shipping { flex: 0 0 auto; margin: 16px 20px 0; padding: 15px 16px 13px; background: #fff; border: 1px solid #bae6fd; border-radius: 15px; box-shadow: 0 8px 22px rgba(15,23,42,.055); }
.store-cart-shipping-message { margin: 0; color: #0f172a; font-size: .86rem; font-weight: 850; line-height: 1.35; text-align: center; }
.store-cart-shipping-route { position: relative; height: 34px; margin: 13px 18px 0; }
.store-cart-shipping-track { position: absolute; top: 50%; right: 0; left: 0; height: 6px; overflow: hidden; border-radius: 999px; background: #dbe3ec; transform: translateY(-50%); }
.store-cart-shipping-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#38bdf8,var(--store-accent)); transition: width .35s ease; }
.store-cart-shipping-truck { position: absolute; top: 50%; left: 0; z-index: 2; display: grid; width: 34px; height: 34px; place-items: center; color: #075985; background: #fff; border: 1px solid #7dd3fc; border-radius: 50%; box-shadow: 0 5px 13px rgba(2,132,199,.2); transform: translate(-50%,-50%); transition: left .35s ease,color .25s ease,background-color .25s ease; }
.store-cart-shipping-truck svg { width: 19px; height: 19px; }
.store-cart-shipping-scale { display: flex; justify-content: space-between; margin-top: 3px; color: #64748b; font-size: .66rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.store-cart-shipping.is-complete { border-color: #86efac; background: linear-gradient(145deg,#fff,#f0fdf4); }
.store-cart-shipping.is-complete .store-cart-shipping-message { color: #166534; }
.store-cart-shipping.is-complete .store-cart-shipping-fill { background: linear-gradient(90deg,#22c55e,#16a34a); }
.store-cart-shipping.is-complete .store-cart-shipping-truck { color: #fff; background: #16a34a; border-color: #15803d; }

.store-cart-body { min-height: 0; flex: 1; overflow-y: auto; padding: 20px; -webkit-overflow-scrolling: touch; }
.store-cart-items { display: grid; gap: 13px; }
.store-cart-empty { display: grid; min-height: 360px; place-content: center; justify-items: center; color: #64748b; text-align: center; }
.store-cart-empty[hidden] { display: none; }
.store-cart-empty > span { display: grid; width: 76px; height: 76px; margin-bottom: 18px; place-items: center; color: #0284c7; background: #e0f2fe; border-radius: 50%; }
.store-cart-empty svg { width: 38px; height: 38px; }
.store-cart-empty strong { color: #0f172a; font-size: 1.12rem; }
.store-cart-empty p { margin: 7px 0 0; font-size: .85rem; }

.store-cart-item { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 13px; background: #fff; border: 1px solid #dbe3ec; border-radius: 15px; box-shadow: 0 8px 22px rgba(15,23,42,.055); }
.store-cart-item-image { display: grid; width: 92px; aspect-ratio: 1; place-items: center; overflow: hidden; padding: 0; color: #94a3b8; background: #eef2f7; border: 0; border-radius: 11px; cursor: pointer; font: inherit; font-size: .65rem; text-align: center; }
.store-cart-item-image:hover { box-shadow: 0 0 0 3px rgba(0,157,180,.16); }
.store-cart-item-image:focus-visible { outline: 3px solid rgba(0,157,180,.32); outline-offset: 2px; }
.store-cart-item-image img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.store-cart-item-copy { display: grid; min-width: 0; align-content: start; gap: 6px; }
.store-cart-item-copy h3 { margin: 0; overflow: hidden; color: #0f172a; font-size: .95rem; line-height: 1.22; text-overflow: ellipsis; white-space: nowrap; }
.store-cart-item-variation { min-height: 17px; margin: 0; overflow: hidden; color: #64748b; font-size: .72rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.store-cart-item-variation[hidden] { display: none; }
.store-cart-item-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 5px; }
.store-cart-quantity { display: inline-grid; grid-template-columns: 31px 34px 31px; align-items: center; overflow: hidden; background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 999px; }
.store-cart-quantity button { display: grid; width: 31px; height: 31px; padding: 0; place-items: center; color: #075985; background: transparent; border: 0; cursor: pointer; font: inherit; font-size: 1.05rem; font-weight: 800; }
.store-cart-quantity button:hover { background: #e0f2fe; }
.store-cart-quantity button:disabled { color: #cbd5e1; cursor: default; }
.store-cart-quantity strong { color: #0f172a; font-size: .78rem; text-align: center; }
.store-cart-stock-warning { margin: -1px 0 0; color: #b45309; font-size: .67rem; font-weight: 800; line-height: 1.25; }
.store-cart-stock-warning[hidden] { display: none; }
.store-cart-line-total { color: #0284c7; font-size: 1.02rem; font-weight: 900; white-space: nowrap; }
.store-cart-remove { display: grid; width: 31px; height: 31px; justify-self: end; margin-top: 1px; padding: 0; place-items: center; color: #64748b; background: #f8fafc; border: 1px solid #dbe3ec; border-radius: 9px; cursor: pointer; }
.store-cart-remove:hover { color: #dc2626; background: #fef2f2; border-color: #fecaca; }
.store-cart-remove:focus-visible { outline: 3px solid rgba(220,38,38,.18); outline-offset: 2px; }
.store-cart-remove svg { width: 17px; height: 17px; }

.store-cart-footer { flex: 0 0 auto; padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #dbe3ec; box-shadow: 0 -12px 30px rgba(15,23,42,.1); }
.store-cart-subtotal, .store-cart-rule-discount { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 8px; font-size: .78rem; font-weight: 800; }
.store-cart-subtotal { color: #64748b; }
.store-cart-subtotal[hidden] { display: none; }
.store-cart-rule-discounts { display: grid; }
.store-cart-rule-discount { color: #087a55; }
.store-cart-rule-discount span { max-width: 72%; line-height: 1.35; }
.store-cart-quote-status { min-height: 0; margin: 0 0 8px; color: #64748b; font-size: .7rem; font-weight: 700; }
.store-cart-total { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.store-cart-total span { color: #334155; font-size: 1rem; font-weight: 800; }
.store-cart-total strong { color: #0f172a; font-size: 2rem; font-weight: 950; letter-spacing: -.04em; line-height: 1; }
.store-cart-checkout { display: flex; width: 100%; min-height: 55px; align-items: center; justify-content: center; padding: 14px 22px; color: #061216; background: var(--store-accent); border: 0; border-radius: 999px; box-shadow: 0 10px 24px rgba(0,157,180,.24); cursor: pointer; font: inherit; font-size: .96rem; font-weight: 900; }
.store-cart-checkout:hover:not(:disabled) { background: #19d7ea; transform: translateY(-1px); }
.store-cart-checkout:focus-visible { outline: 3px solid rgba(0,157,180,.32); outline-offset: 3px; }
.store-cart-checkout:disabled { color: #94a3b8; background: #e2e8f0; box-shadow: none; cursor: default; }

@media (max-width: 700px) {
  .store-cart-drawer { width: 100%; }
  .store-cart-header { min-height: 78px; grid-template-columns: 40px minmax(0, 1fr) 42px; gap: 11px; padding: 13px 14px; }
  .store-cart-header-icon { width: 40px; height: 40px; border-radius: 11px; }
  .store-cart-header-icon svg { width: 22px; height: 22px; }
  .store-cart-header h2 { font-size: 1.18rem; }
  .store-cart-close { width: 42px; height: 42px; }
  .store-cart-shipping { margin: 12px 14px 0; padding: 13px 13px 11px; }
  .store-cart-shipping-message { font-size: .8rem; }
  .store-cart-shipping-route { margin-top: 11px; }
  .store-cart-body { padding: 14px; }
  .store-cart-item { grid-template-columns: 82px minmax(0, 1fr); gap: 11px; padding: 11px; }
  .store-cart-item-image { width: 82px; }
  .store-cart-item-copy h3 { font-size: .88rem; }
  .store-cart-item-bottom { gap: 8px; }
  .store-cart-footer { padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); }
  .store-cart-total { margin-bottom: 12px; }
  .store-cart-total strong { font-size: 1.75rem; }
  .store-cart-checkout { min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .store-cart-backdrop, .store-cart-drawer, .store-cart-shipping-fill, .store-cart-shipping-truck { transition: none; }
}
