/* ==========================================================================
   GoFit — branded skin for the MAIN-STORE (non-SPIRO) WooCommerce checkout.
   Scoped to body.gofit-checkout. CSS ONLY — it restyles the standard checkout
   markup (no template/hook/field-logic changes), so the SPIRO funnel checkout
   and the payment/logistics flow are untouched. Brand: navy + warm ivory + amber.
   ========================================================================== */

body.gofit-checkout{
  --ink:#141d33; --ink2:#0f1626; --paper:#efe9da; --paper2:#f6f1e4; --card:#fbf8ef;
  --lime:#e8a23d; --limeInk:#7a5518; --limeTint:rgba(232,162,61,.14); --limeTintB:rgba(232,162,61,.42);
  --muted:#5d6276; --line:rgba(20,29,51,.14);
  --serif:'Noto Serif TC',serif; --sans:'Noto Sans TC',sans-serif;
  background:var(--paper); color:var(--ink);
  font-family:var(--sans); -webkit-font-smoothing:antialiased;
}

/* hidden helper field (billing_country default TW) */
body.gofit-checkout .gofit-co-hidden{display:none !important}

/* ---- page + 2-column layout (contact/shipping left · order summary right) ---- */
body.gofit-checkout .woocommerce{max-width:1080px;margin:0 auto;padding:clamp(18px,4vw,44px) clamp(14px,4vw,26px)}
/* Single clean centered column: robust against WooCommerce's stray #order_review_heading
   3rd child (which broke the 2-col grid). Order: contact → 送貨 → 備註 → Your order. */
body.gofit-checkout form.checkout.woocommerce-checkout{
  display:block; max-width:600px; margin:0 auto;
}
body.gofit-checkout #customer_details{min-width:0}
body.gofit-checkout #order_review, body.gofit-checkout #order_review_heading{min-width:0}
body.gofit-checkout #order_review_heading{margin:26px 0 0}

/* ---- section cards ---- */
body.gofit-checkout .woocommerce-billing-fields,
body.gofit-checkout .woocommerce-shipping-fields,
body.gofit-checkout .woocommerce-additional-fields,
body.gofit-checkout #order_review{
  background:var(--card); border:1px solid var(--line); border-radius:16px;
  padding:clamp(18px,2.4vw,26px); margin:0 0 18px;
}
body.gofit-checkout #order_review{margin:0}

/* ---- headings ---- */
body.gofit-checkout h3,
body.gofit-checkout .woocommerce-billing-fields > h3,
body.gofit-checkout #order_review_heading,
body.gofit-checkout #ship-to-different-address label{
  font-family:var(--serif); font-size:clamp(18px,2.2vw,22px); font-weight:700; color:var(--ink);
  margin:0 0 16px; line-height:1.3;
}

