/* ==========================================================================
   BOWY USA LLC — CART & CHECKOUT STYLESHEET
   Copyright (c) 2026 BOWY USA LLC. All rights reserved. Confidential and Proprietary.
   ==========================================================================
   Loaded on the cart and checkout pages.
   ========================================================================== */

/* --------------------------------------------------------------------------
   UNLISTED FFL DEALER SWITCH & INTAKE CARD
   -------------------------------------------------------------------------- */
.bowy-unlisted-ffl-wrapper {
  margin: 18px 0 24px 0;
  clear: both;
}

.bowy-unlisted-toggle-header {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.bowy-unlisted-toggle-header.open {
  border-radius: 8px 8px 0 0;
  border-bottom: 1px dashed #cbd5e1;
  background: #f8fafc;
}

.bowy-toggle-info {
  flex: 1 1 auto;
}

.bowy-toggle-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  display: block;
  line-height: 1.35;
}

.bowy-toggle-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
  display: block;
  line-height: 1.35;
}

.bowy-toggle-control {
  flex: 0 0 auto;
}

/* Sliding Switch Component */
.bowy-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  margin: 0;
  cursor: pointer;
}

.bowy-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.bowy-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 28px;
}

.bowy-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.bowy-switch input:checked + .bowy-slider {
  background-color: #1a365d;
}

.bowy-switch input:checked + .bowy-slider:before {
  transform: translateX(22px);
}

.bowy-switch input:focus + .bowy-slider {
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.25);
}

/* Unlisted FFL Intake Card */
.bowy-unlisted-ffl-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 0 0 8px 8px;
  padding: 20px 22px;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05);
}

.bowy-unlisted-notice {
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 18px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #334155;
}

.bowy-unlisted-notice p {
  margin: 0;
}

.bowy-unlisted-grid {
  flex-wrap: wrap;
}

.bowy-unlisted-field {
  display: flex;
  flex-direction: column;
}

.bowy-unlisted-field label .required {
  color: #dc2626;
  font-weight: 700;
}

.bowy-unlisted-field input,
.bowy-unlisted-field select {
  box-sizing: border-box;
}

.bowy-field-half {
  flex: 1 1 calc(50% - 14px);
  min-width: 220px;
}

.bowy-field-full {
  flex: 1 1 100%;
}

.bowy-field-third {
  flex: 1 1 calc(33.333% - 14px);
  min-width: 130px;
}

@media (max-width: 640px) {
  .bowy-unlisted-toggle-header {
    padding: 12px 14px;
  }
  .bowy-field-half,
  .bowy-field-third {
    flex: 1 1 100%;
    min-width: 100%;
  }
}

/* --------------------------------------------------------------------------
   G-FFL CHECKOUT NOTICES & SHIPPING METHOD LIST
   -------------------------------------------------------------------------- */

/* ==========================================================
   YOUR ORDER CARD: CLEAN LINE ITEM ONLY (NO RADIOS)
   ========================================================== */

/* --------------------------------------------------------------------------
   1. CART & CHECKOUT LAYOUT
   -------------------------------------------------------------------------- */
