@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=EB+Garamond:wght@500;600;700&display=swap");

:root {
  --bg: #f4f6fb;
  --card: #e6edf6;
  --text: #111827;
  --muted: #6b7280;
  --accent: #111827;
  --accent-hover: #0b1220;
  --border: #e5e7eb;
}

body {
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}

h1, h2 {
  margin: 16px 0 8px;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #3f5b6d;
  color: #fff;
  border-radius: 18px;
  padding: 14px 20px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  margin-bottom: 14px;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.5px;
}

.legal {
  margin: 14px 0 8px;
  background: #f0f4f8;
  padding: 12px;
  border-radius: 12px;
  color: var(--muted);
  border: 1px dashed var(--border);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 8px;
}

.chip {
  border: 1px solid var(--border);
  background: #f7f9fc;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.chip-active {
  background: #3f5b6d;
  color: #fff;
  border-color: #3f5b6d;
}

.chip:hover {
  background: #3f5b6d;
  color: #fff;
  border-color: #3f5b6d;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  border: 1px solid #cfd9e6;
}

.cover {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}

.cover-wrap {
  overflow: hidden;
  border-radius: 10px;
  background: #dfe6f0;
  border: 1px solid #cfd9e6;
}

.card h3 {
  font-family: "EB Garamond", serif;
  font-size: 18px;
  margin: 6px 0;
}

.price {
  font-weight: bold;
  margin: 18px 0 12px;
  font-size: 22px;
}

.cart-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-badge {
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #cfd9e6;
  color: #1f2d3d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.cart-badge-active {
  background: #3f5b6d;
  color: #fff;
}

.cart-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #cfd9e6;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.cart-fab-active {
  background: #3f5b6d;
  color: #fff;
}

.cart-fab-icon {
  font-size: 22px;
}

.cart-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

input, textarea, button {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
}

button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  padding: 12px 14px;
  font-size: 15px;
}

button:hover {
  background: var(--accent-hover);
}

ul {
  padding-left: 20px;
}

.specs {
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.spec-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px dashed #cfd9e6;
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-row span {
  color: #3a4b5c;
}

.spec-row b {
  text-align: right;
  color: #1f2d3d;
  font-weight: 600;
  word-break: break-word;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 6px 0 2px;
}

.thumb {
  width: 100%;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #cfd9e6;
  cursor: pointer;
  opacity: 0.75;
}

.thumb-active {
  opacity: 1;
  border-color: #3f5b6d;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 6px 0 2px;
}

.thumb {
  width: 100%;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #cfd9e6;
}

@media (max-width: 780px) {
  .topbar {
    flex-direction: column;
    gap: 10px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cover {
    height: 220px;
  }
  .spec-row {
    grid-template-columns: 1fr;
  }
  .spec-row b {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .cover {
    height: 240px;
  }
}
