/* ==========================================================================
   CART & MULTI-GATEWAY CHECKOUT STYLES - AIBundleHub / DigiVault
   ========================================================================== */

/* 1. Slide-Over Cart Drawer */
.cart-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 440px;
  max-width: 100%;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  z-index: 1151;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.cart-drawer-backdrop.active .cart-drawer {
  transform: translateX(0);
}

.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-items-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.cart-item-card {
  display: flex;
  gap: 1rem;
  background: rgba(22, 30, 49, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  position: relative;
}

.cart-item-thumb {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-tertiary);
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  padding-right: 1.5rem;
}

.cart-item-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-cyan);
  font-family: 'Outfit', sans-serif;
}

.cart-qty-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.8rem;
}

.qty-btn:hover {
  background: var(--accent-primary);
}

.cart-item-remove {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  color: var(--text-subtle);
  font-size: 0.9rem;
}

.cart-item-remove:hover {
  color: var(--accent-rose);
}

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  background: rgba(15, 20, 32, 0.95);
}

/* Coupon Engine */
.coupon-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.coupon-input {
  flex: 1;
  padding: 0.6rem 0.9rem;
  background: rgba(22, 30, 49, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.85rem;
}

.cart-subtotal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-color);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

/* 2. Multi-Gateway Payment Selector */
.gateway-selection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
  margin: 1.5rem 0;
}

@media (max-width: 500px) {
  .gateway-selection-grid {
    grid-template-columns: 1fr;
  }
}

.gateway-option {
  position: relative;
  background: rgba(22, 30, 49, 0.6);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: var(--transition-fast);
}

.gateway-option:hover,
.gateway-option.selected {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
}

.gateway-icon {
  font-size: 1.5rem;
  color: var(--accent-cyan);
}

.gateway-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.gateway-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
}

/* UPI QR Modal */
.upi-qr-box {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  max-width: 260px;
  margin: 1.5rem auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.upi-qr-img {
  width: 180px;
  height: 180px;
  margin: 0 auto 0.8rem auto;
  display: block;
}

.upi-id-copy {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 3. Order Confirmation Page */
.order-success-card {
  max-width: 700px;
  margin: 3rem auto;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.success-icon-badge {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid var(--accent-emerald);
  color: var(--accent-emerald);
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
}

.order-download-box {
  background: rgba(22, 30, 49, 0.8);
  border: 1px dashed var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: left;
}

.download-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--gradient-emerald);
  color: #fff;
  font-weight: 800;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
  margin-top: 1rem;
}

.download-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.6);
}