/* Scoped Cart & Checkout Root Styles */
.bowy-cart-compliance-banner {
    background: linear-gradient(135deg, #0b1626 0%, #0f1f38 100%);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}
.bowy-cart-compliance-icon {
    flex-shrink: 0;
    margin-top: 2px;
}
.bowy-cart-compliance-content {
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.5;
}
.bowy-cart-compliance-title {
    display: block;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}
.bowy-cart-compliance-desc {
    margin: 0;
    color: #cbd5e1;
}
/* WooCommerce Cart Table */
.woocommerce table.cart {
    width: 100% !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}
.woocommerce table.cart th {
    background: #0b1626 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.04em !important;
    padding: 14px 16px !important;
    border: none !important;
}
.woocommerce table.cart td {
    padding: 16px !important;
    border-top: 1px solid #e2e8f0 !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}
.woocommerce table.cart td.product-thumbnail img {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
    max-height: 64px !important;
    object-fit: contain !important;
    border-radius: 4px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 2px !important;
    display: block !important;
    margin: 0 auto !important;
    background: #ffffff !important;
}
.woocommerce table.cart td.product-name a {
    color: #0b1626 !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}
.woocommerce table.cart td.product-name a:hover {
    color: #d4af37 !important;
}
.woocommerce table.cart td.product-price,
.woocommerce table.cart td.product-subtotal {
    color: #0b1626 !important;
    font-weight: 700 !important;
    font-size: 1.05rem !important;
}
.woocommerce table.cart td.product-quantity {
    min-width: 90px !important;
    text-align: center !important;
    color: #0b1626 !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
}
.woocommerce table.cart .quantity {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
}
.woocommerce table.cart .quantity input.qty {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 70px !important;
    height: 38px !important;
    line-height: 38px !important;
    padding: 0 4px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    color: #0b1626 !important;
    background: #ffffff !important;
    text-align: center !important;
    font-size: 0.95rem !important;
    box-sizing: border-box !important;
}
.woocommerce table.cart .quantity button,
.woocommerce table.cart .quantity .plus,
.woocommerce table.cart .quantity .minus {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #0b1626 !important;
    width: 28px !important;
    height: 38px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 4px !important;
}
.woocommerce table.cart .quantity button:hover,
.woocommerce table.cart .quantity .plus:hover,
.woocommerce table.cart .quantity .minus:hover {
    background: #e2e8f0 !important;
}
.woocommerce table.cart td.actions {
    background: #f8fafc !important;
    padding: 16px 18px !important;
}
.woocommerce table.cart td.actions .coupon input#coupon_code {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 9px 14px !important;
    font-size: 0.92rem !important;
}
.woocommerce table.cart td.actions .button,
.woocommerce table.cart td.actions input.button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    background: #0b1626 !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 0.92rem !important;
    border: none !important;
    padding: 10px 20px !important;
    min-height: 42px !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}
.woocommerce table.cart td.actions .button:hover:not(:disabled),
.woocommerce table.cart td.actions input.button:hover:not(:disabled) {
    background: #1a2f4c !important;
    color: #ffffff !important;
}
.woocommerce table.cart td.actions .button:disabled,
.woocommerce table.cart td.actions .button[disabled],
.woocommerce table.cart td.actions .button:disabled:hover,
.woocommerce table.cart td.actions .button[disabled]:hover,
.woocommerce table.cart td.actions input.button:disabled,
.woocommerce table.cart td.actions input.button[disabled] {
    background: #cbd5e1 !important;
    color: #64748b !important;
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}
/* Cart Totals Box */
.woocommerce .cart-collaterals .cart_totals {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 24px !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05) !important;
}
.woocommerce .cart-collaterals .cart_totals h2 {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #0b1626 !important;
    margin: 0 0 16px 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding-bottom: 10px !important;
}
.woocommerce .cart-collaterals .cart_totals table.shop_table {
    border: none !important;
    margin-bottom: 18px !important;
}
.woocommerce .cart-collaterals .cart_totals table.shop_table th {
    color: #475569 !important;
    font-weight: 600 !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 10px 0 !important;
}
.woocommerce .cart-collaterals .cart_totals table.shop_table td {
    color: #0b1626 !important;
    text-align: right !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 10px 0 !important;
}
.woocommerce .cart-collaterals .cart_totals table.shop_table .order-total th,
.woocommerce .cart-collaterals .cart_totals table.shop_table .order-total td {
    border-bottom: 2px solid #0b1626 !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #0b1626 !important;
    padding: 14px 0 !important;
}
/* Proceed to Checkout Hero Button */
.woocommerce .wc-proceed-to-checkout a.checkout-button,
.wc-proceed-to-checkout a.checkout-button,
.woocommerce a.button.checkout-button {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    background: linear-gradient(135deg, #d4af37 0%, #aa8010 100%) !important;
    color: #070d18 !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 16px 28px !important;
    border-radius: 6px !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}
.woocommerce .wc-proceed-to-checkout a.checkout-button:hover,
.wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce a.button.checkout-button:hover {
    filter: brightness(1.15) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5) !important;
    color: #070d18 !important;
}
/* Empty Cart Return Button */
.woocommerce a.button.wc-backward {
    background: linear-gradient(135deg, #d4af37 0%, #aa8010 100%) !important;
    color: #070d18 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    border-radius: 6px !important;
    padding: 12px 24px !important;
    border: none !important;
    transition: all 0.2s ease !important;
}
.woocommerce a.button.wc-backward:hover {
    filter: brightness(1.15) !important;
}
/* Shipping Destination Toggle Heading */
#ship-to-different-address {
    margin: 20px 0 12px 0 !important;
}
#ship-to-different-address label {
    cursor: pointer !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    color: #0b1626 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Unified Single Customer Address Architecture: Suppress Secondary Shipping Form Sitewide */
.woocommerce-checkout #ship-to-different-address,
.woocommerce-checkout .woocommerce-shipping-fields,
.woocommerce-checkout .shipping_address,
.woocommerce-checkout .col2-set .col-2 {
    display: none !important;
}

/* Unlisted FFL Intake Styling (Strictly Harmonized with Kadence Checkout Typography) */
#bowy-unlisted-ffl-wrapper,
#bowy-unlisted-ffl-wrapper *,
#bowy-unlisted-ffl-wrapper input,
#bowy-unlisted-ffl-wrapper select,
#bowy-unlisted-ffl-wrapper button,
#bowy-unlisted-ffl-wrapper label,
#bowy-unlisted-ffl-wrapper span,
#bowy-unlisted-ffl-wrapper p,
#bowy-unlisted-ffl-wrapper strong,
#bowy-unlisted-ffl-wrapper div {
    font-family: inherit !important;
    box-sizing: border-box !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}
