/* PepMedix Side Cart — Frontend */
:root {
  --psc-navy:   #1B2D50;
  --psc-navy-2: #243562;
  --psc-gold:   #B09570;
  --psc-cream:  #F9F7F4;
  --psc-border: #E2DDD8;
  --psc-text:   #1E1E1E;
  --psc-mid:    #555;
  --psc-light:  #888;
}

/* ── Floating cart button ───────────────────── */
.psc-fab {
  position: fixed !important;
  bottom: 30px !important;
  right: 30px !important;
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  background: #1B2D50 !important;
  border: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 6px 24px rgba(27,45,80,0.40) !important;
  z-index: 99990 !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: transform .2s, background .2s;
  overflow: visible !important;
}
.psc-fab:hover { background: #243562 !important; transform: scale(1.06); }
.psc-fab:focus { outline: none; }

/* Force the icon to be visible white, override any theme svg rules */
.psc-fab .psc-fab-icon,
.psc-fab svg {
  width: 26px !important;
  height: 26px !important;
  display: block !important;
  fill: #ffffff !important;
  color: #ffffff !important;
  stroke: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.psc-fab .psc-fab-icon path,
.psc-fab svg path {
  fill: #ffffff !important;
  stroke: none !important;
}

.psc-fab-count {
  position: absolute !important;
  top: -4px !important;
  right: -4px !important;
  background: #B09570 !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  min-width: 22px !important;
  height: 22px !important;
  border-radius: 11px !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 5px !important;
  border: 2px solid #fff !important;
  line-height: 1 !important;
}
.psc-fab-count.show { display: flex !important; }

/* ── Overlay ────────────────────────────────── */
.psc-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999998; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.psc-overlay.open { opacity: 1; pointer-events: all; }

/* ── Drawer ─────────────────────────────────── */
.psc-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 400px; max-width: 90vw;
  background: #fff; z-index: 999999;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,0.25);
  height: 100%; height: 100dvh;
}
.psc-drawer.open { transform: translateX(0); }

/* Header — sticky at top of drawer */
.psc-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; background: var(--psc-navy);
  flex-shrink: 0; position: sticky; top: 0; z-index: 2;
}
.psc-title { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: 0.3px; }
.psc-close {
  background: rgba(255,255,255,0.12); color: #fff;
  border: none; width: 34px; height: 34px; border-radius: 50%;
  font-size: 22px; line-height: 1; cursor: pointer;
  transition: background .2s; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.psc-close:hover { background: rgba(255,255,255,0.28); }

/* Body */
.psc-body { flex: 1; overflow-y: auto; padding: 0; -webkit-overflow-scrolling: touch; }

/* ── Free shipping bar ──────────────────────── */
.psc-ship-bar { padding: 16px 24px; background: var(--psc-cream); border-bottom: 1px solid var(--psc-border); }
.psc-ship-text { font-size: 13px; color: var(--psc-mid); text-align: center; margin-bottom: 10px; }
.psc-ship-text strong { color: var(--psc-navy); }
.psc-ship-unlocked { color: var(--psc-gold); }
.psc-ship-track { height: 7px; background: #e3ddd4; border-radius: 4px; overflow: hidden; }
.psc-ship-fill {
  height: 100%; background: linear-gradient(90deg, var(--psc-gold), var(--psc-navy));
  border-radius: 4px; transition: width .4s ease;
}

/* ── Cart items ─────────────────────────────── */
.psc-items { padding: 8px 24px; }
.psc-item {
  display: flex; gap: 14px; padding: 16px 0;
  border-bottom: 1px solid var(--psc-border);
  align-items: flex-start; position: relative;
}
.psc-item-img {
  width: 64px !important; height: 64px !important;
  object-fit: contain; border-radius: 6px;
  background: var(--psc-cream); border: 1px solid var(--psc-border);
  flex-shrink: 0;
}
.psc-item-info { flex: 1; padding-right: 20px; }
.psc-item-name { font-size: 14px; font-weight: 600; color: var(--psc-navy); margin-bottom: 4px; line-height: 1.3; }
.psc-item-price { font-size: 14px; font-weight: 700; color: var(--psc-gold); margin-bottom: 4px; }
.psc-item-discount {
  font-size: 11px; font-weight: 700; color: #166534;
  background: #dcfce7; display: inline-block;
  padding: 2px 8px; border-radius: 100px; margin-bottom: 8px;
}
.psc-item-orig {
  font-size: 12px; color: var(--psc-light);
  text-decoration: line-through; margin-right: 6px; font-weight: 400;
}

.psc-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--psc-border); border-radius: 6px; overflow: hidden; }
.psc-qty-btn {
  width: 28px; height: 28px; background: var(--psc-cream); border: none;
  font-size: 16px; color: var(--psc-navy); cursor: pointer; transition: background .15s;
  display: flex; align-items: center; justify-content: center;
}
.psc-qty-btn:hover { background: var(--psc-gold); color: #fff; }
.psc-qty-num { min-width: 34px; text-align: center; font-size: 14px; font-weight: 600; }

.psc-item-remove {
  position: absolute; top: 14px; right: 0;
  background: none; border: none; font-size: 20px; color: var(--psc-light);
  cursor: pointer; line-height: 1; transition: color .15s; padding: 2px 6px;
}
.psc-item-remove:hover { color: #c0392b; }

/* ── Bulk discount tiers hint ───────────────── */
.psc-tiers {
  margin: 4px 24px 12px; padding: 12px 14px;
  background: #f0f6ff; border: 1px solid #d6e4f7; border-radius: 8px;
}
.psc-tiers-title { font-size: 11px; font-weight: 700; color: var(--psc-navy); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; text-align: center; }
.psc-tiers-row { display: flex; justify-content: space-around; gap: 8px; }
.psc-tier { text-align: center; flex: 1; }
.psc-tier-qty { font-size: 12px; font-weight: 700; color: var(--psc-navy); }
.psc-tier-pct { font-size: 11px; color: #166534; font-weight: 700; }

/* ── Frequently Bought Together ─────────────── */
.psc-fbt {
  margin: 12px 24px 20px; padding: 18px;
  background: var(--psc-cream); border: 1px solid var(--psc-border);
  border-radius: 10px;
}
.psc-fbt-heading {
  font-size: 14px; font-weight: 700; color: var(--psc-navy);
  text-align: center; margin-bottom: 14px;
}
.psc-fbt-product { display: flex; align-items: center; gap: 12px; }
.psc-fbt-img {
  width: 52px !important; height: 52px !important;
  object-fit: contain; border-radius: 6px;
  background: #fff; border: 1px solid var(--psc-border); flex-shrink: 0;
}
.psc-fbt-info { flex: 1; }
.psc-fbt-name { font-size: 13px; font-weight: 600; color: var(--psc-navy); line-height: 1.3; }
.psc-fbt-price { font-size: 14px; font-weight: 700; color: var(--psc-gold); margin-top: 2px; }
.psc-fbt-add {
  background: var(--psc-navy); color: #fff; border: none;
  border-radius: 6px; padding: 8px 20px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .2s, transform .15s; flex-shrink: 0;
}
.psc-fbt-add:hover { background: var(--psc-gold); transform: translateY(-1px); }

/* ── Empty state ────────────────────────────── */
.psc-empty { text-align: center; padding: 60px 24px; color: var(--psc-light); }
.psc-empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.psc-empty p { font-size: 15px; margin-bottom: 20px; }
.psc-shop-btn {
  display: inline-block; background: var(--psc-navy); color: #fff !important;
  padding: 10px 24px; border-radius: 6px; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: background .2s;
}
.psc-shop-btn:hover { background: var(--psc-navy-2); }

/* ── Footer ─────────────────────────────────── */
.psc-footer { padding: 18px 24px; border-top: 1px solid var(--psc-border); background: #fff; flex-shrink: 0; }
.psc-savings-line {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-size: 13px; color: #166534; font-weight: 600;
}
.psc-subtotal { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.psc-subtotal span:first-child { font-size: 14px; color: var(--psc-mid); }
.psc-subtotal-amount { font-size: 20px; font-weight: 800; color: var(--psc-navy); }
.psc-footer-btns { display: flex; gap: 10px; }
.psc-view-cart, .psc-checkout {
  flex: 1; text-align: center; padding: 13px; border-radius: 6px;
  font-size: 14px; font-weight: 700; text-decoration: none; transition: all .2s;
}
.psc-view-cart { background: var(--psc-cream); color: var(--psc-navy) !important; border: 1.5px solid var(--psc-border); }
.psc-view-cart:hover { border-color: var(--psc-navy); }
.psc-checkout { background: var(--psc-navy); color: #fff !important; }
.psc-checkout:hover { background: var(--psc-navy-2); }

/* loading state */
.psc-body.loading { opacity: 0.5; pointer-events: none; }

@media (max-width: 440px) {
  .psc-drawer { width: 100%; max-width: 100%; }
  .psc-fab { bottom: 18px; right: 18px; }
}


html, body { overflow-x: visible; }

/* ════════════════════════════════════════════════
   CART & CHECKOUT PAGE BLOCKS
════════════════════════════════════════════════ */
.psc-page-block {
  max-width: 640px;
  margin: 0 0 24px;
}

/* Free shipping bar (page version) */
.psc-page-ship {
  padding: 16px 20px;
  background: var(--psc-cream);
  border: 1px solid var(--psc-border);
  border-radius: 10px;
  margin-bottom: 16px;
}
.psc-page-ship .psc-ship-text { font-size: 14px; margin-bottom: 10px; }
.psc-page-ship .psc-ship-track { height: 8px; }

/* Tier strip (page version) */
.psc-page-tiers {
  padding: 16px 20px;
  background: #f0f6ff;
  border: 1px solid #d6e4f7;
  border-radius: 10px;
  margin-bottom: 16px;
}
.psc-page-tiers .psc-tiers-title { font-size: 13px; margin-bottom: 12px; }
.psc-page-tiers .psc-tier-qty { font-size: 15px; }
.psc-page-tiers .psc-tier-pct { font-size: 13px; }

/* FBT (page version) */
.psc-page-fbt {
  padding: 20px;
  background: var(--psc-cream);
  border: 1px solid var(--psc-border);
  border-radius: 10px;
  margin-bottom: 16px;
}
.psc-page-fbt .psc-fbt-heading { font-size: 15px; margin-bottom: 14px; }
.psc-page-fbt .psc-fbt-name { font-size: 14px; }
.psc-page-fbt .psc-fbt-price { font-size: 15px; }
.psc-page-fbt .psc-fbt-add { padding: 10px 26px; font-size: 14px; }

/* Savings banner on cart/checkout */
.psc-page-savings {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px; font-weight: 700; color: #166534;
}
