/* AP Checkout — pay.americanpeptides.us. Tokens = the storefront's (ap-shop globals.css). */
:root {
  --navy: #0a1220; --navy-2: #0f1a2e; --navy-3: #14213d;
  --red: #da303d; --red-hi: #e84450;
  --cream: #f6f1e7; --cream-2: #efe7d6;
  --ink: #0a1220; --muted: #5b6b86; --line: rgba(10, 18, 32, .1);
  --green: #1f8f5f; --green-bg: #e8f6ee; --gold: #b8860b;
  --radius: 14px; --maxw: 1180px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--cream); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.01em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }

/* ---------- chrome ---------- */
.ap-header { background: #fff; color: var(--ink); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px -8px rgba(10,18,32,.25); }
.ap-header__in { max-width: var(--maxw); margin: 0 auto; padding: 12px 20px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.ap-header__logo img { height: 42px; width: auto; }
.ap-header__secure { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--navy-3); background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.ap-header__secure svg { color: var(--green); }
.ap-header__back { justify-self: end; font-size: 13px; color: var(--muted); text-decoration: none; font-weight: 600; }
.ap-header__back:hover { color: var(--ink); }
.ap-main { max-width: var(--maxw); margin: 0 auto; padding: 22px 20px 48px; }
.ap-footer { background: var(--navy); color: #cfd7e8; padding: 30px 20px 26px; margin-top: 20px; }
.ap-trust { list-style: none; margin: 0 auto; padding: 0; max-width: var(--maxw); display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ap-trust li { display: grid; grid-template-columns: 30px 1fr; gap: 0 10px; align-items: center; }
.ap-trust__ico { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.08); color: #ffb347; display: grid; place-items: center; font-size: 14px; }
.ap-trust b { color: #fff; font-size: 13.5px; }
.ap-trust small { font-size: 12px; color: #9fb0cf; }
.ap-footer__ruo { max-width: var(--maxw); margin: 22px auto 6px; font-size: 12px; color: #8e9dbb; }
.ap-footer__links { max-width: var(--maxw); margin: 0 auto; font-size: 12px; color: #8e9dbb; }
.ap-footer__links a { color: #cfd7e8; text-decoration: none; }

/* ---------- cards + type ---------- */
.ap-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px; box-shadow: 0 1px 2px rgba(10,18,32,.04), 0 10px 30px -22px rgba(10,18,32,.25); }
.ap-card + .ap-card { margin-top: 16px; }
.ap-h { font-family: var(--serif); font-weight: 600; font-size: 24px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.ap-h--summary { font-size: 20px; margin-bottom: 12px; }
.ap-h--page { font-size: 28px; }
.ap-step { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font: 700 13px/26px var(--font); text-align: center; flex: none; }
.ap-prose { font-size: 15px; }

/* ---------- layout ---------- */
.ap-co__grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 22px; align-items: start; }
.ap-co__side { position: sticky; top: 76px; }
.ap-co__toggle { display: none; }

/* ---------- notices ---------- */
.woocommerce-NoticeGroup, .woocommerce-notices-wrapper { grid-column: 1 / -1; }
.woocommerce-error, .woocommerce-message, .woocommerce-info { list-style: none; margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.woocommerce-error { background: #fdecee; color: #8a1c25; border: 1px solid #f5c2c7; }
.woocommerce-error li + li { margin-top: 4px; }
.woocommerce-message { background: var(--green-bg); color: #145c3c; border: 1px solid #bfe3cf; }
.woocommerce-info { background: #eef3fb; color: var(--navy-3); border: 1px solid #cfdcf3; }
.woocommerce-message .button, .woocommerce-info .button { display: none; }

/* ---------- fields ---------- */
.woocommerce-billing-fields h3, .woocommerce-shipping-fields, .woocommerce-additional-fields, #ship-to-different-address { display: none; }
.woocommerce-billing-fields__field-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 12px; }
.form-row { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.form-row-wide, .form-row.ap-country { grid-column: 1 / -1; }
.form-row-first, .form-row-last { grid-column: span 1; }
.form-row label { font-size: 13px; font-weight: 600; color: var(--navy-3); }
.form-row label .required { color: var(--red); text-decoration: none; }
.form-row label .optional { color: var(--muted); font-weight: 400; }
.ap-country, #billing_country_field { display: none; } /* US only — WooCommerce still submits the value */
.input-text, .form-row input[type="text"], .form-row input[type="email"], .form-row input[type="tel"], .form-row select, .select2-container .select2-selection--single, .payment_box input, .payment_box select {
  width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid #d6dbe6; border-radius: 10px; background: #fff; font: 500 15px var(--font); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.form-row input:focus, .form-row select:focus, .payment_box input:focus, .select2-container--open .select2-selection--single { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(10,18,32,.12); }
.select2-container .select2-selection--single .select2-selection__rendered { line-height: 46px; padding-left: 14px; color: var(--ink); font-size: 15px; }
.select2-container .select2-selection--single .select2-selection__arrow { height: 46px; right: 8px; }
.select2-dropdown { border: 1.5px solid #d6dbe6; border-radius: 10px; font-family: var(--font); }
.woocommerce-invalid input, .woocommerce-invalid select { border-color: var(--red) !important; }
::placeholder { color: #9aa6ba; }

/* ---------- payment ---------- */
.ap-pay__note { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); margin: -6px 0 14px; }
.woocommerce-checkout-payment { margin: 0; }
.wc_payment_methods { list-style: none; margin: 0; padding: 0; border: 1.5px solid #d6dbe6; border-radius: 12px; overflow: hidden; }
.wc_payment_method { border-top: 1.5px solid #e4e8f0; }
.wc_payment_method:first-child { border-top: 0; }
.wc_payment_method > label { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 0; cursor: pointer; font-weight: 600; font-size: 15px; }
.wc_payment_method > input[type="radio"] { position: absolute; opacity: 0; }
.wc_payment_method > label::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c3cad8; flex: none; box-sizing: border-box; }
.wc_payment_method > input[type="radio"]:checked + label::before { border: 6px solid var(--navy); }
.wc_payment_method > input[type="radio"]:checked + label { background: #f7f8fc; }
.wc_payment_method img { max-height: 22px; width: auto; margin-left: auto; }
.payment_box { background: #f7f8fc; padding: 4px 16px 18px; font-size: 14px; color: var(--navy-3); }
.payment_box p { margin: 10px 0; }
.payment_box fieldset { border: 0; padding: 0; margin: 0; }
.payment_box .form-row { margin-top: 10px; }
.payment_box label { font-size: 13px; font-weight: 600; color: var(--navy-3); }
.payment_method_merchantcore .payment_box::before { content: "Visa · Mastercard · Amex · Discover"; display: block; font-size: 12px; color: var(--muted); letter-spacing: .02em; margin-top: 8px; }
.woocommerce-privacy-policy-text p, .ap-consents label { font-size: 12.5px; color: var(--muted); }
.woocommerce-privacy-policy-text { margin: 16px 0 4px; }
.ap-consents { margin: 8px 0 14px; display: grid; gap: 8px; }
.ap-consents .form-row { flex-direction: row; align-items: flex-start; gap: 10px; }
.ap-consents input[type="checkbox"] { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--navy); flex: none; }
.ap-consents label { font-size: 13px; color: var(--ink); font-weight: 500; cursor: pointer; }
.place-order { margin: 0; padding: 0; }
#place_order, .ap-btn { display: block; width: 100%; height: 56px; border: 0; border-radius: 12px; background: var(--red); color: #fff; font: 700 16px var(--font); letter-spacing: .01em; cursor: pointer; text-align: center; line-height: 56px; text-decoration: none; transition: background .15s, transform .05s; box-shadow: 0 10px 24px -12px rgba(218,48,61,.7); }
#place_order:hover, .ap-btn:hover { background: var(--red-hi); }
#place_order:active { transform: translateY(1px); }
.ap-btn--ghost { background: var(--navy); box-shadow: none; }
.ap-pay .woocommerce-terms-and-conditions-wrapper { margin-bottom: 10px; }
.blockUI.blockOverlay { border-radius: var(--radius); }

/* ---------- order summary ---------- */
.ap-lines { list-style: none; margin: 0; padding: 0; }
.ap-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ap-line:last-child { border-bottom: 0; }
.ap-line__thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; background: var(--cream-2); border: 1px solid var(--line); }
.ap-line__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; border-radius: 10px; }
.ap-line__qty { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.ap-line__name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.ap-line__deal { font-size: 12px; color: var(--green); font-weight: 600; margin-top: 2px; }
.ap-line--gift .ap-line__deal { color: var(--gold); }
.ap-gift { display: none; }
.ap-line__price { text-align: right; font-size: 14px; font-weight: 600; display: grid; }
.ap-line__price del { color: var(--muted); font-weight: 400; font-size: 12px; }
.ap-line__price ins { text-decoration: none; color: var(--green); }
.ap-totals { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.ap-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 5px 0; font-size: 14px; color: var(--navy-3); }
.ap-row--save { color: var(--green); font-weight: 600; }
.ap-row--save b { font-weight: 700; }
.ap-remove { color: var(--muted); text-decoration: none; margin-left: 6px; font-weight: 400; }
.ap-remove:hover { color: var(--red); }
.ap-ship { text-align: right; }
.ap-ship__methods { display: grid; justify-items: end; }
.ap-ship__one { font-weight: 600; }
.ap-ship__one--free { color: var(--green); font-weight: 700; }
.ap-ship__label { font-size: 12px; color: var(--muted); font-weight: 400; }
.ap-ship__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ap-ship__list li { display: flex; gap: 6px; align-items: center; justify-content: flex-end; font-size: 13px; }
.ap-ship__list input { accent-color: var(--navy); margin: 0; }
.ap-meter { margin: 2px 0 6px; }
.ap-meter__bar { height: 6px; border-radius: 3px; background: var(--cream-2); overflow: hidden; margin-bottom: 5px; }
.ap-meter__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy-3), var(--red)); border-radius: 3px; }
.ap-meter small { font-size: 12px; color: var(--muted); }
.ap-meter--done small { color: var(--green); font-weight: 600; }
.ap-row--total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink); }
.ap-row--total .woocommerce-Price-amount { font-weight: 700; }
.ap-savings { margin-top: 8px; padding: 9px 12px; border-radius: 10px; background: var(--green-bg); color: #145c3c; font-size: 13px; font-weight: 600; }
.ap-coupon { margin-top: 14px; border: 1px dashed var(--navy-3); border-radius: 12px; padding: 12px 14px; background: #fff; }
.ap-coupon summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--navy-3); list-style: none; display: flex; align-items: center; gap: 6px; }
.ap-coupon summary::-webkit-details-marker { display: none; }
.ap-coupon summary::before { content: "+"; width: 18px; height: 18px; border-radius: 50%; background: var(--cream-2); display: inline-grid; place-items: center; font-size: 13px; }
.ap-coupon[open] summary::before { content: "–"; }
.ap-coupon__form { display: flex !important; gap: 8px; margin: 10px 0 0; }
.ap-coupon__form .input-text { height: 44px; text-transform: uppercase; flex: 1; border: 1.5px solid var(--navy-3); border-radius: 10px; padding: 0 12px; font: 600 14px var(--font); letter-spacing: .04em; }
.ap-coupon__form .button { height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--navy); color: #fff; font: 700 14px var(--font); cursor: pointer; }
.ap-coupon__form .button.is-busy { opacity: .6; cursor: wait; }
.ap-coupon__msg { font-size: 13px; margin-top: 8px; min-height: 1em; }
.ap-coupon__msg.is-ok { color: #1f7a3a; }
.ap-coupon__msg.is-err { color: var(--red); }

/* ---------- order bumps ---------- */
.ap-bumps { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.ap-bumps__h { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.ap-bumps__h::after { content: "20% off, this order only"; display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--green-bg); color: var(--green); font-size: 11px; letter-spacing: 0; text-transform: none; }
.cf-turnstile { display: flex; justify-content: center; }
.ap-bump { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px; margin-bottom: 8px; border: 1.5px solid #e1e6ef; border-radius: 12px; background: #fff; cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit; transition: border-color .15s, background .15s; }
.ap-bump:hover { border-color: var(--navy-3); }
.ap-bump.is-in { border-color: var(--green); background: var(--green-bg); }
.ap-bump.is-busy { opacity: .6; pointer-events: none; }
.ap-bump__img { width: 52px; height: 52px; border-radius: 9px; background: var(--cream-2); overflow: hidden; }
.ap-bump__img img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.ap-bump__name { display: block; font-weight: 700; font-size: 13.5px; line-height: 1.25; }
.ap-bump__why { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.ap-free { color: var(--green); }
.ap-bump--deal .ap-bump__why { color: var(--green); font-weight: 600; }
.ap-bump__cta { display: grid; justify-items: end; gap: 4px; }
.ap-bump__price { font-weight: 700; font-size: 14px; }
.ap-bump__price del { color: var(--muted); font-weight: 400; font-size: 12px; margin-right: 4px; }
.ap-bump__add { font-size: 12px; font-weight: 700; color: #fff; background: var(--navy); border-radius: 999px; padding: 4px 11px; }
.ap-bump.is-in .ap-bump__add { background: var(--green); }
.ap-bump.is-in .ap-bump__add::before { content: "✓ "; }

/* ---------- thank you ---------- */
.ap-thanks__hero { text-align: center; padding: 34px 22px; }
.ap-thanks .ap-back, .ap-thanks .woocommerce-order-details, .ap-thanks .woocommerce-customer-details { display: none; }
.ap-thanks__check { width: 56px; height: 56px; border-radius: 50%; background: var(--green-bg); color: var(--green); font-size: 28px; font-weight: 800; display: grid; place-items: center; margin: 0 auto 12px; }
.ap-thanks__hero .ap-h { justify-content: center; font-size: 32px; margin-bottom: 8px; }
.ap-thanks__lead { max-width: 560px; margin: 0 auto; color: var(--navy-3); font-size: 15px; }
.ap-thanks__bank { max-width: 560px; margin: 12px auto 0; padding: 12px; border-radius: 10px; background: #fff6e5; color: #7a4f00; font-size: 14px; }
.ap-thanks__hero--failed .ap-h { color: var(--red); }
.ap-thanks__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.ap-addr { font-style: normal; font-size: 14px; color: var(--navy-3); margin: 0 0 18px; line-height: 1.5; }
.ap-next { margin: 0 0 18px; padding-left: 20px; font-size: 14px; color: var(--navy-3); display: grid; gap: 6px; }

/* ---------- cart page (rarely seen) ---------- */
.woocommerce-cart-form, .cart-collaterals { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.shop_table.cart { width: 100%; border-collapse: collapse; font-size: 14px; }
.shop_table.cart th, .shop_table.cart td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.shop_table.cart img { width: 56px; }
.cart-empty { font-size: 16px; }
.return-to-shop .button, .wc-proceed-to-checkout .button, .woocommerce-cart .button { display: inline-block; padding: 0 18px; height: 46px; line-height: 46px; border: 0; border-radius: 10px; background: var(--navy); color: #fff; font: 700 14px var(--font); text-decoration: none; cursor: pointer; }
.wc-proceed-to-checkout .button { background: var(--red); width: 100%; text-align: center; margin-top: 10px; }

/* ---------- mobile ---------- */
@media (max-width: 960px) {
  .ap-header__in { grid-template-columns: 1fr auto; padding: 10px 16px; }
  .ap-header__logo img { height: 32px; }
  .ap-header__back { display: none; }
  .ap-main { padding: 14px 14px 36px; }
  .ap-co__grid { grid-template-columns: 1fr; gap: 14px; }
  .ap-co__side { position: static; order: -1; }
  .ap-co__toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 14px 16px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font: 600 15px var(--font); color: var(--navy-3); cursor: pointer; }
  .ap-co__toggle-label { display: inline-flex; align-items: center; gap: 6px; }
  .ap-co__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .ap-co__toggle-total { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--ink); }
  .ap-summary { display: none; }
  .ap-summary.is-open { display: block; }
  .ap-card { padding: 18px 16px 16px; }
  .ap-h { font-size: 21px; }
  .woocommerce-billing-fields__field-wrapper { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ap-trust { grid-template-columns: 1fr 1fr; }
  .ap-thanks__grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .form-row-first, .form-row-last { grid-column: 1 / -1; }
}
