* { box-sizing: border-box; }

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
  color: #000;
  margin: 0;
  padding: 32px 140px;
  font-size: 13px;
  line-height: 1.5;
}

header { margin-bottom: 24px; }

h1 {
  font-size: 36px;
  margin: 0;
  font-weight: normal;
}

.tag {
  margin: 2px 0 10px;
  font-style: italic;
}

nav { font-size: 12px; }

nav a {
  margin-right: 8px;
}

nav a, a {
  color: #000;
  text-decoration: underline;
}

h2 {
  font-size: 16px;
  margin: 24px 0 12px;
  font-weight: bold;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
  width: 100%;
}

.tee {
  text-align: left;
}

.thumb {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin-bottom: 8px;
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.name { margin: 2px 0; }
.price { margin: 2px 0 6px; }

.buy, .qbtn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: #000;
  text-decoration: underline;
  cursor: pointer;
}

.buy:disabled {
  color: #888;
  cursor: default;
}

.cart-table {
  border-collapse: collapse;
  width: 100%;
  max-width: 480px;
}

.cart-table td {
  padding: 4px 12px 4px 0;
  vertical-align: top;
}

.cart-table .qty { white-space: nowrap; }
.cart-table .line-price { white-space: nowrap; }
.cart-table .total-row td { padding-top: 10px; }

.empty { font-style: italic; }
.error { color: #a00; }

footer {
  margin-top: 32px;
  font-size: 11px;
}

footer .tiny {
  font-size: 10px;
  margin-top: 2px;
}

@media (max-width: 1024px) {
  body { padding: 28px 60px; }
}

@media (max-width: 700px) {
  body { padding: 20px 20px; font-size: 14px; }
  h1 { font-size: 28px; }
  h2 { font-size: 15px; margin: 20px 0 10px; }
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  nav { line-height: 2; }
  nav a { display: inline-block; }
  .buy { padding: 4px 0; }
}

@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; gap: 20px; }
}
