/**
 * Apex Side Cart - Nitro Pro Edition
 * High-conversion modern floating drawer for WooCommerce
 * Compatible with Woodmart, Elementor, and all modern themes.
 */

/* Keep these variables inside the plugin; the active theme never receives them. */
#apex-side-cart-wrapper,
#apex-cart-floating-btn {
  --apex-blue-50: #eff6ff;
  --apex-blue-100: #dbeafe;
  --apex-blue-500: #3b82f6;
  --apex-blue-600: #2563eb;
  --apex-blue-700: #1d4ed8;
  --apex-emerald-50: #ecfdf5;
  --apex-emerald-100: #d1fae5;
  --apex-emerald-600: #059669;
  --apex-emerald-700: #047857;
  --apex-slate-50: #f8fafc;
  --apex-slate-100: #f1f5f9;
  --apex-slate-200: #e2e8f0;
  --apex-slate-300: #cbd5e1;
  --apex-slate-400: #94a3b8;
  --apex-slate-500: #64748b;
  --apex-slate-600: #475569;
  --apex-slate-700: #334155;
  --apex-slate-800: #1e293b;
  --apex-slate-900: #0f172a;
  --apex-pink-600: #db2777;
  --apex-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base resets for drawer scope */
.apex-cart-wrapper,
.apex-cart-wrapper * {
  box-sizing: border-box;
}

/* ============================================================
   Wrapper & Backdrop
   ============================================================ */
.apex-cart-wrapper {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  justify-content: flex-end;
  padding: 8px;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  font-family: var(--apex-font);
  transition: visibility 0.3s ease;
}

@media (min-width: 640px) {
  .apex-cart-wrapper {
    padding: 16px;
  }
}

@media (min-width: 768px) {
  .apex-cart-wrapper {
    padding: 24px;
  }
}

.apex-cart-wrapper.is-open {
  visibility: visible;
  pointer-events: auto;
}

.apex-cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.apex-cart-wrapper.is-open .apex-cart-backdrop {
  opacity: 1;
}

/* ============================================================
   Floating Drawer Card
   ============================================================ */
.apex-cart-drawer {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 512px; /* max-w-lg */
  height: 100%;
  max-height: 96vh;
  margin: auto 0;
  background: #ffffff;
  border-radius: 2rem;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  border: 1px solid var(--apex-slate-100);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(110%);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.apex-cart-wrapper.is-open .apex-cart-drawer {
  transform: translateX(0);
}

.apex-cart-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* ============================================================
   Header
   ============================================================ */
.apex-cart-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--apex-slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  flex-shrink: 0;
}

.apex-cart-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.apex-cart-header-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--apex-slate-900);
  letter-spacing: -0.02em;
  margin: 0;
}

.apex-cart-header-badge {
  background: var(--apex-blue-50);
  color: var(--apex-blue-600);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid var(--apex-blue-100);
}

.apex-cart-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: var(--apex-slate-100);
  border: none;
  color: var(--apex-slate-500);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.apex-cart-close-btn:hover {
  background: var(--apex-slate-200);
  color: var(--apex-slate-800);
  transform: rotate(90deg);
}

/* Keep utility controls neutral when a theme styles every button. */
#apex-side-cart-wrapper .apex-cart-close-btn,
#apex-side-cart-wrapper .apex-item-delete-btn,
#apex-side-cart-wrapper .apex-qty-btn {
  -webkit-appearance: none !important;
  appearance: none !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  margin: 0 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  text-shadow: none !important;
}

#apex-side-cart-wrapper .apex-cart-close-btn {
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  background: var(--apex-slate-100) !important;
  border: 0 !important;
  border-radius: 9999px !important;
  color: var(--apex-slate-500) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

#apex-side-cart-wrapper .apex-cart-close-btn:hover,
#apex-side-cart-wrapper .apex-cart-close-btn:focus-visible {
  background: var(--apex-slate-200) !important;
  color: var(--apex-slate-800) !important;
}

#apex-side-cart-wrapper .apex-cart-close-btn svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
  pointer-events: none;
}

/* ============================================================
   3-Step Milestone Free Shipping Bar
   ============================================================ */
.apex-shipping-milestone-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--apex-slate-100);
  padding: 14px 24px 16px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.apex-shipping-status-msg {
  font-size: 12px;
  font-weight: 500;
  color: var(--apex-slate-600);
  margin-bottom: 12px;
  text-align: center;
}

@media (min-width: 640px) {
  .apex-shipping-status-msg {
    text-align: left;
  }
}

.apex-shipping-status-msg .highlight {
  color: var(--apex-emerald-600);
  font-weight: 700;
}

.apex-shipping-status-msg .target {
  font-weight: 700;
  color: var(--apex-slate-800);
}

.apex-milestone-track-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 380px;
  margin: 0 auto;
  padding: 0 16px;
}

.apex-milestone-track-bg {
  position: absolute;
  left: 32px;
  right: 32px;
  top: 16px;
  transform: translateY(-50%);
  height: 4px;
  background: var(--apex-slate-200);
  border-radius: 9999px;
  z-index: 1;
}

