/* ==========================================================================
   TRAILGUARD TOPPERS – Contact, Cart, Checkout and Order-received pages
   Everything is scoped under .atc-page so theme defaults can't leak in.
   ========================================================================== */
.atc-page {
  --atc-navy: #0a0a5c;
  --atc-ink: #1d2024;
  --atc-text: #3b3f45;
  --atc-muted: #6b7280;
  --atc-line: #e5e7eb;
  --atc-soft: #f6f7f9;
  --atc-accent: #f26a1b;
  --atc-ok: #15803d;
  --atc-err: #b91c1c;
  --atc-radius: 12px;
  max-width: 1216px;
  margin: 0 auto;
  padding: 36px 0 72px;
  color: var(--atc-text);
  font-size: 16px;
  line-height: 1.6;
  box-sizing: border-box;
}
.atc-page *, .atc-page *::before, .atc-page *::after { box-sizing: border-box; }
.atc-page a { color: var(--atc-navy); }
.atc-page h1, .atc-page h2, .atc-page h3 { color: var(--atc-ink); font-weight: 700; letter-spacing: -.01em; }

/* ---------- page heading ---------- */
.atc-page-head { margin: 0 0 32px; max-width: 720px; }
.atc-eyebrow { display: inline-block; margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--atc-accent); }
.atc-page .atc-page-title { margin: 0 0 12px; font-size: 40px; line-height: 1.15; }
.atc-lead { margin: 0; font-size: 18px; color: var(--atc-text); }

