:root {
  --ink: #000;
  --ink-2: #121212;
  --muted: #707070;
  --muted-2: #666;
  --line: #dedede;
  --panel: #f5f5f5;
  --accent: #2eb017;
  --accent-hover: #29a015;
  --error: #dd1d1d;
  --radius: 12px;
  --font: -apple-system, "system-ui", "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; }
[hidden] { display: none !important; }
svg { flex-shrink: 0; }

/* ---------- Header ---------- */
.co-header { border-bottom: 1px solid var(--line); background: #fff; }
.co-header__inner {
  max-width: 980px; margin: 0 auto; height: 100px;
  display: flex; align-items: center; justify-content: space-between;
}
.co-logo img { width: 166px; height: 60px; object-fit: contain; object-position: left center; }
.co-bag { color: var(--ink-2); display: flex; padding: 0; }

/* ---------- Layout (desktop) ---------- */
.co-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-columns: calc(50% + 50px) minmax(0, 1fr);
  min-height: calc(100vh - 101px);
}
.co-main { padding: 40px 41px 38px 0; display: flex; justify-content: flex-end; }
.co-form { width: 499px; max-width: 100%; }
.co-aside {
  background: var(--panel);
  border-left: 1px solid var(--line);
  padding: 40px 0 40px 39px;
}
.co-aside .co-summary { width: 400px; position: sticky; top: 40px; }
.co-mobile-summary, .co-mobile-recap { display: none; }

/* ---------- Express checkout ---------- */
.co-express__title { font-size: 14px; font-weight: 400; color: var(--muted); text-align: center; line-height: 18.9px; }
.co-express__buttons { display: flex; gap: 10px; margin-top: 14px; }
.co-express__slot { flex: 1 1 0; min-width: 0; }
.co-btn-paypal, .co-btn-gpay {
  width: 100%; height: 48px; border: 0; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.co-btn-paypal { background: #ffc439; }
.co-btn-paypal:hover { filter: brightness(.96); }
.co-btn-paypal img { width: 74px; height: 20px; }
.co-btn-gpay { background: #000; }
.co-btn-gpay:hover { background: #3c4043; }
.co-or {
  display: flex; align-items: center; gap: 12px; margin: 20px 0 22px;
  color: var(--muted); font-size: 14px; line-height: 17px;
}
.co-or::before, .co-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Sections ---------- */
.co-section + .co-section { margin-top: 32px; }
.co-section--payment { margin-top: 32px !important; }
.co-section--billing { margin-top: 30px !important; }
.co-section--tip { margin-top: 24px !important; }
.co-section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.co-h2 { font-size: 20px; line-height: 24px; font-weight: 600; }
.co-h3 { font-size: 16px; line-height: 19.2px; font-weight: 600; margin-bottom: 14px; }
.co-sub { color: var(--muted); line-height: 18.9px; margin: 4px 0 14px; }
.co-link { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; font-size: 14px; line-height: 18.9px; }
.co-link:hover { text-decoration-thickness: 2px; }

/* ---------- Fields (floating labels) ---------- */
.co-field { position: relative; }
.co-field + .co-field, .co-row + .co-field, .co-field + .co-row, .co-row + .co-row { margin-top: 10px; }
.co-row { display: flex; gap: 10px; }
.co-row > .co-field { flex: 1 1 0; min-width: 0; margin-top: 0 !important; }
.co-field input, .co-field select {
  display: block; width: 100%; height: 49px; margin: 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  font: 14px/18.9px var(--font); color: var(--ink);
  padding: 13.55px 10px 13.55px 10px; outline: none;
  -webkit-appearance: none; appearance: none;
  transition: box-shadow .15s ease-in-out, border-color .15s ease-in-out, padding .15s ease-out;
}
.co-field input:focus, .co-field select:focus { border-color: var(--ink-2); box-shadow: 0 0 0 1px var(--ink-2); }
.co-field label {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  font-size: 14px; line-height: 18.9px; color: var(--muted);
  pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 22px);
  transition: all .15s ease-out;
}
.co-field input:focus + label,
.co-field input:not(:placeholder-shown) + label,
.co-field--select label {
  top: 8px; transform: none; font-size: 12px; line-height: 16.2px;
}
.co-field input:focus, .co-field input:not(:placeholder-shown) { padding-top: 21.05px; padding-bottom: 6.05px; }
.co-field--icon input { padding-right: 38px; }
.co-field--icon label { max-width: calc(100% - 50px); }
.co-field__icon {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.co-field__icon svg { width: 16px; height: 16px; }
.co-field--select select { padding: 21.05px 30px 6.05px 10px; cursor: pointer; }
.co-field__chevron { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; pointer-events: none; }
.co-field.is-invalid input, .co-field.is-invalid select { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }

/* ---------- Checkboxes & radios ---------- */
.co-check { display: flex; align-items: flex-start; gap: 0; margin-top: 10px; cursor: pointer; line-height: 18.9px; }
.co-check span { padding-left: 10px; }
.co-check input, .co-pay input[type="radio"], .co-tip__opt input {
  -webkit-appearance: none; appearance: none; margin: 0; flex: none; cursor: pointer;
  background: #fff; border: 1px solid var(--line);
}
.co-check input { width: 20px; height: 20px; border-radius: 6px; margin-top: -1px; }
.co-check input:checked {
  background: var(--ink-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='m3.5 7.3 2.3 2.2 4.7-5' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
  border-color: var(--ink-2);
}
.co-check input:focus-visible, .co-pay input:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.co-pay input[type="radio"], .co-tip__opt input { width: 18px; height: 18px; border-radius: 50%; }
.co-pay input[type="radio"]:checked { border: 6px solid var(--ink-2); }

/* ---------- Payment methods ---------- */
.co-pay { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.co-pay__option + .co-pay__option { border-top: 1px solid var(--line); }
.co-pay__head {
  display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 47px; cursor: pointer; position: relative;
}
.co-pay__option:first-child .co-pay__head { height: 50px; }
.co-pay__option:first-child .co-pay__head { border-radius: 12px 12px 0 0; }
.co-pay__option:last-child:not(.is-selected) .co-pay__head { border-radius: 0 0 12px 12px; }
.co-pay__option.is-selected .co-pay__head { background: #f6f6f6; }
.co-pay__option.is-selected .co-pay__head::after {
  content: ""; position: absolute; inset: -1px; border: 1px solid var(--ink-2); border-radius: inherit; pointer-events: none;
}
.co-pay__option.is-selected:last-child .co-pay__head { border-radius: 0; }
.co-pay__head strong { font-weight: 600; line-height: 17px; }
.co-pay__brands { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.co-pay__brands img { width: 38px; height: 24px; }
.co-pay__option[data-method="paypal"] .co-pay__brands img { width: 48px; height: 19px; }
.co-pay__more {
  width: 23px; height: 24px; border: 1px solid rgba(0,0,0,.07); border-radius: 3px; background: #fff;
  font-size: 10px; line-height: 13.5px; color: var(--ink-2); display: flex; align-items: center; justify-content: center;
}
.co-pay__body { background: rgba(0,0,0,.043); padding: 14px 14px 14px; border-top: 1px solid var(--line); }
.co-pay__body .co-field input { height: 48px; }
.co-pay__option:not(.is-selected) .co-pay__body { display: none; }
.co-pay__body .co-field + .co-row, .co-pay__body .co-row + .co-field, .co-pay__body .co-field + .co-field { margin-top: 10px; }
.co-pay__body--paypal { padding: 16px 15px; text-align: center; color: var(--ink); line-height: 18.9px; }

/* ---------- Tip ---------- */
.co-tip { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.co-tip__head { margin: 0; padding: 14px 14px 13px; background: #fff; }
.co-tip__head input { margin-top: 0; }
.co-tip__head span { padding-top: 1px; }
.co-tip__body { background: rgba(0,0,0,.043); border-top: 1px solid var(--line); padding: 14px 14px 15px; }
.co-tip__options { display: grid; grid-template-columns: repeat(4, 1fr); }
.co-tip__opt {
  position: relative; height: 53px; display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer;
  background: #fff; border: 1px solid var(--line);
}
.co-tip__opt + .co-tip__opt { border-left: 0; }
.co-tip__opt:first-child { border-radius: 16px 0 0 16px; }
.co-tip__opt:last-child { border-radius: 0 16px 16px 0; }
.co-tip__opt input { position: absolute; opacity: 0; pointer-events: none; }
.co-tip__opt > span { display: flex; flex-direction: column; line-height: 18.9px; }
.co-tip__opt small { font-size: 12px; line-height: 16.2px; color: var(--muted); }
.co-tip__opt:has(input:checked) { background: #f6f6f6; border-color: transparent; z-index: 1; }
.co-tip__opt:has(input:checked)::after {
  content: ""; position: absolute; inset: -1px; border: 1px solid var(--ink-2); border-radius: 12px; pointer-events: none;
}
.co-tip__opt:has(input:focus-visible) { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.co-tip__custom { display: flex; gap: 10px; margin-top: 10px; }
.co-tip__custom .co-field { flex: 1; }
.co-field--stepper input { padding-right: 78px; }
.co-stepper { position: absolute; right: 0; top: 0; height: 100%; display: flex; align-items: center; padding-right: 6px; }
.co-stepper button { width: 34px; height: 34px; border: 0; background: none; padding: 10px; color: var(--muted); display: flex; }
.co-stepper button:hover { color: var(--ink); }
.co-btn-secondary {
  height: 47px; margin-top: 0; padding: 14px; border: 0; border-radius: var(--radius); background: var(--panel);
  font-weight: 600; color: var(--muted); white-space: nowrap; box-shadow: inset 0 0 0 1px var(--line);
}
.co-tip__body .co-btn-secondary:disabled { background: var(--panel); color: #9e9e9e; }
.co-btn-secondary:not(:disabled) { background: var(--ink-2); color: #fff; box-shadow: none; }
.co-btn-secondary:disabled { cursor: default; }
.co-tip__thanks { margin-top: 13px; line-height: 18.9px; }
.co-tip.is-off .co-tip__body { display: none; }

/* ---------- Pay ---------- */
.co-btn-pay {
  display: block; width: 100%; height: 50px; margin-top: 52px; border: 0; border-radius: var(--radius);
  background: var(--accent); color: #fff; font-size: 16px; line-height: 21.6px; font-weight: 600;
  transition: background .15s;
}
.co-btn-pay:hover { background: var(--accent-hover); }
.co-btn-pay:disabled { opacity: .7; cursor: progress; }
.co-error { margin-top: 16px; color: var(--error); line-height: 18.9px; }
.co-footer { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 61px; padding-top: 0; }
.co-footer a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; line-height: 18.9px; }

/* ---------- Order summary ---------- */
.co-line { display: flex; align-items: flex-start; gap: 15px; padding: 1px 0 0 1px; }
.co-line + .co-line { margin-top: 14px; }
.co-line__thumb { position: relative; flex: none; width: 64px; height: 64px; }
.co-line__thumb img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 16px;
  border: 1px solid #fff; background: #ededed;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.04);
}
.co-line__qty {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 8px;
  background: #000; color: #fff; font-size: 12px; line-height: 20px; font-weight: 600; text-align: center;
  }
.co-line__info { flex: 1; min-width: 0; padding-top: 12px; }
.co-line__title { line-height: 18.9px; }
.co-line__discount { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 12px; line-height: 16.2px; color: var(--muted-2); }
.co-line__discount svg { width: 12px; height: 12px; }
.co-line__price { padding-top: 12px; text-align: right; line-height: 18.9px; white-space: nowrap; }
.co-line__price s { display: block; color: var(--muted-2); font-size: 12px; line-height: 16.2px; }

.co-discount { display: flex; gap: 10px; margin-top: 21px; }
.co-discount .co-field { flex: 1; }
.co-btn-apply {
  flex: none; width: 67px; height: 49px; border: 0; border-radius: var(--radius);
  background: #ededed; color: var(--muted); font-weight: 600; box-shadow: inset 0 0 0 1px #d6d6d6;
}
.co-btn-apply:not(:disabled) { background: var(--ink-2); color: #fff; box-shadow: none; }
.co-btn-apply:disabled { cursor: default; }
.co-discount__error { color: var(--error); margin-top: 8px; font-size: 12px; }
.co-discount__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.co-discount__tags:not(:empty) { margin-top: 12px; }
.co-tag {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border-radius: 8px;
  background: #e8e8e8; font-size: 12px; line-height: 16.2px; font-weight: 600; color: var(--ink-2);
}
.co-tag button { border: 0; background: none; padding: 0; display: flex; color: var(--muted-2); }

.co-costs { margin-top: 50px; }
.co-costs__row { display: flex; justify-content: space-between; line-height: 18.9px; margin-bottom: 8px; }
.co-costs__total { display: flex; justify-content: space-between; align-items: baseline; }
.co-costs__total > strong { font-size: 18px; line-height: 24.3px; font-weight: 600; }
.co-costs__total > span { display: flex; align-items: baseline; gap: 6px; }
.co-costs__total > span strong { font-size: 18px; line-height: 24.3px; font-weight: 600; }
.co-currency { font-size: 12px; line-height: 16.2px; color: var(--muted-2); }
.co-costs__savings { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; font-weight: 600; }
.co-costs__savings svg { width: 15px; height: 15px; }

/* ---------- Mobile ---------- */
@media (max-width: 999px) {
  .co-header__inner { padding: 0 14px; }
  .co-mobile-summary { display: block; background: var(--panel); border-bottom: 1px solid var(--line); }
  .co-mobile-summary__toggle {
    width: 100%; height: 63px; border: 0; background: var(--panel); padding: 0 14px;
    display: flex; align-items: center; justify-content: space-between; text-align: left;
  }
  .co-mobile-summary__label { display: flex; align-items: center; gap: 6px; color: var(--ink-2); line-height: 18.9px; }
  .co-mobile-summary__toggle[aria-expanded="true"] .co-mobile-summary__label svg { transform: rotate(180deg); }
  .co-mobile-summary__total { display: flex; align-items: baseline; gap: 8px; }
  .co-mobile-summary__total strong { font-size: 18px; line-height: 24.3px; font-weight: 600; }
  .co-compare { color: var(--muted-2); font-size: 14px; }
  .co-mobile-summary__panel { padding: 6px 14px 20px; }

  .co-layout { display: block; min-height: 0; }
  .co-main { padding: 20px 14px 38px; display: block; }
  .co-form { width: 100%; }
  .co-aside { display: none; }
  .co-section__head { margin-bottom: 14px; }
  .co-row { flex-direction: column; gap: 10px; }

  .co-tip__custom { flex-direction: column; gap: 8px; }
  .co-tip__custom .co-btn-secondary { width: 100%; height: 47px; margin-top: 0; }
  .co-tip__thanks { margin-top: 10px; }
  .co-tip__head { padding: 14px 14px 13px; }
  .co-tip__body { padding-bottom: 14px; }
  .co-or { margin: 14px 0 16px; }

  .co-mobile-recap { display: block; margin-top: 45px; }
  .co-btn-discount {
    display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 9.33px;
    border: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--radius); background: #fff; font-weight: 600; line-height: 18.9px;
  }
  .co-btn-discount svg { width: 14px; height: 14px; margin-right: 0; }
  .co-mobile-recap__total {
    width: 100%; height: 46px; margin-top: 10px; border: 0; background: none; padding: 0;
    display: flex; align-items: center; gap: 17px; text-align: left;
  }
  .co-mobile-recap__total img {
    width: 40px; height: 40px; object-fit: cover; border-radius: 12px; border: 1px solid #fff; background: var(--panel); margin: 4px 0 0 1px;
    box-shadow: 0 0 0 .5px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.04);
  }
  .co-mobile-recap__label { display: flex; flex-direction: column; gap: 4px; }
  .co-mobile-recap__label strong { font-size: 18px; line-height: 18px; font-weight: 600; }
  .co-mobile-recap__label span { color: var(--muted); line-height: 14px; }
  .co-mobile-recap__amount { margin-left: auto; display: flex; align-items: center; gap: 4px; }
  .co-mobile-recap__amount strong { margin-left: 6px; }
  .co-mobile-recap__amount .co-currency {
    font-size: 10px; line-height: 12px; font-weight: 600; color: var(--muted);
    background: #ededed; border-radius: 5px; padding: 2px 4px; margin-top: 1px;
  }
  .co-mobile-recap__amount strong { font-size: 18px; line-height: 18px; font-weight: 600; }
  .co-btn-pay { margin-top: 14px; }
  .co-footer { margin-top: 34px; }
  .co-costs { margin-top: 24px; }
}
