/* Cart & Checkout Enhanced Styles */

/* ===================
   Cart Page Styles
   =================== */

.cart-page {
  background: linear-gradient(135deg, #f8f9ff 0%, #f1f4ff 100%);
  min-height: calc(100vh - 200px);
}

.cart-table {
  background: white;
}

.cart-table thead th {
  background: #f8f9fa;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  color: #495057;
}

.cart-item-row {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

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

.cart-item-row td {
  vertical-align: middle;
  padding: 1.5rem 0.75rem;
}

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

.cart-quantity-selector {
  max-width: 120px;
}

.cart-quantity-selector .form-control {
  height: 38px;
  border-left: none;
  border-right: none;
  text-align: center;
  font-weight: 600;
}

.cart-quantity-selector .btn {
  height: 38px;
  width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-color: #ced4da;
}

.cart-quantity-selector .btn:hover {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
}

.cart-quantity-selector .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Free Shipping Progress */
.progress {
  height: 8px;
  border-radius: 50px;
  overflow: hidden;
  background-color: #e9ecef;
}

.progress-bar {
  border-radius: 50px;
  transition: width 0.6s ease;
}

/* Product Card Enhancements */
.product-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

.product-card .product-image {
  position: relative;
  overflow: hidden;
}

.product-card .product-image img {
  transition: transform 0.4s ease;
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-card:hover .product-image img {
  transform: scale(1.1);
}

/* Order Summary Sticky */
.sticky-top {
  position: sticky;
  top: 20px;
  z-index: 10;
}

/* Trust Badges */
.trust-badges img {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.trust-badges img:hover {
  opacity: 1;
}

/* ===================
   Checkout Styles
   =================== */

.checkout-page {
  background: linear-gradient(135deg, #f8f9ff 0%, #f1f4ff 100%);
  min-height: 100vh;
}

/* Checkout Progress */
.checkout-progress {
  padding: 2rem 0;
}

.checkout-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  max-width: 200px;
}

.checkout-step-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.checkout-step.active .checkout-step-icon {
  background: #007bff;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.checkout-step.completed .checkout-step-icon {
  background: #28a745;
  color: white;
}

.checkout-step-info {
  text-align: center;
}

.checkout-step-number {
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
}

.checkout-step.active .checkout-step-number {
  color: #007bff;
}

.checkout-step-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6c757d;
  margin-top: 0.25rem;
}

.checkout-step.active .checkout-step-title {
  color: #007bff;
  font-weight: 600;
}

.checkout-step-line {
  height: 2px;
  background: #e9ecef;
  flex: 1;
  margin: 0 1rem;
  margin-top: -30px;
  position: relative;
  z-index: -1;
}

/* Form Styling */
.checkout-form .card {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: none;
}

.checkout-form .form-control,
.checkout-form .form-select {
  border-radius: 8px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.checkout-form .form-control:focus,
.checkout-form .form-select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}

.checkout-form .form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

/* Order Summary */
.order-summary {
  position: sticky;
  top: 20px;
}

.order-summary .card {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: none;
}

.order-item {
  padding: 1rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.order-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.order-summary-row {
  display: flex;
  justify-content: between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.order-summary-total {
  font-size: 1.25rem;
  font-weight: 700;
  border-top: 2px solid #007bff;
  padding-top: 1rem;
}

/* Payment Method Cards */
.payment-method-card {
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.payment-method-card:hover {
  border-color: #007bff;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.payment-method-card.active {
  border-color: #007bff;
  background-color: #f8f9ff;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
  .checkout-step {
    max-width: none;
    flex-direction: row;
    justify-content: flex-start;
    margin-bottom: 1rem;
  }

  .checkout-step-icon {
    width: 40px;
    height: 40px;
    margin-right: 0.75rem;
    margin-bottom: 0;
    font-size: 1rem;
  }

  .checkout-step-line {
    display: none;
  }

  .cart-item-row td {
    padding: 1rem 0.25rem;
    font-size: 0.875rem;
  }

  .sticky-top,
  .order-summary {
    position: relative;
    top: auto;
  }
}

@media (max-width: 767.98px) {
  .checkout-progress {
    padding: 1rem 0;
  }

  .checkout-step-info {
    text-align: left;
  }

  .cart-table {
    font-size: 0.825rem;
  }

  .cart-quantity-selector {
    max-width: 100px;
  }

  .cart-quantity-selector .btn {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  .cart-quantity-selector .form-control {
    height: 32px;
    font-size: 0.875rem;
  }
}

/* Loading States */
.btn[wire\:loading] {
  position: relative;
  color: transparent !important;
}

.btn[wire\:loading]:after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
  from {
    transform: rotate(0turn);
  }
  to {
    transform: rotate(1turn);
  }
}

/* Form Validation */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.invalid-feedback {
  display: block;
  font-size: 0.875rem;
  color: #dc3545;
  margin-top: 0.25rem;
}

/* Success States */
.alert-success {
  background: linear-gradient(45deg, #d4edda, #c3e6cb);
  border: none;
  border-radius: 12px;
  color: #155724;
}

.alert-danger {
  background: linear-gradient(45deg, #f8d7da, #f5c6cb);
  border: none;
  border-radius: 12px;
  color: #721c24;
}

.alert-warning {
  background: linear-gradient(45deg, #fff3cd, #ffeaa7);
  border: none;
  border-radius: 12px;
  color: #856404;
}