.apex-milestone-track-fill {
  position: absolute;
  left: 32px;
  top: 16px;
  transform: translateY(-50%);
  height: 4px;
  background: var(--apex-emerald-600);
  border-radius: 9999px;
  z-index: 2;
  transition: width 0.4s ease;
  max-width: calc(100% - 64px);
}

.apex-milestone-step {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.apex-milestone-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.apex-milestone-step.is-done .apex-milestone-icon-wrap {
  background: var(--apex-emerald-600);
  color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.3);
}

.apex-milestone-step.is-current .apex-milestone-icon-wrap {
  background: var(--apex-emerald-600);
  color: #ffffff;
  box-shadow: 0 0 0 4px var(--apex-emerald-50), 0 4px 6px -1px rgba(5, 150, 105, 0.3);
}

.apex-milestone-step.is-locked .apex-milestone-icon-wrap {
  background: var(--apex-slate-100);
  border: 2px solid var(--apex-slate-300);
  color: var(--apex-slate-400);
}

.apex-milestone-step.is-unlocked .apex-milestone-icon-wrap {
  background: var(--apex-emerald-600);
  color: #ffffff;
  box-shadow: 0 0 0 4px var(--apex-emerald-50), 0 4px 6px -1px rgba(5, 150, 105, 0.3);
}

.apex-milestone-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--apex-slate-800);
  margin-top: 6px;
  white-space: nowrap;
}

/* Four milestone labels fit cleanly in the drawer. */
.apex-milestone-track-container {
  max-width: 440px;
  padding: 0 10px;
}

.apex-milestone-label {
  font-size: 10px;
}

.apex-milestone-step.is-current .apex-milestone-label {
  color: var(--apex-emerald-700);
  font-weight: 700;
}

.apex-milestone-step.is-locked .apex-milestone-label {
  color: var(--apex-slate-400);
  font-weight: 500;
}

/* ============================================================
   Scrollable Body
   ============================================================ */
.apex-cart-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Custom Minimalist Scrollbar */
.apex-cart-body::-webkit-scrollbar {
  width: 5px;
}
.apex-cart-body::-webkit-scrollbar-track {
  background: transparent;
}
.apex-cart-body::-webkit-scrollbar-thumb {
  background: var(--apex-slate-300);
  border-radius: 20px;
}
.apex-cart-body::-webkit-scrollbar-thumb:hover {
  background: var(--apex-slate-400);
}

/* ============================================================
   Product Items List
   ============================================================ */
.apex-products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.apex-cart-item {
  padding: 14px;
  border-radius: 1rem;
  background: #ffffff;
  border: 1px solid var(--apex-slate-100);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  display: flex;
  gap: 14px;
  position: relative;
  transition: all 0.2s ease;
}

.apex-cart-item:hover {
  border-color: var(--apex-slate-200);
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.05);
}

.apex-item-thumb-col {
  position: relative;
  width: 80px;
  height: 80px;
  background: var(--apex-slate-50);
  border-radius: 0.75rem;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--apex-slate-100);
  overflow: hidden;
}

.apex-item-thumb-col img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.apex-item-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  line-height: 1.1;
  text-transform: uppercase;
  z-index: 2;
}

.apex-badge-top-ventas {
  background: #ef4444;
  color: #ffffff;
}

.apex-badge-ultimas {
  background: #f59e0b;
  color: #ffffff;
}

.apex-badge-oferta {
  background: #10b981;
  color: #ffffff;
}

.apex-badge-gift {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #ffffff;
}

.apex-item-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.apex-item-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.apex-item-meta {
  min-width: 0;
}

.apex-item-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.apex-item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--apex-slate-900);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.apex-verified-icon {
  width: 14px;
  height: 14px;
  color: var(--apex-blue-500);
  flex-shrink: 0;
}

.apex-item-desc {
  font-size: 12px;
  color: var(--apex-slate-500);
  font-weight: 500;
  margin: 2px 0 0;
}

.apex-item-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.apex-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1.2;
}

.apex-tag-stock {
  background: var(--apex-emerald-50);
  color: var(--apex-emerald-700);
  border: 1px solid var(--apex-emerald-100);
}

.apex-tag-formula {
  background: var(--apex-blue-50);
  color: var(--apex-blue-700);
}

.apex-tag-women {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #f3e8ff;
}

.apex-tag-promo {
  background: #ecfeff;
  color: #0e7490;
}

.apex-tag-muted {
  background: var(--apex-slate-100);
  color: var(--apex-slate-700);
}

.apex-item-delete-btn {
  background: transparent;
  border: none;
  color: var(--apex-slate-400);
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.apex-item-delete-btn:hover {
  color: #ef4444;
  background: #fef2f2;
}

#apex-side-cart-wrapper .apex-item-delete-btn {
  width: 28px !important;
  height: 28px !important;
  padding: 4px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 6px !important;
  color: var(--apex-slate-400) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

#apex-side-cart-wrapper .apex-item-delete-btn:hover,
#apex-side-cart-wrapper .apex-item-delete-btn:focus-visible {
  background: #fef2f2 !important;
  color: #ef4444 !important;
}

