:root {
  font-family: "Times New Roman", Times, serif;
  color: #143c2f;
  background: #fff;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
header {
  max-width: 1505px;
  margin: auto;
  padding: 12px 4.5% 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-size: 54px;
  font-weight: 700;
  letter-spacing: -4px;
  line-height: 1.1;
}
main#shop {
  max-width: 1505px;
  margin: auto;
  padding: 0 4.5% 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr);
  gap: 34px;
}
h1 {
  font-size: clamp(32px, 4.15vw, 62px);
  line-height: 1.13;
  letter-spacing: -2.3px;
  margin: 30px 0 12px;
  font-weight: 600;
}
.intro {
  font-size: clamp(20px, 2.15vw, 32px);
  margin: 0 0 38px;
  line-height: 1.25;
}
.products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 32px;
}
.photo {
  width: 100%;
  aspect-ratio: 1.6;
  background-image: url("/products.png");
  background-size: 200% 200%;
  background-color: #e1dcd4;
}
.photo.cup {
  background-position: 0 0;
}
.photo.brewer {
  background-position: 100% 0;
}
.photo.coffee {
  background-position: 0 100%;
}
.photo.spoon {
  background-position: 100% 100%;
}
.product-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 22px;
  margin: 12px 0 14px;
}
.product-line h3 {
  font-size: inherit;
  font-weight: 400;
  margin: 0;
}
.price {
  white-space: nowrap;
}
button,
.button {
  font:
    20px "Times New Roman",
    Times,
    serif;
  color: inherit;
  background: white;
  border: 1px solid #143c2f;
  border-radius: 5px;
  padding: 10px 14px;
  cursor: pointer;
  line-height: 1.2;
  display: inline-block;
  text-align: center;
}
button:hover:not(:disabled),
.button:hover {
  background: #f0f5f2;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #b87a38;
  outline-offset: 4px;
}
.add {
  width: 100%;
}
.primary {
  background: #143c2f;
  color: white;
  width: 100%;
  font-size: 24px;
  padding: 14px;
}
.primary:hover:not(:disabled) {
  background: #205641;
}
.secondary {
  width: 100%;
  margin-top: 12px;
  border-color: #aebbb4;
  font-size: 18px;
}
.inline-checkout {
  margin-top: 24px;
  border-top: 1px solid #ccd3cf;
  padding-top: 20px;
}
.inline-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 18px;
}
.inline-heading h3 { margin: 0; font-size: 22px; font-weight: 400; }
#card-form { display: grid; gap: 8px; font: 14px/1.4 system-ui, sans-serif; color: #263d32; }
#card-form label { margin-top: 8px; }
#card-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #bcc7c1;
  border-radius: 4px;
  background: white;
  padding: 9px 10px;
  color: #173b2f;
  font: 16px/1.3 system-ui, sans-serif;
}
#card-form input:focus-visible { outline: 2px solid #1b6146; outline-offset: 2px; }
.card-details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card-details > div { display: grid; gap: 8px; }
#submit-card { margin-top: 14px; font-size: 19px; }
.inline-status { font-size: 16px; line-height: 1.6; padding: 12px 0; }
#three-ds { display: block; width: 100%; height: min(600px, 68vh); border: 1px solid #ccd3cf; border-radius: 5px; background: white; margin-top: 16px; }
.inline-note { color: #53625a; font: 12px/1.6 system-ui, sans-serif; margin: 14px 0 0; }
aside {
  border-left: 1px solid #ccd3cf;
  padding: 34px 0 0 40px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
h2 {
  font-size: 40px;
  font-weight: 400;
  margin: 0 0 22px;
}
#cart-items {
  border-top: 1px solid #ccd3cf;
}
.cart-row {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid #ccd3cf;
}
.cart-row .photo {
  width: 90px;
  aspect-ratio: 1;
  flex-shrink: 0;
  background-size: 250% 200%;
}
.cart-row .photo.cup {
  background-position: 8% 0;
}
.cart-row .photo.brewer {
  background-position: 92% 0;
}
.cart-row .photo.coffee {
  background-position: 8% 100%;
}
.cart-row .photo.spoon {
  background-position: 92% 100%;
}
.cart-name {
  font-size: 19px;
  flex: 1;
  line-height: 1.5;
}
.quantity {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quantity button {
  padding: 5px 10px;
  border-color: #bcc7c1;
  font-size: 21px;
}
.quantity span {
  min-width: 15px;
  text-align: center;
}
.remove {
  border: 0;
  padding: 4px;
  font-size: 22px;
}
.empty {
  font-size: 19px;
  line-height: 1.7;
  padding: 16px 0;
  color: #64756e;
}
.checkout {
  margin-top: auto;
  padding-top: 70px;
}
.total {
  display: flex;
  justify-content: space-between;
  font-size: 27px;
  border-top: 1px solid #ccd3cf;
  padding: 18px 0 24px;
}
.total strong {
  font-weight: 400;
}
.note {
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  margin: 12px 0 26px;
}
footer {
  font-size: 15px;
  text-align: center;
  border-top: 1px solid #ccd3cf;
  padding-top: 20px;
  color: #53625a;
}
.error,
.setup {
  font:
    14px/1.6 system-ui,
    sans-serif;
  padding: 12px;
  background: #fff5e9;
  color: #7c4317;
  border-left: 3px solid #ba7a38;
}
.result {
  max-width: 780px;
  margin: 65px auto;
  padding: 0 24px;
}
.result h1 {
  font-size: 52px;
}
.result-label {
  letter-spacing: 2px;
  font:
    12px system-ui,
    sans-serif;
}
.result > p {
  line-height: 1.6;
}
dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  border-block: 1px solid #ccd3cf;
  padding: 24px 0;
  margin: 32px 0;
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.result-actions {
  display: flex;
  gap: 16px;
}
.result-actions > * {
  flex: 1;
}
.result-actions .button {
  padding: 14px;
}
.result .note {
  text-align: left;
}
#last-order {
  display: block;
  text-decoration: underline;
  font-size: 15px;
  margin: 16px 0;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1400px) {
  #shop {
    min-height: 958px;
  }
}
@media (max-width: 1150px) {
  main#shop {
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
    gap: 24px;
  }
  aside {
    padding-left: 24px;
  }
  .cart-row {
    gap: 10px;
    flex-wrap: wrap;
  }
  .cart-row .photo {
    width: 62px;
  }
  .quantity {
    margin-left: auto;
  }
  .product-line {
    font-size: 19px;
  }
  .brand {
    font-size: 52px;
  }
}
@media (max-width: 760px) {
  header {
    padding: 18px 6%;
  }
  .brand {
    font-size: 45px;
  }
  main#shop {
    display: block;
    padding: 0 6% 32px;
  }
  h1 {
    font-size: 40px;
    letter-spacing: -1.4px;
    margin-top: 24px;
  }
  .intro {
    font-size: 22px;
    margin-bottom: 28px;
  }
  .products {
    gap: 26px 16px;
  }
  .product-line {
    font-size: 17px;
    flex-wrap: wrap;
    gap: 5px;
    margin: 10px 0;
  }
  .add {
    font-size: 16px;
    padding: 10px 4px;
  }
  aside {
    border: 0;
    padding: 44px 0 0;
  }
  h2 {
    font-size: 32px;
  }
  .checkout {
    padding-top: 32px;
  }
  .cart-row .photo {
    width: 72px;
  }
  .cart-name {
    font-size: 18px;
  }
  .result {
    margin-top: 30px;
  }
  .result h1 {
    font-size: 38px;
  }
  .result-actions {
    flex-direction: column;
  }
  .primary {
    font-size: 22px;
  }
}

@media (max-width: 760px) {
  .product-line {
    display: block;
    min-height: 46px;
  }
  .product-line h3 {
    margin-bottom: 4px;
  }
}
