/*
 * Commerce Redesign: Modern Cart and Checkout Experience
 * Krebsbach Arms Modern Theme
 */

/* 1. Base Shell & Page Background */
.ka-commerce-redesign {
  background-color: #f4f4f4;
  color: var(--ka-color-darker-gray);
  min-height: 70vh;
}

.ka-commerce-redesign > .ka-page-content {
  padding: 40px 0 48px;
}

/* Let the cart footer follow the carousel instead of stretching the page shell. */
.ka-cart-page.ka-commerce-redesign {
  flex: 0 0 auto;
  min-height: 0;
}

/* Remove bottom void on cart page so carousel meets footer naturally */
.ka-cart-page.ka-commerce-redesign > .ka-page-content {
  padding-bottom: 0 !important;
}

.ka-cart-page.ka-commerce-redesign > .ka-page-content > .ka-container {
  max-width: 1240px;
  padding: 0 24px 0 !important;
  margin: 0 auto;
}

.ka-checkout-page.ka-commerce-redesign > .ka-page-content > .ka-container {
  max-width: 1240px;
  padding: 0 24px;
  margin: 0 auto;
}

.ka-cart-page.ka-commerce-redesign .ka-commerce-article,
.ka-cart-page.ka-commerce-redesign .ka-commerce-content {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.ka-cart-page.ka-commerce-redesign .woocommerce.related.products.ka-cart-products {
  margin-bottom: 0 !important;
  padding-bottom: 12px !important;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-products ul.products {
  margin-bottom: 8px !important;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-products .ka-related-carousel-controls {
  margin-top: 8px !important;
  margin-bottom: 0 !important;
}

/* 2. Unified Modern Commerce Header */
.ka-commerce-redesign .ka-commerce-header {
  margin-bottom: 32px;
}

.ka-commerce-redesign .ka-commerce-kicker {
  color: var(--ka-color-orange);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.ka-commerce-redesign .ka-commerce-title {
  color: var(--ka-color-darker-gray);
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  text-align: center;
  text-transform: uppercase;
}

/* 3. Modern Notices & Messages */
.ka-commerce-redesign :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) {
  background: #ffffff;
  color: var(--ka-color-darker-gray);
  border: 1px solid #e5e7eb;
  border-left: 4px solid var(--ka-color-orange);
  border-radius: 6px;
  box-shadow: 0 3px 12px rgba(17, 20, 26, 0.04);
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 16px 20px 16px 46px;
  margin-bottom: 24px;
}

.ka-commerce-redesign .woocommerce-error {
  border-left-color: var(--ka-color-red);
}

.ka-commerce-redesign :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) a {
  color: var(--ka-color-orange);
  font-weight: 700;
  text-decoration: underline;
}

.ka-commerce-redesign :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) .button {
  background: var(--ka-color-dark-gray) !important;
  color: #ffffff !important;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  margin-left: 12px;
}

.ka-commerce-redesign :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) .button:hover {
  background: var(--ka-color-orange) !important;
}

/* 4. Empty Cart State */
.ka-cart-page.ka-commerce-redesign .wc-empty-cart-message {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 3px 14px rgba(17, 20, 26, 0.04);
  padding: 56px 32px 20px;
  text-align: center;
  max-width: 600px;
  margin: 20px auto 0;
}

.ka-cart-page.ka-commerce-redesign .wc-empty-cart-message::before {
  content: "";
  display: block;
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  background-color: rgba(223, 50, 0, 0.08);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23df3200' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'%3E%3C/circle%3E%3Ccircle cx='20' cy='21' r='1'%3E%3C/circle%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 34px 34px;
}

.ka-cart-page.ka-commerce-redesign .cart-empty {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ka-color-darker-gray);
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0 0 12px;
}

.ka-cart-page.ka-commerce-redesign .cart-empty::before {
  display: none;
}

