/* ============================================================
   Fusion Food – WooCommerce Checkout
   Dark theme: matches single-product.css variables exactly
   ============================================================ */

/* ── Variables (identical to single-product.css) ── */
:root {
    --ff-gold:       #C9A84C;
    --ff-gold-light: #e8c96a;
    --ff-gold-dim:   rgba(201,168,76,0.10);
    --ff-black:      #0a0a0a;
    --ff-surface:    #1a1a1a;
    --ff-card:       #1f1f1f;
    --ff-border:     rgba(201,168,76,0.18);
    --ff-text:       #f0ece4;
    --ff-muted:      #888880;
    --ff-radius:     12px;
    --ff-trans:      0.3s ease;
}

/* ═══════════════════════════════════════════════════
   PAGE SHELL – full dark background
   ═══════════════════════════════════════════════════ */

body.woocommerce-checkout {
    background: var(--ff-black) !important;
    color: var(--ff-text) !important;
    font-family: 'Jost', sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.woocommerce-checkout *,
body.woocommerce-checkout *::before,
body.woocommerce-checkout *::after { box-sizing: border-box; }

/* Kill white backgrounds from any framework wrapper */
body.woocommerce-checkout #page,
body.woocommerce-checkout .site,
body.woocommerce-checkout #content,
body.woocommerce-checkout .site-content,
body.woocommerce-checkout #primary,
body.woocommerce-checkout .content-area,
body.woocommerce-checkout main,
body.woocommerce-checkout #main-content,
body.woocommerce-checkout article,
body.woocommerce-checkout .entry-content {
    background: var(--ff-black) !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    width: 100% !important;
}

/* Hide the WordPress page title "Checkout" from index.php */
body.woocommerce-checkout h1.entry-title,
body.woocommerce-checkout .entry-header,
body.woocommerce-checkout .page-header { display: none !important; }

/* ═══════════════════════════════════════════════════
   CHECKOUT WRAPPER & GRID
   ═══════════════════════════════════════════════════ */

.ff-checkout-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(32px, 5vw, 60px) clamp(16px, 4vw, 48px) 80px;
    font-family: 'Jost', sans-serif;
    color: var(--ff-text);
}

.ff-checkout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}
.ff-checkout-left  { grid-column: 1; }
.ff-checkout-right {
    grid-column: 2;
    position: sticky;
    top: 90px;
}

/* Section titles */
.ff-checkout-section-title,
.woocommerce-billing-fields > h3,
.woocommerce-shipping-fields > h3,
.woocommerce-additional-fields > h3,
#order_review_heading {
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #fff !important;
    letter-spacing: 0.22em !important;
    text-transform: uppercase !important;
    margin: 0 0 24px !important;
    padding: 0 0 14px !important;
    border: none !important;
    border-bottom: 1px solid var(--ff-border) !important;
    font-family: 'Jost', sans-serif !important;
    background: none !important;
}
.woocommerce-shipping-fields > h3 { margin-top: 32px !important; }

/* ═══════════════════════════════════════════════════
   WooCommerce NOTICES (errors, info, success)
   ═══════════════════════════════════════════════════ */

body.woocommerce-checkout .woocommerce-notices-wrapper { margin-bottom: 20px; }
body.woocommerce-checkout .woocommerce-error,
body.woocommerce-checkout .woocommerce-message,
body.woocommerce-checkout .woocommerce-info {
    list-style: none !important;
    background: var(--ff-surface) !important;
    border: 1px solid var(--ff-border) !important;
    border-top: 3px solid var(--ff-gold) !important;
    border-radius: 0 0 var(--ff-radius) var(--ff-radius) !important;
    color: var(--ff-text) !important;
    font-family: 'Jost', sans-serif !important;
    font-size: 14px !important;
    padding: 14px 20px !important;
    margin: 0 0 20px !important;
}
body.woocommerce-checkout .woocommerce-error a,
body.woocommerce-checkout .woocommerce-message a,
body.woocommerce-checkout .woocommerce-info a {
    color: var(--ff-gold) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}
body.woocommerce-checkout .woocommerce-error a:hover,
body.woocommerce-checkout .woocommerce-message a:hover,
body.woocommerce-checkout .woocommerce-info a:hover { text-decoration: underline !important; }
/* Remove WC info icon */
body.woocommerce-checkout .woocommerce-info::before { display: none !important; }

