:root {
  --bg: #191919;
  --surface: #222;
  --text: #f5f3ed;
  --muted: #aaa9a2;
  --line: #ffffff26;
  --accent: #e1fc88;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Helvetica, sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
header {
  padding: 25px 6%;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header > a:last-child {
  font-size: 12px;
}
.logo {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -2px;
}
main {
  max-width: 1280px;
  margin: auto;
  padding: 55px 6% 90px;
}
.page-heading > span,
aside > span {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
}
h1 {
  font-size: clamp(38px, 5vw, 64px);
  letter-spacing: -2px;
  font-weight: 400;
  margin: 18px 0;
}
p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}
#checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 60px;
  margin-top: 40px;
}
.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.cart-item img {
  width: 100px;
  height: 90px;
  object-fit: cover;
  mask-image: radial-gradient(ellipse, #000 35%, transparent 75%);
}
h2 {
  font-size: 21px;
  font-weight: 400;
}
.cart-item h2 {
  font-size: 16px;
  margin: 0 0 8px;
}
.cart-item p {
  font-size: 12px;
  margin: 0 0 12px;
}
.quantity {
  display: flex;
  align-items: center;
  gap: 12px;
}
.quantity button,
.remove,
.secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  min-height: 40px;
  padding: 8px 14px;
}
.remove {
  border: 0;
  color: var(--muted);
  font-size: 11px;
}
.item-price {
  font-size: 14px;
}
fieldset {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 26px 0;
  margin: 35px 0 0;
}
legend {
  padding: 0 14px 0 0;
  font-size: 18px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
label {
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.full {
  grid-column: 1/-1;
}
input,
select {
  min-width: 0;
  width: 100%;
  border: 1px solid #ffffff40;
  background: #252525;
  color: var(--text);
  padding: 13px;
  border-radius: 0;
  min-height: 46px;
}
select option {
  background: #252525;
}
.shipping {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  margin: 12px 0;
}
.shipping input,
.consent input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.shipping span {
  flex: 1;
}
.shipping small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}
.shipping strong {
  font-size: 12px;
}
.muted {
  font-size: 12px;
}
.consent {
  flex-direction: row;
  align-items: center;
  line-height: 1.6;
  margin: 20px 0;
}
.primary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background: var(--accent);
  color: #191919;
  border: 0;
  min-height: 50px;
  align-items: center;
  padding: 16px 22px;
  font-size: 13px;
  width: 100%;
}
.primary:hover {
  background: #cbe477;
}
aside {
  background: var(--surface);
  padding: 28px;
  height: fit-content;
  position: sticky;
  top: 25px;
}
aside > div {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-top: 24px;
  gap: 10px;
}
aside .total {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 20px;
}
aside p {
  font-size: 11px;
  margin-top: 28px;
}
#review,
#confirmation {
  margin-top: 30px;
  padding: 25px;
  background: var(--surface);
}
#review p,
#confirmation p {
  overflow-wrap: anywhere;
}
.actions {
  display: flex;
  gap: 12px;
  margin-top: 25px;
}
#form-error {
  color: #ffb4a8;
  font-size: 12px;
}
@media (max-width: 850px) {
  #checkout-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  aside {
    position: static;
    grid-row: 1;
  }
  main {
    padding: 32px 6% 60px;
  }
}
@media (max-width: 450px) {
  .fields {
    grid-template-columns: 1fr;
  }
  .cart-item {
    grid-template-columns: 65px 1fr;
    gap: 12px;
  }
  .cart-item img {
    width: 65px;
    height: 80px;
  }
  .item-price {
    grid-column: 2;
  }
  aside {
    padding: 22px;
  }
  .shipping {
    padding: 14px;
  }
  .actions {
    flex-direction: column;
  }
  header {
    gap: 15px;
  }
}
