:root {
  --purple: #472859;
  --purple-footer: #442d5e;
  --pink: #e52269;
  --green: #23a455;
  --yellow: #ffe50e;
  --gray: #5b5b5b;
  --max-width: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: #fff; }

body {
  margin: 0;
  color: #333;
  background: #fff;
  font-family: "Roboto", Arial, sans-serif;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.container {
  width: min(calc(100% - 32px), var(--max-width));
  margin-inline: auto;
}

.hero {
  padding: 31px 0 29px;
  color: #fff;
  background: linear-gradient(180deg, var(--purple) 38%, #bf264f 100%);
  text-align: center;
}

.hero__inner { max-width: 1080px; }

.hero h1 {
  margin: 0 auto 27px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
  text-shadow: 0 2px 2px rgba(0, 0, 0, .35);
}

.hero p {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 2px 2px rgba(0, 0, 0, .35);
}

.hero h2 {
  margin: 0;
  color: var(--yellow);
  font-size: 33px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 2px 2px rgba(0, 0, 0, .35);
}

.catalog { padding: 42px 0 36px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 28px 40px;
}

.product-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #f7f7f7;
  box-shadow: 0 1px 9px rgba(0, 0, 0, .16);
}

.product-card > a {
  display: flex;
  height: 100%;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.product-card__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.08 / 1;
  background: #eee;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__image span {
  position: absolute;
  top: 18px;
  left: -42px;
  width: 155px;
  padding: 7px 0;
  transform: rotate(-45deg);
  color: #fff;
  background: #19a85b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
}

.product-card__content {
  display: flex;
  min-height: 245px;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 15px 11px 18px;
  text-align: center;
}

.product-card h2 {
  margin: 0 0 18px;
  color: var(--pink);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.1;
}

.product-card p {
  margin: auto 0 14px;
  color: var(--gray);
  font-size: 18px;
  line-height: 1.18;
}

.product-card p strong { font-weight: 800; }

.button {
  display: inline-flex;
  min-width: 140px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 5px;
  color: #fff;
  background: var(--green);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.product-card a:hover .button,
.product-card a:focus-visible .button { background: #177d40; }

footer {
  padding: 30px 0;
  color: rgba(255, 255, 255, .64);
  background: var(--purple-footer);
}

.footer__inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: center;
  gap: 50px;
}

.footer__brand {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.footer__brand img { width: 85px; opacity: .72; }

.instagram {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #a350d8;
  text-decoration: none;
}

.instagram svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.instagram__dot {
  fill: currentColor;
  stroke: none;
}

.footer__text { font-size: 15px; line-height: 1.7; text-align: center; }
.footer__text p { margin: 10px 0; }
.footer__text a { font-weight: 700; text-decoration: none; }
.footer__text a:hover, .footer__text a:focus-visible { color: #fff; }

@media (max-width: 900px) {
  .product-grid { gap: 20px 14px; }
  .product-card h2 { font-size: 20px; }
  .product-card p { font-size: 16px; }
  .product-card__content { min-height: 225px; }
}

@media (max-width: 700px) {
  .container { width: min(calc(100% - 16px), var(--max-width)); }
  .hero { padding: 45px 0 15px; }
  .hero h1 { margin-bottom: 24px; font-size: 24px; line-height: 1.08; }
  .hero p { margin-bottom: 13px; font-size: 23px; line-height: 1.08; }
  .hero h2 { font-size: 27px; line-height: 1.02; }
  .catalog { padding: 27px 0 30px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
  .product-card { border-radius: 8px; }
  .product-card__image { aspect-ratio: 1.02 / 1; }
  .product-card__image span { top: 13px; left: -48px; width: 145px; padding: 5px 0; font-size: 13px; }
  .product-card__content { min-height: 232px; padding: 13px 8px 16px; }
  .product-card h2 { margin-bottom: 13px; font-size: 19px; line-height: 1.08; }
  .product-card p { margin-bottom: 12px; font-size: 15px; line-height: 1.12; }
  .button { min-width: 0; width: min(125px, 100%); min-height: 39px; padding: 9px 8px; font-size: 14px; }
  footer { padding: 30px 0; }
  .footer__inner { grid-template-columns: 1fr; gap: 22px; }
  .footer__brand img { width: 74px; }
  .footer__text { font-size: 13px; }
}

@media (max-width: 339px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-card { max-width: 260px; margin-inline: auto; }
}
