/* Enhanced Checkout Page Styles - Modern Dark Theme */

/* ========================================
   CHECKOUT LAYOUT SYSTEM
======================================== */
.checkout-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
}

.checkout-main {
  flex: 1 1 400px;
  min-width: 320px;
}

.checkout-sidebar {
  flex: 0 1 340px;
  min-width: 260px;
}

/* ========================================
   ENHANCED CARD STYLING
======================================== */
.card-enhanced {
  background: #2a2a2e;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  padding: 32px 28px;
  margin-bottom: 24px;
  border: 1px solid #3a3a3e;
  transition: all 0.3s ease;
}

.card-enhanced:hover {
  border-color: #8b5cf6;
  box-shadow: 0 12px 35px rgba(139, 92, 246, 0.1);
  transform: translateY(-2px);
}

/* ========================================
   CHECKOUT SECURITY & TRUST ELEMENTS
======================================== */
.checkout-security {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.security-icon {
  font-size: 18px;
}

.security-text {
  font-weight: 500;
}

/* ========================================
   TRUST INDICATORS SYSTEM
======================================== */
.trust-indicators {
  display: flex;
justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 10px;
  padding: 14px 16px;
  transition: all 0.3s ease;
}

.trust-item:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: #8b5cf6;
  transform: translateY(-1px);
}

.trust-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.trust-icon svg {
  width: 20px;
  height: 20px;
  color: #8b5cf6;
}

.trust-item span {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
}

/* ========================================
   ENHANCED ORDER SUMMARY
======================================== */
.custom-order-summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.custom-order-item {
  display: flex;
  align-items: center;
  background: #1f1f23;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #2a2a2e;
  transition: all 0.3s ease;
}

.custom-order-item:hover {
  background: #252529;
  border-color: #8b5cf6;
}

.custom-order-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: #111;
  margin-right: 16px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #333;
}

.custom-order-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.custom-order-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.custom-order-title {
  font-weight: 600;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 2px;
}

.custom-order-qty {
  color: #9ca3af;
  font-size: 13px;
  font-weight: 500;
}

.custom-order-subtotal {
  font-weight: 700;
  color: #8b5cf6;
  font-size: 16px;
  text-align: right;
  min-width: 80px;
  margin-left: 16px;
}

/* ========================================
   ORDER TOTALS STYLING
======================================== */
.custom-order-totals {
  margin-top: 20px;
  border-top: 2px solid #3a3a3e;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.custom-order-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  color: #ffffff;
  padding: 4px 0;
}

.custom-order-total-row span:first-child {
  color: #d1d5db;
  font-weight: 500;
}

.custom-order-total-row span:last-child {
  font-weight: 600;
}

.custom-order-grandtotal {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  border-top: 2px solid #8b5cf6;
  padding-top: 12px !important;
  margin-top: 8px;
}

.custom-order-grandtotal span:first-child {
  color: #ffffff !important;
  font-weight: 800 !important;
}

.custom-order-grandtotal span:last-child {
  color: #8b5cf6 !important;
  font-size: 22px !important;
}

/* ========================================
   WOOCOMMERCE FORM OVERRIDES
======================================== */
/* Hide default WooCommerce order review table */
.woocommerce-checkout-review-order-table {
  display: none !important;
}

/* Checkout form sections */
.checkout-section {
  margin-bottom: 32px;
}

.checkout-section .section-title {
  font-family: "IM Fell English", serif;
  font-size: 24px;
  color: #ffffff;
  margin-bottom: 20px;
  text-align: left;
  border-bottom: 2px solid #8b5cf6;
  padding-bottom: 8px;
}

/* Form field styling */
.woocommerce-billing-fields .form-row,
.woocommerce-shipping-fields .form-row,
.woocommerce-additional-fields .form-row {
  margin-bottom: 20px;
}

.woocommerce-billing-fields label,
.woocommerce-shipping-fields label,
.woocommerce-additional-fields label {
  display: block;
  color: #ffffff;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 14px;
}

.woocommerce-billing-fields input,
.woocommerce-billing-fields select,
.woocommerce-billing-fields textarea,
.woocommerce-shipping-fields input,
.woocommerce-shipping-fields select,
.woocommerce-additional-fields input,
.woocommerce-additional-fields textarea {
  width: 100%;
  padding: 12px 16px;
  background: #1a1a1d;
  border: 2px solid #333;
  border-radius: 8px;
  color: #ffffff;
  font-size: 15px;
  transition: all 0.3s ease;
}