.ka-cart-page.ka-commerce-redesign .return-to-shop {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 3px 14px rgba(17, 20, 26, 0.04);
  max-width: 600px;
  margin: 24px auto 48px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ka-cart-page.ka-commerce-redesign .return-to-shop .button {
  background: var(--ka-color-orange) !important;
  color: #ffffff !important;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-sizing: border-box;
  width: 332px;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 14px 36px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(223, 50, 0, 0.28);
  text-decoration: none;
  transition: background-color 150ms ease, transform 150ms ease;
}

.ka-cart-page.ka-commerce-redesign .return-to-shop .button:hover {
  background: var(--ka-color-darker-gray) !important;
  transform: translateY(-1px);
}

/* 5. Cart Page Layout & Items Card */
.ka-cart-page.ka-commerce-redesign .ka-cart-summary-column {
  max-width: 100%;
  margin: 0;
}

/* Default spacing when cart and totals are stacked */
.ka-cart-page.ka-commerce-redesign .cart-collaterals {
  margin-top: 40px !important;
}

@media (min-width: 992px) {
  .ka-cart-page.ka-commerce-redesign .ka-cart-summary-column:has(form.woocommerce-cart-form),
  .ka-cart-page.ka-commerce-redesign .ka-cart-summary-column > .woocommerce:has(form.woocommerce-cart-form) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 40px;
    align-items: start;
  }

  .ka-cart-page.ka-commerce-redesign .woocommerce-notices-wrapper {
    grid-column: 1 / -1;
  }

  .ka-cart-page.ka-commerce-redesign form.woocommerce-cart-form {
    grid-column: 1;
    margin-bottom: 0;
  }

  .ka-cart-page.ka-commerce-redesign .cart-collaterals {
    grid-column: 2;
    position: sticky;
    top: 24px;
    margin-top: 0 !important;
  }
}

.ka-cart-page.ka-commerce-redesign :is(.wc-empty-cart-message, .return-to-shop) {
  grid-column: 1 / -1;
}

