/**
 * Cart View Styles
 * @package PCC_Woo
 * @since 1.3.0
 */

/* ========================================
   TOAST NOTIFICATIONS - Override for visibility
   ======================================== */
.inscape-app .inscape-toasts,
#inscape-toasts.inscape-toasts {
  position: fixed !important;
  top: 100px !important;
  right: 24px !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 99999 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px;
  max-width: 400px;
  width: auto;
  pointer-events: none;
}

.inscape-app .toast,
#inscape-toasts .toast {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  min-width: 300px;
  max-width: 400px;
  width: auto !important;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.1);
  animation: toastSlideIn 0.3s ease-out;
  pointer-events: auto;
  border-left: 4px solid #3b82f6;
}

.inscape-app .toast.toast-success,
#inscape-toasts .toast.toast-success {
  border-left-color: #10b981;
}

.inscape-app .toast.toast-error,
#inscape-toasts .toast.toast-error {
  border-left-color: #ef4444;
}

.inscape-app .toast.toast-warning,
#inscape-toasts .toast.toast-warning {
  border-left-color: #f59e0b;
}

.inscape-app .toast.toast-info,
#inscape-toasts .toast.toast-info {
  border-left-color: #3b82f6;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.inscape-app .toast.removing,
#inscape-toasts .toast.removing {
  animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideOut {
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.inscape-app .toast-icon,
#inscape-toasts .toast-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.inscape-app .toast-success .toast-icon {
  color: #10b981;
}
.inscape-app .toast-error .toast-icon {
  color: #ef4444;
}
.inscape-app .toast-warning .toast-icon {
  color: #f59e0b;
}
.inscape-app .toast-info .toast-icon {
  color: #3b82f6;
}

#inscape-toasts .toast-success .toast-icon {
  color: #10b981;
}
#inscape-toasts .toast-error .toast-icon {
  color: #ef4444;
}
#inscape-toasts .toast-warning .toast-icon {
  color: #f59e0b;
}
#inscape-toasts .toast-info .toast-icon {
  color: #3b82f6;
}

.inscape-app .toast-content,
#inscape-toasts .toast-content {
  flex: 1;
  min-width: 0;
}

.inscape-app .toast-title,
#inscape-toasts .toast-title {
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.inscape-app .toast-message,
#inscape-toasts .toast-message {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.4;
  word-wrap: break-word;
}

.inscape-app .toast-close,
#inscape-toasts .toast-close {
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s;
}

.inscape-app .toast-close:hover,
#inscape-toasts .toast-close:hover {
  color: #374151;
}

/* ========================================
   CART VIEW - MAIN CONTAINER
   ======================================== */
.inscape-app .cart-view {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--ins-space-0);
  box-sizing: border-box;
}

/* Loading Overlay */
.cart-view .cart-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.cart-view .cart-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: cart-spin 0.8s linear infinite;
}

@keyframes cart-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   CART HEADER
   ======================================== */
.cart-view .cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: var(--ins-space-6) 0;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.cart-view .cart-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.cart-view .cart-title svg {
  width: 20px;
  height: 24px;
  color: #2563eb;
}

.cart-view .cart-item-count {
  font-size: 14px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 6px 16px;
  border-radius: 20px;
}

/* ========================================
   CART LAYOUT - TWO COLUMN (DESKTOP)
   ======================================== */
.cart-view .cart-layout {
  display: flex !important;
  flex-direction: row !important;
  gap: 32px;
  align-items: flex-start;
}

.cart-view .cart-items-section {
  flex: 1 1 0%;
  min-width: 0;
  order: 1;
}

.cart-view .cart-summary-section {
  flex: 0 0 360px;
  width: 360px;
  max-width: 360px;
  order: 2;
  position: sticky;
  top: 80px;
}

/* ========================================
   CART ITEMS LIST
   ======================================== */
.cart-view .cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ========================================
   SINGLE CART ITEM
   ======================================== */
.cart-view .cart-item {
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  position: relative;
  box-sizing: border-box;
}

.cart-view .cart-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Item Image */
.cart-view .cart-item-image {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  background: #f9fafb;
  flex-shrink: 0;
}

.cart-view .cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-view .cart-item-badge {
  position: absolute;
  top: 28px;
  left: 28px;
  background: #dc2626;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  z-index: 1;
}

