/**
 * Checkout Page Styles
 */

/* Hide WooCommerce notices wrapper completely */
.woocommerce-notices-wrapper {
  display: none !important;
}

/* Hide WooCommerce success/info messages (we use toast instead), but show errors */
.woocommerce-message,
.woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info {
  display: none !important;
}

/* Show error messages with custom styling (will be converted to toast by JavaScript) */
.woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-error {
  display: block !important;
  background: #fee2e2;
  border-left: 4px solid #ef4444;
  color: #991b1b;
  padding: 16px 20px;
  margin: 0 0 24px 0;
  border-radius: 8px;
  list-style: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Hide error messages that have been converted to toast */
.woocommerce-error.converted-to-toast,
.woocommerce-notices-wrapper .woocommerce-error.converted-to-toast {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.woocommerce-error li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.woocommerce-error::before {
  content: "⚠️ ";
  margin-right: 8px;
}

/* Checkout Page Container */
.checkout-page {
  padding: 60px 0;
  background: #f8f9fa;
}

/* Checkout Header */
.checkout-page__header {
  text-align: center;
  margin-bottom: 50px;
}

.checkout-page__title {
  font-size: 36px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 10px 0;
}

.checkout-page__subtitle {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
}

/* Checkout Layout */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 450px;
  gap: 40px;
  align-items: start;
}

/* Checkout Main Column */
.checkout-layout__main {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Checkout Customer Details */
.checkout-customer-details {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Checkout Section */
.checkout-section {
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.checkout-section__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 25px 0;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--tl-primary,#dc4d28);
}

.checkout-section__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--tl-primary,#dc4d28) 0%, var(--tl-primary-dark,#b83d1f) 100%);
  color: white;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
}

.checkout-section__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Form Fields */
.checkout-section .woocommerce-input-wrapper {
  width: 100%;
}

.checkout-section input[type="text"],
.checkout-section input[type="email"],
.checkout-section input[type="tel"],
.checkout-section input[type="password"],
.checkout-section textarea,
.checkout-section select,
.woocommerce-additional-fields__field-wrapper textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 15px;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.checkout-section textarea,
.woocommerce-additional-fields__field-wrapper textarea {
  min-height: 120px;
  resize: vertical;
}

.checkout-section input:focus,
.checkout-section textarea:focus,
.checkout-section select:focus,
.woocommerce-additional-fields__field-wrapper textarea:focus {
  outline: none;
  border-color: var(--tl-primary,#dc4d28);
}

.checkout-section label,
.woocommerce-additional-fields__field-wrapper label {
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 8px;
  display: block;
}

.checkout-section .required {
  color: var(--tl-primary,#dc4d28);
}

/* Order Notes Field Wrapper */
.woocommerce-additional-fields__field-wrapper {
  width: 100%;
}

.woocommerce-additional-fields__field-wrapper .form-row {
  margin-bottom: 0;
}

/* Hide Address 2 field */
.form-row.hidden {
  display: none !important;
}

/* Vietnam Address Fields */
#billing_city_field,
#shipping_city_field,
#billing_state_field,
#shipping_state_field {
  position: relative;
}

/* Province fields (city) and District fields (state) */
#billing_city,
#shipping_city,
#billing_state,
#shipping_state {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* District fields (state) - disabled until province selected */
#billing_state:disabled,
#shipping_state:disabled {
  background-color: #f8f9fa;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Country field - hide or make readonly for Vietnam */
#billing_country_field,
#shipping_country_field {
  display: none;
}

/* Force show state field (District) for Vietnam */
#billing_state_field,
#shipping_state_field {
  display: block !important;
  visibility: visible !important;
}

/* VAT Invoice Section */
.checkout-vat .vat-checkbox-wrapper {
  margin-bottom: 20px;
}

.checkout-vat .vat-checkbox-wrapper label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
}

.checkout-vat .vat-checkbox-wrapper input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.vat-fields {
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  margin-top: 10px;
}

