/* Cart — minimal, matches Purity Pharmaceuticals indigo UI */

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #374151;
  cursor: pointer;
  flex: none;
}
.cart-btn:hover { background: #f3f4f6; color: var(--ink); }
.cart-btn svg { width: 22px; height: 22px; }
.cart-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--indigo);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(79, 70, 229, .35);
}
.cart-badge.hidden { display: none; }
.cart-badge.pulse { animation: cartPulse .45s ease; }
@keyframes cartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.cart-nav-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(17, 24, 39, .42);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  backdrop-filter: blur(2px);
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 210;
  width: min(400px, 100vw);
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 50px rgba(17, 24, 39, .12);
  transform: translateX(102%);
  transition: transform .26s cubic-bezier(.2, .8, .2, 1);
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: none; }

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.cart-head h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -.02em;
}
.cart-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.cart-clear {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.cart-clear:hover { color: #b91c1c; background: #fef2f2; }
.cart-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.cart-close:hover { background: #f3f4f6; color: var(--ink); }
.cart-close svg { width: 18px; height: 18px; }

.cart-ship-hint {
  padding: 12px 20px;
  font-size: 13px;
  color: #4b5563;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}
.cart-ship-hint b { color: var(--ink); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 16px;
}
.cart-empty {
  text-align: center;
  padding: 48px 12px;
  color: var(--muted);
}
.cart-empty p { margin: 0 0 8px; }
.cart-empty .btn { margin-top: 16px; }

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: 0; }
.cart-item-img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.cart-item-name {
  font-weight: 750;
  font-size: 14px;
  line-height: 1.25;
  color: var(--ink);
}
.cart-item-meta {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 8px;
}
.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cart-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.cart-qty button {
  width: 30px;
  height: 30px;
  border: 0;
  background: #fff;
  color: #4b5563;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.cart-qty button:hover { background: var(--soft); color: var(--indigo); }
.cart-qty b {
  min-width: 28px;
  text-align: center;
  font-size: 13px;
}
.cart-item-price {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -.02em;
}
.cart-item-del {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 0;
  margin-top: 6px;
  cursor: pointer;
}
.cart-item-del:hover { color: #b91c1c; }

.cart-foot {
  border-top: 1px solid var(--line);
  padding: 16px 20px 20px;
  background: #fff;
}
.cart-totals { display: grid; gap: 8px; margin-bottom: 10px; }
.cart-t-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: #4b5563;
}
.cart-t-row.disc { color: #166534; }
.cart-t-row.grand {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 15.5px;
  font-weight: 800;
  color: var(--ink);
}
.cart-t-row .free { color: #166534; font-weight: 750; }
.cart-stack-hint {
  margin: 0 0 4px;
  font-size: 12.5px;
  color: var(--muted);
}
.cart-stack-hint.on { color: #166534; }
.cart-stack-hint b { color: inherit; }
.cart-deal {
  margin: 8px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.cart-deal.on {
  background: #ecfdf5;
  border-color: #bbf7d0;
}
.cart-deal-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--indigo);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.cart-deal.on .cart-deal-badge { background: #16a34a; }
.cart-deal .cart-stack-hint { margin: 0; }

.cart-checkout-btn {
  width: 100%;
  margin-top: 12px;
  min-height: 48px;
}
.cart-pay-note {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* Product card / detail buy controls */
.product-price {
  margin-top: 8px;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -.02em;
}
.product-card .product-body .product-price {
  color: var(--indigo);
  font-size: 14.5px;
}
.product-card {
  display: flex;
  flex-direction: column;
}
.product-card > a {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.product-card-actions {
  padding: 0 14px 14px;
  margin-top: auto;
}
.product-card-actions .btn {
  width: 100%;
  min-height: 40px;
  font-size: 13px;
  padding: 0 12px;
}
.detail-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  margin: 22px 0 8px;
}
.detail-price {
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -.03em;
  color: var(--ink);
  width: 100%;
}
.detail-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.detail-qty button {
  width: 40px;
  height: 44px;
  border: 0;
  background: #fff;
  color: #4b5563;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.detail-qty button:hover { background: var(--soft); color: var(--indigo); }
.detail-qty button svg { width: 16px; height: 16px; }
.detail-qty b {
  min-width: 36px;
  text-align: center;
  font-size: 15px;
}
.detail-buy .btn {
  min-width: 180px;
  gap: 8px;
}
.detail-buy .btn svg { width: 18px; height: 18px; }
.detail-trust {
  width: 100%;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* Toast */
.cart-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  z-index: 220;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 440px);
  padding: 12px 16px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font-size: 13.5px;
  font-weight: 550;
  box-shadow: 0 16px 40px rgba(17, 24, 39, .28);
  opacity: 0;
  pointer-events: none;
  transition: .22s ease;
}
.cart-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.cart-toast svg {
  width: 16px;
  height: 16px;
  color: #a5b4fc;
  flex: none;
}
.cart-toast .btn {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
  margin-left: 4px;
  background: #fff;
  color: var(--ink);
  border: 0;
}
.cart-toast .btn:hover { background: #eef2ff; color: var(--indigo); }

body.cart-no-scroll { overflow: hidden; }

@media (max-width: 560px) {
  .cart-drawer { width: 100vw; }
  .detail-buy { flex-direction: column; align-items: stretch; }
  .detail-buy .btn { width: 100%; }
}


/* Mobile header cart placement (with site.css grid) */
@media (max-width: 980px) {
  .cart-nav-wrap {
    margin-left: 0;
  }
}