#apex-side-cart-wrapper .apex-item-delete-btn svg {
  width: 16px !important;
  height: 16px !important;
  display: block !important;
  pointer-events: none;
}

.apex-item-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--apex-slate-50);
}

.apex-quantity-pill {
  display: flex;
  align-items: center;
  background: var(--apex-slate-50);
  border: 1px solid var(--apex-slate-200);
  border-radius: 8px;
  padding: 2px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}

.apex-qty-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--apex-slate-500);
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.apex-qty-btn:hover {
  background: #ffffff;
  color: var(--apex-slate-900);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.apex-qty-number {
  width: 28px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--apex-slate-800);
}

#apex-side-cart-wrapper .apex-quantity-pill {
  height: 30px;
  padding: 2px !important;
  background: var(--apex-slate-50) !important;
  border: 1px solid var(--apex-slate-200) !important;
  border-radius: 8px !important;
}

#apex-side-cart-wrapper .apex-qty-btn {
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 4px !important;
  color: var(--apex-slate-500) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

#apex-side-cart-wrapper .apex-qty-btn:hover,
#apex-side-cart-wrapper .apex-qty-btn:focus-visible {
  background: #ffffff !important;
  color: var(--apex-slate-900) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}

#apex-side-cart-wrapper .apex-qty-number {
  width: 28px !important;
  color: var(--apex-slate-800) !important;
  line-height: 24px !important;
}

.apex-item-price-box {
  text-align: right;
}

.apex-item-old-price {
  font-size: 11px;
  color: var(--apex-slate-400);
  text-decoration: line-through;
  display: block;
  line-height: 1.1;
}

.apex-item-final-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--apex-slate-900);
  letter-spacing: -0.01em;
}

.apex-item-unit-note {
  font-size: 10px;
  color: var(--apex-slate-400);
  display: block;
  line-height: 1.1;
}

.apex-item-fav-row {
  margin-top: 6px;
  text-align: right;
}

.apex-item-fav-btn {
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 500;
  color: var(--apex-pink-600);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

.apex-item-fav-btn:hover {
  text-decoration: underline;
  color: #be185d;
}

/* ============================================================
   Coupon Accordion Box
   ============================================================ */
.apex-coupon-box {
  background: rgba(248, 250, 252, 0.9);
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.apex-coupon-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.apex-coupon-label-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.apex-coupon-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--apex-slate-800);
}

.apex-coupon-suggested-tag {
  font-size: 10px;
  background: var(--apex-blue-50);
  color: var(--apex-blue-700);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid var(--apex-blue-100);
  cursor: pointer;
  transition: background 0.15s ease;
}

.apex-coupon-suggested-tag:hover {
  background: var(--apex-blue-100);
}

.apex-coupon-form-row {
  display: flex;
  gap: 8px;
}

.apex-coupon-input {
  flex: 1;
  border-radius: 0.75rem;
  font-size: 12px;
  border: 1px solid var(--apex-slate-200);
  background: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  color: var(--apex-slate-800);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.apex-coupon-input:focus {
  border-color: var(--apex-blue-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.apex-coupon-submit-btn {
  background: var(--apex-slate-900);
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.apex-coupon-submit-btn:hover {
  background: var(--apex-slate-800);
}

/* ============================================================
   Cross-Sell / Recommendations Card Grid
   ============================================================ */
.apex-upsells-card {
  background: rgba(248, 250, 252, 0.8);
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  padding: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.apex-upsells-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.apex-upsells-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.apex-upsells-icon {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background: #fef3c7;
  color: #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.apex-upsells-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--apex-slate-900);
  margin: 0;
  letter-spacing: -0.01em;
}

.apex-upsells-badge {
  font-size: 10px;
  background: var(--apex-emerald-50);
  color: var(--apex-emerald-700);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid var(--apex-emerald-100);
}

.apex-upsells-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 480px) {
  .apex-upsells-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.apex-upsell-item {
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 10px;
  border: 1px solid var(--apex-slate-100);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.apex-upsell-item:hover {
  border-color: var(--apex-slate-200);
  transform: translateY(-1px);
}

.apex-upsell-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.apex-upsell-thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: var(--apex-slate-50);
  border-radius: 8px;
  padding: 4px;
  border: 1px solid var(--apex-slate-100);
  flex-shrink: 0;
}

.apex-upsell-details {
  min-width: 0;
  flex: 1;
}

.apex-upsell-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 2px;
}

.apex-upsell-tag-blue {
  background: var(--apex-blue-50);
  color: var(--apex-blue-700);
}

.apex-upsell-tag-green {
  background: var(--apex-emerald-50);
  color: var(--apex-emerald-700);
}

.apex-upsell-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--apex-slate-900);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.apex-upsell-price {
  font-size: 12px;
  font-weight: 900;
  color: var(--apex-slate-900);
  display: block;
  margin-top: 2px;
}

.apex-upsell-btn {
  width: 100%;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--apex-slate-50);
  background: var(--apex-slate-900);
  color: #ffffff;
  font-weight: 700;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
}

.apex-upsell-btn:hover {
  background: var(--apex-blue-600);
}

.apex-upsell-btn.is-emerald {
  background: var(--apex-emerald-600);
}

.apex-upsell-btn.is-emerald:hover {
  background: var(--apex-emerald-700);
}

/* ============================================================
   Footer: Summary & Checkout
   ============================================================ */
.apex-cart-footer {
  padding: 20px 24px;
  background: #ffffff;
  border-top: 1px solid var(--apex-slate-100);
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.03);
  flex-shrink: 0;
}

.apex-totals-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 500;
}