#bowy-unlisted-ffl-wrapper {
    margin: 0 0 24px 0 !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 18px 20px !important;
    width: 100% !important;
    clear: both !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
#bowy-unlisted-ffl-wrapper:hover {
    border-color: #94a3b8 !important;
}
.bowy-unlisted-ffl-card {
    margin-top: 14px !important;
    padding-top: 14px !important;
    border-top: 1px solid #e2e8f0 !important;
}
.bowy-unlisted-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 12px 14px !important;
    margin-bottom: 16px !important;
}
.bowy-unlisted-field.bowy-field-half { grid-column: span 3 !important; }
.bowy-unlisted-field.bowy-field-full { grid-column: span 6 !important; }
.bowy-unlisted-field.bowy-field-third { grid-column: span 2 !important; }
@media (max-width: 600px) {
    .bowy-unlisted-field.bowy-field-half,
    .bowy-unlisted-field.bowy-field-third {
        grid-column: span 6 !important;
    }
}
.bowy-unlisted-field label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    margin-bottom: 6px !important;
    text-transform: none !important;
    line-height: 1.3 !important;
}
.bowy-unlisted-field label span.required {
    color: #dc2626 !important;
}
.bowy-unlisted-field input,
.bowy-unlisted-field select {
    width: 100% !important;
    height: 42px !important;
    padding: 8px 12px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    line-height: 1.4 !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.04) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.bowy-unlisted-field input:focus,
.bowy-unlisted-field select:focus {
    border-color: #0b1626 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(11, 22, 38, 0.12) !important;
}