/* Item Content */
.cart-view .cart-item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-view .cart-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.cart-view .cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-view .cart-item-name {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px 0;
  line-height: 1.4;
}

.cart-view .cart-item-name a {
  color: #111827;
  text-decoration: none;
}

.cart-view .cart-item-name a:hover {
  color: #2563eb;
}

.cart-view .cart-item-desc {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-view .cart-item-variation {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.cart-view .cart-item-variation span {
  font-size: 11px;
  color: #4b5563;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 4px;
}

.cart-view .cart-item-meta {
  margin-top: 4px;
}

.cart-view .cart-item-sku {
  font-size: 11px;
  color: #9ca3af;
}

/* Item Price */
.cart-view .cart-item-price {
  text-align: right;
  flex-shrink: 0;
}

.cart-view .cart-item-price-regular {
  font-size: 13px;
  color: #9ca3af;
  text-decoration: line-through;
  display: block;
}

.cart-view .cart-item-price-current {
  font-size: 15px;
  font-weight: 500;
  color: #374151;
}

/* Item Footer */
.cart-view .cart-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}

/* Quantity Controls */
.cart-view .cart-item-quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
}

.cart-view .qty-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: #f9fafb;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.cart-view .qty-btn:hover:not(:disabled) {
  background: #e0e7ff;
  color: #2563eb;
}

.cart-view .qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cart-view .qty-btn svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.cart-view .qty-input {
  width: 48px;
  height: 36px;
  border: none;
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  background: #fff;
}

.cart-view .qty-input:focus {
  outline: none;
  background: #eff6ff;
}

.cart-view .qty-input::-webkit-outer-spin-button,
.cart-view .qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-view .qty-input[type="number"] {
  -moz-appearance: textfield;
}

/* Item Total */
.cart-view .cart-item-total {
  font-size: 17px;
  font-weight: 700;
  color: #1e40af;
}

/* Remove Button */
.cart-view .cart-item-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.cart-view .cart-item-remove:hover {
  background: #fef2f2;
  color: #dc2626;
}

.cart-view .cart-item-remove svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* Cart Actions Row */
.cart-view .cart-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f3f4f6;
}

.cart-view .cart-clear-btn {
  color: #6b7280;
}

.cart-view .cart-clear-btn:hover {
  color: #dc2626;
}

/* ========================================
   CART SUMMARY PANEL
   ======================================== */
.cart-view .cart-summary {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  box-sizing: border-box;
}

.cart-view .cart-summary-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 20px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid #f3f4f6;
}

.cart-view .cart-summary-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.cart-view .cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

/* Blue labels for Subtotal, Shipping, Tax */
.cart-view .cart-summary-row span:first-child {
  color: #2563eb;
  font-weight: 500;
}

.cart-view .cart-summary-row span:last-child {
  font-weight: 500;
  color: #111827;
}

.cart-view .cart-summary-discount span:first-child,
.cart-view .cart-summary-discount span:last-child {
  color: #059669;
}

.cart-view .cart-summary-total {
  padding-top: 16px;
  border-top: 2px solid #e5e7eb;
  font-size: 16px;
  font-weight: 700;
}

.cart-view .cart-summary-total span:first-child {
  color: #111827;
}

.cart-view .cart-summary-total span:last-child {
  font-size: 20px;
  color: #1e40af;
}

/* ========================================
   SHIPPING METHODS SELECTOR
   ======================================== */
.cart-view .cart-shipping-section {
  margin-bottom: 4px;
}

.cart-view .cart-shipping-header {
  margin-bottom: 12px;
}

.cart-view .cart-shipping-header .shipping-cost {
  font-weight: 600;
  color: #111827;
}

.cart-view .shipping-notice {
  font-style: italic;
  color: #9ca3af;
  font-size: 13px;
}

.cart-view .cart-shipping-methods {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 10px;
  margin-bottom: 12px;
}

.cart-view .shipping-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cart-view .shipping-method:hover {
  border-color: #2563eb;
  background: #f8fafc;
}

.cart-view .shipping-method.selected {
  border-color: #2563eb;
  background: #eff6ff;
}

.cart-view .shipping-method input[type="radio"] {
  display: none;
}