.vat-tax-code-row,
.vat-tax-code-row.form-row,
.vat-tax-code-row.form-row-wide {
  position: relative !important;
  margin-bottom: 20px !important;
  width: 100% !important;
  float: none !important;
  clear: both !important;
}

.vat-tax-code-row label,
.vat-tax-code-row.form-row label,
.vat-tax-code-row.form-row-wide label {
  display: block !important;
  width: 100% !important;
  float: none !important;
  margin-bottom: 12px !important;
  margin-right: 0 !important;
  font-weight: 500 !important;
  color: #2c3e50 !important;
  font-size: 15px !important;
}

.tax-code-input-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  align-items: stretch !important;
}

.tax-code-input-group input.input-text,
#vat_tax_code.input-text {
  width: 100% !important;
  height: 48px !important;
  padding: 0 16px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  font-size: 15px !important;
  line-height: normal !important;
  transition: border-color 0.3s ease !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.tax-code-input-group input.input-text:focus,
#vat_tax_code.input-text:focus {
  border-color: var(--tl-primary,#dc4d28) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--tl-primary,#dc4d28) 10%,transparent) !important;
}

.tax-lookup-btn,
button.tax-lookup-btn {
  height: 48px !important;
  padding: 0 24px !important;
  background-color: var(--tl-primary,#dc4d28) !important;
  color: white !important;
  border: none !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 4px color-mix(in srgb,var(--tl-primary,#dc4d28) 20%,transparent) !important;
  line-height: normal !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: flex-start !important;
  min-width: 200px !important;
}

.tax-lookup-btn:hover:not(:disabled),
button.tax-lookup-btn:hover:not(:disabled) {
  background-color: var(--tl-primary-dark,#c13d1d) !important;
  box-shadow: 0 4px 8px color-mix(in srgb,var(--tl-primary,#dc4d28) 30%,transparent) !important;
  transform: translateY(-1px) !important;
}

.tax-lookup-btn:active:not(:disabled),
button.tax-lookup-btn:active:not(:disabled) {
  transform: translateY(0) !important;
  box-shadow: 0 2px 4px color-mix(in srgb,var(--tl-primary,#dc4d28) 20%,transparent) !important;
}

.tax-lookup-btn:disabled,
button.tax-lookup-btn:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

.tax-lookup-message {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tax-lookup-message--success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.tax-lookup-message--success::before {
  content: "✓";
  font-weight: bold;
  font-size: 16px;
}

.tax-lookup-message--error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.tax-lookup-message--error::before {
  content: "✕";
  font-weight: bold;
  font-size: 16px;
}

/* VAT Fields Styling */
.vat-fields .form-row,
.vat-fields .form-row-wide {
  margin-bottom: 20px !important;
  width: 100% !important;
  float: none !important;
  clear: both !important;
}

.vat-fields .form-row label,
.vat-fields .form-row-wide label {
  display: block !important;
  width: 100% !important;
  float: none !important;
  margin-bottom: 12px !important;
  margin-right: 0 !important;
  font-weight: 500 !important;
  color: #2c3e50 !important;
  font-size: 15px !important;
}

.vat-fields .form-row input.input-text,
.vat-fields .form-row-wide input.input-text,
#vat_company_name.input-text,
#vat_company_address.input-text,
#vat_invoice_email.input-text {
  width: 100% !important;
  height: 48px !important;
  padding: 0 16px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  font-size: 15px !important;
  line-height: normal !important;
  transition: border-color 0.3s ease !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.vat-fields .form-row input.input-text:focus,
.vat-fields .form-row-wide input.input-text:focus,
#vat_company_name.input-text:focus,
#vat_company_address.input-text:focus,
#vat_invoice_email.input-text:focus {
  border-color: var(--tl-primary,#dc4d28) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--tl-primary,#dc4d28) 10%,transparent) !important;
}

/* Responsive */
@media (max-width: 768px) {
  .tax-code-input-group {
    grid-template-columns: 1fr;
  }

  .tax-lookup-btn {
    width: 100%;
  }
}

/* Apply consistent styling to all checkout form inputs */
.checkout-section .form-row,
.checkout-section .form-row-wide,
.checkout-section .form-row-first,
.checkout-section .form-row-last {
  margin-bottom: 20px !important;
  width: 100% !important;
  float: none !important;
  clear: both !important;
}

.checkout-section .form-row-first,
.checkout-section .form-row-last {
  width: 48% !important;
}

.form-row-group {
  display: flex !important;
  gap: 4% !important;
}

.checkout-section .form-row label,
.checkout-section .form-row-wide label,
.checkout-section .form-row-first label,
.checkout-section .form-row-last label {
  display: block !important;
  float: none !important;
  margin-bottom: 12px !important;
  margin-right: 0 !important;
  font-weight: 500 !important;
  color: #2c3e50 !important;
  font-size: 15px !important;
}

/* All text inputs in checkout */
.checkout-section input.input-text,
.checkout-section select.select,
.checkout-section textarea.input-text {
  width: 100% !important;
  padding: 0 16px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  font-size: 15px !important;
  line-height: normal !important;
  transition: border-color 0.3s ease !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.checkout-section input.input-text,
.checkout-section select.select {
  height: 48px !important;
}

.checkout-section textarea.input-text {
  min-height: 120px !important;
  padding: 12px 16px !important;
  resize: vertical !important;
}

.checkout-section input.input-text:focus,
.checkout-section select.select:focus,
.checkout-section textarea.input-text:focus {
  border-color: var(--tl-primary,#dc4d28) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--tl-primary,#dc4d28) 10%,transparent) !important;
}

/* Select dropdown styling */
.checkout-section select.select {
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  padding-right: 40px !important;
}

.checkout-section select.select:disabled {
  background-color: #f8f9fa !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
}

/* Responsive for name fields */
@media (max-width: 768px) {
  .checkout-section .form-row-first,
  .checkout-section .form-row-last {
    width: 100% !important;
  }

  .form-row-group {
    flex-direction: column !important;
    gap: 0 !important;
  }
}

/* Checkout Sidebar */
.checkout-layout__sidebar {
  position: sticky;
  top: 100px;
}

.checkout-order-review {
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.checkout-order-review__title {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 25px 0;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--tl-primary,#dc4d28);
}

/* Custom Order Review - Card Based Design */
.custom-order-review {
  margin-bottom: 25px;
}

/* Order Items */
.order-items {
  margin-bottom: 20px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: white;
  border: 1px solid #f1f3f5;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.order-item:hover {
  border-color: var(--tl-primary,#dc4d28);
  box-shadow: 0 2px 8px color-mix(in srgb,var(--tl-primary,#dc4d28) 10%,transparent);
}

.order-item__content {
  flex: 1;
}

.order-item__name {
  font-size: 15px;
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 8px;
  line-height: 1.4;
}

.order-item__vat-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  background: linear-gradient(135deg, var(--tl-primary-soft,#fff5f2) 0%, var(--tl-primary-light,#ffe8e0) 100%);
  color: var(--tl-primary,#dc4d28);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}

.order-item__quantity {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6b7280;
}

.order-item__quantity svg {
  color: #9ca3af;
}

.order-item__price {
  font-size: 18px;
  font-weight: 700;
  color: var(--tl-primary,#dc4d28);
  margin-left: 20px;
}

/* Order Totals */
.order-totals {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
}

.order-total-row:last-child {
  border-bottom: none;
}

.order-total-row__label {
  font-size: 14px;
  color: #495057;
  font-weight: 500;
}

.order-total-row__label svg {
  color: #6b7280;
}

.order-total-row__label small.vat-hint {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
  margin-top: 4px;
}

.order-total-row__value {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
}

/* VAT Row */
.order-total-row--vat {
  background: linear-gradient(135deg, var(--tl-primary-soft,#fff5f2) 0%, var(--tl-primary-light,#ffe8e0) 100%);
  padding: 12px 20px;
  margin: 8px -20px;
  border-bottom: none;
}

.order-total-row--vat .order-total-row__label {
  color: var(--tl-primary,#dc4d28);
  font-weight: 600;
}

.order-total-row--vat .order-total-row__value {
  color: var(--tl-primary,#dc4d28);
  font-weight: 700;
}

/* Shipping Row */
.order-total-row--shipping .order-total-row__label {
  display: flex;
  align-items: center;
}

.free-shipping {
  color: #10b981;
  font-weight: 600;
}

/* Discount Row */
.order-total-row--discount {
  background: #ecfdf5;
  padding: 12px 16px;
  margin: 8px -20px;
  border-bottom: none;
}

.order-total-row--discount .order-total-row__label {
  color: #047857;
}

.order-total-row__value--discount {
  color: #10b981 !important;
  font-weight: 700 !important;
}

/* Final Total Row */
.order-total-row--final {
  margin-top: 12px;
  padding-top: 20px;
  border-top: 3px solid var(--tl-primary,#dc4d28);
  border-bottom: none;
}

.order-total-row--final .order-total-row__label {
  font-size: 18px;
  font-weight: 700;
  color: #2c3e50;
}

.order-total-row--final .order-total-row__value {
  font-size: 26px;
  font-weight: 700;
  color: var(--tl-primary,#dc4d28);
}

/* Old table styles (keep for fallback) */
.woocommerce-checkout-review-order-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 25px;
}

.woocommerce-checkout-review-order-table thead th {
  background: #f8f9fa;
  padding: 16px 20px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--tl-primary,#dc4d28);
}

.woocommerce-checkout-review-order-table thead th:first-child {
  border-top-left-radius: 8px;
}

.woocommerce-checkout-review-order-table thead th:last-child {
  border-top-right-radius: 8px;
  text-align: right;
}

.woocommerce-checkout-review-order-table tbody tr {
  border-bottom: 1px solid #f1f3f5;
  transition: background-color 0.2s ease;
}

.woocommerce-checkout-review-order-table tbody tr:hover {
  background-color: #fafbfc;
}

.woocommerce-checkout-review-order-table tbody td {
  padding: 18px 20px;
  vertical-align: middle;
}

.woocommerce-checkout-review-order-table .product-name {
  font-size: 15px;
  font-weight: 500;
  color: #2c3e50;
  line-height: 1.5;
}

.woocommerce-checkout-review-order-table .product-quantity {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  background: #e9ecef;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #495057;
}

.woocommerce-checkout-review-order-table .product-vat-info {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 10px;
  background: var(--tl-primary-soft,#fff5f2);
  color: var(--tl-primary,#dc4d28);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.woocommerce-checkout-review-order-table .product-total {
  text-align: right;
  font-size: 17px;
  font-weight: 700;
  color: var(--tl-primary,#dc4d28);
}

/* Table Footer (Totals) */
.woocommerce-checkout-review-order-table tfoot tr {
  border-bottom: 1px solid #f1f3f5;
}

.woocommerce-checkout-review-order-table tfoot th {
  padding: 15px 20px;
  text-align: left;
  font-size: 15px;
  color: #495057;
  font-weight: 600;
}

.woocommerce-checkout-review-order-table tfoot td {
  padding: 15px 20px;
  text-align: right;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
}

.woocommerce-checkout-review-order-table tfoot .cart-vat {
  background: linear-gradient(135deg, var(--tl-primary-soft,#fff5f2) 0%, var(--tl-primary-light,#ffe8e0) 100%);
}

.woocommerce-checkout-review-order-table tfoot .cart-vat th {
  color: var(--tl-primary,#dc4d28);
  font-weight: 600;
}

.woocommerce-checkout-review-order-table tfoot .cart-vat td {
  color: var(--tl-primary,#dc4d28);
  font-weight: 700;
}

.woocommerce-checkout-review-order-table tfoot .vat-hint {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
  margin-top: 4px;
}

.woocommerce-checkout-review-order-table tfoot .order-total {
  border: none;
  border-top: 3px solid var(--tl-primary,#dc4d28);
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.woocommerce-checkout-review-order-table tfoot .order-total th {
  font-size: 18px;
  font-weight: 700;
  color: #2c3e50;
  padding-top: 20px;
}

.woocommerce-checkout-review-order-table tfoot .order-total td {
  font-size: 26px;
  font-weight: 700;
  color: var(--tl-primary,#dc4d28);
  padding-top: 20px;
}

/* Custom Coupon Section */
.custom-coupon-section {
  margin-top: 25px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  padding: 20px;
  border: 2px dashed #e0e0e0;
  transition: all 0.3s ease;
}

.custom-coupon-section:hover {
  border-color: var(--tl-primary,#dc4d28);
  box-shadow: 0 4px 12px color-mix(in srgb,var(--tl-primary,#dc4d28) 10%,transparent);
}

.custom-coupon-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  color: #495057;
  font-size: 15px;
  font-weight: 600;
}

.custom-coupon-header svg {
  color: var(--tl-primary,#dc4d28);
}

.custom-coupon-form {
  margin-bottom: 0;
}

.coupon-input-group {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.coupon-input-group input.input-text {
  flex: 1;
  height: 48px !important;
  padding: 0 16px !important;
  border: 2px solid #dee2e6 !important;
  border-radius: 8px !important;
  font-size: 15px !important;
  transition: all 0.3s ease !important;
  background: white !important;
}

.coupon-input-group input.input-text:focus {
  border-color: var(--tl-primary,#dc4d28) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--tl-primary,#dc4d28) 10%,transparent) !important;
}

.apply-coupon-btn {
  height: 48px !important;
  padding: 0 24px !important;
  background: linear-gradient(135deg, var(--tl-primary,#dc4d28) 0%, var(--tl-primary-dark,#b83d1f) 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 8px color-mix(in srgb,var(--tl-primary,#dc4d28) 30%,transparent) !important;
}

.apply-coupon-btn:hover {
  background: linear-gradient(135deg, var(--tl-primary-dark,#b83d1f) 0%, var(--tl-primary-dark,#a03419) 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px color-mix(in srgb,var(--tl-primary,#dc4d28) 40%,transparent) !important;
}

.apply-coupon-btn svg {
  transition: transform 0.3s ease;
}

.apply-coupon-btn:hover svg {
  transform: translateX(4px);
}

/* Applied Coupons List */
.applied-coupons {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
}

.applied-coupon-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #86efac;
  border-radius: 8px;
  margin-bottom: 10px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.applied-coupon-item svg:first-child {
  color: #10b981;
  flex-shrink: 0;
}

.applied-coupon-item .coupon-code {
  font-weight: 700;
  color: #047857;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.applied-coupon-item .coupon-amount {
  margin-left: auto;
  font-weight: 700;
  color: #10b981;
  font-size: 15px;
}

.applied-coupon-item .remove-coupon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex-shrink: 0;
  border: 1px solid #d1fae5;
}

.applied-coupon-item .remove-coupon:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  transform: rotate(90deg);
}

.applied-coupon-item .remove-coupon svg {
  color: #dc2626;
}

/* Responsive */
@media (max-width: 640px) {
  .coupon-input-group {
    flex-direction: column;
  }

  .apply-coupon-btn {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* Payment Methods */
#payment {
  margin-top: 30px;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

#payment .wc-proceed-to-checkout {
  margin-top: 20px;
}

.wc_payment_methods {
  list-style: none;
  margin: 0 0 25px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wc_payment_method {
  margin-bottom: 0;
  position: relative;
}

.wc_payment_method input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.wc_payment_method label {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: relative;
  min-height: 80px;
}

.wc_payment_method label::before {
  content: "";
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  background: white;
  transition: all 0.3s ease;
  position: relative;
  margin-top: 2px;
  box-shadow: inset 0 0 0 0 var(--tl-primary,#dc4d28);
}

.wc_payment_method input[type="radio"]:checked + label::before {
  border-color: var(--tl-primary,#dc4d28);
  background: white;
  box-shadow: inset 0 0 0 6px var(--tl-primary,#dc4d28);
}

.wc_payment_method label:hover {
  border-color: var(--tl-primary,#dc4d28);
  background: linear-gradient(135deg, #ffffff 0%, var(--tl-primary-soft,#fff5f2) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px color-mix(in srgb,var(--tl-primary,#dc4d28) 12%,transparent);
}

.wc_payment_method input[type="radio"]:checked + label {
  border-color: var(--tl-primary,#dc4d28);
  border-width: 2px;
  background: linear-gradient(135deg, var(--tl-primary-soft,#fff5f2) 0%, var(--tl-primary-light,#ffe8e0) 100%);
  box-shadow: 0 8px 20px color-mix(in srgb,var(--tl-primary,#dc4d28) 20%,transparent);
}

/* Payment method content wrapper */
.wc_payment_method label > span,
.wc_payment_method label img {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Add icon styling before payment method title */
.wc_payment_method label img {
  max-width: 40px;
  height: 40px;
  object-fit: contain;
  margin-left: auto;
}

/* Payment method description in label */
.wc_payment_method .payment_box {
  margin-top: 16px !important;
  padding: 18px 24px !important;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%) !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
  color: #6b7280 !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}
.wc_payment_method .payment_box p {
  margin: 0;
}

.wc_payment_method .payment_box p:last-child {
  margin-bottom: 0;
}

/* Custom styling for COD */
.wc_payment_method.payment_method_cod label::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M17 9V7a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2m2 4h10a2 2 0 002-2v-6a2 2 0 00-2-2H9a2 2 0 00-2 2v6a2 2 0 002 2zm7-5a2 2 0 11-4 0 2 2 0 014 0z'/%3E%3C/svg%3E");
}

/* Custom styling for QR Banking */
.wc_payment_method.payment_method_qr_banking label::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 4v1m6 11h2m-6 0h-2v4m0-11v3m0 0h.01M12 12h4.01M16 20h4M4 12h4m12 0h.01M5 8h2a1 1 0 001-1V5a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1zm12 0h2a1 1 0 001-1V5a1 1 0 00-1-1h-2a1 1 0 00-1 1v2a1 1 0 001 1zM5 20h2a1 1 0 001-1v-2a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1z'/%3E%3C/svg%3E");
}

/* Responsive */
@media (max-width: 768px) {
  .wc_payment_method label {
    padding: 16px 18px;
    font-size: 15px;
    min-height: 70px;
  }

  .wc_payment_method .payment_box {
    padding: 14px 18px;
    font-size: 13px;
  }
}

/* Place Order Button */
.checkout-button,
#place_order,
button#place_order {
  width: 100% !important;
  padding: 18px 32px !important;
  background: var(--tl-primary,#dc4d28) !important;
  color: white !important;
  text-align: center !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 12px color-mix(in srgb,var(--tl-primary,#dc4d28) 30%,transparent) !important;
  margin-top: 20px !important;
}

.checkout-button:hover,
#place_order:hover,
button#place_order:hover {
  background: var(--tl-primary-dark,#b83d1f) !important;
  box-shadow: 0 8px 24px color-mix(in srgb,var(--tl-primary,#dc4d28) 50%,transparent) !important;
  transform: translateY(-3px) !important;
}

.checkout-button:active,
#place_order:active,
button#place_order:active {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px color-mix(in srgb,var(--tl-primary,#dc4d28) 30%,transparent) !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .checkout-layout__sidebar {
    position: static;
    order: 2;
  }

  .checkout-layout__main {
    order: 1;
  }
}

@media (max-width: 768px) {
  .checkout-page {
    padding: 40px 0;
  }

  .checkout-page__title {
    font-size: 28px;
  }

  .checkout-section {
    padding: 20px;
  }

  .checkout-order-review {
    padding: 20px;
  }

  .review-order-item__image {
    width: 50px;
    height: 50px;
  }

  .review-order-item__name {
    font-size: 13px;
  }
}