/* Cart Items Form Card */
.ka-cart-page.ka-commerce-redesign form.ka-cart-form {
  background: #ffffff;
  color: var(--ka-color-darker-gray);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 3px 14px rgba(17, 20, 26, 0.04);
  padding: 0;
  overflow: hidden;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-item {
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 22px 24px;
  position: relative;
  transition: background-color 150ms ease;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-item:last-child {
  border-bottom: 0;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-item:hover {
  background: #fafafa;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-item-image img {
  width: 96px;
  height: 96px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  object-fit: contain;
  padding: 6px;
  box-sizing: border-box;
}

@media (min-width: 769px) {
  .ka-cart-page.ka-commerce-redesign .ka-cart-item-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    grid-template-areas:
      "name qty total remove"
      "sku  qty total remove";
    align-items: center;
    gap: 6px 20px;
    min-height: auto;
    padding-right: 0;
    position: static;
  }

  .ka-cart-page.ka-commerce-redesign .ka-commerce-content .ka-cart-item-name {
    grid-area: name;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
  }

  .ka-cart-page.ka-commerce-redesign .ka-cart-item-sku {
    grid-area: sku;
  }

  .ka-cart-page.ka-commerce-redesign .ka-cart-item-quantity {
    grid-area: qty;
    margin: 0;
  }

  .ka-cart-page.ka-commerce-redesign .ka-cart-item-line-total {
    grid-area: total;
    position: static;
    margin: 0;
    text-align: right;
  }

  .ka-cart-page.ka-commerce-redesign .woocommerce .ka-cart-item-remove {
    grid-area: remove;
    position: static;
    margin: 0;
  }
}

.ka-cart-page.ka-commerce-redesign .ka-cart-item-name a {
  color: var(--ka-color-darker-gray);
  text-decoration: none;
  transition: color 150ms ease;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-item-name a:hover {
  color: var(--ka-color-orange);
}

.ka-cart-page.ka-commerce-redesign .ka-cart-item-sku {
  color: #6b7280;
  font-size: 0.8rem;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-item-sku strong {
  color: var(--ka-color-darker-gray);
  font-weight: 600;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-item-quantity .quantity .qty {
  min-height: 38px;
  width: 60px;
  padding: 4px 8px;
  border: 1.5px solid #d1d5db;
  border-radius: 4px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ka-color-darker-gray);
  background: #ffffff;
  box-sizing: border-box;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-item-quantity .quantity .qty:focus {
  border-color: var(--ka-color-orange);
  outline: none;
  box-shadow: 0 0 0 2px rgba(223, 50, 0, 0.15);
}

.ka-cart-page.ka-commerce-redesign .ka-cart-item-multiplier {
  color: #6b7280;
  font-size: 0.9rem;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-item-line-total {
  position: static;
  color: var(--ka-color-darker-gray);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  min-width: 90px;
}

.ka-cart-page.ka-commerce-redesign .woocommerce .ka-cart-item-remove {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #6b7280 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  transition: all 150ms ease;
  cursor: pointer;
}

.ka-cart-page.ka-commerce-redesign .woocommerce .ka-cart-item-remove:hover {
  background: var(--ka-color-orange);
  color: #ffffff !important;
  border-color: var(--ka-color-orange);
}

/* Cart Actions & Coupon Bar - Incorporating Header Dark Blue (#192028) */
.ka-cart-page.ka-commerce-redesign .ka-cart-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #192028;
  border-top: 1px solid #11141a;
  padding: 18px 24px;
  gap: 16px;
  flex-wrap: wrap;
  border-radius: 0 0 8px 8px !important;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-coupon {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
}

.ka-cart-page.ka-commerce-redesign .ka-coupon-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-coupon input {
  min-height: 42px;
  border: 1px solid #334155 !important;
  border-radius: 6px !important;
  padding: 8px 14px;
  font-size: 0.9rem;
  color: var(--ka-color-darker-gray);
  background: #ffffff !important;
  width: 190px;
  box-sizing: border-box;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-coupon input:focus {
  border-color: var(--ka-color-orange) !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(223, 50, 0, 0.35) !important;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-coupon button {
  min-height: 42px;
  padding: 0 20px;
  background: var(--ka-color-orange) !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 6px !important;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-coupon button:hover {
  background: #ffffff !important;
  color: #192028 !important;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-actions {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-actions .button.ka-update-cart {
  min-height: 42px;
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.32) !important;
  border-radius: 6px !important;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 150ms ease;
  cursor: pointer;
}

.ka-cart-page.ka-commerce-redesign .ka-cart-actions .button.ka-update-cart:hover {
  background: #ffffff !important;
  color: #192028 !important;
  border-color: #ffffff !important;
}

/* 6. Order Summary Card (Cart Totals) */
.ka-cart-page.ka-commerce-redesign .cart-collaterals .cart_totals {
  background: #ffffff;
  color: var(--ka-color-darker-gray);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 3px 14px rgba(17, 20, 26, 0.04);
  padding: 28px 24px;
  margin-top: 0;
  width: 100%;
}

.ka-cart-page.ka-commerce-redesign .cart_totals > h2 {
  color: var(--ka-color-darker-gray);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ka-color-orange);
}

.ka-cart-page.ka-commerce-redesign .cart_totals table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
}

.ka-cart-page.ka-commerce-redesign .cart_totals tr {
  border-bottom: 1px solid #f0f0f0;
}

.ka-cart-page.ka-commerce-redesign .cart_totals th {
  color: #4b5563;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 0;
  text-align: left;
  border: 0;
}

.ka-cart-page.ka-commerce-redesign .cart_totals td {
  color: var(--ka-color-darker-gray);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 0;
  text-align: right;
  border: 0;
}

.ka-cart-page.ka-commerce-redesign .cart_totals .order-total {
  border-top: 2px solid #e5e7eb;
  border-bottom: 0;
}

.ka-cart-page.ka-commerce-redesign .cart_totals .order-total th {
  color: var(--ka-color-darker-gray);
  font-size: 1.15rem;
  font-weight: 700;
  padding-top: 18px;
}

.ka-cart-page.ka-commerce-redesign .cart_totals .order-total td,
.ka-cart-page.ka-commerce-redesign .cart_totals .order-total :is(.amount, .woocommerce-Price-currencySymbol) {
  color: var(--ka-color-orange) !important;
  font-size: 1.4rem !important;
  font-weight: 700;
  padding-top: 18px;
}

.ka-cart-page.ka-commerce-redesign .wc-proceed-to-checkout {
  padding: 0;
  margin: 0;
}

.ka-cart-page.ka-commerce-redesign .wc-proceed-to-checkout .checkout-button {
  width: 100%;
  min-height: 50px;
  line-height: 50px;
  padding: 0 24px;
  background: var(--ka-color-orange) !important;
  color: #ffffff !important;
  border-radius: 5px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  box-shadow: 0 4px 14px rgba(223, 50, 0, 0.28);
  text-decoration: none;
  display: block;
  box-sizing: border-box;
  transition: background-color 150ms ease, transform 150ms ease;
}

.ka-cart-page.ka-commerce-redesign .wc-proceed-to-checkout .checkout-button:hover {
  background: var(--ka-color-darker-gray) !important;
  transform: translateY(-1px);
}

/* 8. Checkout Page Layout */
@media (min-width: 992px) {
  .ka-checkout-page.ka-commerce-redesign form.woocommerce-checkout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(380px, 0.85fr);
    gap: 36px;
    align-items: start;
  }

  .ka-checkout-page.ka-commerce-redesign .woocommerce-NoticeGroup {
    grid-column: 1 / -1;
  }

  .ka-checkout-page.ka-commerce-redesign .col2-set {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .ka-checkout-page.ka-commerce-redesign #order_review_heading {
    display: none;
  }

  .ka-checkout-page.ka-commerce-redesign #order_review {
    grid-column: 2;
    position: sticky;
    top: 24px;
  }
}

/* Checkout Form Cards */
.ka-checkout-page.ka-commerce-redesign .col2-set {
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
}

.ka-checkout-page.ka-commerce-redesign .col2-set .col-1,
.ka-checkout-page.ka-commerce-redesign .col2-set .col-2 {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 3px 14px rgba(17, 20, 26, 0.04);
  padding: 30px;
  box-sizing: border-box;
  float: none !important;
  width: 100% !important;
}

.ka-checkout-page.ka-commerce-redesign .woocommerce-additional-fields {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

.ka-checkout-page.ka-commerce-redesign .woocommerce-billing-fields h3,
.ka-checkout-page.ka-commerce-redesign .woocommerce-shipping-fields h3,
.ka-checkout-page.ka-commerce-redesign .woocommerce-additional-fields h3 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ka-color-darker-gray);
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

/* Form Controls & Inputs */
.ka-checkout-page.ka-commerce-redesign .form-row {
  margin-bottom: 18px;
  padding: 0;
}

.ka-checkout-page.ka-commerce-redesign label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  display: block;
}

.ka-checkout-page.ka-commerce-redesign .required {
  color: var(--ka-color-orange);
  text-decoration: none;
}

.ka-checkout-page.ka-commerce-redesign input.input-text,
.ka-checkout-page.ka-commerce-redesign textarea,
.ka-checkout-page.ka-commerce-redesign select,
.ka-checkout-page.ka-commerce-redesign .select2-container--default .select2-selection--single {
  min-height: 46px;
  border: 1.5px solid #d1d5db;
  border-radius: 5px;
  background: #ffffff;
  color: var(--ka-color-darker-gray);
  font-size: 0.95rem;
  padding: 10px 14px;
  box-sizing: border-box;
  width: 100%;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.ka-checkout-page.ka-commerce-redesign input.input-text:focus,
.ka-checkout-page.ka-commerce-redesign textarea:focus,
.ka-checkout-page.ka-commerce-redesign select:focus,
.ka-checkout-page.ka-commerce-redesign .select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--ka-color-orange) !important;
  box-shadow: 0 0 0 3px rgba(223, 50, 0, 0.15) !important;
  outline: none !important;
}

.ka-checkout-page.ka-commerce-redesign textarea {
  min-height: 100px;
}

.ka-checkout-page.ka-commerce-redesign .select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 42px;
  padding-left: 0;
  color: var(--ka-color-darker-gray);
}

.ka-checkout-page.ka-commerce-redesign .select2-container .select2-selection--single .select2-selection__arrow {
  height: 44px;
  right: 12px;
}

/* FFL dealer search: the plugin's text inputs lack .input-text and use
   content-box sizing, so match them to the theme fields and the radius select. */
.ka-checkout-page.ka-commerce-redesign #ffl_container #ffl-zip-code,
.ka-checkout-page.ka-commerce-redesign #ffl_container #ffl-name-search {
  height: 46px;
  min-height: 46px;
  margin: 0;
  border: 1.5px solid #d1d5db;
  border-radius: 5px;
  background: #ffffff;
  color: var(--ka-color-darker-gray);
  font-size: 0.95rem;
  padding: 10px 14px;
  box-sizing: border-box;
  width: 100%;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.ka-checkout-page.ka-commerce-redesign #ffl_container #ffl-zip-code:focus,
.ka-checkout-page.ka-commerce-redesign #ffl_container #ffl-name-search:focus {
  border-color: var(--ka-color-orange);
  box-shadow: 0 0 0 3px rgba(223, 50, 0, 0.15);
  outline: none;
}