/* Checkout Delivery Policy Callout Card */
.bowy-checkout-delivery-policy-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 14px 18px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}
.bowy-delivery-policy-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 8px !important;
}
.bowy-delivery-policy-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}
.bowy-delivery-policy-title {
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    color: #0b1626 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
}
.bowy-delivery-policy-list {
    margin: 0 !important;
    padding-left: 20px !important;
    list-style-type: disc !important;
    color: #334155 !important;
    font-size: 0.88rem !important;
    line-height: 1.55 !important;
}
.bowy-delivery-policy-list li {
    margin-bottom: 4px !important;
}
.bowy-delivery-policy-list li:last-child {
    margin-bottom: 0 !important;
}
.bowy-delivery-policy-list strong {
    color: #0b1626 !important;
}
.bowy-shipping-categories-sublist {
    margin: 6px 0 6px 0 !important;
    padding-left: 18px !important;
    list-style-type: circle !important;
    font-size: 0.84rem !important;
    color: #475569 !important;
    line-height: 1.5 !important;
}
.bowy-shipping-categories-sublist li {
    margin-bottom: 3px !important;
}
.bowy-shipping-categories-sublist strong {
    color: #0b1626 !important;
}
/* Inner Stack for Left Panel (all widths) */
.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2,
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin-bottom: 20px !important;
    box-sizing: border-box !important;
}
/* 50-50 Two-Column Checkout Layout (desktop only; phones and tablets stack) */
@media (min-width: 1024px) {
    .woocommerce-checkout form.checkout,
    .woocommerce-checkout form.woocommerce-checkout {
        display: block !important;
        width: 100% !important;
        position: relative !important;
    }
    .woocommerce-checkout form.checkout::after,
    .woocommerce-checkout form.woocommerce-checkout::after {
        content: "" !important;
        display: table !important;
        clear: both !important;
    }

    /* Left Panel: Customer Details */
    .woocommerce-checkout #customer_details,
    .woocommerce-checkout form.checkout #customer_details,
    .woocommerce-checkout .col2-set#customer_details {
        width: calc(50% - 18px) !important;
        float: left !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        margin-bottom: 24px !important;
        clear: left !important;
        box-sizing: border-box !important;
    }

    /* Right Panel: Order Review & Payment (Top-Aligned) */
    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review,
    .woocommerce-checkout form.checkout #order_review_heading,
    .woocommerce-checkout form.checkout #order_review,
    .woocommerce-checkout .woocommerce-checkout-review-order {
        width: calc(50% - 18px) !important;
        float: right !important;
        clear: right !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        box-sizing: border-box !important;
    }

    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout form.checkout #order_review_heading {
        margin-top: 0 !important;
        padding-top: 0 !important;
        margin-bottom: 16px !important;
    }

    .woocommerce-checkout #order_review,
    .woocommerce-checkout form.checkout #order_review {
        margin-top: 0 !important;
    }
}

@media (max-width: 1023px) {
    .woocommerce-checkout #customer_details,
    .woocommerce-checkout form.checkout #customer_details,
    .woocommerce-checkout .col2-set#customer_details,
    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review,
    .woocommerce-checkout form.checkout #order_review_heading,
    .woocommerce-checkout form.checkout #order_review,
    .woocommerce-checkout .woocommerce-checkout-review-order {
        width: 100% !important;
        float: none !important;
        clear: both !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

.woocommerce-checkout h3 {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #0b1626 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding-bottom: 8px !important;
    margin: 0 0 18px 0 !important;
}

/* Checkout Fields Grid Layout (6-Column System) */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 12px 14px !important;
}
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper > *,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper > * {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    float: none !important;
    margin: 0 !important;
}
.woocommerce-checkout #billing_first_name_field,
.woocommerce-checkout #shipping_first_name_field { grid-column: span 3 !important; }
.woocommerce-checkout #billing_last_name_field,
.woocommerce-checkout #shipping_last_name_field  { grid-column: span 3 !important; }
.woocommerce-checkout #billing_country_field,
.woocommerce-checkout #shipping_country_field {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
}
.woocommerce-checkout #billing_country_field .woocommerce-input-wrapper,
.woocommerce-checkout #shipping_country_field .woocommerce-input-wrapper,
.woocommerce-checkout #billing_country_field .select2-container,
.woocommerce-checkout #shipping_country_field .select2-container {
    width: 100% !important;
    display: block !important;
}
.woocommerce-checkout #billing_address_1_field,
.woocommerce-checkout #shipping_address_1_field  { grid-column: 1 / -1 !important; }
.woocommerce-checkout #billing_address_2_field,
.woocommerce-checkout #shipping_address_2_field  { grid-column: 1 / -1 !important; }
.woocommerce-checkout #billing_postcode_field,
.woocommerce-checkout #shipping_postcode_field   { grid-column: span 2 !important; }
.woocommerce-checkout #billing_city_field,
.woocommerce-checkout #shipping_city_field       { grid-column: span 2 !important; }
.woocommerce-checkout #billing_state_field,
.woocommerce-checkout #shipping_state_field      { grid-column: span 2 !important; }
.woocommerce-checkout #billing_phone_field       { grid-column: span 3 !important; }
.woocommerce-checkout #billing_email_field       { grid-column: span 3 !important; }

