:root {
  --bg: #f4f2ef;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --border: rgba(26, 26, 26, 0.08);
  --shadow: 0 1px 2px rgba(26, 26, 26, 0.04), 0 8px 24px rgba(26, 26, 26, 0.06);
  --radius: 14px;
  --radius-sm: 8px;
  --max-width: 1120px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2rem);
}

.page-title {
  margin: 0 0 clamp(1.75rem, 4vw, 2.5rem);
  font-size: clamp(1.75rem, 4.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.products-grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 1.75rem);
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 600px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 2px 4px rgba(26, 26, 26, 0.06), 0 12px 32px rgba(26, 26, 26, 0.08);
  transform: translateY(-2px);
}

.card__media {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  min-height: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(145deg, #ebe9e6 0%, #e0ddd8 100%);
}

.card__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: clamp(1rem, 2.5vw, 1.25rem);
}

.card__type {
  align-self: flex-start;
  margin: 0;
  padding: 0.25rem 0.6rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.card__title {
  margin: 0;
  font-size: clamp(1.0625rem, 2vw, 1.125rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.card__description {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.error {
  margin: 1.5rem 0 0;
  padding: 1rem 1.125rem;
  font-size: 0.9375rem;
  color: #7a1f1f;
  background: #fce8e8;
  border: 1px solid rgba(122, 31, 31, 0.15);
  border-radius: var(--radius-sm);
}

.local-load {
  margin: 0 0 clamp(1.75rem, 4vw, 2.5rem);
  padding: 1.25rem 1.25rem 1.35rem;
  max-width: 36rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.local-load__text {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.local-load__text code {
  font-size: 0.84em;
  padding: 0.1em 0.35em;
  background: var(--bg);
  border-radius: 4px;
  border: 1px solid var(--border);
}

.local-load__choose {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.local-load__choose input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.local-load__btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px rgba(26, 26, 26, 0.04);
}

.local-load__choose:hover .local-load__btn,
.local-load__choose:focus-within .local-load__btn {
  border-color: rgba(26, 26, 26, 0.14);
  box-shadow: 0 2px 6px rgba(26, 26, 26, 0.06);
}