/* ═══════════════════════════════════════════════════
   COUPON TOGGLE + FORM
   ═══════════════════════════════════════════════════ */

.woocommerce-form-coupon-toggle {
    max-width: 1200px;
    margin: clamp(16px, 3vw, 32px) auto 0;
    padding: 0 clamp(16px, 4vw, 48px);
}
.woocommerce-form-coupon-toggle .woocommerce-info {
    background: var(--ff-surface) !important;
    border: 1px solid var(--ff-border) !important;
    border-top: 3px solid var(--ff-gold) !important;
    border-radius: var(--ff-radius) !important;
    color: var(--ff-muted) !important;
    font-family: 'Jost', sans-serif !important;
    font-size: 13px !important;
    padding: 14px 20px !important;
    margin: 0 !important;
}
.woocommerce-form-coupon-toggle .woocommerce-info::before { display: none !important; }
.woocommerce-form-coupon-toggle .showcoupon {
    color: var(--ff-gold) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}
.woocommerce-form-coupon-toggle .showcoupon:hover { text-decoration: underline !important; }

/* Coupon form (hidden until toggled) */
.checkout_coupon.woocommerce-form-coupon {
    max-width: 1200px;
    margin: 8px auto 0;
    padding: 20px clamp(16px, 4vw, 48px);
    display: none; /* WC JS shows/hides this */
}
.checkout_coupon.woocommerce-form-coupon .coupon-inner {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    background: var(--ff-surface);
    border: 1px solid var(--ff-border);
    border-radius: var(--ff-radius);
    padding: 20px 24px;
}
/* WooCommerce wraps fields in <p class="form-row"> */
.checkout_coupon .form-row { margin: 0 !important; padding: 0 !important; }
.checkout_coupon .form-row-first { flex: 1; min-width: 180px; }
.checkout_coupon .form-row-last  { flex-shrink: 0; }

