/* ============================================================
   Vincor Labs — cart-drawer.css
   Linked from: products.html and index.html
   ============================================================ */

/* ── OVERLAY ─────────────────────────────────────────────── */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 500;
}

.cart-overlay.active {
  display: block;
}

/* ── DRAWER ──────────────────────────────────────────────── */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--white);
  z-index: 501;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 30px rgba(0,0,0,.15);
  transition: right .3s ease;
  overflow-y: auto;
}

.cart-drawer.active {
  right: 0;
}

/* ── HEADER ──────────────────────────────────────────────── */
.cart-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.cart-drawer-header h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-dark);
}

.cart-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--gray);
  transition: color .2s;
  line-height: 1;
}

.cart-close:hover { color: var(--black); }

/* ── SHIPPING BAR ────────────────────────────────────────── */
.cart-shipping-bar {
  padding: 14px 24px;
  background: var(--gray-light);
  border-bottom: 1px solid var(--border);
}

.cart-shipping-bar p {
  font-size: 13px;
  color: var(--blue-dark);
  margin-bottom: 8px;
  font-weight: 500;
}

.shipping-track {
  height: 6px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.shipping-fill {
  height: 100%;
  background: var(--blue-mid);
  border-radius: 10px;
  transition: width .4s ease;
}

/* ── CART ITEMS ──────────────────────────────────────────── */
.cart-items {
  flex: 1;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-empty {
  font-size: 14px;
  color: var(--gray);
  text-align: center;
  margin-top: 40px;
}

.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.cart-item-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--gray-light);
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-dark);
  margin-bottom: 4px;
  line-height: 1.3;
}

.cart-item-sub {
  font-size: 12px;
  color: var(--gray);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-dark);
  transition: background .2s;
}

.qty-btn:hover { background: var(--blue-pale); }

.qty-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-dark);
  min-width: 20px;
  text-align: center;
}

.cart-item-remove {
  background: none;
  border: none;
  color: #cc3333;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  transition: color .2s;
}

.cart-item-remove:hover { color: #991111; }

/* ── SUBTOTAL ────────────────────────────────────────────── */
.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  font-weight: 700;
  font-size: 16px;
  color: var(--blue-dark);
}

/* ── ACTIONS ─────────────────────────────────────────────── */
.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 24px 16px;
}

.btn-view-cart {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius);
  border: 2px solid var(--blue-mid);
  color: var(--blue-mid);
  font-weight: 700;
  font-size: 14px;
  transition: all .2s;
}

.btn-view-cart:hover {
  background: var(--blue-pale);
}

.btn-checkout {
  display: block;
  text-align: center;
  padding: 13px;
  border-radius: var(--radius);
  background: var(--blue-dark);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  transition: background .2s;
}

.btn-checkout:hover { background: var(--blue-mid); }

/* ── NOTICE ──────────────────────────────────────────────── */
.cart-notice {
  padding: 12px 24px 20px;
  font-size: 11px;
  color: var(--gray);
  text-align: center;
  line-height: 1.5;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .cart-drawer {
    max-width: 100%;
    right: -100%;
  }
}