/* ========== Base / Reset (light only) ========== */
:root{
  --bg:#ffffff;
  --text:#0A0A0A;
  --muted:#8B8B8B;
  --brand:#8B0000;
  --line:#EAEAEA;
  --btn:#0A0A0A;
  --radius:14px;
  --shadow:0 10px 30px rgba(0,0,0,.05);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,Helvetica,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

a{color:inherit;text-decoration:none}
button{font:inherit}
img{display:block;max-width:100%}

/* ========== Layout ========== */
.wrap{
  max-width:640px;
  margin:0 auto;
  padding:14px 20px 28px;
}

header{
  display:flex;
  align-items:center;
  gap:18px;
  padding:6px 0 14px;
  border-bottom:1px solid var(--line);
}

/* ========== Header / Logo / Icons ========== */
.logo{display:inline-flex;align-items:center;gap:10px}
.logo-img{height:28px;display:block}

.iconbtn{
  appearance:none;
  background:none;
  border:0;
  cursor:pointer;
  padding:6px;
  border-radius:10px;
}
.iconbtn:focus-visible{outline:2px solid #d0d0d0;outline-offset:2px}

.icon{
  width:22px;height:22px;display:block;
  stroke:currentColor;stroke-width:2;fill:none;
  stroke-linecap:round;stroke-linejoin:round;opacity:.9;
}

/* ========== Typography ========== */
h1{
  font-size:42px;
  font-weight:800;
  letter-spacing:-.02em;
  margin:18px 0 6px;
  text-transform:lowercase;
}

/* ========== Card / Row ========== */
.card{
  background:#fff;
  border-radius:20px;
  box-shadow:var(--shadow);
  overflow:hidden;
}

.row{
  display:grid;
  grid-template-columns:64px 1fr auto;
  gap:16px;
  align-items:center;
  padding:18px 18px;
  border-bottom:1px solid var(--line);
}

.thumb{
  width:64px;height:64px;border-radius:10px;
  background:#f3f3f3;overflow:hidden;
}
.thumb a{display:block;width:100%;height:100%}
.thumb-img{
  width:100%;height:100%;object-fit:cover;border-radius:10px;
}

.info{display:flex;flex-direction:column;gap:4px}
.subtitle{
  font-size:12px;font-weight:500;color:var(--muted);
  text-transform:uppercase;letter-spacing:.5px;
}
.title{font-size:15px;font-weight:600;line-height:1.3}

/* ========== Prices ========== */
.price{
  font-size:16px;font-weight:700;white-space:nowrap;
  display:flex;align-items:center;gap:8px;
}
.old-price{color:var(--muted);text-decoration:line-through;font-weight:600}
.new-price{font-weight:800}

/* ========== Promo section ========== */
.promo{
  padding:16px 18px;
  border-bottom:1px solid var(--line);
}
.promo label{
  display:block;
  font-size:14px;
  color:var(--muted);
  margin-bottom:8px;
}
.promo .field{display:flex;gap:10px;align-items:center}

.input{
  flex:1;
  border:1px solid var(--line);
  background:#fff;
  border-radius:12px;
  padding:14px 12px;
  font-size:16px;
  color:var(--text);
  transition:border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder{color:#B0B0B0}
.input:focus{
  outline:none;
  border-color:#d8d8d8;
  box-shadow:0 0 0 3px rgba(0,0,0,.04);
}

.apply{
  height:46px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#F6F6F6;
  font-weight:700;
  cursor:pointer;
  transition:filter .15s ease, transform .02s ease;
}
.apply:hover{filter:brightness(.98)}
.apply:active{transform:translateY(1px)}
.apply:focus-visible{outline:2px solid #d0d0d0;outline-offset:2px}

.promo-msg{margin-top:8px;font-size:13px}
.promo-msg.error{color:#B91C1C}
.promo-msg.success{color:#047857}

/* ========== Summary / Button / Legal ========== */
.summary{padding:18px 18px}

.sumrow{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:10px 0;
  font-size:16px;
}
.sumrow.total{font-size:28px;font-weight:800}
.sumrow.email{font-size:14px;color:var(--muted);font-weight:400}

.btn{
  display:block;
  width:100%;
  margin:22px 0 8px;
  background:var(--btn);
  color:#fff;
  border:none;
  border-radius:12px;
  padding:18px;
  text-align:center;
  font-weight:800;
  font-size:16px;
  text-decoration:none;
  box-shadow:0 8px 16px rgba(0,0,0,.06);
  transition:filter .15s ease, transform .02s ease;
}
.btn:hover{filter:brightness(1.05)}
.btn:active{transform:translateY(1px)}
.btn:focus-visible{outline:2px solid #d0d0d0;outline-offset:2px}

.legal{margin-top:18px;text-align:center;color:var(--muted)}
.legal a{color:var(--muted);text-decoration:none}

/* ========== Utilities ========== */
.hidden{display:none !important}

/* ========== Small screens tweaks ========== */
@media (max-width:420px){
  .row{grid-template-columns:56px 1fr auto;gap:12px;padding:14px}
  .thumb{width:56px;height:56px}
  h1{font-size:36px}
}
