/* assets/css/cart.css - Custom stylesheet for Cart & Checkout Page */

/* 1. Header Page Banner */
.cart-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 36px 0;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 68px;
}

.cart-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 70, 100, 0.15) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.2;
  pointer-events: none;
}

.cart-banner-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: #ffffff !important;
}

.cart-banner-desc {
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 0.95rem;
  max-width: 600px;
  margin-bottom: 0;
}

/* 2. Cart Content Components */
.cart-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.cart-card-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-color);
  background-color: #fafbfc;
}

.cart-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0;
  color: var(--text-heading);
}

.btn-clear-all {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  transition: var(--transition-fast);
}

.btn-clear-all:hover {
  color: var(--primary);
  background-color: rgba(255, 70, 100, 0.05);
}

/* Cart Item Row */
.cart-item-row {
  display: flex;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-fast);
}

.cart-item-row {
  display: flex;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
  position: relative;
}

.cart-item-row:last-child {
  border-bottom: none;
}

.cart-item-row:hover {
  background-color: #f8fafc;
}

.cart-item-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
}

.cart-item-details {
  flex-grow: 1;
  padding-left: var(--space-4);
  padding-right: var(--space-3);
  min-width: 0;
}

.cart-item-title-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-heading);
  display: inline-block;
  text-decoration: none;
  line-height: 1.3;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  transition: color 0.2s ease;
}

.cart-item-title-link:hover {
  color: var(--primary);
}

.cart-item-artist-line {
  font-size: 0.88rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-artist-label {
  color: #64748b;
  font-weight: 500;
}

.cart-item-artist-link {
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease;
}

.cart-item-artist-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.cart-item-attributes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cart-attr-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.cart-attr-badge.highlight {
  background: rgba(34, 197, 94, 0.08);
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.25);
  font-weight: 700;
}

.cart-item-price-wrap {
  text-align: right;
  padding: 0 var(--space-3);
  flex-shrink: 0;
}

.cart-item-price {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--primary);
  display: block;
}

.cart-item-price.contact {
  color: var(--text-muted);
  font-weight: 600;
  font-style: italic;
  font-size: 0.95rem;
}

.cart-item-unit-label {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
  margin-top: 2px;
}

.cart-item-remove-btn {
  background: none;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.cart-item-remove-btn:hover {
  color: #ef4444;
  background-color: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

/* 3. Summary & Checkout Form Card */
.cart-summary-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
}

/* Checkout Mini Review Box */
.checkout-review-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}

.checkout-mini-list {
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.checkout-mini-list::-webkit-scrollbar {
  width: 5px;
}
.checkout-mini-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.checkout-mini-item {
  padding: 8px 0;
  border-bottom: 1px dashed #e2e8f0;
}

.checkout-mini-item:last-child {
  border-bottom: none !important;
}

.checkout-mini-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
  font-size: 0.95rem;
  color: var(--text-main);
}

.summary-row.total {
  font-size: 1.1rem;
  color: var(--text-heading);
  margin-bottom: 0;
}

.total-price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--primary);
}

.summary-divider {
  border-top: 1px dashed var(--border-color);
  opacity: 1;
}

.checkout-form-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.form-input {
  background-color: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-xs);
  padding: 11px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #0f172a;
  transition: var(--transition-fast);
}

.form-input::placeholder {
  color: #64748b;
  font-weight: 400;
}

.form-input:focus {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 70, 100, 0.2);
  outline: none;
}

select.form-input {
  cursor: pointer;
}

/* Service Guarantee Card */
.cart-support-card {
  background-color: #fdfdfd;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.support-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--text-heading);
}

.support-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.support-list li {
  font-size: 0.8rem;
  color: var(--text-main);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: flex-start;
}

.support-list li:last-child {
  margin-bottom: 0;
}

/* 4. Empty State */
.empty-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: rgba(226, 232, 240, 0.4);
  color: var(--text-muted);
}

.empty-title {
  font-size: 1.6rem;
  font-weight: 700;
}

.empty-subtitle {
  font-size: 1rem;
}

/* 5. Success State Styling - Clean, Natural, Trustworthy */
#cart-success-state {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.success-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.shadow-2xs {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.fs-7 {
  font-size: 0.88rem;
}

.fs-8 {
  font-size: 0.8rem;
}

.order-summary-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
}

/* 6. Responsive Adjustments */
@media (max-width: 991.98px) {
  .cart-banner {
    padding: var(--space-6) 0;
  }

  .cart-banner-title {
    font-size: 1.8rem;
  }

  .cart-summary-card {
    margin-top: var(--space-4);
  }
}

@media (max-width: 575.98px) {
  .cart-item-row {
    flex-wrap: wrap;
    position: relative;
    padding: var(--space-4) var(--space-3);
  }

  .cart-item-price-wrap {
    width: 100%;
    text-align: left;
    padding-left: 76px;
    padding-top: var(--space-2);
  }

  .cart-item-remove-btn {
    position: absolute;
    top: var(--space-4);
    right: var(--space-3);
  }
}

/* Cart Summary Bar inside Left Card */
.cart-summary-bar {
  background-color: #fafbfc;
  border-top: 1px solid var(--border-color);
  font-family: var(--font-display);
}

.summary-qty-wrap {
  font-size: 0.95rem;
  color: var(--text-main);
}

.summary-total-wrap {
  font-weight: 700;
}

/* Payment Methods Grid - Compact, Modern & Premium */
.payment-methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.payment-method-card {
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  background-color: #ffffff;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: block;
}

.payment-method-card:hover {
  border-color: #cbd5e1;
  background-color: #f8fafc;
}

.payment-method-card.active {
  border-color: #0d6efd;
  background-color: #f0f7ff;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.08);
}

.payment-card-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.payment-radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
  font-size: 11px;
  transition: all 0.2s ease;
}

.payment-method-card.active .payment-radio-circle {
  border-color: #0d6efd;
  background: #0d6efd;
}

.payment-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.payment-method-card.active .payment-icon-wrap {
  background: #dbeafe;
  color: #0d6efd;
}

.payment-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.payment-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.payment-desc {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Waiting for QR Payment Box */
.waiting-payment-card {
  border-radius: 16px;
}

.payment-transfer-box {
  background: #fbfcfd !important;
  border: 1px solid #e8edf2;
}

.qr-canvas-wrap {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.btn-copy-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Live Pulsing Status Bar */
.live-status-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 30px;
  padding: 8px 18px;
  margin: 16px auto 0;
  width: fit-content;
  max-width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.live-dot-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulseLiveGreen 1.8s infinite;
}

@keyframes pulseLiveGreen {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Success Screen Styling */
.success-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #059669;
  font-size: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #a7f3d0;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.12);
}

.success-icon-badge.warning {
  background: #fffbeb !important;
  color: #d97706 !important;
  border-color: #fde68a !important;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.12) !important;
}

.studio-contact-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

/* Responsive */
@media (max-width: 767.98px) {
  .payment-methods-grid {
    grid-template-columns: 1fr;
  }
}
