:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f7f4;
  color: #17211a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f6f7f4;
}

button {
  font: inherit;
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 16px 112px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 2px;
  color: #48714d;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid #cbd8ca;
  border-radius: 8px;
  background: #ffffff;
  color: #23442a;
  cursor: pointer;
}

.status {
  min-height: 22px;
  margin-bottom: 14px;
  color: #5d675f;
  font-size: 14px;
}

.checkout-details,
.history {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #d8e1d7;
  border-radius: 10px;
  background: #ffffff;
}

.checkout-details h2,
.history h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.checkout-details {
  display: grid;
  gap: 10px;
}

.checkout-details label {
  display: grid;
  gap: 5px;
  color: #526058;
  font-size: 13px;
  font-weight: 700;
}

.checkout-details input,
.checkout-details textarea {
  width: 100%;
  border: 1px solid #cbd8ca;
  border-radius: 8px;
  padding: 10px 11px;
  color: #17211a;
  font: inherit;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title button,
.repeat-order {
  border: 0;
  border-radius: 8px;
  background: #245c2b;
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.section-title button {
  padding: 8px 10px;
}

.history-list {
  color: #647068;
  font-size: 14px;
}

.history-order {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid #edf1ec;
}

.history-order:first-child {
  border-top: 0;
}

.history-order strong {
  color: #17211a;
}

.history-order ul {
  margin: 0;
  padding-left: 18px;
}

.repeat-order {
  justify-self: start;
  padding: 9px 12px;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.product {
  display: grid;
  gap: 12px;
  grid-template-rows: auto auto auto auto 1fr auto;
  min-height: 330px;
  padding: 14px;
  border: 1px solid #d8e1d7;
  border-radius: 8px;
  background: #ffffff;
}

.image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: #eef2ec;
}

.image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.image-wrap.empty::before {
  content: "GlobeClean";
  display: grid;
  height: 100%;
  place-items: center;
  color: #6a766c;
  font-weight: 800;
}

.image-wrap.empty img {
  display: none;
}

.product h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.product a {
  color: #306a36;
  font-size: 13px;
  text-decoration: none;
}

.price {
  color: #152b18;
  font-size: 18px;
  font-weight: 800;
}

.stock {
  color: #6f5a00;
  font-size: 13px;
}

.quantity {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
}

.quantity button,
.add {
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: #245c2b;
  color: #ffffff;
  cursor: pointer;
}

.quantity output {
  text-align: center;
  font-weight: 700;
}

.add:disabled,
.quantity button:disabled,
.cart button:disabled {
  background: #9aa69b;
  cursor: not-allowed;
}

.cart {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid #d8e1d7;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -8px 24px rgba(20, 38, 23, 0.12);
}

.cart span {
  display: block;
  margin-top: 2px;
  color: #647068;
  font-size: 13px;
}

.cart button {
  min-width: 120px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: #ef7f1a;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 560px) {
  .cart {
    grid-template-columns: 1fr auto;
  }

  .cart button {
    grid-column: 1 / -1;
    width: 100%;
  }
}