.ka-checkout-page.ka-commerce-redesign #ffl_container #ffl-radius,
.ka-checkout-page.ka-commerce-redesign #ffl_container #ffl-search {
  height: 46px;
  min-height: 46px;
  margin: 0;
  box-sizing: border-box;
  width: 100%;
}

/* Find FFL matches the theme's orange buttons, e.g. Place Order. */
.ka-checkout-page.ka-commerce-redesign #ffl_container #ffl-search {
  padding: 0 12px;
  background: var(--ka-color-orange) !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}

.ka-checkout-page.ka-commerce-redesign #ffl_container #ffl-search:hover,
.ka-checkout-page.ka-commerce-redesign #ffl_container #ffl-search:focus-visible {
  background: var(--ka-color-darker-gray) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  outline: none;
}

/* Checkout Review & Payment Card */
.ka-checkout-page.ka-commerce-redesign #order_review {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(17, 20, 26, 0.05);
  padding: 28px 24px;
  box-sizing: border-box;
}

.ka-checkout-page.ka-commerce-redesign #order_review table.shop_table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e5e7eb;
  border-radius: 6px !important;
  overflow: hidden;
  margin-bottom: 24px;
}

.ka-checkout-page.ka-commerce-redesign #order_review table.shop_table thead th {
  background: #192028;
  padding: 12px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 0;
}

