:root {
  --green: #52811F;
  --green-dark: #3F6617;
  --cta: #4BA60C;
  --cta-dark: #3F8E08;
  --text: #16281E;
  --body: #3A3F33;
  --muted: #6B7558;
  --line: #DDE2D5;
  --panel: #F6F7F3;
  --guar-bg: #EAFBEA;
  --guar-line: #B1F2B4;
  --err: #C4321C;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Poppins', system-ui, sans-serif; color: var(--text); background: #fff; font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--green); }
h2 { font-size: 19px; font-weight: 600; margin: 0 0 12px; }

/* Header */
.co-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); max-width: 1120px; margin: 0 auto; }
.co-logo img { height: 34px; width: auto; display: block; }
.co-back { font-size: 13px; color: var(--muted); text-decoration: none; }
.co-back:hover { text-decoration: underline; }

/* Mobile summary bar */
.co-sumbar { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: var(--panel); border: 0; border-bottom: 1px solid var(--line); font: inherit; color: var(--green); cursor: pointer; }
.co-sumbar__label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.co-sumbar__label svg { transition: transform .2s; }
.co-sumbar[aria-expanded="true"] .co-sumbar__label svg { transform: rotate(180deg); }
.co-sumbar__total { font-size: 18px; font-weight: 600; color: var(--text); }

/* Layout */
.co-layout { display: flex; flex-direction: column; }
.co-summary { background: var(--panel); border-bottom: 1px solid var(--line); display: none; }
.co-summary.is-open { display: block; }
.co-summary__inner { padding: 18px 16px; }
.co-main { padding: 22px 16px 40px; max-width: 620px; width: 100%; margin: 0 auto; }

@media (min-width: 900px) {
  .co-sumbar { display: none; }
  .co-layout { flex-direction: row-reverse; max-width: 1120px; margin: 0 auto; min-height: calc(100vh - 64px); }
  .co-summary { display: block; flex: 0 0 42%; border-bottom: 0; border-left: 1px solid var(--line); }
  .co-summary__inner { position: sticky; top: 0; padding: 36px 32px; }
  .co-main { flex: 1; margin: 0; padding: 36px 40px 56px 16px; max-width: none; }
}

/* Summary lines */
.co-lines { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.co-line { display: flex; align-items: center; gap: 12px; }
.co-line__img { position: relative; flex: 0 0 60px; width: 60px; height: 60px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.co-line__img img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; display: block; }
.co-line__qty { position: absolute; top: -8px; right: -8px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 11px; background: var(--text); color: #fff; font-size: 12px; font-weight: 500; line-height: 21px; text-align: center; }
.co-line__info { flex: 1; min-width: 0; }
.co-line__title { font-size: 14px; font-weight: 500; line-height: 1.3; }
.co-line__sub { font-size: 12.5px; color: var(--muted); }
.co-line__price { text-align: right; font-size: 14px; font-weight: 500; white-space: nowrap; }
.co-line__price s { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.co-line__price .is-free { color: var(--green); font-weight: 600; }

.co-totals { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.co-totals > div { display: flex; justify-content: space-between; align-items: baseline; }
.co-totals dt, .co-totals dd { margin: 0; }
.co-totals__grand { font-size: 19px; font-weight: 600; padding-top: 6px; }
.co-cur { font-size: 12px; font-weight: 400; color: var(--muted); margin-right: 4px; }
.co-totals__save { color: var(--green); font-weight: 500; }
.co-subnote { margin: 14px 0 0; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; color: var(--body); }

/* Sections and fields */
.co-sec { margin-bottom: 26px; }
.co-muted { margin: -6px 0 12px; color: var(--muted); font-size: 13.5px; }
.co-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.co-row--3 { grid-template-columns: 1fr; }
@media (min-width: 520px) { .co-row--3 { grid-template-columns: 1.3fr 1fr 1fr; } }

.co-field { position: relative; margin-bottom: 10px; }
.co-field input, .co-field select {
  width: 100%; height: 50px; padding: 20px 12px 6px; border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: 15px; color: var(--text); background: #fff; outline: none; appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.co-field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236B7558' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.co-field label { position: absolute; left: 13px; top: 15px; font-size: 15px; color: var(--muted); pointer-events: none; transition: all .12s; }
.co-field input:focus, .co-field select:focus { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.co-field input:focus + label, .co-field input:not(:placeholder-shown) + label, .co-field select + label { top: 6px; font-size: 11.5px; }
.co-field.is-invalid input { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
.co-err { margin: 4px 2px 0; font-size: 12.5px; color: var(--err); min-height: 0; }
.co-err:empty { display: none; }
.co-err--form { margin: 0 0 10px; font-size: 14px; text-align: center; }

.co-check { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--body); cursor: pointer; margin-top: 4px; }
.co-check input { width: 18px; height: 18px; accent-color: var(--green); margin: 0; }

/* Shipping */
.co-ship { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; background: #fff; }
.co-ship__name { font-weight: 500; }
.co-ship__detail { color: var(--muted); font-size: 13px; }
.co-ship__price { font-weight: 600; white-space: nowrap; }

/* Payment */
.co-pay { border: 1px solid var(--text); border-radius: var(--radius); overflow: hidden; }
.co-pay__head { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
.co-radio { width: 18px; height: 18px; border-radius: 50%; border: 5px solid var(--text); flex: 0 0 18px; }
.co-pay__title { font-weight: 600; flex: 1; }
.co-cards { display: inline-flex; gap: 5px; }
.co-cards img { height: 22px; width: auto; display: block; }
.co-pay__body { padding: 14px; background: var(--panel); }
.co-slot { min-height: 50px; margin-bottom: 10px; position: relative; }
.co-slot iframe { display: block; width: 100% !important; }
/* Shown until the hosted field has loaded */
.co-slot:empty::before { content: attr(data-label); display: flex; align-items: center; height: 50px; padding: 0 13px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--muted); font-size: 15px; }

/* Guarantee + pay */
.co-guarantee { display: flex; align-items: flex-start; gap: 9px; background: var(--guar-bg); border: 1px solid var(--guar-line); border-radius: var(--radius); padding: 13px 14px; margin-bottom: 14px; font-size: 14px; color: #101E11; }
.co-guarantee svg { flex: 0 0 18px; margin-top: 1px; color: #4D7A50; }
.co-guarantee strong { font-weight: 600; }
.co-paybtn { width: 100%; height: 58px; border: 0; border-radius: 48px; background: var(--cta); color: #fff; font: inherit; font-size: 18px; font-weight: 700; letter-spacing: .02em; cursor: pointer; transition: background .15s, transform .05s; }
.co-paybtn:hover { background: var(--cta-dark); }
.co-paybtn:active { transform: scale(.995); }
.co-paybtn[disabled] { opacity: .65; cursor: default; }
.co-legal { margin: 14px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.co-branding { margin-top: 14px; min-height: 44px; }

.co-preview { background: #FFF7E0; border: 1px solid #F0D58A; color: #6A5200; border-radius: var(--radius); padding: 10px 12px; font-size: 13px; margin-bottom: 18px; }

.co-footer { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; }
.co-footer a { color: var(--muted); }