.apex-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--apex-slate-500);
}

.apex-total-row strong {
  color: var(--apex-slate-700);
  font-weight: 600;
}

.apex-shipping-badge-free {
  font-weight: 700;
  color: var(--apex-emerald-600);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.apex-badge-national {
  font-size: 10px;
  background: var(--apex-slate-100);
  color: var(--apex-slate-500);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

.apex-final-total-row {
  padding-top: 8px;
  border-top: 1px solid var(--apex-slate-100);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.apex-total-label {
  font-size: 16px;
  font-weight: 800;
  color: var(--apex-slate-900);
  display: block;
  line-height: 1.1;
}

.apex-tax-notice {
  font-size: 10px;
  color: var(--apex-slate-400);
  font-weight: 400;
  display: block;
  margin-top: 2px;
}

.apex-total-amount {
  font-size: 24px;
  font-weight: 900;
  color: var(--apex-blue-600);
  letter-spacing: -0.02em;
}

/* Primary CTA Button */
.apex-checkout-cta-btn {
  width: 100%;
  background: var(--apex-blue-600);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  padding: 14px 24px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.apex-checkout-cta-btn:hover {
  background: var(--apex-blue-700);
  box-shadow: 0 12px 30px -5px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
  color: #ffffff;
}

.apex-checkout-cta-btn:active {
  transform: scale(0.99);
}

.apex-lock-icon {
  width: 16px;
  height: 16px;
  opacity: 0.9;
}

/* Payment Methods & Trust Badges */
.apex-trust-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--apex-slate-100);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.apex-trust-title {
  font-size: 10px;
  color: var(--apex-slate-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.apex-payment-methods {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  opacity: 0.85;
}

.apex-payment-methods-image {
  display: block;
  width: min(100%, 310px);
  height: auto;
  max-height: 34px;
  object-fit: contain;
}

.apex-badge-visa {
  font-size: 11px;
  font-weight: 900;
  font-style: italic;
  color: #1e3a8a;
  letter-spacing: -0.05em;
  background: var(--apex-slate-50);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--apex-slate-200);
}

.apex-badge-mastercard {
  display: flex;
  align-items: center;
  background: var(--apex-slate-50);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--apex-slate-200);
}

.apex-mc-circle {
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  display: inline-block;
}

.apex-mc-red {
  background: #ef4444;
}

.apex-mc-amber {
  background: #f59e0b;
  margin-left: -5px;
  opacity: 0.85;
}

.apex-badge-mercadopago {
  font-size: 10px;
  font-weight: 700;
  color: #0284c7;
  background: var(--apex-slate-50);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--apex-slate-200);
}

.apex-badge-transfer {
  font-size: 10px;
  font-weight: 600;
  color: var(--apex-emerald-700);
  background: var(--apex-slate-50);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--apex-slate-200);
}

.apex-ssl-guarantee {
  font-size: 10px;
  color: var(--apex-slate-400);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.apex-ssl-shield-icon {
  width: 12px;
  height: 12px;
  color: var(--apex-emerald-600);
  flex-shrink: 0;
}

/* ============================================================
   Store-safe visual overrides and compact recommendations
   ============================================================ */
#apex-side-cart-wrapper .apex-item-final-price,
#apex-side-cart-wrapper .apex-item-final-price .woocommerce-Price-amount,
#apex-side-cart-wrapper .apex-total-row strong,
#apex-side-cart-wrapper .apex-total-row strong .woocommerce-Price-amount,
#apex-side-cart-wrapper .apex-total-row > span:last-child:not(.apex-shipping-badge-free) {
  color: #111827 !important;
}

#apex-side-cart-wrapper .apex-total-amount,
#apex-side-cart-wrapper .apex-total-amount .woocommerce-Price-amount {
  color: #7c3aed !important;
}

#apex-side-cart-wrapper .apex-discount-row span,
#apex-side-cart-wrapper .apex-discount-row strong,
#apex-side-cart-wrapper .apex-discount-row .woocommerce-Price-amount {
  color: #15803d !important;
}

/* Gift unlocked by the 2+ pre-workout promotion. */
#apex-side-cart-wrapper .apex-cart-item--gift {
  order: 2;
  min-height: 76px;
  padding: 10px 42px 10px 12px !important;
  background: #fffdf0 !important;
  border: 1px dashed #f4c84a !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