.ka-checkout-page.ka-commerce-redesign #order_review table.shop_table tbody td {
  padding: 14px;
  font-size: 0.95rem;
  color: var(--ka-color-darker-gray);
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.ka-checkout-page.ka-commerce-redesign #order_review table.shop_table tbody .product-name {
  font-weight: 600;
}

.ka-checkout-page.ka-commerce-redesign #order_review table.shop_table tbody .product-quantity {
  color: var(--ka-color-orange);
  font-weight: 700;
  margin-left: 4px;
}

.ka-checkout-page.ka-commerce-redesign #order_review table.shop_table tbody .product-total {
  font-weight: 700;
  text-align: right;
}

.ka-checkout-page.ka-commerce-redesign #order_review table.shop_table tfoot th {
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4b5563;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
}

.ka-checkout-page.ka-commerce-redesign #order_review table.shop_table tfoot td {
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ka-color-darker-gray);
  text-align: right;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
}

.ka-checkout-page.ka-commerce-redesign #order_review table.shop_table tfoot .order-total {
  border-top: 2px solid #e5e7eb;
}

.ka-checkout-page.ka-commerce-redesign #order_review table.shop_table tfoot .order-total th {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ka-color-darker-gray);
  border-bottom: 0;
}

.ka-checkout-page.ka-commerce-redesign #order_review table.shop_table tfoot .order-total td,
.ka-checkout-page.ka-commerce-redesign #order_review table.shop_table tfoot .order-total .amount {
  font-size: 1.4rem !important;
  font-weight: 700;
  color: var(--ka-color-orange) !important;
  border-bottom: 0;
}

/* Payment Methods Box */
.ka-checkout-page.ka-commerce-redesign #payment {
  background: #f9fafb;
  color: var(--ka-color-darker-gray);
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 20px;
  margin-top: 20px;
}

.ka-checkout-page.ka-commerce-redesign #payment ul.payment_methods {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 0;
}

.ka-checkout-page.ka-commerce-redesign #payment ul.payment_methods li {
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}

.ka-checkout-page.ka-commerce-redesign #payment ul.payment_methods li:last-child {
  border-bottom: 0;
}

.ka-checkout-page.ka-commerce-redesign #payment ul.payment_methods label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ka-color-darker-gray);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ka-checkout-page.ka-commerce-redesign #payment ul.payment_methods input[type="radio"] {
  accent-color: var(--ka-color-orange);
  width: 18px;
  height: 18px;
}

.ka-checkout-page.ka-commerce-redesign #payment div.payment_box {
  background: #ffffff;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 14px;
  margin-top: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.ka-checkout-page.ka-commerce-redesign #payment div.payment_box::before {
  border-bottom-color: #ffffff;
}