.cart-view .shipping-method-radio {
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.cart-view .shipping-method.selected .shipping-method-radio {
  border-color: #2563eb;
}

.cart-view .shipping-method.selected .shipping-method-radio::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #2563eb;
  border-radius: 50%;
}

.cart-view .shipping-method-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.cart-view .shipping-method-label {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.cart-view .shipping-method-cost {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.cart-view .shipping-method.selected .shipping-method-label {
  color: #1e40af;
}

/* Coupons */
.cart-view .cart-coupons {
  margin-bottom: 20px;
}

.cart-view .cart-coupon-form {
  display: flex;
  gap: 8px;
}

.cart-view .cart-coupon-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

.cart-view .cart-coupon-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.cart-view .cart-coupon-btn {
  padding: 10px 16px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.cart-view .cart-coupon-btn:hover {
  background: #e5e7eb;
}

.cart-view .cart-coupons-applied {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.cart-view .cart-coupon-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #d1fae5;
  color: #059669;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.cart-view .cart-coupon-tag svg {
  width: 14px;
  height: 14px;
}

.cart-view .cart-coupon-remove {
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  color: #059669;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-view .cart-coupon-remove:hover {
  background: rgba(0, 0, 0, 0.1);
}

.cart-view .cart-coupon-remove svg {
  width: 12px;
  height: 12px;
}

/* Summary Actions */
.cart-view .cart-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.cart-view .cart-summary-actions .btn-primary {
  width: 100%;
  padding: 14px 20px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: background 0.15s;
}

.cart-view .cart-summary-actions .btn-primary:hover {
  background: #1d4ed8;
}

.cart-view .cart-summary-actions .btn-primary svg {
  width: 18px;
  height: 18px;
}

.cart-view .cart-summary-actions .btn-secondary {
  width: 100%;
  padding: 14px 20px;
  background: #fff;
  color: var(--ins-success);
  border: 2px solid var(--ins-success-dark);
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.15s;
}

.cart-view .cart-summary-actions .btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}

.cart-view .cart-summary-actions .btn-secondary svg {
  width: 18px;
  height: 18px;
}

.cart-view .cart-summary-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
}

.cart-view .cart-summary-secure svg {
  width: 16px;
  height: 16px;
  color: #059669;
}

/* Summary Features */
.cart-view .cart-summary-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid #f3f4f6;
}

.cart-view .cart-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #4b5563;
}

.cart-view .cart-feature svg {
  width: 16px;
  height: 16px;
  color: #2563eb;
  flex-shrink: 0;
}

/* Payment Methods */
.cart-view .cart-payment-methods {
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

.cart-view .payment-label {
  display: block;
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.cart-view .payment-icons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cart-view .payment-icon {
  height: 24px;
  width: auto;
  border-radius: 4px;
}

/* ========================================
   EMPTY CART
   ======================================== */
.cart-view .cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: #f9fafb;
  border-radius: 16px;
}

.cart-view .cart-empty-icon {
  width: 80px;
  height: 80px;
  color: #d1d5db;
  margin-bottom: 24px;
}

.cart-view .cart-empty h2 {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px 0;
}

.cart-view .cart-empty p {
  font-size: 15px;
  color: #6b7280;
  margin: 0 0 24px 0;
  max-width: 360px;
}

/* ========================================
   SKELETON LOADING
   ======================================== */
.cart-view .skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 6px;
}

.cart-view .skeleton-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.cart-view .skeleton-image {
  width: 100px;
  height: 100px;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ========================================
   BUTTONS
   ======================================== */
.cart-view .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  border: none;
}

.cart-view .btn svg {
  width: 18px;
  height: 18px;
}

.cart-view .btn-ghost {
  background: transparent;
  color: #6b7280;
}

.cart-view .btn-ghost:hover {
  background: #f3f4f6;
  color: #111827;
}

.cart-view .btn-outline {
  background: transparent;
  color: #374151;
  border: 1px solid #d1d5db;
}

.cart-view .btn-outline:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* ========================================
   RESPONSIVE - TABLET (below 1024px)
   ======================================== */
@media (max-width: 1024px) {
  .cart-view .cart-layout {
    flex-direction: column !important;
  }

  .cart-view .cart-items-section {
    order: 2;
    width: 100%;
  }

  .cart-view .cart-summary-section {
    order: 1;
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    position: static;
    margin-bottom: 24px;
  }
}