/* Gift cards are always grouped below paid items, even if WooCommerce added
   them in the middle of the cart. */
#apex-side-cart-wrapper .apex-cart-item--gift-first {
  margin-top: 28px;
}

#apex-side-cart-wrapper .apex-cart-item--gift-first::before {
  content: 'REGALOS DESBLOQUEADOS  🎁';
  position: absolute;
  top: -24px;
  left: 0;
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 10px;
  border-radius: 999px;
  background: #171923;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
}

#apex-side-cart-wrapper .apex-cart-item--gift .apex-item-thumb-col {
  background: #fff !important;
  border-color: #f8e7a3 !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  padding: 3px !important;
}

#apex-side-cart-wrapper .apex-cart-item--gift .apex-item-thumb-col img {
  max-width: 40px !important;
  max-height: 40px !important;
  object-fit: contain !important;
}

#apex-side-cart-wrapper .apex-cart-item--gift .apex-item-title::before {
  content: none;
}

#apex-side-cart-wrapper .apex-cart-item--gift .apex-item-desc {
  color: #6b7280 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

#apex-side-cart-wrapper .apex-cart-item--gift .apex-item-tags-row {
  display: flex;
  margin-top: 5px;
  gap: 4px;
}

#apex-side-cart-wrapper .apex-cart-item--gift .apex-tag-stock,
#apex-side-cart-wrapper .apex-cart-item--gift .apex-tag-formula {
  display: inline-flex;
  min-height: 18px;
  padding: 2px 6px;
  border: 1px solid #f7d76c;
  border-radius: 999px;
  background: #fff8cb;
  color: #705b06;
  font-size: 9px;
  font-weight: 800;
}

#apex-side-cart-wrapper .apex-cart-item--gift .apex-item-title {
  font-size: 12px !important;
  line-height: 1.18 !important;
  color: #3f3f46 !important;
}

#apex-side-cart-wrapper .apex-cart-item--gift .apex-item-bottom-row {
  position: absolute;
  right: 12px;
  bottom: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

#apex-side-cart-wrapper .apex-gift-locked-qty {
  display: none;
}

#apex-side-cart-wrapper .apex-gift-price {
  display: block;
  color: #171923 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .02em;
}

#apex-side-cart-wrapper .apex-discount-row {
  position: relative;
  margin: 1px -4px;
  padding: 6px 8px;
  border-radius: 7px;
  background: #f0fdf4;
  font-weight: 700;
}

/* A quiet text action, matching the product price rather than a large button. */
#apex-side-cart-wrapper .apex-item-fav-btn {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  color: #ec4899 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
}

#apex-side-cart-wrapper .apex-item-fav-btn:hover,
#apex-side-cart-wrapper .apex-item-fav-btn.is-saved {
  color: #be185d !important;
  text-decoration: underline;
}

/* Coupon: one compact field with a clear secondary action. */
#apex-side-cart-wrapper .apex-coupon-box {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

#apex-side-cart-wrapper .apex-coupon-form-row {
  gap: 6px;
}

#apex-side-cart-wrapper .apex-coupon-input {
  min-height: 38px !important;
  padding: 8px 12px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

#apex-side-cart-wrapper .apex-coupon-submit-btn {
  min-height: 38px !important;
  padding: 0 14px !important;
  border: 1px solid #1e40af !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #1e40af !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

#apex-side-cart-wrapper .apex-coupon-submit-btn:hover,
#apex-side-cart-wrapper .apex-coupon-submit-btn:focus-visible {
  background: #1e40af !important;
  color: #ffffff !important;
}

/* Horizontal marquee: smaller cards, optional touch scrolling, no oversized CTA. */
#apex-side-cart-wrapper .apex-upsells-card {
  padding: 12px !important;
  background: linear-gradient(135deg, #f8fafc, #eff6ff) !important;
}

#apex-side-cart-wrapper .apex-upsells-marquee {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 1px 7px;
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
}

#apex-side-cart-wrapper .apex-upsells-grid {
  display: flex !important;
  width: max-content;
  grid-template-columns: none !important;
  gap: 8px !important;
}

#apex-side-cart-wrapper .apex-upsell-item {
  width: 178px;
  min-height: 106px;
  padding: 9px !important;
  border-radius: 10px !important;
  scroll-snap-align: start;
}

#apex-side-cart-wrapper .apex-upsell-thumb {
  width: 40px !important;
  height: 40px !important;
}

#apex-side-cart-wrapper .apex-upsell-title {
  font-size: 11px !important;
}

#apex-side-cart-wrapper .apex-upsell-price,
#apex-side-cart-wrapper .apex-upsell-price .woocommerce-Price-amount {
  color: #111827 !important;
  font-size: 11px !important;
}

#apex-side-cart-wrapper .apex-upsell-btn {
  width: auto !important;
  min-height: 27px !important;
  margin-top: 7px !important;
  padding: 5px 10px !important;
  align-self: flex-start;
  border: 0 !important;
  border-radius: 6px !important;
  background: #0f172a !important;
  color: #ffffff !important;
  font-size: 10px !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