/* ---- form rows + inputs ---- */
body.gofit-checkout .form-row{margin:0 0 15px; padding:0}
body.gofit-checkout .form-row label{
  display:block; font-size:13px; font-weight:600; color:var(--ink); margin:0 0 6px; letter-spacing:.01em;
}
body.gofit-checkout .required{color:var(--lime); border:0}
body.gofit-checkout .input-text,
body.gofit-checkout input[type="text"],
body.gofit-checkout input[type="tel"],
body.gofit-checkout input[type="email"],
body.gofit-checkout textarea,
body.gofit-checkout select,
body.gofit-checkout .select2-container .select2-selection--single{
  width:100%; background:#fff; border:1px solid var(--line); border-radius:10px;
  padding:12px 14px; font-size:15px; line-height:1.5; color:var(--ink); font-family:var(--sans);
  min-height:46px; box-sizing:border-box; transition:border-color .15s, box-shadow .15s;
}
body.gofit-checkout .select2-container .select2-selection--single{display:flex; align-items:center}
body.gofit-checkout .input-text:focus,
body.gofit-checkout select:focus,
body.gofit-checkout textarea:focus{
  outline:none; border-color:var(--lime); box-shadow:0 0 0 3px var(--limeTint);
}
body.gofit-checkout ::placeholder{color:#9aa0b0}

/* ---- order review table ---- */
body.gofit-checkout .woocommerce-checkout-review-order-table{width:100%; font-size:14.5px; border:0; margin:0}
body.gofit-checkout .woocommerce-checkout-review-order-table th,
body.gofit-checkout .woocommerce-checkout-review-order-table td{
  padding:11px 0; border-bottom:1px solid var(--line); text-align:right; color:var(--muted);
}
body.gofit-checkout .woocommerce-checkout-review-order-table .product-name{text-align:left; color:var(--ink); font-weight:600}
body.gofit-checkout .woocommerce-checkout-review-order-table .cart_item td{color:var(--ink)}
body.gofit-checkout .woocommerce-checkout-review-order-table tfoot th{text-align:left; color:var(--ink); font-weight:600}
body.gofit-checkout .order-total th,
body.gofit-checkout .order-total td{border-bottom:0; padding-top:14px; font-size:16px}
body.gofit-checkout .order-total .amount,
body.gofit-checkout .order-total bdi{color:var(--limeInk); font-family:var(--serif); font-size:22px; font-weight:700}

/* ---- payment box ---- */
body.gofit-checkout #payment{background:transparent; border-radius:0}
body.gofit-checkout #payment ul.payment_methods{
  background:#fff; border:1px solid var(--line); border-radius:12px; padding:8px 14px; margin:0 0 16px;
}
body.gofit-checkout #payment ul.payment_methods li{border:0; margin:0}
body.gofit-checkout #payment div.payment_box{background:var(--paper2); border-radius:10px; color:var(--muted); font-size:13px}
body.gofit-checkout #payment div.payment_box::before{border-bottom-color:var(--paper2)}

/* ---- place-order button ---- */
body.gofit-checkout #place_order,
body.gofit-checkout button.checkout-button,
body.gofit-checkout #payment #place_order{
  width:100%; background:var(--lime); color:var(--ink); border:0; border-radius:12px;
  padding:16px 22px; font-size:17px; font-weight:700; font-family:var(--sans);
  letter-spacing:.02em; cursor:pointer; box-shadow:0 6px 18px rgba(232,162,61,.32);
  transition:transform .12s, box-shadow .12s, filter .12s;
}
body.gofit-checkout #place_order:hover{transform:translateY(-1px); filter:brightness(1.03); box-shadow:0 10px 24px rgba(232,162,61,.42)}
body.gofit-checkout #place_order:active{transform:translateY(0)}

/* ---- misc polish ---- */
body.gofit-checkout .woocommerce-info,
body.gofit-checkout .woocommerce-form-login-toggle .woocommerce-info{
  background:var(--limeTint); border-top:3px solid var(--lime); color:var(--ink); border-radius:10px;
}
body.gofit-checkout .woocommerce-privacy-policy-text{font-size:12px; color:var(--muted); margin-top:14px}
body.gofit-checkout abbr[title]{text-decoration:none}
body.gofit-checkout a{color:var(--limeInk)}
/* trust strip under the button */
body.gofit-checkout #order_review::after{
  content:"🔒 SSL 加密交易 · 不儲存完整卡號 · 全台免運";
  display:block; text-align:center; margin-top:14px;
  font-family:var(--sans); font-size:12px; color:var(--muted);
}

/* ---- FIX malformed layout: the theme's #customer_details/#order_review width:48%
   + float shrinks the CSS-grid columns to ~half → mispositioned. Force the grid
   children to fill their columns. (2026-07) ---- */
body.gofit-checkout #customer_details,
body.gofit-checkout #order_review{
  width:100% !important; max-width:none !important; float:none !important; margin:0 !important;
}
body.gofit-checkout .col2-set .col-1,
body.gofit-checkout .col2-set .col-2{ width:100% !important; float:none !important; }