@media (min-width: 768px) {
  .cart-view .cart-summary-section {
    width: 320px;
    flex-shrink: 0;
  }
}

/* ========================================
   RESPONSIVE - MOBILE (below 600px)
   ======================================== */
@media (max-width: 600px) {
  .cart-view {
    padding: 16px 12px;
  }

  .cart-view .cart-summary {
    border-top: 0;
  }

  .cart-view .cart-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    flex-direction: row-reverse;
  }

  .cart-view .cart-title {
    font-size: 20px;
    width: auto;
  }

  .cart-view .cart-title svg {
    width: 24px;
    height: 24px;
  }

  .cart-view .cart-item {
    padding: 16px;
  }

  .cart-view .cart-item-image {
    width: 80px;
    height: 80px;
  }

  .cart-view .cart-item-name {
    font-size: 14px;
  }

  .cart-view .cart-item-desc,
  .cart-view .cart-item-variation,
  .cart-view .cart-item-meta {
    display: none;
  }

  .cart-view .cart-item-footer {
    flex-wrap: wrap;
    gap: 12px;
  }

  .cart-view .qty-btn {
    width: 32px;
    height: 32px;
  }

  .cart-view .qty-input {
    width: 40px;
    height: 32px;
    font-size: 14px;
  }

  .cart-view .cart-item-total {
    font-size: 15px;
  }

  .cart-view .cart-actions-row {
    flex-direction: column;
    gap: 12px;
  }

  .cart-view .cart-actions-row .btn {
    width: 100%;
    justify-content: center;
  }

  .cart-view .cart-summary {
    padding: 20px;
  }

  .cart-view .cart-coupon-form {
    flex-direction: column;
  }

  .cart-view .cart-coupon-btn {
    width: 100%;
  }
}

/* ========================================
   MODAL COMPONENT
   ======================================== */
.cart-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  animation: cart-modal-fade-in 0.2s ease-out;
}

@keyframes cart-modal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cart-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 450px;
  width: 100%;
  animation: cart-modal-slide-in 0.2s ease-out;
  overflow: hidden;
}

@keyframes cart-modal-slide-in {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cart-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.cart-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.cart-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.cart-modal-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.cart-modal-body {
  padding: 24px;
}

.cart-modal-body p {
  margin: 0;
  font-size: 15px;
  color: #4b5563;
  line-height: 1.6;
}

.cart-modal-footer {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.cart-modal-footer .btn {
  flex: 1;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  text-align: center;
}

.cart-modal-footer .btn-secondary {
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
}

.cart-modal-footer .btn-secondary:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.cart-modal-footer .btn-primary {
  background: #2563eb;
  color: white;
}

.cart-modal-footer .btn-primary:hover {
  background: #1d4ed8;
}

/* Large modal variant */
.cart-modal.cart-modal-lg {
  max-width: 480px;
}

/* Modal form styles */
.cart-modal .modal-description {
  color: #6b7280;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.cart-modal .form-group {
  margin-bottom: 20px;
}

.cart-modal .form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.cart-modal .form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  color: #111827;
  background: #fff;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.cart-modal .form-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.cart-modal .form-input::placeholder {
  color: #9ca3af;
}

/* Offer summary in modal */
.cart-modal .offer-summary {
  background: #f9fafb;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.cart-modal .offer-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: #6b7280;
}

.cart-modal .offer-summary-row:not(:last-child) {
  border-bottom: 1px solid #e5e7eb;
}

.cart-modal .offer-summary-row span:last-child {
  color: #111827;
}

.cart-modal .offer-summary-total {
  font-weight: 600;
  padding-top: 12px;
  margin-top: 4px;
}

.cart-modal .offer-summary-total span:last-child {
  font-size: 16px;
  color: #1e40af;
}

/* Modal note */
.cart-modal .modal-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 12px;
  line-height: 1.4;
}

.cart-modal .modal-note svg {
  flex-shrink: 0;
  color: #0284c7;
  margin-top: 1px;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .cart-modal {
    max-width: 100%;
    margin: 20px;
  }

  .cart-modal-header {
    padding: 16px 20px;
  }

  .cart-modal-body {
    padding: 20px;
  }

  .cart-modal-footer {
    padding: 16px 20px;
    flex-direction: column;
  }

  .cart-modal-footer .btn {
    width: 100%;
  }
}
