/* Pepvela Retail Cart (Phase 1B) -- scoped styles. Brand hex matches shop.css.
   Indigo #1e1648  Violet #6c52e3  Lavender #ede9ff  Soft White #f8f7ff
   Border #ddd8f5  Muted #6b6890  White #ffffff.  Only .sf-cart / .sf-qty / .sf-inquiry classes. */

/* ---- Nav cart link + badge ---- */
.sf-cart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #6c52e3;
  font-size: 14px;
  font-weight: 600;
  background: #ede9ff;
  padding: 9px 16px;
  border-radius: 8px;
}
.sf-cart-link:hover { background: #ddd8f5; }
.sf-cart-count {
  display: inline-block;
  min-width: 18px;
  text-align: center;
}
.mobile-nav .sf-cart-link { display: block; text-align: center; margin-top: 8px; }

/* ---- Overlay + drawer ---- */
.sf-cart-overlay { position: fixed; inset: 0; background: rgba(30,22,72,0.55); z-index: 9400; display: flex; justify-content: flex-end; }
.sf-cart-drawer { background: #ffffff; width: 420px; max-width: 92vw; height: 100%; display: flex; flex-direction: column; box-shadow: -8px 0 40px rgba(30,22,72,0.25); }
.sf-cart-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid #ede9ff; }
.sf-cart-head h3 { font-family: Georgia, serif; color: #1e1648; font-size: 1.2rem; margin: 0; }
.sf-cart-close { background: none; border: none; font-size: 1.7rem; line-height: 1; color: #6b6890; cursor: pointer; }
.sf-cart-body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.sf-cart-foot { border-top: 1px solid #ede9ff; padding: 18px 24px; }
body.sf-cart-open { overflow: hidden; }

/* ---- Line item (drawer + cart page) ---- */
.sf-cart-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid #f0eeff; }
.sf-cart-thumb { flex-shrink: 0; }
.sf-cart-thumb img { width: 56px; height: 56px; object-fit: contain; background: #f8f7ff; border-radius: 8px; display: block; }
.sf-cart-info { flex: 1; min-width: 0; }
.sf-cart-name { display: block; font-weight: 600; color: #1e1648; font-size: 0.9rem; text-decoration: none; }
.sf-cart-name:hover { color: #6c52e3; }
.sf-cart-unit { color: #6b6890; font-size: 0.8rem; margin: 2px 0 8px; }
.sf-cart-lineend { text-align: right; flex-shrink: 0; }
.sf-cart-line { font-weight: 600; color: #1e1648; font-size: 0.9rem; }
.sf-cart-remove { background: none; border: none; color: #b3261e; font-size: 0.78rem; cursor: pointer; padding: 6px 0 0; }

/* ---- Quantity stepper (shared) ---- */
.sf-qty { display: inline-flex; align-items: center; gap: 0; border: 1.5px solid #ddd8f5; border-radius: 8px; overflow: hidden; }
.sf-qty-dec, .sf-qty-inc { width: 30px; height: 30px; border: none; background: #ffffff; color: #1e1648; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.sf-qty-dec:hover, .sf-qty-inc:hover { background: #f8f7ff; }
.sf-qty-val { min-width: 34px; text-align: center; font-size: 0.9rem; color: #1e1648; }
.sf-qty-page { margin: 0 0 12px; }

/* ---- Footer / summary ---- */
.sf-cart-subtotal { display: flex; justify-content: space-between; font-weight: 700; color: #1e1648; font-size: 1rem; margin-bottom: 6px; }
.sf-cart-ship { font-size: 0.78rem; color: #6b6890; margin-bottom: 14px; }
.sf-checkout { width: 100%; opacity: 0.6; cursor: not-allowed; }
.sf-cart-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.sf-cart-actions .btn-secondary { flex: 1; text-align: center; min-width: 130px; }
.sf-cart-empty { text-align: center; padding: 44px 10px; color: #6b6890; }
.sf-cart-empty p { margin-bottom: 12px; }

/* ---- Inquiry (Wholesale / Special Order) secondary action ---- */
.sf-inquiry-link {
  display: inline-block;
  color: #6c52e3;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.product-detail .sf-inquiry-link { display: block; margin-top: 10px; }
.sf-inquiry-link:hover { text-decoration: underline; }
.sf-cart-wholesale { margin-top: 16px; font-size: 0.85rem; color: #6b6890; }

/* ---- Full cart page ---- */
.sf-cart-page-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
.sf-cart-summary { background: #ffffff; border: 1px solid #ddd8f5; border-radius: 14px; padding: 22px; }

/* ---- Notice toast ---- */
.sf-cart-notice {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: #1e1648; color: #ffffff; padding: 12px 20px; border-radius: 10px;
  font-size: 0.88rem; z-index: 9600; opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s; max-width: 90vw; text-align: center;
}
.sf-cart-notice.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 768px) {
  .sf-cart-page-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .sf-cart-drawer { width: 100%; max-width: 100%; }
}

/* ---- WhatsApp float clearance (fix overlap with product-card Add to Cart / Out of Stock) ----
   The floating WhatsApp button (fixed, bottom-left, styled in shop.css) could sit over the
   bottom row of product-card controls. Add bottom clearance below product grids and the
   product-detail action area so those controls stay clickable, and keep the button tucked in
   the corner on small screens. Position/spacing only; the button link, icon, and behavior are
   unchanged. cart.css loads after shop.css, so these overrides win. */
.products-grid { padding-bottom: 44px; }
.product-detail { padding-bottom: 24px; }
/* WhatsApp float: bottom-RIGHT on all pages; compact circular icon-only on tablet/mobile.
   Position/shape/label-visibility only -- link target, icon, and behavior are unchanged.
   The word "WhatsApp" is visually hidden with font-size:0 but stays in the accessibility
   tree, so the link keeps its accessible name; a ::before renders the visible icon.
   cart.css loads after shop.css on all storefront pages, so these overrides win. */
.whatsapp-float { left: auto; right: 24px; bottom: 24px; }
@media (max-width: 768px) {
  .products-grid { padding-bottom: 96px; }
  .product-detail { padding-bottom: 88px; }
  .whatsapp-float {
    left: auto; right: 16px; bottom: 16px;
    width: 54px; height: 54px; padding: 0;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0; line-height: 0; overflow: hidden;
  }
  .whatsapp-float::before { content: "\1F4AC"; font-size: 26px; line-height: 1; }
}