#apex-side-cart-wrapper .apex-upsell-btn:hover {
  background: #2563eb !important;
}

/* The checkout CTA keeps a blue/navy hover instead of a theme red. */
#apex-side-cart-wrapper .apex-checkout-cta-btn:hover,
#apex-side-cart-wrapper .apex-checkout-cta-btn:focus-visible {
  background: #1e40af !important;
  color: #ffffff !important;
  border-color: #1e40af !important;
}

/* Free Gift Items (PowerMuscle 2+ promo) */
.apex-cart-item--gift {
  border-color: #bbf7d0 !important;
  background: #f0fdf4 !important;
}

.apex-badge-gift {
  background: #10b981 !important;
  color: #ffffff !important;
}

.apex-gift-locked-qty {
  font-size: 12px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #a7f3d0;
  display: inline-flex;
  align-items: center;
}

.apex-gift-price {
  color: #059669 !important;
  font-weight: 800;
}

/* Discount row in totals */
.apex-discount-row {
  color: #059669 !important;
}

.apex-discount-row strong {
  color: #059669 !important;
}

/* Upsells Marquee / Grid Container */
.apex-upsells-marquee {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* Payment Methods Banner Image */
.apex-payment-methods-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 6px auto 0;
  object-fit: contain;
  border-radius: 6px;
}

/* ============================================================
   Floating Cart Launcher (Solved the "siempre está fijo" issue)
   ============================================================ */
.apex-cart-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99998;
  width: 58px;
  height: 58px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--apex-blue-600) 0%, var(--apex-blue-700) 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px -3px rgba(37, 99, 235, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* WoodMart applies `position: relative` to generic buttons.  The launcher
   must stay attached to the viewport, independently of theme button rules. */
#apex-cart-floating-btn.apex-cart-floating-btn {
  position: fixed !important;
  width: 58px !important;
  height: 58px !important;
  right: 24px !important;
  bottom: 24px !important;
  left: auto !important;
  top: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #7c3aed !important;
  color: #ffffff !important;
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.38) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  z-index: 999998 !important;
}

#apex-cart-floating-btn.apex-cart-floating-btn:hover {
  background: #6d28d9 !important;
}

@media (max-width: 640px) {
  #apex-cart-floating-btn.apex-cart-floating-btn {
    right: 16px !important;
    bottom: 16px !important;
  }
}

.apex-cart-floating-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 14px 30px -3px rgba(37, 99, 235, 0.55);
}

.apex-cart-floating-btn:active {
  transform: scale(0.96);
}

.apex-cart-floating-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  line-height: 20px;
  border-radius: 9999px;
  text-align: center;
  padding: 0 4px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Compact product cards leave room for useful recommendations. */
#apex-side-cart-wrapper .apex-cart-body { gap: 12px; padding: 12px 20px; }
#apex-side-cart-wrapper .apex-products-list { gap: 9px; }
#apex-side-cart-wrapper .apex-cart-item { padding: 11px; gap: 11px; border-radius: 14px; }
#apex-side-cart-wrapper .apex-item-thumb-col { width: 68px; height: 68px; padding: 5px; }
#apex-side-cart-wrapper .apex-item-title { font-size: 13px; }
#apex-side-cart-wrapper .apex-item-desc { margin-top: 1px; line-height: 1.25; }
#apex-side-cart-wrapper .apex-item-bottom-row { margin-top: 6px; padding-top: 6px; }
#apex-side-cart-wrapper .apex-item-fav-row { margin-top: 4px; }

/* Two products are visible at once; more are available by swiping. */
#apex-side-cart-wrapper .apex-upsells-card { gap: 9px; border-radius: 14px; }
#apex-side-cart-wrapper .apex-upsells-title { font-size: 12px; }
#apex-side-cart-wrapper .apex-upsells-badge { text-transform: uppercase; letter-spacing: .03em; }
#apex-side-cart-wrapper .apex-upsells-grid {
  display: grid !important;
  grid-auto-flow: column;
  grid-auto-columns: minmax(172px, calc((100% - 8px) / 2));
  width: 100% !important;
  gap: 8px !important;
}
#apex-side-cart-wrapper .apex-upsell-item { width: auto; min-height: 112px; padding: 9px !important; }
#apex-side-cart-wrapper .apex-upsell-btn { width: 100% !important; min-height: 29px !important; align-self: stretch; justify-content: center; margin-top: 7px !important; }

#apex-side-cart-wrapper .apex-shipping-pending { color: #64748b !important; font-size: 10px; font-weight: 700; text-align: right; }

#apex-cart-floating-btn .apex-cart-floating-count {
  top: -7px !important;
  right: -7px !important;
  min-width: 23px !important;
  height: 23px !important;
  padding: 0 5px !important;
  border: 2px solid #ffffff !important;
  background: #ef4444 !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 19px !important;
  box-shadow: 0 3px 8px rgba(127, 29, 29, .38) !important;
}

