* { box-sizing: border-box; }
:root {
  --product-accent: #f15b35;
  --product-ink: #172033;
  --product-muted: #687385;
  --product-surface: #f7f7f7;
  --product-card: #ffffff;
}
html { scroll-behavior: smooth; }


/* Products section */
.products-section {
  width: 100%;
  padding: 76px 0 88px;
  background: var(--product-surface);
}
.products-container {
  width: min(1600px, calc(100% - 64px));
  margin: 0 auto;
}
.products-heading {
  text-align: center;
  margin: 0 auto 42px;
  max-width: 720px;
}
.products-kicker {
  display: block;
  margin-bottom: 9px;
  color: var(--product-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
}
.products-heading h2 {
  margin: 0;
  color: var(--product-accent);
  font: 800 clamp(30px, 3.1vw, 42px)/1.15 "Manrope", sans-serif;
  letter-spacing: -.8px;
}
.products-heading p {
  margin: 13px 0 0;
  color: var(--product-muted);
  font-size: 15px;
  line-height: 1.7;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 24px;
}
.product-card {
  appearance: none;
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(25, 35, 50, .06);
  border-radius: 2px;
  background: var(--product-card);
  box-shadow: 0 5px 16px rgba(20, 30, 45, .13);
  text-align: left;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.product-card:hover,
.product-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 12px 26px rgba(20, 30, 45, .17);
  outline: none;
}
.product-card:focus-visible { outline: 2px solid var(--product-accent); outline-offset: 3px; }
.product-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f0ece6;
}
.product-card-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 5px 4px;
}
.product-card-title {
  margin: 0;
  color: var(--product-ink);
  font: 700 15px/1.35 "Manrope", sans-serif;
}
.product-card-category {
  display: block;
  margin-top: 4px;
  color: var(--product-muted);
  font-size: 11px;
  line-height: 1.4;
}
.product-card-icon {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(241, 91, 53, .35);
  border-radius: 50%;
  color: var(--product-accent);
  font-size: 17px;
  transition: background .2s, color .2s;
}
.product-card:hover .product-card-icon { background: var(--product-accent); color: #fff; }
.products-note {
  margin: 36px 0 0;
  text-align: center;
  color: var(--product-muted);
  font-size: 14px;
}
.products-note a { color: var(--product-accent); font-weight: 700; text-decoration: none; }
.products-note a:hover { text-decoration: underline; }

/* Image preview */
.product-dialog {
  width: min(92vw, 760px);
  max-width: 760px;
  max-height: 92vh;
  padding: 18px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
  overflow: visible;
}
.product-dialog::backdrop { background: rgba(8, 18, 35, .78); backdrop-filter: blur(4px); }
.dialog-content { display: grid; grid-template-columns: minmax(0, 1fr) 210px; align-items: center; gap: 20px; }
.dialog-content img { display: block; width: 100%; max-height: 76vh; object-fit: contain; background: #f5f2ed; }
.dialog-caption h3 { margin: 6px 0 0; color: var(--product-ink); font: 800 21px/1.3 "Manrope", sans-serif; }
.dialog-category { margin: 0; color: var(--product-accent); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.dialog-close, .dialog-arrow {
  position: absolute;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #182235;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0,0,0,.18);
}
.dialog-close { top: -14px; right: -14px; width: 38px; height: 38px; font-size: 27px; line-height: 1; }
.dialog-arrow { top: 50%; width: 38px; height: 38px; font-size: 15px; transform: translateY(-50%); }
.dialog-prev { left: -19px; }
.dialog-next { right: -19px; }

@media (max-width: 900px) {
  .products-section { padding: 64px 0 72px; }
  .products-container { width: min(760px, calc(100% - 48px)); }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .product-card-title { font-size: 14px; }
}
@media (max-width: 560px) {
  .products-section { padding: 48px 0 58px; }
  .products-container { width: calc(100% - 32px); }
  .products-heading { margin-bottom: 27px; }
  .products-kicker { font-size: 9px; letter-spacing: 2px; }
  .products-heading h2 { font-size: 29px; }
  .products-heading p { max-width: 320px; margin: 10px auto 0; font-size: 13px; }
  .products-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 13px; }
  .product-card { padding: 6px; }
  .product-card-info { align-items: flex-start; padding: 9px 3px 3px; }
  .product-card-title { font-size: 11px; line-height: 1.35; }
  .product-card-category { font-size: 9px; }
  .product-card-icon { flex-basis: 24px; width: 24px; height: 24px; font-size: 13px; }
  .products-note { margin-top: 25px; font-size: 12px; line-height: 1.6; }
  .product-dialog { padding: 12px; }
  .dialog-content { grid-template-columns: 1fr; gap: 12px; }
  .dialog-content img { max-height: 68vh; }
  .dialog-caption { text-align: center; }
  .dialog-caption h3 { font-size: 17px; }
  .dialog-prev { left: -10px; }
  .dialog-next { right: -10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