/* Authorize.net Lightbox: card entry happens in the popup, so only the description shows. */
.ka-checkout-page.ka-commerce-redesign #payment .payment_method_authorize_net_cim_credit_card div.payment_box p {
  font-weight: 700;
}

.ka-checkout-page.ka-commerce-redesign #payment #wc-authorize-net-cim-credit-card-credit-card-form {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

/* Newsletter Opt-In: dark panel so it stands apart from the light checkout fields. */
.ka-checkout-page.ka-commerce-redesign .ka-newsletter-opt-in {
  margin: 18px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--ka-color-orange);
  border-radius: 4px;
  background: var(--ka-color-darker-gray);
  color: var(--ka-color-white);
}

.ka-checkout-page.ka-commerce-redesign .ka-newsletter-opt-in label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  color: inherit;
  font-weight: 400;
  line-height: 1.45;
  cursor: pointer;
}

.ka-checkout-page.ka-commerce-redesign .ka-newsletter-opt-in input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--ka-color-orange);
  cursor: pointer;
}

.ka-checkout-page.ka-commerce-redesign .ka-newsletter-opt-in-text {
  display: grid;
  gap: 4px;
}

.ka-checkout-page.ka-commerce-redesign .ka-newsletter-opt-in-text strong {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ka-checkout-page.ka-commerce-redesign .ka-newsletter-opt-in-text span {
  font-size: 0.9rem;
}

.ka-checkout-page.ka-commerce-redesign .ka-newsletter-opt-in-text small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  line-height: 1.45;
}

.ka-checkout-page.ka-commerce-redesign .ka-newsletter-opt-in input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--ka-color-orange);
  outline-offset: 3px;
}

/* Shipping Policy Acknowledgment */
.ka-checkout-page.ka-commerce-redesign .ka-shipping-policy-acknowledgment {
  margin: 18px 0;
}

.ka-checkout-page.ka-commerce-redesign .ka-shipping-policy-acknowledgment label {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #374151;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ka-checkout-page.ka-commerce-redesign .ka-shipping-policy-acknowledgment input[type="checkbox"] {
  accent-color: var(--ka-color-orange);
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
}

.ka-checkout-page.ka-commerce-redesign #payment .ka-shipping-policy-acknowledgment a {
  color: var(--ka-color-orange) !important;
  font-weight: 600;
  text-decoration: underline;
}

/* Place Order CTA Button */
.ka-checkout-page.ka-commerce-redesign #place_order {
  width: 100% !important;
  min-height: 52px !important;
  line-height: 52px !important;
  padding: 0 24px !important;
  background: var(--ka-color-orange) !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 5px !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  box-shadow: 0 4px 14px rgba(223, 50, 0, 0.28) !important;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}

.ka-checkout-page.ka-commerce-redesign #place_order:hover {
  background: var(--ka-color-darker-gray) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* 9. Responsive Mobile Overrides */
@media (max-width: 768px) {
  .ka-commerce-redesign > .ka-page-content {
    padding: 24px 0 48px;
  }

  .ka-cart-page.ka-commerce-redesign .ka-cart-item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .ka-cart-page.ka-commerce-redesign .ka-cart-item-image img {
    width: 72px;
    height: 72px;
  }

  .ka-cart-page.ka-commerce-redesign .ka-cart-item-details {
    grid-column: 2;
  }

  .ka-cart-page.ka-commerce-redesign .ka-cart-item-line-total {
    text-align: left;
    margin-top: 6px;
  }

  .ka-cart-page.ka-commerce-redesign .woocommerce .ka-cart-item-remove {
    position: absolute;
    top: 14px;
    right: 14px;
    margin: 0;
  }

  .ka-cart-page.ka-commerce-redesign .ka-cart-coupon {
    flex-direction: column;
    align-items: stretch;
  }

  .ka-cart-page.ka-commerce-redesign .ka-cart-coupon > div {
    flex-direction: column;
    align-items: stretch;
  }

  .ka-cart-page.ka-commerce-redesign .ka-cart-coupon input {
    width: 100%;
  }

  .ka-cart-page.ka-commerce-redesign .ka-cart-actions {
    justify-content: stretch;
  }

  .ka-cart-page.ka-commerce-redesign .ka-cart-actions .button.ka-update-cart {
    width: 100%;
    text-align: center;
  }

  .ka-checkout-page.ka-commerce-redesign .col2-set .col-1,
  .ka-checkout-page.ka-commerce-redesign .col2-set .col-2,
  .ka-checkout-page.ka-commerce-redesign #order_review {
    padding: 20px 16px;
  }
}

