.header-cart-toggle { position: relative; }
.header-cart-count {
  position: absolute;
  top: -3px;
  right: -3px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 20px;
  background: var(--accent);
  color: var(--page-bg);
  font: 600 10px/1 "Poppins", sans-serif;
}
.header-cart-count[hidden] { display: none; }
html.sidecart-is-open, .sidecart-is-open body { overflow: hidden; }

.sidecart {
  --sidecart-border: rgba(182, 189, 216, .1);
  position: fixed;
  inset: 0 0 0 auto;
  width: min(100%, 420px);
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--page-bg, #00021a);
  color: var(--text-light, #f6f7ff);
  font: 500 15px/1.5 "Poppins", "Segoe UI", sans-serif;
  box-shadow: -16px 0 64px rgba(0, 0, 0, .32);
  overflow: hidden;
  overscroll-behavior: contain;
}
.sidecart[open] { display: flex; animation: sidecart-enter .25s ease-out; }
.sidecart::backdrop { background: rgba(0, 1, 14, .66); backdrop-filter: blur(3px); }
.sidecart *, .sidecart *::before, .sidecart *::after { box-sizing: border-box; }
.sidecart button, .sidecart input { font: inherit; }
.sidecart button { cursor: pointer; }
.sidecart button:disabled { cursor: default; opacity: .35; }
.sidecart :is(button, a, input, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sidecart svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.sidecart-panel { display: flex; flex-direction: column; width: 100%; min-width: 0; height: 100%; }
.sidecart-header { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 68px; padding: 15px 62px; border-bottom: 1px solid var(--sidecart-border); }
.sidecart-header h2 { display: flex; align-items: center; gap: 12px; margin: 0; color: #fff; font-size: 24px; font-weight: 600; line-height: 1.3; }
.sidecart-header h2 svg { width: 26px; height: 26px; }
.sidecart-close { position: absolute; left: 18px; top: 50%; display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text-muted); transform: translateY(-50%); }
.sidecart-close:hover { background: rgba(159, 179, 255, .08); color: #fff; }
.sidecart-content { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.sidecart-items { flex: 1 1 auto; min-height: 80px; padding: 14px 20px 24px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #343c65 transparent; }
.sidecart-item-list { margin: 0; padding: 0; list-style: none; }
.sidecart-item { margin: 0; padding: 20px 0 14px; }
.sidecart-item + .sidecart-item { margin-top: 8px; }
.sidecart-product { display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: center; gap: 15px; min-height: 112px; padding: 0 15px 16px; }
.sidecart-product-media { display: block; width: 100px; }
.sidecart .sidecart-product-image { display: block; width: 100%; height: 76px; object-fit: contain; }
.sidecart-product-info { min-width: 0; }
.sidecart-product-name { margin: 0; color: var(--accent); font-size: 16px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.sidecart-product-name a:hover { color: #d1dbff; }
.sidecart-product-info dl.variation { display: block; margin: 4px 0 0; padding: 0; border: 0; color: var(--accent); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.sidecart-product-info dl.variation dt, .sidecart-product-info dl.variation dd { float: none; display: inline; margin: 0; padding: 0; font-weight: 400; }
.sidecart-product-info dl.variation dt::after { content: " "; }
.sidecart-product-info dl.variation dd::after { content: ""; display: block; }
.sidecart-product-info dl.variation p { display: inline; margin: 0; }
.sidecart-price { margin: 7px 0 0; font-size: 14px; font-weight: 500; }
.sidecart-backorder { margin: 6px 0 0; color: var(--text-muted); font-size: 12px; }
.sidecart-item-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 15px 0 35px; border-top: 1px solid var(--sidecart-border); }
.sidecart-quantity { display: flex; flex: 0 0 auto; align-items: center; height: 42px; overflow: hidden; border: 1px solid var(--accent); border-radius: 8px; background: #fff; color: #00021a; }
.sidecart-quantity button { width: 35px; height: 40px; padding: 0; border: 0; background: transparent; color: inherit; font-size: 22px; font-weight: 400; }
.sidecart-quantity button:hover:not(:disabled) { background: #edf1ff; }
.sidecart-quantity input { width: 46px; height: 40px; margin: 0; padding: 0 2px; border: 0; border-radius: 0; background: #fff; color: inherit; font-size: 14px; text-align: center; appearance: textfield; -moz-appearance: textfield; }
.sidecart-quantity input::-webkit-inner-spin-button, .sidecart-quantity input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.sidecart-quantity :is(button, input):focus-visible { outline-offset: -3px; }
.sidecart-remove { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 4px 0; border: 0; background: transparent; color: #fff; font-size: 16px; white-space: nowrap; }
.sidecart-remove svg { width: 17px; height: 17px; }
.sidecart-remove:hover { color: var(--accent); }
.sidecart-summary { flex: 0 0 auto; max-height: 58%; padding: 19px 20px max(16px, env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; background: #090b22; scrollbar-width: thin; scrollbar-color: #343c65 transparent; }
.sidecart-coupon { margin: 0 0 10px; }
.sidecart-coupon summary { display: flex; align-items: center; gap: 6px; width: fit-content; min-height: 30px; cursor: pointer; list-style: none; }
.sidecart-coupon summary::-webkit-details-marker { display: none; }
.sidecart-coupon summary svg { width: 14px; height: 14px; transition: transform .2s; }
.sidecart-coupon[open] summary svg { transform: rotate(180deg); }
.sidecart-coupon-form { display: flex; gap: 8px; margin: 10px 0 16px; }
.sidecart-coupon-form input { width: 100%; min-width: 0; height: 44px; padding: 10px 12px; border: 1px solid #46517f; border-radius: 6px; background: #00021a; color: #fff; font-size: 14px; }
.sidecart-coupon-form input::placeholder { color: var(--text-muted); }
.sidecart-coupon-form button, .sidecart-notices button { padding: 8px 12px; border: 1px solid #52618f; border-radius: 6px; background: #1b244d; color: #fff; font-size: 13px; }
.sidecart-totals { margin: 0 0 24px; }
.sidecart-total-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin: 0; line-height: 1.55; }
.sidecart-total-row dt { min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.sidecart-total-row dd { flex: 0 1 58%; margin: 0; text-align: right; }
.sidecart-total-row .amount { white-space: nowrap; }
.sidecart-discount { align-items: center; padding: 4px 0; color: #c4d0ff; font-size: 13px; }
.sidecart-discount dt { display: flex; align-items: center; flex: 1; }
.sidecart-discount dd { flex: 0 0 auto; }
.sidecart-discount dt button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; min-width: 28px; min-height: 28px; margin-left: 4px; padding: 0; border: 0; background: transparent; color: inherit; font-size: 20px; line-height: 1; }
.sidecart-total-row small { display: block; color: var(--text-muted); font-size: 11px; font-weight: 400; }
.sidecart-grand-total { align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--sidecart-border); }
.sidecart-grand-total dd { font-size: 24px; font-weight: 600; line-height: 1.4; }
.sidecart-grand-total strong { font-weight: 600; }
.sidecart-checkout { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 7px; background: #050839; color: #fff; font-size: 14px; font-weight: 600; text-align: center; transition: background .2s, border-color .2s; }
.sidecart-checkout:hover { border-color: #6879ce; background: #182154; }
.sidecart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100%; padding: 32px 12px; text-align: center; }
.sidecart-empty > svg { width: 54px; height: 54px; margin-bottom: 12px; color: var(--accent); stroke-width: 1; }
.sidecart-empty p { margin: 12px 0 6px; font-size: 20px; font-weight: 500; }
.sidecart-empty > span { color: var(--text-muted); font-size: 14px; }
.sidecart-empty .sidecart-checkout { width: auto; margin-top: 24px; padding-right: 30px; padding-left: 30px; }
.sidecart-notices { flex: 0 0 auto; max-height: 25%; margin: 12px 20px 0; padding: 12px; overflow-y: auto; border: 1px solid #475685; border-radius: 6px; background: #151e3a; color: var(--text-light); font-size: 13px; }
.sidecart-notices[hidden] { display: none; }
.sidecart-notices.has-error { border-color: #885267; background: #2c152c; }
.sidecart-notices :is(.woocommerce-message, .woocommerce-error, .woocommerce-info) { margin: 0; padding: 0; border: 0; background: transparent; color: inherit; list-style: none; }
.sidecart-notices :is(.woocommerce-message, .woocommerce-error, .woocommerce-info)::before { display: none; }
.sidecart-notices p { margin: 0 0 6px; }
.sidecart[aria-busy="true"] .sidecart-content { opacity: .6; cursor: progress; }
.sidecart[aria-busy="true"] .sidecart-header::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); content: ""; animation: sidecart-loading 1s ease-in-out infinite; }
@keyframes sidecart-enter { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes sidecart-loading { 50% { opacity: .25; } }
@media (max-width: 1100px) {
  .floating-action--cart { display: flex; }
}
@media (max-width: 359px) {
  .sidecart-header h2 { font-size: 21px; }
  .sidecart-items { padding-right: 14px; padding-left: 14px; }
  .sidecart-product { grid-template-columns: 82px minmax(0, 1fr); gap: 12px; padding-right: 4px; padding-left: 4px; }
  .sidecart-product-media { width: 82px; }
  .sidecart-product-name { font-size: 15px; }
  .sidecart-item-actions { gap: 10px; padding-right: 4px; padding-left: 4px; }
  .sidecart-remove { font-size: 14px; }
  .sidecart-summary { padding-right: 14px; padding-left: 14px; }
}
@media (max-height: 550px) {
  .sidecart-header { min-height: 56px; padding-top: 10px; padding-bottom: 10px; }
  .sidecart-summary { max-height: 52%; }
}
@media (prefers-reduced-motion: reduce) {
  .sidecart[open], .sidecart[aria-busy="true"] .sidecart-header::after { animation: none; }
  .sidecart * { transition: none; scroll-behavior: auto; }
}
