:root {
  --fs-cart-width: 400px;
  --fs-cart-bg: #fff;
  --fs-cart-accent: #1a5fa8;
  --fs-cart-border: #e5e5e5;
  --fs-cart-speed: .3s;
}

.fs-cart-trigger {
  position: relative; background: none; border: 0; padding: 6px;
  cursor: pointer; color: inherit; line-height: 0;
}
.fs-cart-badge {
  position: absolute; top: -2px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--fs-cart-accent); color: #fff;
  font: 600 11px/18px sans-serif; text-align: center;
}
.fs-cart-badge[data-count="0"] { display: none; }

.fs-cart-overlay {
  position: fixed; inset: 0; z-index: 1040;
  background: rgba(0,0,0,.45);
  opacity: 0; visibility: hidden;
  transition: opacity var(--fs-cart-speed), visibility var(--fs-cart-speed);
}
.fs-cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1050;
  width: var(--fs-cart-width); max-width: 100vw;
  background: var(--fs-cart-bg);
  display: flex; flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,.15);
  transform: translateX(100%);
  transition: transform var(--fs-cart-speed) ease;
}
.fs-cart:focus { outline: none; }
body.fs-cart-open .fs-cart { transform: translateX(0); }
body.fs-cart-open .fs-cart-overlay { opacity: 1; visibility: visible; }
body.fs-cart-open { overflow: hidden; }

.fs-cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--fs-cart-border);
}
.fs-cart-header h2 { margin: 0; font-size: 20px; }
.fs-cart-close {
  background: none; border: 0; font-size: 28px; line-height: 1;
  cursor: pointer; padding: 0 4px; color: #666;
}
.fs-cart-close:hover { color: #000; }

.fs-cart-body {
  flex: 1; overflow-y: auto; padding: 16px 20px;
  -webkit-overflow-scrolling: touch;
}
.fs-cart-body:empty::before {
  content: "Your cart is empty."; display: block;
  text-align: center; color: #888; padding: 40px 0;
}

.fs-cart-footer {
  padding: 16px 20px; border-top: 1px solid var(--fs-cart-border);
}
.fs-cart-subtotal {
  display: flex; justify-content: space-between;
  font-weight: 600; font-size: 16px; margin-bottom: 12px;
}
.fs-cart-checkout {
  width: 100%; padding: 12px; border: 0; border-radius: 4px;
  background: var(--fs-cart-accent); color: #fff;
  font-size: 16px; font-weight: 600; cursor: pointer;
}
.fs-cart-checkout:hover { filter: brightness(1.1); }

@media (prefers-reduced-motion: reduce) {
  .fs-cart, .fs-cart-overlay { transition: none; }
}

/* ===== Tray body (output from loadCheckoutItems) ===== */
#fs-cart-items { font-size: 13px; }

/* "2 Items in Cart" line */
#fs-cart-items > div:first-child {
  color: #888; font-size: 12px; text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: 4px;
}

/* stray separators and the in-body total (total is shown in the footer) */
#fs-cart-items > hr,
#fs-cart-items > br { display: none; }
#fs-cart-items > div:last-child[style*="text-align:right"] { display: none; }

/* ===== Tray item cards ===== */
.fs-ci { --fs-ci-thumb: 128px; padding: 12px 0; }
.fs-ci + .fs-ci { border-top: 1px solid var(--fs-cart-border); }

.fs-ci-name { font-weight: 600; font-size: 14px; line-height: 1.3; margin-bottom: 8px; }

.fs-ci-row {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 0 12px; align-items: start;
}