.checkout_coupon input[name="coupon_code"] {
    display: block !important;
    width: 100% !important;
    background: var(--ff-card) !important;
    border: 1.5px solid var(--ff-border) !important;
    border-radius: 10px !important;
    color: var(--ff-text) !important;
    font-family: 'Jost', sans-serif !important;
    font-size: 14px !important;
    padding: 12px 16px !important;
    outline: none !important;
    transition: border-color 0.25s, box-shadow 0.25s !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.checkout_coupon input[name="coupon_code"]:focus {
    border-color: var(--ff-gold) !important;
    box-shadow: 0 0 0 3px rgba(201,168,76,0.12) !important;
}
.checkout_coupon input[name="coupon_code"]::placeholder { color: #555 !important; }

.checkout_coupon button[name="apply_coupon"],
.checkout_coupon .button {
    background: var(--ff-gold) !important;
    border: none !important;
    border-radius: 10px !important;
    color: #111 !important;
    font-family: 'Jost', sans-serif !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    padding: 13px 28px !important;
    cursor: pointer !important;
    transition: background 0.25s, transform 0.2s !important;
    white-space: nowrap !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    line-height: 1 !important;
    height: auto !important;
}
.checkout_coupon button[name="apply_coupon"]:hover,
.checkout_coupon .button:hover {
    background: var(--ff-gold-light) !important;
    transform: translateY(-1px) !important;
}

/* ═══════════════════════════════════════════════════
   BILLING / SHIPPING FORM FIELDS
   ═══════════════════════════════════════════════════ */

/* Reset WC float layout */
.woocommerce-checkout #customer_details.col2-set,
.woocommerce-checkout .col2-set { float: none !important; width: 100% !important; }
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
    float: none !important;
    width: 100% !important;
    padding: 0 !important;
}

/* Form row spacing */
.woocommerce-checkout .form-row {
    margin: 0 0 18px !important;
    padding: 0 !important;
    float: none !important;
    clear: none !important;
}

/* Side-by-side first/last rows */
.woocommerce-checkout .form-row-first,
.woocommerce-checkout .form-row-last {
    display: inline-block !important;
    width: calc(50% - 8px) !important;
    vertical-align: top !important;
}
.woocommerce-checkout .form-row-first { margin-right: 12px !important; }
.woocommerce-checkout .form-row-wide  {
    display: block !important;
    width: 100% !important;
}

/* Labels */
.woocommerce-checkout .form-row label {
    display: block !important;
    font-family: 'Jost', sans-serif !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: var(--ff-muted) !important;
    margin-bottom: 8px !important;
}
.woocommerce-checkout .form-row label .required,
.woocommerce-checkout .form-row label abbr {
    color: var(--ff-gold) !important;
    text-decoration: none !important;
}

/* Text inputs */
.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row input[type="text"],
.woocommerce-checkout .form-row input[type="email"],
.woocommerce-checkout .form-row input[type="tel"],
.woocommerce-checkout .form-row input[type="number"],
.woocommerce-checkout .form-row input[type="password"],
.woocommerce-checkout .form-row textarea {
    display: block !important;
    width: 100% !important;
    background: var(--ff-surface) !important;
    border: 1.5px solid var(--ff-border) !important;
    border-radius: 10px !important;
    color: var(--ff-text) !important;
    font-family: 'Jost', sans-serif !important;
    font-size: 14px !important;
    padding: 13px 16px !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.25s, box-shadow 0.25s !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0 !important;
    height: auto !important;
    line-height: 1.4 !important;
}
.woocommerce-checkout .form-row input.input-text:focus,
.woocommerce-checkout .form-row input[type="text"]:focus,
.woocommerce-checkout .form-row input[type="email"]:focus,
.woocommerce-checkout .form-row input[type="tel"]:focus,
.woocommerce-checkout .form-row input[type="password"]:focus,
.woocommerce-checkout .form-row textarea:focus {
    border-color: var(--ff-gold) !important;
    box-shadow: 0 0 0 3px rgba(201,168,76,0.12) !important;
    background: #212121 !important;
}
.woocommerce-checkout .form-row input::placeholder,
.woocommerce-checkout .form-row textarea::placeholder { color: #555 !important; }

/* Native <select> (fallback when Select2 not used) */
.woocommerce-checkout .form-row select {
    display: block !important;
    width: 100% !important;
    background: var(--ff-surface) !important;
    border: 1.5px solid var(--ff-border) !important;
    border-radius: 10px !important;
    color: var(--ff-text) !important;
    font-family: 'Jost', sans-serif !important;
    font-size: 14px !important;
    padding: 13px 40px 13px 16px !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    cursor: pointer !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C9A84C' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
}
.woocommerce-checkout .form-row select:focus {
    border-color: var(--ff-gold) !important;
    box-shadow: 0 0 0 3px rgba(201,168,76,0.12) !important;
}

/* ── Select2 (WC uses it for country / state dropdowns) ── */
.woocommerce-checkout .select2-container { width: 100% !important; }

.woocommerce-checkout .select2-container .select2-selection--single {
    background: var(--ff-surface) !important;
    border: 1.5px solid var(--ff-border) !important;
    border-radius: 10px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    transition: border-color 0.25s, box-shadow 0.25s !important;
}
.woocommerce-checkout .select2-container--focus .select2-selection--single,
.woocommerce-checkout .select2-container--open  .select2-selection--single {
    border-color: var(--ff-gold) !important;
    box-shadow: 0 0 0 3px rgba(201,168,76,0.12) !important;
    outline: none !important;
}
.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__rendered {
    color: var(--ff-text) !important;
    font-family: 'Jost', sans-serif !important;
    font-size: 14px !important;
    line-height: 1 !important;
    padding: 0 40px 0 16px !important;
}
.woocommerce-checkout .select2-container .select2-selection__placeholder { color: #555 !important; }
.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
    right: 12px !important;
}
.woocommerce-checkout .select2-container .select2-selection__arrow b {
    border-color: var(--ff-gold) transparent transparent transparent !important;
}
.woocommerce-checkout .select2-container--open .select2-selection__arrow b {
    border-color: transparent transparent var(--ff-gold) transparent !important;
}

/* Select2 dropdown (appended to <body>, needs global scope) */
.select2-dropdown {
    background: var(--ff-surface) !important;
    border: 1px solid var(--ff-border) !important;
    border-radius: var(--ff-radius) !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6) !important;
    font-family: 'Jost', sans-serif !important;
}
.select2-search--dropdown .select2-search__field {
    background: var(--ff-card) !important;
    border: 1px solid var(--ff-border) !important;
    border-radius: 8px !important;
    color: var(--ff-text) !important;
    font-family: 'Jost', sans-serif !important;
    padding: 8px 12px !important;
    outline: none !important;
}
.select2-results__option {
    color: var(--ff-text) !important;
    font-family: 'Jost', sans-serif !important;
    font-size: 14px !important;
    padding: 10px 16px !important;
}
.select2-results__option--highlighted[aria-selected] {
    background: rgba(201,168,76,0.15) !important;
    color: var(--ff-gold) !important;
}
.select2-results__option[aria-selected="true"] {
    background: rgba(201,168,76,0.1) !important;
    color: var(--ff-gold) !important;
    font-weight: 600 !important;
}

/* ── Checkboxes ── */
.woocommerce-checkout input[type="checkbox"],
.woocommerce-form__input-checkbox {
    accent-color: var(--ff-gold) !important;
    width: 16px !important;
    height: 16px !important;
    cursor: pointer !important;
}
.woocommerce-form__label-for-checkbox {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    color: var(--ff-muted) !important;
    font-size: 13px !important;
    font-family: 'Jost', sans-serif !important;
}
#ship-to-different-address label {
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    color: var(--ff-text) !important;
}