/* The launcher is always available, including when the cart is empty. */
#apex-cart-floating-btn,
#apex-cart-floating-btn.hide-on-empty[data-count="0"] {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ============================================================
   Empty State
   ============================================================ */
.apex-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.apex-empty-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 9999px;
  background: var(--apex-blue-50);
  color: var(--apex-blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.apex-cart-empty h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--apex-slate-900);
  margin: 0 0 6px;
}

.apex-cart-empty p {
  font-size: 13px;
  color: var(--apex-slate-500);
  margin: 0 0 20px;
  max-width: 280px;
}

.apex-btn-shop {
  background: var(--apex-blue-600);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 0.75rem;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease;
}

.apex-btn-shop:hover {
  background: var(--apex-blue-700);
}

/* ============================================================
   Loading Overlay
   ============================================================ */
.apex-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(2px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.apex-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--apex-slate-200);
  border-top-color: var(--apex-blue-600);
  border-radius: 50%;
  animation: apexSpin 0.7s linear infinite;
}

@keyframes apexSpin {
  to { transform: rotate(360deg); }
}

/* Recommendation card layout: readable product names, two cards per view. */
#apex-side-cart-wrapper .apex-upsells-marquee {
  scrollbar-width: none;
  padding-bottom: 2px;
}
#apex-side-cart-wrapper .apex-upsells-marquee::-webkit-scrollbar { display: none; }
#apex-side-cart-wrapper .apex-upsells-grid {
  grid-auto-columns: calc((100% - 8px) / 2);
}
#apex-side-cart-wrapper .apex-upsell-item {
  min-height: 126px;
  justify-content: space-between;
}
#apex-side-cart-wrapper .apex-upsell-top {
  align-items: flex-start;
  gap: 8px;
}
#apex-side-cart-wrapper .apex-upsell-thumb {
  width: 44px !important;
  height: 44px !important;
}
#apex-side-cart-wrapper .apex-upsell-details { min-width: 0; }
#apex-side-cart-wrapper .apex-upsell-title {
  white-space: normal !important;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.22;
  min-height: 27px;
}
#apex-side-cart-wrapper .apex-upsell-price {
  margin-top: 3px;
  font-size: 12px !important;
}

/* Quantity savings belongs with the real product characteristics, not over its photo. */
#apex-side-cart-wrapper .apex-tag-quantity {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

/* Compact horizontal carousel: arrows, swipe and trackpad all expose more products. */
#apex-side-cart-wrapper .apex-upsells-header {
  gap: 8px;
}
#apex-side-cart-wrapper .apex-upsells-header > .apex-upsells-badge {
  margin-left: auto;
}
#apex-side-cart-wrapper .apex-upsells-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
#apex-side-cart-wrapper .apex-upsells-nav-btn {
  appearance: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #d8e1ee;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}
#apex-side-cart-wrapper .apex-upsells-nav-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#apex-side-cart-wrapper .apex-upsells-nav-btn:hover,
#apex-side-cart-wrapper .apex-upsells-nav-btn:focus-visible {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #ffffff;
}
#apex-side-cart-wrapper .apex-upsells-nav.is-hidden { display: none; }
#apex-side-cart-wrapper .apex-upsells-nav-btn:disabled {
  opacity: .35;
  cursor: default;
  pointer-events: none;
}
#apex-side-cart-wrapper .apex-upsells-marquee {
  cursor: grab;
  scroll-behavior: smooth;
}
#apex-side-cart-wrapper .apex-upsell-item {
  min-height: 118px;
  border-color: #e2e8f0;
}

/* Coupon stays as one slim line until the shopper chooses to enter a code. */
#apex-side-cart-wrapper .apex-coupon-box {
  padding: 9px 12px !important;
  gap: 7px !important;
}
#apex-side-cart-wrapper .apex-coupon-toggle {
  width: 100%;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f172a !important;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  list-style: none;
}
#apex-side-cart-wrapper .apex-coupon-toggle::-webkit-details-marker { display: none; }
#apex-side-cart-wrapper .apex-coupon-toggle-hint {
  color: #1d4ed8 !important;
  font-size: 11px !important;
  font-weight: 800;
  white-space: nowrap;
  text-transform: none !important;
  letter-spacing: 0 !important;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 4px 7px;
}
#apex-side-cart-wrapper .apex-coupon-toggle-hint span {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  transition: transform .18s ease;
}
#apex-side-cart-wrapper .apex-coupon-box[open] .apex-coupon-toggle-hint span {
  transform: rotate(180deg);
}

/* Product cards: tighter vertical rhythm with controls close to product details. */
#apex-side-cart-wrapper .apex-cart-item {
  align-items: flex-start;
}
#apex-side-cart-wrapper .apex-item-info-col {
  justify-content: flex-start;
}
#apex-side-cart-wrapper .apex-item-bottom-row {
  margin-top: 4px;
  padding-top: 4px;
}
#apex-side-cart-wrapper .apex-item-fav-row {
  margin-top: 2px;
  line-height: 1;
}

