/* ============================================
   CHECKOUT PAGES - Enhanced style (matches account)
   ============================================ */

.checkout-page .content .container {
  padding: 0.4rem 1rem !important;
}

/* Section wrappers (loaded via AJAX) - thinner */
.checkout-section-wrap .account-section-card {
  margin-bottom: 14px;
}

.checkout-section-wrap .account-section-card:last-child {
  margin-bottom: 0;
}

/* Different colors per checkout card */
#checkout-register .account-section-card .account-section-header {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

#checkout-payment-address .account-section-header {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

#checkout-shipping-address .account-section-header {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

#checkout-shipping-method .account-section-header {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

#checkout-payment-method .account-section-header {
  background: linear-gradient(135deg, #be185d 0%, #9d174d 100%);
}

.checkout-confirm-card .account-section-header {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
}

.checkout-order-summary-wrap .checkout-confirm-card {
  border-left: 3px solid #0d9488;
}

/* Unavailable products in checkout summary */
.checkout-confirm-table .checkout-product-unavailable td {
  background-color: #fef2f2;
  color: #b91c1c;
}

.checkout-confirm-table .checkout-product-unavailable a {
  color: #b91c1c;
}

.checkout-confirm-table .checkout-product-unavailable td small {
  color: #b91c1c;
}

#checkout-payment-address .checkout-address-card {
  border-left: 3px solid #6366f1;
}

#checkout-shipping-address .checkout-address-card {
  border-left: 3px solid #059669;
}

#checkout-shipping-method .checkout-method-card {
  border-left: 3px solid #d97706;
}

#checkout-payment-method .checkout-method-card {
  border-left: 3px solid #be185d;
}

#checkout-register .account-section-card {
  border-left: 3px solid #0ea5e9;
}

/* Checkout one-page: product list left, all options right */
.checkout-one-page-columns {
  align-items: flex-start;
  gap: 24px;
}

.checkout-order-summary-col {
  margin-bottom: 0;
}

@media (min-width: 992px) {
  .checkout-order-summary-col {
    position: sticky;
    top: 24px;
  }
}

.checkout-order-summary-wrap .checkout-confirm-card {
  margin-bottom: 0;
}

.checkout-options-col .checkout-section-wrap {
  margin-bottom: 14px;
}

.checkout-options-col .checkout-section-wrap:last-child {
  margin-bottom: 0;
}

/* Shipping / payment method selects */
.checkout-method-select-wrapper {
  margin-bottom: 8px;
}