/* 10. Comprehensive Rounded Corners Enforcement */
:root body.wp-theme-krebsbacharms .ka-commerce-redesign :is(
  button,
  .button,
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .select2-container .select2-selection--single,
  .select2-dropdown,
  table.shop_table,
  .ka-cart-form,
  .cart_totals,
  .wc-empty-cart-message,
  .return-to-shop,
  .woocommerce-message,
  .woocommerce-info,
  .woocommerce-error,
  .ka-cart-item-image img,
  .ka-cart-item-sku,
  .woocommerce-form-coupon-toggle .woocommerce-info,
  form.checkout_coupon,
  .woocommerce-terms-and-conditions-wrapper,
  #payment,
  #payment div.payment_box
):not(.add_to_cart_button, .outofstock > .button) {
  border-radius: 6px !important;
}

:root body.wp-theme-krebsbacharms .ka-commerce-redesign :is(
  .col-1,
  .col-2,
  #order_review,
  #payment,
  form.ka-cart-form,
  .cart-collaterals .cart_totals
) {
  border-radius: 8px !important;
}

:root body.wp-theme-krebsbacharms .ka-commerce-redesign :is(
  #place_order,
  .checkout-button,
  .return-to-shop .button
) {
  border-radius: 6px !important;
}

:root body.wp-theme-krebsbacharms .ka-commerce-redesign input[type="checkbox"] {
  border-radius: 3px !important;
}

/* 10. Order Received (thank you) page
 * Same card language as the My Account order view, without the sidebar. */