/* Mobile-first drawer: full-height, thumb-friendly and safe around phone UI. */
@media (max-width: 639px) {
  #apex-side-cart-wrapper.apex-cart-wrapper {
    padding: 0 !important;
    align-items: stretch;
  }

  #apex-side-cart-wrapper .apex-cart-drawer {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  #apex-side-cart-wrapper .apex-cart-header {
    min-height: 64px;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
  }

  #apex-side-cart-wrapper .apex-cart-header-title { font-size: 18px; }
  #apex-side-cart-wrapper .apex-cart-close-btn {
    width: 40px !important;
    height: 40px !important;
  }

  #apex-side-cart-wrapper .apex-shipping-milestone-bar {
    padding: 10px 14px 12px;
  }
  #apex-side-cart-wrapper .apex-shipping-status-msg {
    margin-bottom: 10px;
    font-size: 11px;
    line-height: 1.35;
  }
  #apex-side-cart-wrapper .apex-milestone-track-container { padding: 0 4px; }
  #apex-side-cart-wrapper .apex-milestone-label {
    max-width: 68px;
    margin-top: 5px;
    white-space: normal;
    font-size: 9px;
    line-height: 1.15;
    text-align: center;
  }

  #apex-side-cart-wrapper .apex-cart-body {
    padding: 12px 14px 16px;
    gap: 10px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  #apex-side-cart-wrapper .apex-cart-item { padding: 10px; gap: 10px; }
  #apex-side-cart-wrapper .apex-item-thumb-col {
    width: 62px;
    height: 62px;
  }
  #apex-side-cart-wrapper .apex-item-title { font-size: 13px; line-height: 1.2; }
  #apex-side-cart-wrapper .apex-item-delete-btn,
  #apex-side-cart-wrapper .apex-qty-btn { min-width: 32px !important; min-height: 32px !important; }

  #apex-side-cart-wrapper .apex-upsells-grid {
    grid-auto-columns: minmax(220px, 78%) !important;
  }
  #apex-side-cart-wrapper .apex-upsell-item { min-height: 128px; }
  #apex-side-cart-wrapper .apex-upsells-nav-btn {
    width: 34px;
    height: 34px;
  }

  #apex-side-cart-wrapper .apex-cart-footer {
    padding: 14px 16px max(14px, env(safe-area-inset-bottom));
  }
  #apex-side-cart-wrapper .apex-totals-breakdown {
    margin-bottom: 12px;
    gap: 7px;
  }
  #apex-side-cart-wrapper .apex-total-amount { font-size: 23px; }
  #apex-side-cart-wrapper .apex-checkout-cta-btn {
    min-height: 50px;
    padding: 13px 16px;
    font-size: 14px;
  }
  #apex-side-cart-wrapper .apex-trust-footer {
    margin-top: 10px;
    padding-top: 9px;
    gap: 5px;
  }
  #apex-side-cart-wrapper .apex-payment-methods-image { max-height: 29px; }

  #apex-cart-floating-btn.apex-cart-floating-btn {
    right: max(16px, env(safe-area-inset-right)) !important;
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
    width: 56px !important;
    height: 56px !important;
  }
}

/* The smallest phones keep all four milestones and the checkout action visible. */
@media (max-width: 374px) {
  #apex-side-cart-wrapper .apex-cart-header { min-height: 58px; padding-inline: 12px; }
  #apex-side-cart-wrapper .apex-cart-header-title { font-size: 17px; }
  #apex-side-cart-wrapper .apex-cart-header-badge { padding-inline: 8px; font-size: 11px; }
  #apex-side-cart-wrapper .apex-milestone-label { max-width: 58px; font-size: 8px; }
  #apex-side-cart-wrapper .apex-cart-body { padding-inline: 12px; }
  #apex-side-cart-wrapper .apex-cart-footer { padding-inline: 12px; }
  #apex-side-cart-wrapper .apex-upsells-grid { grid-auto-columns: 84% !important; }
}

/* Landscape phones have limited height: retain the CTA without crowding content. */
@media (max-height: 700px) and (max-width: 900px) {
  #apex-side-cart-wrapper .apex-shipping-milestone-bar { padding-block: 8px; }
  #apex-side-cart-wrapper .apex-shipping-status-msg { margin-bottom: 7px; }
  #apex-side-cart-wrapper .apex-cart-footer { padding-top: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  #apex-side-cart-wrapper .apex-trust-footer { display: none; }
}

/* Product promotions reflected from WooCommerce data. */
#apex-side-cart-wrapper .apex-tag-vitamin-promo {
  background: #f3e8ff !important;
  border-color: #d8b4fe !important;
  color: #7e22ce !important;
}
#apex-side-cart-wrapper .apex-vitamin-discount-row {
  background: #faf5ff;
  border: 1px solid #ead5ff;
  border-radius: 8px;
  padding: 7px 9px;
  color: #6b21a8;
}
#apex-side-cart-wrapper .apex-vitamin-discount-row strong { color: #7e22ce; }