/* ---------- panels / headings ---------- */
.atc-panel { background: #fff; border: 1px solid var(--atc-line); border-radius: var(--atc-radius); padding: 28px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .04); }
.atc-page .atc-h2 { margin: 0 0 18px; font-size: 22px; line-height: 1.3; }
.atc-page .atc-h3 { margin: 22px 0 6px; font-size: 16px; }
.atc-muted { color: var(--atc-muted); margin: 6px 0 0; }
.atc-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.atc-center { justify-content: center; }

/* ---------- buttons / links ---------- */
.atc-page .atc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 12px 24px; border-radius: 8px; border: 1.5px solid var(--atc-ink); background: #fff; color: var(--atc-ink); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease; }
.atc-page .atc-btn:hover { background: var(--atc-ink); color: #fff; }
.atc-page .atc-btn-primary { background: var(--atc-navy); border-color: var(--atc-navy); color: #fff; }
.atc-page .atc-btn-primary:hover { background: #07073f; border-color: #07073f; color: #fff; transform: translateY(-1px); }
.atc-page .atc-btn-light { border-color: var(--atc-line); background: var(--atc-soft); }
.atc-page .atc-btn-block { display: flex; width: 100%; }
.atc-page .atc-btn-lg { min-height: 54px; font-size: 14px; }
.atc-page .atc-btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.atc-page .atc-btn:focus-visible, .atc-page a:focus-visible, .atc-page .atc-link-btn:focus-visible { outline: 3px solid rgba(10, 10, 92, .35); outline-offset: 2px; }
.atc-btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.atc-page .atc-link { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; text-decoration: none; }
.atc-page .atc-link:hover { text-decoration: underline; }
.atc-page .atc-link-btn { padding: 0; border: 0; background: none; color: var(--atc-navy); font-size: 14px; font-weight: 600; text-decoration: underline; cursor: pointer; }
.atc-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 0; font-size: 13px; color: var(--atc-muted); }

/* ---------- notices ---------- */
.atc-notice { margin: 14px 0; padding: 12px 16px; border-radius: 8px; font-size: 14px; border: 1px solid; }
.atc-notice.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.atc-notice.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.atc-notice a { color: inherit; font-weight: 700; }

/* ---------- forms ---------- */
.atc-page .atc-form fieldset { border: 0; margin: 0 0 28px; padding: 0; min-width: 0; }
.atc-page .atc-form legend { float: none; display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 16px; padding: 0 0 12px; border-bottom: 1px solid var(--atc-line); font-size: 18px; font-weight: 700; color: var(--atc-ink); }
.atc-step-n { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--atc-navy); color: #fff; font-size: 14px; font-weight: 700; flex: 0 0 28px; }
.atc-field { position: relative; margin: 0 0 16px; }
.atc-page .atc-field label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--atc-ink); }
.atc-field.required > label::after { content: " *"; color: var(--atc-err); }
.atc-opt { font-weight: 400; color: var(--atc-muted); font-size: 13px; }
.atc-page .atc-field input:not([type="checkbox"]):not([type="radio"]),
.atc-page .atc-field select,
.atc-page .atc-field textarea,
.atc-page .atc-coupon input {
  display: block; width: 100%; min-height: 48px; margin: 0; padding: 11px 14px;
  border: 1.5px solid #d1d5db; border-radius: 8px; background: #fff; color: var(--atc-ink);
  font-family: inherit; font-size: 15px; line-height: 1.4; box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.atc-page .atc-field textarea { min-height: 130px; resize: vertical; }
.atc-page .atc-field input::placeholder, .atc-page .atc-field textarea::placeholder { color: #9ca3af; }
.atc-page .atc-field input:focus, .atc-page .atc-field select:focus, .atc-page .atc-field textarea:focus, .atc-page .atc-coupon input:focus { outline: none; border-color: var(--atc-navy); box-shadow: 0 0 0 3px rgba(10, 10, 92, .15); }
.atc-field.has-error input, .atc-field.has-error select, .atc-field.has-error textarea { border-color: var(--atc-err); background: #fffafa; }
.atc-field-error { display: block; margin-top: 6px; font-size: 13px; color: var(--atc-err); }
.atc-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.atc-row3 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.atc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.atc-choices { display: grid; gap: 10px; }
.atc-page .atc-choice { position: relative; display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 14px 16px; border: 1.5px solid var(--atc-line); border-radius: 10px; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.atc-page .atc-choice:hover { border-color: #c7c9d1; }
.atc-page .atc-choice:has(input:checked) { border-color: var(--atc-navy); background: #f5f5fc; }
.atc-page .atc-choice input { margin: 4px 0 0; width: 18px; height: 18px; accent-color: var(--atc-navy); flex: 0 0 18px; }
.atc-page .atc-choice > span { display: flex; flex: 1; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; font-weight: 600; color: var(--atc-ink); }
.atc-page .atc-choice em { font-style: normal; font-weight: 600; color: var(--atc-muted); }
.atc-page .atc-choice small { flex-basis: 100%; font-weight: 400; color: var(--atc-muted); font-size: 13px; }
.atc-hint { margin: 12px 0 0; font-size: 13px; color: var(--atc-muted); }
.atc-page .atc-check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400 !important; font-size: 14px !important; cursor: pointer; }
.atc-page .atc-check input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--atc-navy); flex: 0 0 18px; }
.atc-terms { margin: 4px 0 20px; }

/* ---------- coupon ---------- */
.atc-coupon { display: flex; gap: 10px; }
.atc-page .atc-coupon input { flex: 1; min-width: 0; }
.atc-page .atc-coupon .atc-btn { white-space: nowrap; padding: 10px 18px; }
.atc-coupon-applied { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 8px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; font-size: 14px; }

/* ---------- totals ---------- */
.atc-totals { margin: 18px 0; }
.atc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--atc-line); font-size: 15px; }
.atc-row small { color: var(--atc-muted); }
.atc-row-discount strong { color: var(--atc-ok); }
.atc-row-total { border-bottom: 0; padding-top: 16px; font-size: 18px; font-weight: 700; color: var(--atc-ink); }
.atc-row-total strong { font-size: 24px; color: var(--atc-navy); }
.atc-ship { border: 0; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--atc-line); min-width: 0; }
.atc-page .atc-ship legend { float: none; width: auto; padding: 0; margin: 0 0 8px; font-size: 15px; font-weight: 400; border: 0; color: var(--atc-text); }
.atc-ship .atc-choice { padding: 10px 14px; margin-bottom: 8px; }

/* ---------- cart ---------- */
.atc-cart { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.atc-cart-main { padding: 8px 28px 24px; }
.atc-lines-head, .atc-line { display: grid; grid-template-columns: minmax(0, 1fr) 128px 110px 36px; gap: 18px; align-items: center; }
.atc-lines-head { padding: 16px 0 12px; border-bottom: 2px solid var(--atc-line); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--atc-muted); }
.atc-lines-head span:nth-child(2) { text-align: center; }
.atc-lines-head span:nth-child(3) { text-align: right; }
.atc-line { position: relative; padding: 20px 0; border-bottom: 1px solid var(--atc-line); }
.atc-line-info { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 16px; align-items: center; }
.atc-line-img { width: 96px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--atc-soft); }
.atc-line-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.atc-line-name { font-weight: 600; font-size: 16px; line-height: 1.35; color: var(--atc-ink) !important; text-decoration: none; }
.atc-line-name:hover { color: var(--atc-navy) !important; }
.atc-line-cat, .atc-line-unit { display: block; font-size: 12px; color: var(--atc-muted); }
.atc-line-cat { text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.atc-qty { display: inline-flex; align-items: stretch; justify-self: center; border: 1.5px solid #d1d5db; border-radius: 8px; overflow: hidden; height: 42px; background: #fff; }
.atc-page .atc-qty button { width: 38px; border: 0; background: var(--atc-soft); color: var(--atc-ink); font-size: 18px; line-height: 1; cursor: pointer; padding: 0; transition: background .15s ease; }
.atc-page .atc-qty button:hover { background: #e5e7eb; }
.atc-page .atc-qty input { width: 48px; min-height: 0; height: 100%; border: 0; border-left: 1px solid var(--atc-line); border-right: 1px solid var(--atc-line); border-radius: 0; padding: 0; text-align: center; font-size: 15px; font-weight: 600; background: #fff; box-shadow: none; -moz-appearance: textfield; }
.atc-page .atc-qty input::-webkit-outer-spin-button, .atc-page .atc-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.atc-line-total { text-align: right; font-weight: 700; font-size: 17px; color: var(--atc-ink); }
.atc-page .atc-remove { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--atc-muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 0; transition: background .15s ease, color .15s ease; }
.atc-page .atc-remove:hover { background: #fee2e2; color: var(--atc-err); }
.atc-cart-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; }
.atc-cart-foot .atc-coupon, .atc-cart-foot .atc-coupon-applied { flex: 1 1 320px; max-width: 460px; }
.atc-cart-foot .atc-link { margin: 0; }
.atc-cart-side { position: sticky; top: 20px; }
.atc-cart-side .atc-btn-block { margin-top: 8px; }

/* ---------- empty states ---------- */
.atc-empty { max-width: 560px; margin: 24px auto 40px; padding: 56px 28px; text-align: center; background: var(--atc-soft); border-radius: var(--atc-radius); }
.atc-empty-icon { display: inline-flex; margin-bottom: 14px; color: #9ca3af; }
.atc-page .atc-empty h2 { margin: 0 0 10px; font-size: 26px; }
.atc-empty p { margin: 0 auto 24px; max-width: 440px; color: var(--atc-muted); }
.atc-empty .atc-btn-row { justify-content: center; }
[data-suggestions] .atc-section-head { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 20px; padding-bottom: 12px; border-bottom: 2px solid var(--atc-line); }
[data-suggestions] .atc-section-title { margin: 0; font-size: 22px; }
[data-suggestions] .atc-section-link { font-size: 14px; font-weight: 600; text-decoration: none; }

/* ---------- checkout ---------- */
.atc-checkout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: start; }
.atc-summary { position: sticky; top: 20px; background: var(--atc-soft); }
.atc-sum-lines { margin: 0 0 16px; }
.atc-sum-line { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--atc-line); font-size: 14px; }
.atc-sum-img { position: relative; display: block; width: 56px; height: 44px; }
.atc-sum-img img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.atc-sum-img b { position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--atc-ink); color: #fff; font-size: 11px; line-height: 20px; text-align: center; }
.atc-sum-name, .atc-sum-name a { font-weight: 600; color: var(--atc-ink); line-height: 1.35; text-decoration: none; }
.atc-summary .atc-coupon-applied, .atc-summary .atc-coupon { margin-bottom: 4px; }

/* ---------- order received ---------- */
.atc-thanks { max-width: 680px; margin: 0 auto 32px; text-align: center; }
.atc-thanks-icon { display: inline-flex; margin-bottom: 8px; color: var(--atc-ok); }
.atc-page .atc-thanks h2 { margin: 0 0 10px; font-size: 30px; }
.atc-thanks p { margin: 0; color: var(--atc-text); }
.atc-order-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0 0 28px; border: 1px solid var(--atc-line); border-radius: var(--atc-radius); background: var(--atc-soft); overflow: hidden; }
.atc-order-meta > div { padding: 18px 20px; border-right: 1px solid var(--atc-line); min-width: 0; }
.atc-order-meta > div:last-child { border-right: 0; }
.atc-order-meta span { display: block; margin-bottom: 4px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--atc-muted); }
.atc-order-meta strong { display: block; font-size: 16px; color: var(--atc-ink); overflow-wrap: anywhere; }
.atc-order-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-bottom: 32px; }
.atc-address { font-style: normal; line-height: 1.7; color: var(--atc-ink); }