.woocommerce-billing-fields input:focus,
.woocommerce-billing-fields select:focus,
.woocommerce-billing-fields textarea:focus,
.woocommerce-shipping-fields input:focus,
.woocommerce-shipping-fields select:focus,
.woocommerce-additional-fields input:focus,
.woocommerce-additional-fields textarea:focus {
  outline: none;
  border-color: #8b5cf6;
  background: #232327;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Required field indicators */
.required {
  color: #ef4444;
  font-weight: 700;
}

/* ========================================
   PAYMENT SECTION STYLING
======================================== */
#payment {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
}

#payment .section-title {
  margin-bottom: 20px;
  color: #ffffff;
  border-bottom: 2px solid #8b5cf6;
  padding-bottom: 8px;
}

.wc_payment_methods {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 20px 0 !important;
}

.wc_payment_methods li {
  border: 2px solid #333;
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.wc_payment_methods li:hover {
  border-color: #8b5cf6;
}

.wc_payment_methods li.wc_payment_method {
  background: #1a1a1d;
}

.wc_payment_methods li label {
  display: block;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 500;
  color: #ffffff;
  margin: 0;
  transition: all 0.3s ease;
}

.wc_payment_methods li input[type="radio"] {
  margin-right: 12px;
  accent-color: #8b5cf6;
}

.wc_payment_methods li.payment_method_selected {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
}

/* Payment method descriptions */
.payment_box {
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 12px 20px 16px;
  font-size: 14px;
  line-height: 1.5;
}

/* ========================================
   PLACE ORDER BUTTON
======================================== */
.place-order-btn {
  width: 100%;
  padding: 18px 32px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #ffffff !important;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "IM Fell English", serif !important;
  position: relative;
  overflow: hidden;
}

.place-order-btn:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.place-order-btn:active {
  transform: translateY(0);
}

/* Loading state for place order button */
.place-order-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.place-order-btn.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========================================
   WOOCOMMERCE NOTICES & MESSAGES
======================================== */
.woocommerce-notice,
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
  background: #1a1a1d !important;
  border: 2px solid #333 !important;
  border-radius: 10px !important;
  padding: 16px 20px !important;
  margin: 16px 0 !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  position: relative;
}

.woocommerce-error {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.1) !important;
  color: #fef2f2 !important;
}

.woocommerce-message {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.1) !important;
  color: #f0fdf4 !important;
}

.woocommerce-info {
  border-color: #8b5cf6 !important;
  background: rgba(139, 92, 246, 0.1) !important;
  color: #faf7ff !important;
}

/* Remove list styling from notices */
.woocommerce-info ul,
.woocommerce-notice ul,
.woocommerce-error ul,
.woocommerce-message ul {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0 !important;
}

.woocommerce-info li,
.woocommerce-notice li,
.woocommerce-error li,
.woocommerce-message li {
  padding-left: 0 !important;
  background: none !important;
  list-style: none !important;
  margin: 0 !important;
}

.woocommerce-info li::before,
.woocommerce-info li::after,
.woocommerce-info li::marker,
.woocommerce-notice li::before,
.woocommerce-notice li::after,
.woocommerce-notice li::marker {
  display: none !important;
  content: none !important;
}

/* ========================================
   CART TOTALS IN SIDEBAR
======================================== */
.cart_totals {
  background: #1a1a1d;
  border-radius: 12px;
  border: 1px solid #333;
  padding: 24px;
}

.cart_totals .shop_table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
}

.cart_totals .shop_table th,
.cart_totals .shop_table td {
  padding: 12px 8px;
  border: none;
  background: none;
  font-size: 15px;
  color: #ffffff;
}

.cart_totals .shop_table th {
  text-align: left;
  color: #d1d5db;
  font-weight: 500;
  width: 60%;
}

.cart_totals .shop_table td {
  text-align: right;
  font-weight: 600;
  width: 40%;
}

.cart_totals .shop_table .order-total th,
.cart_totals .shop_table .order-total td {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  border-top: 2px solid #8b5cf6;
  padding-top: 16px;
}

.cart_totals .shop_table .order-total td {
  color: #8b5cf6;
}

/* Shipping and tax rows */
.cart_totals .shop_table .cart-discount th,
.cart_totals .shop_table .cart-discount td {
  color: #10b981;
}

.cart_totals .shop_table .shipping th,
.cart_totals .shop_table .shipping td,
.cart_totals .shop_table .tax-total th,
.cart_totals .shop_table .tax-total td {
  color: #ffffff;
}

/* ========================================
   PROCEED TO CHECKOUT BUTTON (for cart page)
======================================== */
.wc-proceed-to-checkout .checkout-button,
.woocommerce-cart .wc-proceed-to-checkout .button.checkout-button {
  display: inline-block;
  width: 100%;
  margin-top: 20px;
  padding: 16px 32px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #ffffff !important;
  text-decoration: none;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
  border-radius: 12px;
  font-family: "IM Fell English", serif !important;
}