/* FFL Checkout Injected Notices: Spanning Full Width (Fixing 1-alphabet vertical slicing) */
#first_last_notice,
#mixed_cart_notice {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    display: block !important;
    clear: both !important;
    font-size: 0.88rem !important;
    line-height: 1.45 !important;
    color: #475569 !important;
    background: #f1f5f9 !important;
    padding: 10px 14px !important;
    border-radius: 4px !important;
    margin: 8px 0 12px 0 !important;
    box-sizing: border-box !important;
}

/* Order Review Shipping Methods: Hide Radio Inputs & Inactive Options, Display Selected Price Only */
.woocommerce-checkout #order_review .woocommerce-shipping-methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.woocommerce-checkout #order_review .woocommerce-shipping-methods input[type="radio"] {
    display: none !important;
}
.woocommerce-checkout #order_review .woocommerce-shipping-methods li:has(input[type="radio"]):not(:has(input[type="radio"]:checked)) {
    display: none !important;
}
.woocommerce-checkout #order_review .woocommerce-shipping-methods li:has(input[type="radio"]:checked),
.woocommerce-checkout #order_review .woocommerce-shipping-methods li:has(input[type="hidden"]),
.woocommerce-checkout #order_review .woocommerce-shipping-methods li:not(:has(input[type="radio"])) {
    display: flex !important;
    justify-content: flex-end !important;
    text-align: right !important;
    font-weight: 700 !important;
    color: #0b1626 !important;
    pointer-events: none !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}
.woocommerce-checkout #order_review .woocommerce-shipping-methods label {
    font-weight: 700 !important;
    color: #0b1626 !important;
    cursor: default !important;
    margin: 0 !important;
}

@media (max-width: 767px) {
    .woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
    .woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    #ffl-local-pickup-search,
    #ffl-favorite-search {
        font-size: 12px !important;
        letter-spacing: 0 !important;
        padding: 12px 8px !important;
    }
}
@media (max-width: 1023px) {
    #ffl_container .ffl_checkout_columns {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    #ffl_container .ffl_checkout_column {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    #ffl_search_fields input,
    #ffl_search_fields select,
    #ffl-local-pickup-section input,
    #ffl-favorite-section input,
    #ffl-candr-section input {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
}
.woocommerce-checkout .form-row {
    margin-bottom: 0 !important;
}
.woocommerce-checkout .form-row label {
    color: #1e293b !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    margin-bottom: 4px !important;
    display: block !important;
}
.woocommerce-checkout .woocommerce-input-wrapper {
    width: 100% !important;
    display: block !important;
}
.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 10px 14px !important;
    font-size: 0.95rem !important;
    color: #0b1626 !important;
    background: #ffffff !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.woocommerce-checkout .form-row input.input-text:focus,