/* ---------- contact ---------- */
.atc-contact-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.atc-contact .atc-form-panel { padding: 36px; }
.atc-contact .atc-form-panel > .atc-h2 { font-size: 26px; margin-bottom: 6px; }
.atc-form-sub { margin: 0 0 24px; color: var(--atc-muted); }
.atc-group-label { display: block; margin: 6px 0 12px; font-size: 14px; font-weight: 700; color: var(--atc-ink); }
.atc-group-label span { font-weight: 400; color: var(--atc-muted); }
.atc-contact-success { text-align: center; padding: 28px 8px; }
.atc-contact-success .atc-thanks-icon { margin-bottom: 12px; }
.atc-page .atc-contact-success h2 { margin: 0 0 10px; font-size: 26px; }
.atc-contact-success p { margin: 0 auto 22px; max-width: 460px; }
.atc-contact-side { display: grid; gap: 16px; }
.atc-info-card { display: flex; gap: 16px; padding: 22px; border: 1px solid var(--atc-line); border-radius: var(--atc-radius); background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.atc-info-icon { flex: 0 0 44px; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #eceefb; color: var(--atc-navy); }
.atc-page .atc-info-card h3 { margin: 0 0 6px; font-size: 16px; }
.atc-info-card p { margin: 0; font-size: 15px; line-height: 1.55; }
.atc-info-card a { text-decoration: none; font-weight: 600; }
.atc-info-card a:hover { text-decoration: underline; }
.atc-info-card .atc-addr + .atc-addr { margin-top: 10px; }
.atc-info-card-dark { background: var(--atc-ink); border-color: var(--atc-ink); flex-direction: column; gap: 6px; }
.atc-page .atc-info-card-dark h3 { color: #fff; font-size: 18px; }
.atc-info-card-dark p { color: #d1d5db; }
.atc-page .atc-info-card-dark .atc-btn { margin-top: 14px; background: #fff; color: var(--atc-ink); border-color: #fff; align-self: flex-start; }
.atc-page .atc-info-card-dark .atc-btn:hover { background: var(--atc-accent); border-color: var(--atc-accent); color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1255px) { .atc-page { padding-left: 20px; padding-right: 20px; } }
@media (max-width: 991px) {
  .atc-cart, .atc-checkout, .atc-contact-grid, .atc-order-grid { grid-template-columns: 1fr; }
  .atc-cart-side, .atc-summary { position: static; }
  .atc-checkout .atc-summary { order: -1; }
  .atc-order-meta { grid-template-columns: repeat(2, 1fr); }
  .atc-order-meta > div:nth-child(2) { border-right: 0; }
  .atc-order-meta > div:nth-child(-n+2) { border-bottom: 1px solid var(--atc-line); }
}
@media (max-width: 640px) {
  .atc-page { padding-top: 24px; padding-bottom: 48px; }
  .atc-page .atc-page-title { font-size: 30px; }
  .atc-lead { font-size: 16px; }
  .atc-panel, .atc-contact .atc-form-panel { padding: 20px 18px; }
  .atc-cart-main { padding: 4px 16px 20px; }
  .atc-lines-head { display: none; }
  .atc-line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "info remove" "qty total"; gap: 14px 12px; }
  .atc-line .atc-line-info { grid-area: info; }
  .atc-line .atc-remove { grid-area: remove; align-self: start; }
  .atc-line .atc-qty { grid-area: qty; justify-self: start; }
  .atc-line .atc-line-total { grid-area: total; }
  .atc-line-info { grid-template-columns: 72px minmax(0, 1fr); }
  .atc-line-img { width: 72px; height: 56px; }
  .atc-row2 { grid-template-columns: 1fr; gap: 0; }
  .atc-row3 { grid-template-columns: 1fr 1fr; }
  .atc-order-meta { grid-template-columns: 1fr 1fr; }
  .atc-cart-foot { flex-direction: column; align-items: stretch; }
  .atc-cart-foot .atc-coupon, .atc-cart-foot .atc-coupon-applied { flex: 0 0 auto; max-width: none; }
  .atc-page .atc-thanks h2 { font-size: 24px; }
}

/* ---------- checkout progress steps ---------- */
.atc-steps { margin: 0 0 28px; }
.atc-steps ol { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; list-style: none; }
.atc-steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--atc-muted); }
.atc-steps li span { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid #d1d5db; font-size: 13px; }
.atc-steps li + li::before { content: ""; width: 28px; height: 1.5px; background: #d1d5db; margin-right: 18px; }
.atc-steps li.is-current { color: var(--atc-ink); }
.atc-steps li.is-current span { background: var(--atc-navy); border-color: var(--atc-navy); color: #fff; }
.atc-steps li.is-done { color: var(--atc-ok); }
.atc-steps li.is-done span { background: var(--atc-ok); border-color: var(--atc-ok); color: #fff; }
.atc-page [hidden] { display: none !important; }
@media (max-width: 640px) { .atc-steps li + li::before { display: none; } .atc-steps ol { gap: 8px 18px; } }
