/* =============================================
   CART.CSS — Slide-in cart panel
   BioWraps Vietnam Shop
   ============================================= */

/* ---- PANEL ---- */
.cart-panel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 95%;
  height: 100%;
  background: var(--white);
  box-shadow: -4px 0 32px rgba(0,0,0,0.15);
  z-index: 1000;
  flex-direction: column;
}
.cart-panel.show { display: flex; }

/* ---- HEADER ---- */
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 2px solid var(--green-pale);
}
.cart-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--green-main);
}
.cart-close {
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  border: none;
  line-height: 1;
  padding: 2px 6px;
  transition: color 0.2s;
}
.cart-close:hover { color: var(--text-primary); }

/* ---- BODY ---- */
.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

/* Empty state */
.cart-empty {
  text-align: center;
  padding: 56px 0;
  color: var(--text-hint);
  font-size: 14px;
}
.cart-empty .ce-icon {
  font-size: 56px;
  margin-bottom: 14px;
  display: block;
}
.cart-empty .ce-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

/* ---- ITEM ---- */
.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  align-items: flex-start;
}
.ci-img {
  width: 64px;
  height: 64px;
  background: var(--green-bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  overflow: hidden;
}
.ci-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ci-info {
  flex: 1;
  min-width: 0;
}
.ci-badge {
  font-size: 10px;
  background: var(--green-pale);
  color: var(--green-main);
  padding: 1px 6px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 4px;
  font-weight: 600;
}
.ci-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ci-price {
  font-size: 12px;
  color: var(--green-main);
  font-style: italic;
}

/* Quantity controls */
.ci-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.qty-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  line-height: 1;
  transition: all 0.2s;
}
.qty-btn:hover {
  background: var(--green-bg);
  border-color: var(--green-main);
}
.qty-val {
  font-size: 14px;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
}
.ci-del {
  color: var(--text-hint);
  font-size: 16px;
  background: none;
  border: none;
  padding: 2px 4px;
  margin-left: auto;
  transition: color 0.2s;
}
.ci-del:hover { color: var(--danger); }

/* ---- FOOTER ---- */
.cart-footer {
  padding: 18px 20px;
  border-top: 2px solid var(--green-pale);
  background: #fafafa;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.cart-total-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}
.cart-total-val {
  font-size: 13px;
  color: var(--green-main);
  font-weight: 600;
}
.checkout-btn {
  width: 100%;
  background: var(--green-main);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  transition: background 0.2s;
  font-family: inherit;
}
.checkout-btn:hover { background: var(--green-dark); }
.cart-note {
  font-size: 11px;
  color: var(--text-hint);
  text-align: center;
  margin-top: 10px;
}