.ka-checkout-page.ka-commerce-redesign .ka-thankyou {
  margin: 0 auto;
  max-width: 980px;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou :is(
  .ka-thankyou-hero,
  .ka-thankyou-card,
  .woocommerce-order-details,
  .woocommerce-customer-details
) {
  background: #ffffff;
  border: 0;
  border-radius: 6px !important;
  box-shadow: 0 3px 14px rgba(17, 20, 26, 0.04);
  margin: 0 0 24px;
  padding: 28px;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.6fr);
  column-gap: 28px;
  align-items: start;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou-eyebrow {
  color: var(--ka-color-orange);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou-title {
  color: var(--ka-color-darker-gray);
  font-size: 2.1rem;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
  text-transform: none;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-thankyou-order-received {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #666666;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 14px 0 0;
  padding: 0;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou-status {
  align-items: center;
  background: #f4f4f4;
  border-radius: 4px !important;
  color: #55585f;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  min-height: 44px;
  padding: 0 14px;
  text-transform: uppercase;
  white-space: nowrap;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou-status:is(.status-processing, .status-on-hold, .status-pending) {
  background: rgba(223, 50, 0, 0.1);
  color: var(--ka-color-orange);
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou-actions .button {
  align-items: center;
  background: var(--ka-color-orange) !important;
  border: 0 !important;
  border-radius: 4px !important;
  box-sizing: border-box;
  color: #ffffff !important;
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0.05em;
  line-height: 1.2;
  margin: 0;
  min-height: 44px;
  padding: 12px 18px;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 150ms ease;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou-actions .button.ka-thankyou-secondary {
  background: var(--ka-color-darker-gray) !important;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou-actions .button.ka-thankyou-secondary:is(:hover, :focus-visible) {
  background: var(--ka-color-dark-gray) !important;
  color: #ffffff !important;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou-actions .button:not(.ka-thankyou-secondary):is(:hover, :focus-visible) {
  background: var(--ka-color-darker-gray) !important;
  color: #ffffff !important;
}

/* The core overview list becomes the stacked facts panel. */
.ka-checkout-page.ka-commerce-redesign .ka-thankyou ul.ka-thankyou-facts {
  background: #f4f4f4;
  border-radius: 5px !important;
  display: grid;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou ul.ka-thankyou-facts li {
  border: 0;
  display: flex;
  flex-direction: column;
  float: none;
  gap: 3px;
  margin: 0;
  min-width: 0;
  padding: 13px 20px;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou ul.ka-thankyou-facts li + li {
  border-top: 1px solid #e5e5e5;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou ul.ka-thankyou-facts span {
  color: #666666;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou ul.ka-thankyou-facts :is(strong, strong .amount, strong .woocommerce-Price-currencySymbol) {
  color: var(--ka-color-darker-gray) !important;
  font-size: 1.05rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-transform: none;
}

/* Order details and customer details sections. */
.ka-checkout-page.ka-commerce-redesign .ka-thankyou :is(.woocommerce-order-details__title, .woocommerce-customer-details > h2, .woocommerce-column__title) {
  color: var(--ka-color-darker-gray);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  text-align: left;
  text-transform: none;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou table.woocommerce-table--order-details {
  background: #ffffff;
  border: 0;
  border-collapse: collapse;
  border-radius: 0 !important;
  margin: 0;
  width: 100%;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-table--order-details :is(th, td) {
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #eeeeee;
  border-radius: 0 !important;
  color: var(--ka-color-darker-gray);
  padding: 14px 12px;
  vertical-align: top;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-table--order-details thead th {
  background: #f4f4f4;
  color: #666666;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-table--order-details .product-total {
  text-align: right;
  width: 30%;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-table--order-details .product-name {
  overflow-wrap: anywhere;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-table--order-details .product-name > a {
  color: var(--ka-color-darker-gray);
  font-weight: 700;
  text-decoration: none;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-table--order-details .product-name > a:hover {
  color: var(--ka-color-orange);
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-table--order-details .product-quantity {
  color: var(--ka-color-orange);
  font-weight: 700;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-table--order-details .wc-item-meta {
  color: #666666;
  font-size: 0.85rem;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-table--order-details .wc-item-meta :is(li, p) {
  margin: 0;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-table--order-details tfoot :is(th, td) {
  font-weight: 700;
  text-align: right;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-table--order-details tfoot tr:last-child :is(th, td) {
  background: #f4f4f4;
  border-bottom: 0;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-table--order-details :is(.amount, .woocommerce-Price-currencySymbol) {
  color: inherit !important;
  font-size: inherit !important;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-customer-details .woocommerce-columns {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-customer-details .woocommerce-columns::before,
.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-customer-details .woocommerce-columns::after {
  display: none;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-customer-details .woocommerce-column {
  background: transparent;
  box-shadow: none;
  float: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-customer-details address {
  background: #f9f9f9;
  border: 0 !important;
  border-radius: 5px !important;
  color: #666666;
  font-style: normal;
  line-height: 1.65;
  margin: 0;
  padding: 20px !important;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-customer-details address p {
  margin: 10px 0 0;
}

/* Failed payment and missing order states keep their core notices inside a card. */
.ka-checkout-page.ka-commerce-redesign .ka-thankyou-card .woocommerce-notice {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--ka-color-darker-gray);
  margin: 0;
  padding: 0;
}

.ka-checkout-page.ka-commerce-redesign .ka-thankyou-card .woocommerce-notice + .woocommerce-notice {
  margin-top: 4px;
}

@media (max-width: 900px) {
  .ka-checkout-page.ka-commerce-redesign .ka-thankyou-hero {
    display: block;
  }

  .ka-checkout-page.ka-commerce-redesign .ka-thankyou ul.ka-thankyou-facts {
    margin-top: 24px;
  }
}

@media (max-width: 600px) {
  .ka-checkout-page.ka-commerce-redesign .ka-thankyou :is(
    .ka-thankyou-hero,
    .ka-thankyou-card,
    .woocommerce-order-details,
    .woocommerce-customer-details
  ) {
    padding: 20px;
  }

  .ka-checkout-page.ka-commerce-redesign .ka-thankyou-title {
    font-size: 1.75rem;
  }

  .ka-checkout-page.ka-commerce-redesign .ka-thankyou-actions .button {
    flex: 1 1 100%;
  }

  .ka-checkout-page.ka-commerce-redesign .ka-thankyou .woocommerce-customer-details .woocommerce-columns {
    grid-template-columns: 1fr;
  }
}