.wc-proceed-to-checkout .checkout-button:hover,
.woocommerce-cart .wc-proceed-to-checkout .button.checkout-button:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
  color: #ffffff !important;
}

/* ========================================
   ENHANCED MOBILE RESPONSIVE DESIGN
======================================== */

/* Tablet and small desktop adjustments */
@media (max-width: 1024px) {
  .checkout-wrapper {
    gap: 32px;
  }
  
  .checkout-main {
    min-width: 300px;
  }
  
  .checkout-sidebar {
    min-width: 280px;
  }
  
  .card-enhanced {
    padding: 28px 24px;
  }
}

/* Mobile landscape and portrait tablet */
@media (max-width: 768px) {
  .checkout-wrapper {
    flex-direction: column;
    gap: 24px;
    margin: 0 -10px;
  }

  .trust-indicators{
    flex-direction: column;
  }

  .checkout-main,
  .checkout-sidebar {
    min-width: 0;
    width: 100%;
    margin: 0 10px;
  }

  .card-enhanced {
    padding: 24px 20px;
    margin-bottom: 20px;
    border-radius: 12px;
  }

  /* Form adjustments */
  .checkout-section .section-title {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .woocommerce-billing-fields .form-row,
  .woocommerce-shipping-fields .form-row,
  .woocommerce-additional-fields .form-row {
    margin-bottom: 16px;
  }

  .woocommerce-billing-fields input,
  .woocommerce-billing-fields select,
  .woocommerce-billing-fields textarea,
  .woocommerce-shipping-fields input,
  .woocommerce-shipping-fields select,
  .woocommerce-additional-fields input,
  .woocommerce-additional-fields textarea {
    padding: 14px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* Order summary mobile adjustments */
  .custom-order-item {
    padding: 14px;
    flex-direction: row;
    align-items: center;
  }

  .custom-order-thumb {
    width: 50px;
    height: 50px;
    margin-right: 14px;
  }

  .custom-order-title {
    font-size: 14px;
    line-height: 1.3;
  }

  .custom-order-qty {
    font-size: 12px;
  }

  .custom-order-subtotal {
    font-size: 15px;
    margin-left: 12px;
    min-width: 70px;
  }

  /* Payment section mobile */
  #payment {
    padding: 20px;
  }

  .wc_payment_methods li label {
    padding: 14px 16px;
    font-size: 14px;
  }

  .payment_box {
    margin: 10px 16px 14px;
    padding: 14px 16px;
    font-size: 13px;
  }

  /* Trust indicators mobile */
  .trust-item {
    padding: 12px 14px;
  }

  .trust-item span {
    font-size: 13px;
  }

  .trust-icon svg {
    width: 18px;
    height: 18px;
  }
}

/* Mobile portrait - smaller screens */
@media (max-width: 600px) {
  .checkout-wrapper {
    margin: 0 -5px;
  }

  .checkout-main,
  .checkout-sidebar {
    margin: 0 5px;
  }

  .card-enhanced {
    padding: 20px 16px;
    border-radius: 10px;
  }

  .checkout-security {
    padding: 12px 14px;
    font-size: 14px;
    gap: 10px;
  }

  .security-icon {
    font-size: 16px;
  }

  /* Vertical order items on very small screens */
  .custom-order-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 12px;
  }

  .custom-order-thumb {
    align-self: center;
    margin-right: 0;
    margin-bottom: 8px;
    width: 60px;
    height: 60px;
  }

  .custom-order-info {
    align-self: stretch;
    text-align: center;
  }

  .custom-order-title {
    font-size: 15px;
    text-align: center;
  }

  .custom-order-qty {
    text-align: center;
  }

  .custom-order-subtotal {
    margin-left: 0;
    align-self: center;
    font-size: 16px;
    font-weight: 700;
    margin-top: 8px;
  }

  /* Totals section mobile */
  .custom-order-totals {
    margin-top: 16px;
    padding-top: 16px;
  }

  .custom-order-total-row {
    font-size: 14px;
    padding: 6px 0;
  }

  .custom-order-grandtotal {
    font-size: 18px !important;
    padding-top: 12px !important;
  }

  .custom-order-grandtotal span:last-child {
    font-size: 20px !important;
  }

  /* Form improvements for mobile */
  .woocommerce-billing-fields label,
  .woocommerce-shipping-fields label,
  .woocommerce-additional-fields label {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .checkout-section .section-title {
    font-size: 18px;
    margin-bottom: 14px;
  }

  /* Place order button mobile */
  .place-order-btn {
    padding: 16px 24px !important;
    font-size: 16px !important;
    border-radius: 10px;
  }

  /* Payment methods mobile */
  .wc_payment_methods li {
    border-radius: 8px;
  }

  .wc_payment_methods li label {
    padding: 12px 14px;
    font-size: 13px;
  }

  /* Cart totals mobile */
  .cart_totals {
    padding: 20px 16px;
    border-radius: 10px;
  }

  .cart_totals .shop_table th,
  .cart_totals .shop_table td {
    padding: 10px 6px;
    font-size: 14px;
  }

  .cart_totals .shop_table .order-total th,
  .cart_totals .shop_table .order-total td {
    font-size: 18px;
    padding-top: 14px;
  }

  /* Trust indicators mobile adjustments */
  .trust-indicators {
    gap: 12px;
    margin-top: 20px;
  }

  .trust-item {
    padding: 10px 12px;
  }

  .trust-icon {
    width: 20px;
    height: 20px;
  }

  .trust-icon svg {
    width: 16px;
    height: 16px;
  }

  .trust-item span {
    font-size: 12px;
  }
}

/* Very small mobile screens */
@media (max-width: 480px) {
  .checkout-wrapper {
    margin: 0;
    gap: 20px;
  }

  .checkout-main,
  .checkout-sidebar {
    margin: 0;
  }

  .card-enhanced {
    padding: 18px 14px;
    border-radius: 8px;
  }

  /* Ultra compact order items */
  .custom-order-item {
    padding: 14px 10px;
  }

  .custom-order-thumb {
    width: 50px;
    height: 50px;
  }

  .custom-order-title {
    font-size: 14px;
  }

  .custom-order-subtotal {
    font-size: 15px;
  }

  /* Form fields ultra mobile */
  .woocommerce-billing-fields input,
  .woocommerce-billing-fields select,
  .woocommerce-billing-fields textarea,
  .woocommerce-shipping-fields input,
  .woocommerce-shipping-fields select,
  .woocommerce-additional-fields input,
  .woocommerce-additional-fields textarea {
    padding: 12px 14px;
    font-size: 16px;
  }

  .checkout-section .section-title {
    font-size: 16px;
  }

  .place-order-btn {
    padding: 14px 20px !important;
    font-size: 15px !important;
  }

  /* Payment section ultra compact */
  #payment {
    padding: 16px 14px;
  }

  .wc_payment_methods li label {
    padding: 10px 12px;
    font-size: 12px;
  }

  .payment_box {
    padding: 12px 14px;
    font-size: 12px;
    margin: 8px 12px 12px;
  }

  /* Security notice compact */
  .checkout-security {
    padding: 10px 12px;
    font-size: 13px;
  }

  /* Totals ultra compact */
  .custom-order-totals {
    gap: 8px;
  }

  .custom-order-total-row {
    font-size: 13px;
  }

  .custom-order-grandtotal {
    font-size: 16px !important;
  }

  .custom-order-grandtotal span:last-child {
    font-size: 18px !important;
  }
}