.woocommerce-checkout .form-row select:focus,
.woocommerce-checkout .form-row textarea:focus {
    border-color: #0b1626 !important;
    box-shadow: 0 0 0 3px rgba(11, 22, 38, 0.1) !important;
    outline: none !important;
}
/* Select2 / SelectWoo Full Width & Uniform Input Styling */
.woocommerce-checkout .select2-container,
.woocommerce-checkout .select2-container--default {
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
}
.woocommerce-checkout .select2-container .selection {
    width: 100% !important;
    display: block !important;
}
.woocommerce-checkout .select2-container--default .select2-selection--single {
    height: 44px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 8px 14px !important;
    background-color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.woocommerce-checkout .select2-container--default.select2-container--open .select2-selection--single,
.woocommerce-checkout .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #0b1626 !important;
    box-shadow: 0 0 0 3px rgba(11, 22, 38, 0.1) !important;
    outline: none !important;
}
.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #0b1626 !important;
    line-height: normal !important;
    padding-left: 0 !important;
    padding-right: 20px !important;
    font-size: 0.95rem !important;
    font-weight: 400 !important;
}
.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px !important;
    top: 1px !important;
    right: 10px !important;
    display: flex !important;
    align-items: center !important;
}
/* MatchGrade ZIP Compliance Alert */
.bowy-zip-compliance-alert {
    grid-column: 1 / -1 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
    border-radius: 6px !important;
    padding: 10px 14px !important;
    font-size: 0.88rem !important;
    line-height: 1.4 !important;
    margin-top: 4px !important;
}
/* Checkout Order Review Table */
.woocommerce-checkout #order_review_heading {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #0b1626 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    margin: 0 0 16px 0 !important;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table {
    width: 100% !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
    margin-bottom: 24px !important;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table thead th {
    background: #0b1626 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.04em !important;
    padding: 14px 16px !important;
    border: none !important;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table thead th.product-name,
.woocommerce-checkout table.woocommerce-checkout-review-order-table thead th:first-child {
    text-align: left !important;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table thead th.product-total,
.woocommerce-checkout table.woocommerce-checkout-review-order-table thead th:last-child {
    text-align: right !important;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody td {
    padding: 14px 16px !important;
    border-top: 1px solid #e2e8f0 !important;
    color: #0b1626 !important;
    vertical-align: middle !important;
    background: #ffffff !important;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table .product-name {
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    text-align: left !important;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table .product-total,
.woocommerce-checkout table.woocommerce-checkout-review-order-table .cart-subtotal td,
.woocommerce-checkout table.woocommerce-checkout-review-order-table .shipping td,
.woocommerce-checkout table.woocommerce-checkout-review-order-table .fee td,
.woocommerce-checkout table.woocommerce-checkout-review-order-table .tax-rate td,
.woocommerce-checkout table.woocommerce-checkout-review-order-table .tax-total td,
.woocommerce-checkout table.woocommerce-checkout-review-order-table .order-total td {
    text-align: right !important;
    font-weight: 700 !important;
}
/* Clean Matching Background for Subtotal, Shipping, Taxes, and Footer */
.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot th,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot td {
    background: #ffffff !important;
    color: #0b1626 !important;
    border-top: 1px solid #f1f5f9 !important;
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot th {
    font-weight: 600 !important;
    color: #475569 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot .fee th,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot .tax-rate th,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot .tax-total th {
    font-weight: 600 !important;
    color: #475569 !important;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot .fee td,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot .tax-rate td,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot .tax-total td {
    text-align: right !important;
    font-weight: 700 !important;
    color: #0b1626 !important;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot .order-total th,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot .order-total td {
    border-top: 2px solid #0b1626 !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #0b1626 !important;
    padding: 16px !important;
    background: #f8fafc !important;
}
/* Payment Box */
.woocommerce-checkout #payment {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05) !important;
}
.woocommerce-checkout #payment ul.payment_methods {
    border-bottom: 1px solid #e2e8f0 !important;
    padding-bottom: 16px !important;
    margin-bottom: 16px !important;
    list-style: none !important;
    padding-left: 0 !important;
}
.woocommerce-checkout #payment ul.payment_methods li {
    margin-bottom: 12px !important;
}
.woocommerce-checkout #payment ul.payment_methods li label {
    font-weight: 600 !important;
    color: #0b1626 !important;
    cursor: pointer !important;
}
.woocommerce-checkout #payment div.payment_box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 14px 16px !important;
    color: #475569 !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    margin-top: 8px !important;
}
/* Statutory Attestation Checkbox */
.bowy-checkout-statutory-attestation {
    background: #f8fafc !important;
    border: 1px solid #d4af37 !important;
    border-radius: 8px !important;
    padding: 16px 18px !important;
    margin: 18px 0 !important;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.1) !important;
    transition: all 0.25s ease !important;
}
.bowy-checkout-statutory-attestation.bowy-attestation-error {
    border: 2px solid #dc2626 !important;
    background: #fef2f2 !important;
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.25) !important;
}
.woocommerce-checkout input.bowy-input-error,
.woocommerce-checkout select.bowy-input-error,
.woocommerce-checkout .form-row.bowy-field-error input.input-text,
.woocommerce-checkout .form-row.bowy-field-error select,
.woocommerce-checkout .form-row.bowy-field-error .select2-selection,
.woocommerce-checkout .form-row.woocommerce-invalid input.input-text,
.woocommerce-checkout .form-row.woocommerce-invalid select,
.woocommerce-checkout .form-row.woocommerce-invalid .select2-selection,
.bowy-unlisted-field.bowy-field-error input,
.bowy-unlisted-field.bowy-field-error select {
    border: 2px solid #dc2626 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.2) !important;
    outline: none !important;
}
.woocommerce-checkout .form-row.bowy-field-error label,
.bowy-unlisted-field.bowy-field-error label {
    color: #dc2626 !important;
}
.bowy-checkout-statutory-attestation label.bowy-checkbox-label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    cursor: pointer !important;
    margin: 0 !important;
    user-select: none !important;
}
.bowy-checkout-statutory-attestation input[type="checkbox"] {
    margin-top: 3px !important;
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
    accent-color: #0b1626 !important;
    cursor: pointer !important;
}
.bowy-checkout-statutory-attestation .bowy-attestation-text {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    color: #1e293b !important;
}
.bowy-checkout-statutory-attestation .bowy-attestation-text strong {
    color: #0b1626 !important;
}
.bowy-policy-tabs-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 12px !important;
    padding-left: 30px !important;
}
.bowy-policy-tab-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    color: #0b1626 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
    white-space: nowrap !important;
}
.bowy-policy-tab-link:hover {
    border-color: #d4af37 !important;
    background: #fffdf5 !important;
    color: #aa8010 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(212, 175, 55, 0.2) !important;
}
.bowy-policy-tab-link .bowy-tab-external {
    font-size: 0.88rem !important;
    line-height: 1 !important;
    color: #94a3b8 !important;
    transition: color 0.2s ease !important;
}
.bowy-policy-tab-link:hover .bowy-tab-external {
    color: #aa8010 !important;
}
/* Place Order Button Brand Architecture */
.woocommerce-checkout #payment #place_order,
.woocommerce #place_order,
#place_order {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    background: linear-gradient(135deg, #d4af37 0%, #aa8010 100%) !important;
    color: #070d18 !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 16px 28px !important;
    border-radius: 6px !important;
    border: none !important;
    box-shadow: 0 4px 18px rgba(212, 175, 55, 0.45) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-top: 14px !important;
    box-sizing: border-box !important;
}
.woocommerce-checkout #payment #place_order:hover:not(:disabled),
.woocommerce #place_order:hover:not(:disabled),
#place_order:hover:not(:disabled) {
    filter: brightness(1.15) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 22px rgba(212, 175, 55, 0.6) !important;
    color: #070d18 !important;
}
/* Explicitly Disabled / Restriction State (FFL Dealer Required or Gateway Processing) */
.woocommerce-checkout #payment #place_order:disabled,
.woocommerce-checkout #payment #place_order[disabled],
.woocommerce-checkout #payment #place_order.disabled,
.woocommerce-checkout #payment #place_order.ffl-restriction-disabled,
.woocommerce #place_order:disabled,
.woocommerce #place_order[disabled],
.woocommerce #place_order.disabled,
.woocommerce #place_order.ffl-restriction-disabled,
#place_order:disabled,
#place_order[disabled],
#place_order.disabled,
#place_order.ffl-restriction-disabled {
    background: #94a3b8 !important;
    background-image: none !important;
    color: #ffffff !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    filter: none !important;
    opacity: 0.65 !important;
    transform: none !important;
}