.fs-ci-thumb {
  position: relative;
  width: var(--fs-ci-thumb); height: var(--fs-ci-thumb);
  border-radius: 8px; overflow: hidden;
  background: #f0f2f5;
}
.fs-ci-thumb--sail {
  background: url(https://www.falconsails.com/design/images/backgrounds/blueocean.jpg) center / cover;
}
.fs-ci-thumb > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fs-ci-noimg { width: 100%; height: 100%; }

.fs-ci-mid {
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  min-width: 0; min-height: var(--fs-ci-thumb);
  font-size: 12px; color: #6b7078;
}

/* sail color list */
.fs-ci-colors { display: grid; gap: 3px; color: #444; }
.fs-ci-color { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fs-ci-color-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-ci-dot {
  flex: none; width: 10px; height: 10px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}

.fs-ci-right {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between;
  min-height: var(--fs-ci-thumb);
}
.fs-ci-pricewrap { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.fs-ci-price { font-weight: 600; font-size: 15px; white-space: nowrap; }
.fs-ci-qty { font-size: 12px; color: #6b7078; white-space: nowrap; }
.fs-ci-remove {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: #c0392b; font-size: 12px; text-decoration: underline;
}

/* part quantity stepper */
.fs-ci-part-details { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.fs-ci-stepper {
  display: inline-flex; align-items: center;
  border: 1px solid var(--fs-cart-border); border-radius: 6px; overflow: hidden;
}
.fs-ci-step {
  width: 30px; height: 30px; border: 0; padding: 0;
  background: #f5f6f8; color: #333; font-size: 16px; line-height: 1; cursor: pointer;
}
.fs-ci-step:hover:not(:disabled) { background: #e9ecf0; }
.fs-ci-step:disabled { color: #bbb; cursor: default; }
.fs-ci-step-val {
  min-width: 34px; text-align: center;
  font-size: 14px; font-weight: 600; color: #1d1f23;
}

/* phones: a little smaller so the middle column isn't squeezed */
@media (max-width: 420px) {
  .fs-ci { --fs-ci-thumb: 96px; }
}

/* ===== Cart icon "item added" animation ===== */
@keyframes fs-cart-wiggle {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-14deg) scale(1.1); }
  40% { transform: rotate(10deg) scale(1.1); }
  60% { transform: rotate(-6deg); }
  80% { transform: rotate(3deg); }
}
@keyframes fs-cart-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.6); }
  100% { transform: scale(1); }
}
@keyframes fs-cart-ring {
  0%   { box-shadow: 0 0 0 0 var(--fs-cart-accent); }
  100% { box-shadow: 0 0 0 12px transparent; }
}

.fs-cart-bump svg {
  transform-origin: 50% 20%;
  animation: fs-cart-wiggle .6s ease;
}
.fs-cart-bump .fs-cart-badge {
  animation: fs-cart-pop .4s ease, fs-cart-ring .8s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .fs-cart-bump svg { animation: none; }
  .fs-cart-bump .fs-cart-badge { animation: fs-cart-ring .8s ease-out; }
}

/* ===== Floating cart button (labeled pill) ===== */
.fs-cart-fab {
  --fs-cart-fab-accent: orange;
  position: fixed; right: 20px; bottom: 20px; z-index: 1030;
  height: 48px; padding: 0 18px 0 14px; gap: 10px;
  display: flex; align-items: center;
  border: 0; border-radius: 24px;
  background: #111; color: #fff; cursor: pointer;
  font: 500 14px/1 'Poppins', sans-serif;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  opacity: 0; visibility: hidden; transform: translateY(20px) scale(.8);
  transition: opacity .25s, transform .25s, visibility .25s;
}
body.fs-cart-has-items.fs-cart-header-hidden .fs-cart-fab {
  opacity: 1; visibility: visible; transform: none;
}
body.fs-cart-open .fs-cart-fab { opacity: 0; visibility: hidden; }

.fs-cart-fab svg { color: var(--fs-cart-fab-accent); }
.fs-cart-fab-sep { width: 1px; height: 20px; background: rgba(255,255,255,.25); }

.fs-cart-fab .fs-cart-badge {
  position: static; min-width: 0; height: auto; padding: 0; border-radius: 0;
  background: none; color: var(--fs-cart-fab-accent);
  font: 700 16px/1 'Poppins', sans-serif;
}

@keyframes fs-cart-fab-ring {
  0%   { box-shadow: 0 4px 14px rgba(0,0,0,.3), 0 0 0 0 rgba(255,165,0,.6); }
  100% { box-shadow: 0 4px 14px rgba(0,0,0,.3), 0 0 0 16px rgba(255,165,0,0); }
}
.fs-cart-fab.fs-cart-bump { animation: fs-cart-fab-ring .8s ease-out; }
.fs-cart-fab.fs-cart-bump .fs-cart-badge { animation: fs-cart-pop .4s ease; }

@media (prefers-reduced-motion: reduce) {
  .fs-cart-fab.fs-cart-bump .fs-cart-badge { animation: none; }
}

/* store page has its own cart button, so hide the site menu's copy here */
.navbar .fs-cart-menu { display: none !important; }

/* ===== Local overrides ===== */
/* remove the old border on the mini sail drawing (comes from another stylesheet) */
.minisails_099, .minisails_120, .minisails_140 {
  border: none;
}

/* ===== Header quick checkout link ===== */
.fs-cart-header-actions { display: flex; align-items: center; gap: 14px; }

.fs-cart-quick-checkout {
  display: none;
  align-items: center; gap: 5px;
  color: #33CCFF; font-weight: 600; font-size: 18px;
  white-space: nowrap; text-decoration: none;
}
.fs-cart-quick-checkout .fa { font-size: 11px; }
.fs-cart-quick-checkout:hover,
.fs-cart-quick-checkout:focus { color: #fff; text-decoration: none; }

body.fs-cart-has-items .fs-cart-quick-checkout { display: inline-flex; }