/* Cart & Checkout */
:root {
  --cart-primary: #148FFA;
  --cart-accent: #e65100;
}
.cart-float {
  position: fixed; right: 24px; bottom: 60px; z-index: 998;
}
.cart-btn {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--cart-accent); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 16px rgba(230,81,0,0.3);
  transition: transform 0.3s; position: relative;
}
.cart-btn:hover { transform: scale(1.08); }
.cart-btn svg { width: 26px; height: 26px; fill: #fff; }
.cart-badge {
  position: absolute; top: -4px; right: -4px; background: #f44336;
  color: #fff; font-size: 0.7rem; font-weight: 700; width: 20px; height: 20px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  display: none;
}
.cart-badge.show { display: flex; }

/* Cart Sidebar */
.cart-sidebar {
  position: fixed; top: 0; right: -400px; width: 380px; height: 100vh;
  background: #fff; z-index: 9998; transition: right 0.3s;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1); display: flex; flex-direction: column;
}
.cart-sidebar.open { right: 0; }
.cart-sidebar-header {
  padding: 20px; border-bottom: 1px solid #eee; display: flex;
  justify-content: space-between; align-items: center;
}
.cart-sidebar-header h3 { font-size: 1.1rem; }
.cart-close-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #999; }
.cart-items { flex: 1; overflow-y: auto; padding: 15px; }
.cart-item {
  display: flex; gap: 12px; padding: 12px; border-radius: 8px;
  border: 1px solid #eee; margin-bottom: 10px;
}
.cart-item-img {
  width: 60px; height: 60px; border-radius: 6px; background: #f0f2ff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0; overflow: hidden;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 0.9rem; margin-bottom: 4px; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cart-item-qty button {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid #ddd;
  background: #fff; cursor: pointer; font-size: 1rem; display: flex;
  align-items: center; justify-content: center;
}
.cart-item-qty span { font-size: 0.9rem; min-width: 20px; text-align: center; }
.cart-item-remove { color: #f44336; cursor: pointer; font-size: 0.8rem; }
.cart-sidebar-footer {
  padding: 20px; border-top: 1px solid #eee;
}
.cart-total { display: flex; justify-content: space-between; font-size: 1.1rem; font-weight: 600; margin-bottom: 12px; }
.checkout-btn {
  width: 100%; padding: 14px; background: var(--cart-accent); color: #fff;
  border: none; border-radius: 8px; font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: background 0.3s;
}
.checkout-btn:hover { background: #bf360c; }
.cart-empty { text-align: center; padding: 60px 20px; color: #999; }

/* Checkout Page */
.checkout-page {
  max-width: 800px; margin: 0 auto; padding: 40px 20px;
}
.checkout-page h1 { font-size: 1.6rem; color: #1a1a2e; margin-bottom: 24px; }
.checkout-layout { display: flex; gap: 30px; flex-wrap: wrap; }
.checkout-form { flex: 1; min-width: 300px; }
.checkout-form .field { margin-bottom: 16px; }
.checkout-form .field label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.85rem; color: #555; }
.checkout-form .field input, .checkout-form .field textarea, .checkout-form .field select {
  width: 100%; padding: 11px 14px; border: 1px solid #ddd; border-radius: 6px;
  font-size: 0.9rem; font-family: inherit; transition: border 0.3s;
}
.checkout-form .field input:focus, .checkout-form .field textarea:focus { border-color: var(--cart-primary); }
.checkout-row { display: flex; gap: 14px; }
.checkout-row .field { flex: 1; }
.checkout-summary {
  width: 320px; background: #f8f9ff; border-radius: 10px; padding: 24px;
  align-self: flex-start; position: sticky; top: 100px;
}
.checkout-summary h3 { font-size: 1.05rem; margin-bottom: 16px; }
.checkout-summary-item { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 10px; }
.checkout-summary-total { border-top: 1px solid #ddd; padding-top: 12px; margin-top: 12px; font-size: 1.2rem; font-weight: 700; display: flex; justify-content: space-between; }
.pay-btn {
  width: 100%; padding: 14px; background: #07C160; color: #fff; border: none;
  border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; margin-top: 16px;
  transition: background 0.3s;
}
.pay-btn:hover { background: #06AD56; }
.pay-btn.paypal { background: #0070BA; }
.pay-btn.paypal:hover { background: #005da6; }
.payment-methods { margin-top: 16px; }
.payment-method {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border: 2px solid #eee; border-radius: 8px; cursor: pointer; margin-bottom: 8px;
  transition: border-color 0.2s;
}
.payment-method:hover, .payment-method.selected { border-color: var(--cart-primary); }
.payment-method .radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #ccc; display: flex; align-items: center; justify-content: center; }
.payment-method.selected .radio { border-color: var(--cart-primary); }
.payment-method.selected .radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--cart-primary); }
.payment-method .pmt-info h4 { font-size: 0.9rem; }
.payment-method .pmt-info p { font-size: 0.75rem; color: #888; }

@media (max-width: 768px) {
  .cart-sidebar { width: 100%; right: -100%; }
  .checkout-summary { width: 100%; position: static; }
}

/* Overlay for cart sidebar */
.cart-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3);
  z-index: 9997;
}
.cart-overlay.show { display: block; }