/* FFL Cockpit / g-ffl-checkout Harmonization */
#ffl_container {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 18px 20px !important;
    margin-bottom: 24px !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.ffl-restriction,
.ffl-required-notice {
    background: #f0fdf4 !important;
    color: #065f46 !important;
    padding: 12px 16px !important;
    border-radius: 4px !important;
    font-size: 0.92rem !important;
    margin: 12px 0 !important;
    line-height: 1.5 !important;
}
.ffl-restriction.ffl-alert-error,
.ffl-restriction.error {
    background: #fef2f2 !important;
    color: #991b1b !important;
}
.ffl-dealer-selected-box {
    background: #f8fafc !important;
    border: 1px solid #d4af37 !important;
    border-radius: 6px !important;
    padding: 14px 16px !important;
}

/* Notices */
.woocommerce-error,
.woocommerce-NoticeGroup-checkout .woocommerce-error {
    background: #fef2f2 !important;
    color: #991b1b !important;
    border-radius: 6px !important;
    padding: 12px 18px !important;
    font-size: 0.92rem !important;
    margin-bottom: 20px !important;
    list-style: none !important;
}
.woocommerce-message {
    background: #f0fdf4 !important;
    color: #065f46 !important;
    border-radius: 6px !important;
    padding: 12px 18px !important;
    font-size: 0.92rem !important;
    margin-bottom: 20px !important;
}
/* Phone Cart: Compact Item Rows */
@media (max-width: 767px) {
    .woocommerce-cart table.cart thead {
        display: none !important;
    }
    .woocommerce-cart table.cart tr.cart_item {
        display: grid !important;
        grid-template-columns: 72px minmax(0, 1fr) auto !important;
        grid-template-areas:
            "thumb name remove"
            "thumb price price"
            "thumb foot foot" !important;
        gap: 4px 12px !important;
        padding: 14px 12px !important;
        border-top: 1px solid #e2e8f0 !important;
        background: #ffffff !important;
    }
    .woocommerce-cart table.cart tr.cart_item td {
        display: block !important;
        padding: 0 !important;
        border: 0 !important;
        min-width: 0 !important;
        width: auto !important;
        text-align: left !important;
        background: transparent !important;
    }
    .woocommerce-cart table.cart tr.cart_item td::before {
        content: none !important;
        display: none !important;
    }
    .woocommerce-cart table.cart tr.cart_item td.product-thumbnail {
        grid-area: thumb !important;
        align-self: start !important;
    }
    .woocommerce-cart table.cart tr.cart_item td.product-thumbnail img {
        width: 72px !important;
        height: 72px !important;
        max-width: 72px !important;
        max-height: 72px !important;
        margin: 0 !important;
    }
    .woocommerce-cart table.cart tr.cart_item td.product-name {
        grid-area: name !important;
        line-height: 1.35 !important;
    }
    .woocommerce-cart table.cart tr.cart_item td.product-remove {
        grid-area: remove !important;
        justify-self: end !important;
        align-self: start !important;
    }
    .woocommerce-cart table.cart tr.cart_item td.product-remove a.remove {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        margin: -6px -6px 0 0 !important;
    }
    .woocommerce-cart table.cart tr.cart_item td.product-price {
        grid-area: price !important;
        font-size: 0.92rem !important;
        font-weight: 600 !important;
        color: #475569 !important;
    }
    .woocommerce-cart table.cart tr.cart_item td.product-quantity {
        grid-area: foot !important;
        justify-self: start !important;
        align-self: center !important;
    }
    .woocommerce-cart table.cart tr.cart_item td.product-quantity .quantity {
        justify-content: flex-start !important;
        margin: 4px 0 0 0 !important;
    }
    .woocommerce-cart table.cart tr.cart_item td.product-subtotal {
        grid-area: foot !important;
        justify-self: end !important;
        align-self: center !important;
        font-size: 1.05rem !important;
    }
}
/* Phone Checkout: Flattened Containers */
@media (max-width: 767px) {
    body.woocommerce-checkout .entry-content-wrap,
    body.woocommerce-cart .entry-content-wrap {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    .bowy-checkout-delivery-policy-card,
    #ffl_container,
    #bowy-unlisted-ffl-wrapper,
    .woocommerce-checkout #payment {
        padding: 12px !important;
    }
    #ffl-required-notice,
    #ffl_container .ffl_checkout_notice,
    #bowy-unlisted-ffl-wrapper .bowy-unlisted-toggle-header {
        padding: 10px !important;
    }
    .woocommerce-checkout #payment div.payment_box {
        border: 0 !important;
        border-radius: 0 !important;
        padding: 10px 0 10px 12px !important;
    }
    .bowy-checkout-statutory-attestation {
        padding: 12px !important;
    }
    .bowy-policy-tabs-wrapper {
        padding-left: 0 !important;
    }
    .bowy-policy-tab-link {
        white-space: normal !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}
