:root {
  --space-unit: 1rem; /* Adjust space unit as needed */
  --font-primary: Arial, Helvetica, sans-serif; /* Use an appropriate font */
  --color-text: #333; /* Adjust text color as needed */
  --color-background: #F6F6F6; /* Adjust background color as needed */
  --color-product-background: #EEE; /* Background color for product cards */
  --minimum-column-width: 40ch; /* Minimum column width for the grid */
  --size-step-0: clamp(1rem, 0.9821rem + 0.0893vw, 1.125rem);
  --size-step-1: clamp(1.25rem, 1.2144rem + 0.1781vw, 1.4994rem);
  --size-step-2: clamp(1.5625rem, 1.5002rem + 0.3116vw, 1.9988rem);
  --size-step-3: clamp(1.9531rem, 1.8515rem + 0.508vw, 2.6644rem);
  --size-step-4: clamp(2.4413rem, 2.2826rem + 0.7933vw, 3.5519rem);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  font-size: var(--size-step-0);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-background);
  padding: 2rem;
  word-spacing: 0.016em;
  letter-spacing: 0.012em;
}

header {
  padding-block-end: var(--space-unit);
}

h1 {
  /* font-size: clamp(1.5rem, 4vw, 2rem); */
  font-size: var(--size-step-4);
  max-width: 70ch;
  line-height: 1.1;
  margin-block-end: 2rem;
  font-weight: normal;
}

h2 {
  /* font-size: clamp(1.5rem, 3vw, 1.5rem); */
  font-size: var(--size-step-3);
  font-weight: normal;
  max-width: 60ch;
  margin-block-end: var(--space-unit);
}

.product-grid {
  display: grid;
  grid-gap: var(--space-unit);
  grid-template-columns: repeat(auto-fit, minmax(min(var(--minimum-column-width), 100%), 1fr));
}

.product {
  display: flex;
  flex-direction: column;
}

.product:hover {
  cursor: pointer;
}

.product-header {
  display: flex;
  justify-content: space-between;
}

.product img {
  max-inline-size: 100%;
  height: auto;
  margin-block-end: var(--space-unit);
  background-color: var(--color-product-background);
  transition: transform 0.3s ease;
}

.product:hover img {
  transform: translateY(-0.2rem);
  background-color: #E3E3E3; /* Changes background color of the image */
}

.product-name {
  margin-block-end: calc(2 * var(--space-unit)); /* Double the space below the description */
}

.product-page {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 50% image and 50% text */
  align-items: center;
  gap: 1rem;
}

.product-image img {
  width: 100%;
  height: auto;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