/* Validation error state */
.woocommerce-checkout .woocommerce-invalid input.input-text,
.woocommerce-checkout .woocommerce-invalid .select2-selection {
    border-color: #e57373 !important;
    box-shadow: 0 0 0 3px rgba(229,115,115,0.15) !important;
}
.woocommerce-checkout .woocommerce-invalid label { color: #ef9a9a !important; }

/* ═══════════════════════════════════════════════════
   ORDER REVIEW (right column)
   ═══════════════════════════════════════════════════ */

.woocommerce-checkout-review-order {
    background: var(--ff-surface) !important;
    border: 1px solid var(--ff-border) !important;
    border-radius: var(--ff-radius) !important;
    padding: 24px !important;
    overflow: hidden !important;
}

/* Order table */
.woocommerce-checkout-review-order-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-family: 'Jost', sans-serif !important;
    margin-bottom: 0 !important;
    background: transparent !important;
}
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 10px 0 !important;
    border: none !important;
    border-bottom: 1px solid rgba(201,168,76,0.08) !important;
    color: var(--ff-text) !important;
    font-size: 13px !important;
    font-family: 'Jost', sans-serif !important;
    text-align: left !important;
    background: transparent !important;
}
/* Hide thead */
.woocommerce-checkout-review-order-table thead { display: none !important; }

/* Product name */
.woocommerce-checkout-review-order-table .product-name {
    color: var(--ff-text) !important;
    font-weight: 500 !important;
}
.woocommerce-checkout-review-order-table .product-name strong { font-weight: 600 !important; }

/* Product qty badge */
.woocommerce-checkout-review-order-table .product-quantity {
    color: var(--ff-muted) !important;
    font-size: 12px !important;
}

/* Price column right-aligned */
.woocommerce-checkout-review-order-table .product-total,
.woocommerce-checkout-review-order-table td:last-child { text-align: right !important; }
.woocommerce-checkout-review-order-table .product-total { color: var(--ff-gold) !important; }

/* Subtotal / shipping / tax rows */
.woocommerce-checkout-review-order-table .cart-subtotal th,
.woocommerce-checkout-review-order-table .cart-subtotal td,
.woocommerce-checkout-review-order-table .shipping th,
.woocommerce-checkout-review-order-table .shipping td,
.woocommerce-checkout-review-order-table .tax-rate th,
.woocommerce-checkout-review-order-table .tax-rate td {
    color: var(--ff-muted) !important;
    font-size: 12px !important;
    border-bottom-color: rgba(201,168,76,0.05) !important;
}

/* Order total row */
.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 16px !important;
    border-top: 1px solid var(--ff-border) !important;
    border-bottom: none !important;
    padding-top: 16px !important;
}
.woocommerce-checkout-review-order-table .order-total .amount,
.woocommerce-checkout-review-order-table .order-total strong {
    color: var(--ff-gold) !important;
}

/* General price amounts */
.woocommerce-checkout-review-order-table .amount { color: var(--ff-gold) !important; }

/* Shipping options */
.shipping .woocommerce-shipping-destination { color: var(--ff-muted) !important; font-size: 12px !important; }

/* ═══════════════════════════════════════════════════
   PAYMENT METHODS
   ═══════════════════════════════════════════════════ */

