:root {
  --primary: #ed1c24;
  --text: #000;
  --text-2: #707070;
  --border: #dedede;
  --border-focus: #ed1c24;
  --bg: #fff;
  --bg-summary: #f5f5f5;
  --muted-box: #f5f5f5;
  --error: #dd1d1d;
  --radius: 5px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
h2 { font-size: 21px; font-weight: 600; margin: 0 0 14px; letter-spacing: -.01em; }
h3 { font-size: 17px; font-weight: 600; margin: 0 0 14px; }
a { color: var(--primary); }
[hidden] { display: none !important; }

.site-header { border-bottom: 1px solid var(--border); background: #fff; }
.header-inner { max-width: 1160px; margin: 0 auto; padding: 22px 21px; display: flex; align-items: center; justify-content: center; position: relative; min-height: 96px; }
.brand { display: flex; align-items: center; gap: 0; }
.brand .trust { padding: 0 14px; font-size: 11px; font-weight: 700; line-height: 1.15; text-align: center; white-space: pre-line; letter-spacing: .02em; }
.brand .stars { color: #f5b301; font-size: 19px; letter-spacing: 1px; line-height: 1; margin-bottom: 3px; }
.brand .logo { color: inherit; text-decoration: none; }
.brand .logo { border-left: 1px solid #cfcfcf; border-right: 1px solid #cfcfcf; padding: 8px 18px; display: flex; align-items: center; min-height: 64px; background: var(--primary); border-radius: 6px; }
.brand .logo img { max-height: 46px; max-width: 170px; display: block; }
.brand .logo-text { font-family: Georgia, "Times New Roman", serif; font-size: 34px; letter-spacing: .01em; font-weight: 400; }
.brand.no-trust .logo { border: 0; }
.brand.right-only .logo { border-left: 0; }
.tp-badge { text-decoration: none; color: #191919; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 14px; }
.tp-star { display: block; flex: none; }
.tp-text { font-size: 13px; font-weight: 700; letter-spacing: .02em; line-height: 1; }
.cart-link { position: absolute; right: 21px; top: 50%; transform: translateY(-50%); color: var(--primary); display: flex; }

.layout { display: flex; min-height: calc(100vh - 97px); }
.main { flex: 1 1 54%; display: flex; justify-content: flex-end; }
.main-inner { width: 100%; max-width: 660px; padding: 38px 38px 60px 21px; }
.summary { flex: 1 1 46%; background: var(--bg-summary); border-left: 1px solid #e3e3e3; }
.summary-inner { max-width: 540px; padding: 38px 21px 38px 38px; position: sticky; top: 0; }
.summary-toggle { display: none; }

.section { margin-bottom: 34px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.sub { color: var(--text-2); margin: -8px 0 14px; }

.field { position: relative; margin-bottom: 14px; flex: 1; min-width: 0; }
.field input, .field select {
  width: 100%; height: 52px; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 12px 0; background: #fff; outline: none; font-size: 14px; appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:not(:placeholder-shown), .field input:focus { padding-top: 18px; }
.field label {
  position: absolute; left: 13px; top: 16px; color: var(--text-2); pointer-events: none;
  transition: transform .12s, font-size .12s, top .12s; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 40px);
}
.field input:focus + label, .field input:not(:placeholder-shown) + label, .field label.always { top: 7px; font-size: 12px; }
.field select { padding-top: 18px; padding-right: 34px; cursor: pointer; }
.field.select::after { content: ""; position: absolute; right: 16px; top: 22px; width: 7px; height: 7px; border-right: 1.6px solid #555; border-bottom: 1.6px solid #555; transform: rotate(45deg); pointer-events: none; }
.field input:focus, .field select:focus { border-color: var(--border-focus); box-shadow: 0 0 0 1px var(--border-focus); }
.field.invalid input, .field.invalid select { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.field .err { color: var(--error); font-size: 12.5px; margin-top: 5px; display: flex; gap: 5px; align-items: center; }
.field .err::before { content: "!"; display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--error); color: #fff; font-size: 10px; font-weight: 700; }
.field-icon { position: absolute; right: 14px; top: 17px; color: #707070; }
.tip { width: 18px; height: 18px; border: 1.5px solid #707070; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; cursor: help; top: 17px; }
.tip-text { display: none; position: absolute; bottom: 28px; right: -10px; width: 220px; background: #333; color: #fff; padding: 8px 10px; border-radius: 5px; font-size: 12px; font-weight: 400; line-height: 1.35; z-index: 5; }
.tip:hover .tip-text, .tip:focus .tip-text { display: block; }
.row { display: flex; gap: 14px; }

.check { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; margin: 2px 0 0; }
.check input { position: absolute; opacity: 0; }
.check .box { width: 18px; height: 18px; border: 1px solid #c6c6c6; border-radius: 4px; background: #fff; flex: none; display: grid; place-items: center; }
.check input:checked + .box { background: var(--primary); border-color: var(--primary); }
.check input:checked + .box::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.check input:focus-visible + .box { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary); }

.muted-box { background: var(--muted-box); border-radius: var(--radius); padding: 18px 21px; color: var(--text-2); font-size: 15px; }

.ship-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ship-opt { display: flex; align-items: center; gap: 12px; padding: 16px; cursor: pointer; border-bottom: 1px solid var(--border); }
.ship-opt:last-child { border-bottom: 0; }
.ship-opt.on { background: #fdeaeb; box-shadow: inset 0 0 0 1px var(--primary); }
.ship-opt input { position: absolute; opacity: 0; }
.ship-opt .name { flex: 1; }
.ship-opt .name small { display: block; color: var(--text-2); font-size: 13px; }
.ship-opt .price { font-weight: 600; }

.radio { width: 18px; height: 18px; border-radius: 50%; border: 1px solid #c6c6c6; background: #fff; flex: none; }
.radio.on { border: 6px solid var(--primary); }

.pay-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pay-opt + .pay-opt { border-top: 1px solid var(--border); }
.pay-opt-head { display: flex; align-items: center; gap: 12px; padding: 18px 16px; cursor: pointer; }
.pay-opt-head input { position: absolute; opacity: 0; }
.pay-opt-head strong { font-weight: 500; font-size: 15px; flex: 1; }
.pay-opt.on .pay-opt-head { background: #fdeaeb; box-shadow: inset 0 0 0 1px var(--primary); }
.pay-opt-body { display: none; background: #f5f5f5; border-top: 1px solid var(--border); }
.pay-opt.on .pay-opt-body { display: block; }
.pay-icons { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.pay-icons svg { height: 24px; width: auto; display: block; border-radius: 3px; }
.wallet-badge { display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 9px; border: 1px solid #d6d6d6; border-radius: 5px; background: #fff; font-weight: 600; font-size: 14px; color: #000; }
.wallet-badge.google { color: #3c4043; }

.card-body { padding: 0; background: #fff; position: relative; }
.card-cell { padding: 10px 14px 8px; min-height: 64px; border-bottom: 1px solid var(--border); }
.card-row { display: flex; }
.card-row .card-cell { flex: 1; border-bottom: 0; }
.card-row .card-cell + .card-cell { border-left: 1px solid var(--border); }
.card-label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 2px; }
.xpay-field { min-height: 26px; }
.card-loading { position: absolute; inset: 0; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-2); }
.card-loading.error { color: var(--error); padding: 0 20px; text-align: center; }

.wallet-body { padding: 16px; }
.wallet-gate { width: 100%; height: 48px; border: 0; border-radius: 6px; background: #000; color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; }
.wallet-gate[data-gate="googlepay"] { background: #fff; color: #3c4043; border: 1px solid #c6c6c6; }
.wallet-gate.loading { opacity: .6; pointer-events: none; }
.wallet-btn { min-height: 48px; }
.wallet-note { margin: 10px 0 0; color: var(--text-2); font-size: 13px; }
.wallet-hint { color: var(--text-2); text-align: center; margin: 0 0 8px; }

.pay-error { color: var(--error); font-size: 13.5px; margin-top: 10px; }
.billing-fields { margin-top: 14px; }
.secure-line { display: flex; justify-content: center; align-items: center; gap: 10px; color: var(--text-2); font-size: 12.5px; margin-top: 16px; }
.secure-line span { display: inline-flex; align-items: center; gap: 5px; }
.secure-line .dot { width: 3px; height: 3px; border-radius: 50%; background: #bbb; }
.secure-foot { text-align: center; color: var(--text-2); font-size: 12.5px; margin: 6px 0 0; }

.btn-primary {
  width: 100%; height: 58px; border: 0; border-radius: var(--radius); background: var(--primary); color: #fff;
  font-size: 18px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none;
  transition: filter .15s, transform .05s;
}
.btn-primary:hover { filter: brightness(.88); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.btn-primary .spinner { display: none; }
.btn-primary.loading .btn-label { opacity: .0; }
.btn-primary.loading .spinner { display: block; position: absolute; }
.btn-primary { position: relative; }
.btn-primary.loading { pointer-events: none; }
.btn-primary:disabled { opacity: .55; cursor: default; filter: none; }
.btn-secondary { height: 52px; padding: 0 16px; border: 1px solid var(--border); border-radius: var(--radius); background: #ededed; color: #707070; font-weight: 600; cursor: pointer; font-size: 15px; }
.btn-secondary:not(:disabled) { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-secondary:disabled { cursor: default; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.45); border-top-color: #fff; animation: spin .7s linear infinite; }
.spinner.dark { border-color: #ddd; border-top-color: #707070; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.link, .back-link { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; font-size: 13px; }
.back-link { margin-top: 4px; font-size: 14px; }

.alert { background: #fff4f4; border: 1px solid #f3c2c2; color: #8a1111; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 20px; }

.review { border: 1px solid var(--border); border-radius: var(--radius); padding: 0 16px; margin-bottom: 34px; }
.review-row { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.review-row:last-child { border-bottom: 0; }
.review-k { color: var(--text-2); width: 84px; flex: none; }
.review-v { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.policies { list-style: none; padding: 18px 0 0; margin: 40px 0 0; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.policies a { font-size: 12.5px; }

.lines { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.line { display: flex; align-items: center; gap: 16px; }
.thumb { position: relative; width: 66px; height: 66px; flex: none; border-radius: 8px; border: 1px solid #ddd; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; display: block; }
.thumb .qty { position: absolute; top: -9px; right: -9px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #000; color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; border: 2px solid var(--bg-summary); box-sizing: content-box; }
.line-info { flex: 1; min-width: 0; }
.line-title { font-size: 15px; }
.line-variant { color: var(--text-2); font-size: 12.5px; }
.line-disc { color: #555; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; display: flex; gap: 5px; align-items: center; margin-top: 2px; }
.line-disc svg { flex: none; }
.line-price { text-align: right; white-space: nowrap; font-size: 15px; }
.line-price s { display: block; color: #707070; font-size: 13px; }
.skeleton { height: 66px; border-radius: 8px; background: linear-gradient(90deg, #ececec, #f6f6f6, #ececec); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

.discount { display: flex; gap: 10px; margin-bottom: 8px; }
.discount .field { margin: 0; }
.discount-msg { color: var(--error); font-size: 13px; margin: 4px 0 8px; }
.discount-tag { display: inline-flex; align-items: center; gap: 6px; background: #e6e6e6; border-radius: 4px; padding: 5px 8px; font-size: 13px; font-weight: 600; margin: 4px 0 8px; }
.discount-tag button { border: 0; background: none; cursor: pointer; color: #555; font-size: 15px; line-height: 1; padding: 0 0 0 4px; }

.totals { margin-top: 22px; }
.t-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 9px; font-size: 15px; }
.t-row .muted { color: var(--text-2); text-align: right; }
.t-row .q { display: inline-grid; place-items: center; width: 15px; height: 15px; border: 1.3px solid #707070; color: #707070; border-radius: 50%; font-size: 10px; font-weight: 700; vertical-align: 1px; margin-left: 2px; }
.t-row.total { margin-top: 20px; font-size: 21px; font-weight: 600; }
.t-row.total small { color: var(--text-2); font-size: 13px; font-weight: 400; margin-right: 4px; }
.savings { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 15.5px; letter-spacing: .01em; }

@media (max-width: 999px) {
  .header-inner { padding: 16px; min-height: 76px; }
  .brand .logo-text { font-size: 26px; }
  .brand .logo { min-height: 50px; padding: 4px 10px; }
  .brand .logo img { max-height: 36px; max-width: 120px; }
  .brand .trust { padding: 0 8px; font-size: 9px; }
  .brand .stars { font-size: 13px; }
  .cart-link { right: 14px; }
  .layout { flex-direction: column; min-height: 0; }
  .summary { order: -1; border-left: 0; border-bottom: 1px solid #e3e3e3; display: none; }
  .summary.open { display: block; }
  .summary-inner { padding: 20px 16px 24px; max-width: none; position: static; }
  .summary-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 18px 16px; border: 0; border-bottom: 1px solid #e3e3e3; background: var(--bg-summary); color: var(--primary); font-size: 15px; cursor: pointer; }
  .summary-toggle-label { display: flex; align-items: center; gap: 6px; }
  .summary-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
  .summary-toggle-total { color: var(--text); font-weight: 600; font-size: 18px; }
  .main { justify-content: stretch; }
  .main-inner { max-width: none; padding: 22px 16px 40px; }
  .field input, .field select { font-size: 16px; }
}
@media (max-width: 380px) {
  .brand .trust:not(.tp-badge) { display: none; }
  .tp-badge .tp-text { display: none; }
  .tp-badge { padding: 4px 8px; }
  .brand .logo { border-left: 0; }
}