/* Landscape phone adjustments */
@media (max-width: 896px) and (orientation: landscape) {
  .card-enhanced {
    padding: 20px;
  }

  .checkout-security {
    padding: 10px 14px;
  }

  .custom-order-item {
    padding: 12px;
  }

  .place-order-btn {
    padding: 14px 28px !important;
  }
}

/* Touch improvements for all mobile devices */
@media (hover: none) and (pointer: coarse) {
  .wc_payment_methods li label {
    padding: 16px 20px;
  }

  .place-order-btn {
    padding: 18px 32px !important;
    min-height: 50px;
  }

  .trust-item {
    padding: 14px 16px;
  }

  /* Larger tap targets for mobile */
  .woocommerce-billing-fields input,
  .woocommerce-billing-fields select,
  .woocommerce-billing-fields textarea,
  .woocommerce-shipping-fields input,
  .woocommerce-shipping-fields select,
  .woocommerce-additional-fields input,
  .woocommerce-additional-fields textarea {
    min-height: 48px;
    padding: 14px 16px;
  }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
======================================== */
/* Focus styles for better keyboard navigation */
.wc_payment_methods li input[type="radio"]:focus,
.woocommerce-billing-fields input:focus,
.woocommerce-shipping-fields input:focus,
.place-order-btn:focus {
  outline: 2px solid #8b5cf6;
  outline-offset: 2px;
}

/* Screen reader improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card-enhanced {
    border-width: 2px;
  }
  
  .custom-order-item {
    border-width: 2px;
  }
  
  .place-order-btn {
    border: 2px solid #ffffff;
  }
}