#payment {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-top: 20px !important;
}

#payment ul.wc_payment_methods {
    list-style: none !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    border: none !important;
}

#payment li.wc_payment_method {
    background: var(--ff-card) !important;
    border: 1.5px solid var(--ff-border) !important;
    border-radius: 10px !important;
    padding: 14px 16px !important;
    transition: border-color 0.2s, background 0.2s !important;
    overflow: hidden !important;
}
#payment li.wc_payment_method:hover {
    border-color: rgba(201,168,76,0.4) !important;
    background: rgba(201,168,76,0.04) !important;
}
/* Highlight selected method */
#payment li.wc_payment_method:has(input[type="radio"]:checked) {
    border-color: var(--ff-gold) !important;
    background: rgba(201,168,76,0.07) !important;
}

/* Radio + label inline */
#payment li.wc_payment_method > label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    color: var(--ff-text) !important;
    font-family: 'Jost', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin: 0 !important;
}
#payment li.wc_payment_method > label img {
    height: 24px !important;
    max-width: 60px !important;
    object-fit: contain !important;
    vertical-align: middle !important;
}
#payment li.wc_payment_method input[type="radio"] {
    accent-color: var(--ff-gold) !important;
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    margin: 0 !important;
}

/* Payment description box */
#payment .payment_box {
    background: rgba(201,168,76,0.05) !important;
    border-top: 1px solid rgba(201,168,76,0.12) !important;
    border-radius: 0 !important;
    padding: 12px 0 4px !important;
    margin: 10px 0 0 !important;
    color: var(--ff-muted) !important;
    font-family: 'Jost', sans-serif !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
}
#payment .payment_box p { margin: 0 !important; }
#payment .payment_box::before { display: none !important; }

/* Privacy policy text */
#payment .woocommerce-privacy-policy-text,
.woocommerce-privacy-policy-text {
    font-size: 11px !important;
    color: var(--ff-muted) !important;
    margin: 12px 0 0 !important;
    line-height: 1.6 !important;
    font-family: 'Jost', sans-serif !important;
}
.woocommerce-privacy-policy-text a { color: var(--ff-gold) !important; }

/* Terms and conditions */
.woocommerce-terms-and-conditions-checkbox-text,
#payment .terms {
    font-size: 12px !important;
    color: var(--ff-muted) !important;
    font-family: 'Jost', sans-serif !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin: 12px 0 0 !important;
}
.woocommerce-terms-and-conditions-checkbox-text a,
#payment .terms a { color: var(--ff-gold) !important; }

/* ── PLACE ORDER button ── */
#payment #place_order,
.woocommerce #payment #place_order,
.form-row #place_order {
    display: block !important;
    width: 100% !important;
    background: var(--ff-gold) !important;
    border: none !important;
    border-radius: 10px !important;
    color: #111 !important;
    font-family: 'Jost', sans-serif !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 0.2em !important;
    text-transform: uppercase !important;
    padding: 18px 32px !important;
    cursor: pointer !important;
    transition: background 0.25s, transform 0.2s, box-shadow 0.25s !important;
    line-height: 1 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    margin-top: 20px !important;
}
#payment #place_order:hover {
    background: var(--ff-gold-light) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 32px rgba(201,168,76,0.35) !important;
}
#payment #place_order:active {
    transform: translateY(0) !important;
    box-shadow: none !important;
}

/* Loading overlay */
.blockUI.blockOverlay {
    background: rgba(10,10,10,0.7) !important;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */

@media (max-width: 960px) {
    .ff-checkout-grid {
        grid-template-columns: 1fr !important;
    }
    .ff-checkout-left,
    .ff-checkout-right {
        grid-column: 1 / -1 !important;
    }
    .ff-checkout-right {
        position: static !important;
    }
}

@media (max-width: 600px) {
    .ff-checkout-wrap {
        padding: 24px 14px 60px !important;
    }
    .woocommerce-checkout .form-row-first,
    .woocommerce-checkout .form-row-last {
        display: block !important;
        width: 100% !important;
    }
    .woocommerce-checkout .form-row-first { margin-right: 0 !important; }
    .woocommerce-checkout-review-order { padding: 16px !important; }
    .woocommerce-form-coupon-toggle { padding: 0 14px !important; }
}