.checkout-method-select.animated {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.checkout-method-select.animated.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.checkout-payment-slot {
  margin-top: 8px;
}

.checkout-payment-slot .checkout-payment-wrap {
  margin-top: 0;
}

@media (max-width: 991px) {
  .checkout-one-page-columns {
    flex-direction: column;
  }

  .checkout-order-summary-col {
    width: 100%;
  }

  .checkout-options-col {
    width: 100%;
  }
}

/* Cart page - 2 column layout */
.checkout-cart-two-columns {
  align-items: flex-start;
}

.checkout-cart-items-col {
  margin-bottom: 0;
}

.checkout-cart-summary-col {
  margin-bottom: 0;
}

@media (min-width: 992px) {
  .checkout-cart-summary-col {
    position: sticky;
    top: 24px;
  }
}

.checkout-cart-summary-card .account-section-body {
  padding: 14px 16px;
}

.checkout-summary-totals {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.checkout-summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  color: #475569;
}

.checkout-summary-total-row--last {
  padding-top: 16px;
  margin-top: 8px;
  border-top: 2px solid #e2e8f0;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-bg, #1a1a2e);
}

.checkout-summary-total-value {
  font-weight: 600;
}

.checkout-summary-total-row--last .checkout-summary-total-value {
  font-weight: 800;
  color: var(--primary-bg, #667eea);
}

.checkout-cart-actions--stacked .btn-back,
.checkout-cart-actions--stacked .btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.checkout-cart-content .alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkout-cart-card .account-section-body {
  padding: 16px;
}

.checkout-cart-table-wrap {
  margin-bottom: 0;
}

.checkout-cart-table {
  margin-bottom: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.checkout-cart-table thead th {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 2px solid #e2e8f0;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.checkout-cart-table tbody td {
  padding: 16px;
  vertical-align: middle;
  border-color: #e2e8f0;
}

.checkout-cart-table tfoot td {
  padding: 14px 16px;
  background: #f8fafc;
  border-top: 2px solid #e2e8f0;
  font-weight: 600;
}

/* Cart 2-col: no tfoot in items table; totals are in sidebar */
.checkout-cart-two-columns .checkout-cart-table tbody tr:last-child td {
  border-bottom: 1px solid #e2e8f0;
}

/* ========== Cart page - image style (clean 2-col, grey/blue/green) ========== */
.checkout-cart-style-image .checkout-cart-heading-image {
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.checkout-cart-card-image {
  background: #fff;
  padding: 0;
}

.checkout-cart-table-image {
  border: 1px solid #d1d5db;
  border-radius: 0;
}

.checkout-cart-table-image thead th {
  background: #e5e7eb;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid #d1d5db;
}

.checkout-cart-table-image tbody td {
  padding: 14px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}

.checkout-cart-table-image tbody tr:last-child td {
  border-bottom: 1px solid #e5e7eb;
}

.checkout-cart-product-link {
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
}

.checkout-cart-product-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.checkout-qty-group-image {
  max-width: 140px;
  margin: 0 auto;
  flex-wrap: nowrap;
}

.checkout-qty-group-image .form-control {
  max-width: 50px;
  text-align: center;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

.checkout-qty-group-image .btn {
  padding: 6px 10px;
  border-radius: 4px;
}

.checkout-qty-group-image .btn-danger {
  color: #fff;
  background: #dc2626;
  border-color: #dc2626;
}

/* Right sidebar - image style */
.checkout-cart-sidebar-image {
  background: #fff;
  border: 1px solid #d1d5db;
  padding: 24px;
  border-radius: 4px;
}

.checkout-sidebar-heading-image {
  font-size: 16px;
  font-weight: 700;
  color: #374151;
  margin: 0 0 16px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #dc2626;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.checkout-sidebar-heading-image--no-modules {
  border-bottom-color: #e5e7eb;
}

.checkout-accordion-image .accordion-item {
  border: none;
  border-bottom: 1px solid #e5e7eb;
  background: transparent;
}

.checkout-accordion-image .accordion-item:last-child {
  border-bottom: none;
}

.checkout-accordion-image .accordion-button {
  background: transparent;
  color: #374151;
  font-weight: 500;
  padding: 12px 0;
  box-shadow: none;
  border: none;
}

.checkout-accordion-image .accordion-button::after {
  margin-left: auto;
}

.checkout-accordion-image .accordion-button:not(.collapsed) {
  background: transparent;
  color: #1e293b;
}

.checkout-summary-box-image {
  background: #f3f4f6;
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 4px;
}

.checkout-summary-totals-image .checkout-summary-total-row {
  font-size: 14px;
  color: #374151;
}

.checkout-summary-totals-image .checkout-summary-total-row--last {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  border-top: 1px solid #d1d5db;
  padding-top: 12px;
  margin-top: 8px;
}

.checkout-summary-totals-image .checkout-summary-total-row--last .checkout-summary-total-value {
  color: #1e293b;
  font-weight: 700;
}

.checkout-cart-actions-image {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 0;
}

.checkout-cart-actions-image .btn-continue-shopping {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.checkout-cart-actions-image .btn-continue-shopping:hover {
  background: #1d4ed8;
  color: #fff;
  transform: translateY(-1px);
}

.checkout-cart-actions-image .btn-checkout-now {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.checkout-cart-actions-image .btn-checkout-now:hover {
  background: #15803d;
  color: #fff;
  transform: translateY(-1px);
}

.checkout-cart-actions-image .btn-continue-shopping i,
.checkout-cart-actions-image .btn-checkout-now i {
  font-size: 12px;
}

.checkout-qty-group .form-control {
  max-width: 70px;
  text-align: center;
}

.checkout-qty-group .btn {
  padding: 8px 12px;
}

.checkout-modules-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.checkout-modules-title i {
  color: var(--primary-bg, #667eea);
  margin-right: 8px;
}

.checkout-cart-actions .btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.checkout-cart-actions .btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Empty cart */
.checkout-empty-card .account-empty-state {
  padding: 48px 24px;
}

.checkout-empty-card .account-empty-state h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

/* Confirm / order summary */
.checkout-confirm-card .account-section-body {
  padding: 14px 16px;
}

.checkout-confirm-table {
  margin-bottom: 0;
  border: none;
}

.checkout-confirm-table thead th {
  background: transparent;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 0;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.checkout-confirm-table tbody td,
.checkout-confirm-table tfoot td {
  padding: 10px 0;
  border-color: #f1f5f9;
}

.checkout-confirm-table tfoot tr:last-child td {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-bg, #667eea);
  padding-top: 16px;
  border-top: 2px solid #e2e8f0;
}

.checkout-payment-wrap {
  margin-top: 20px;
}

.checkout-payment-wrap .btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Order confirm: spinner while payment / redirect runs (see bd_smartcart.js checkout.init) */
.checkout-payment-wrap #button-confirm:disabled {
  cursor: wait;
}

.checkout-payment-wrap #button-confirm .fa-circle-notch {
  font-size: 1.15em;
  vertical-align: middle;
}

/* Address cards (payment/shipping) - thinner */
.checkout-address-card .account-section-body {
  padding: 16px;
}

.checkout-address-radio-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkout-address-radio-item .form-check-label {
  font-weight: 500;
  color: #374151;
  cursor: pointer;
}

.checkout-address-radio-item .form-check-input:checked + .form-check-label {
  color: #1e293b;
}

.checkout-address-card .form-check {
  margin-bottom: 12px;
}

.checkout-address-card .form-select,
.checkout-address-card .form-control {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
}

.checkout-address-card .form-select:focus,
.checkout-address-card .form-control:focus {
  border-color: var(--primary-bg, #667eea);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Method cards (shipping method, payment method) - thinner */
.checkout-method-card .account-section-body {
  padding: 16px;
}

.checkout-method-input-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #e2e8f0;
}

.checkout-method-input-wrap .input-group-text {
  background: #f8fafc;
  border: none;
  color: var(--primary-bg, #667eea);
  font-size: 18px;
  padding: 12px 16px;
}

.checkout-method-input-wrap .form-control {
  border: none;
  padding: 12px 16px;
  background: #fff;
}

.checkout-method-input-wrap .btn-submit {
  padding: 12px 20px;
  border-radius: 0;
}

.checkout-method-radio-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkout-method-radio-list .checkout-method-loading {
  padding: 8px 0;
}

.checkout-method-radio-item .form-check-label {
  font-weight: 500;
  color: #374151;
  cursor: pointer;
}

.checkout-method-radio-item .form-check-input:checked + .form-check-label {
  color: #1e293b;
}

.checkout-method-radio-list p.mb-2 {
  margin-bottom: 8px;
  margin-top: 16px;
  color: #64748b;
  font-size: 14px;
}

.checkout-method-radio-list p.mb-2:first-child {
  margin-top: 0;
}

/* Register form (checkout) */
.checkout-form-register .account-section-card {
  margin-bottom: 0;
}

.checkout-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.checkout-legend {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkout-legend i {
  color: var(--primary-bg, #667eea);
}

.checkout-form-register .form-control,
.checkout-form-register .form-select {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
}

.checkout-form-register .form-control:focus,
.checkout-form-register .form-select:focus {
  border-color: var(--primary-bg, #667eea);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Alert info (cart list) */
.alert-info {
  background: #e0f2fe;
  color: #0369a1;
}

.shipping-existing {
  margin: 10px 15px;
}

/* Responsive - cart 2 column */
@media (max-width: 991px) {
  .checkout-cart-two-columns {
    flex-direction: column;
  }

  .checkout-cart-summary-col {
    order: -1;
    width: 100%;
  }

  .checkout-cart-summary-card {
    margin-bottom: 0;
  }

  .checkout-cart-items-col {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .checkout-cart-table thead th {
    font-size: 11px;
    padding: 10px 8px;
  }

  .checkout-cart-table tbody td {
    padding: 12px 8px;
    font-size: 14px;
  }

  .checkout-qty-group .form-control {
    max-width: 56px;
  }

  .checkout-cart-actions .col {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .checkout-cart-actions .col.text-end {
    margin-top: 12px;
  }

  .checkout-cart-actions .btn-back,
  .checkout-cart-actions .btn-submit {
    width: 100%;
    justify-content: center;
  }
}


