:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --text: #121826;
  --muted: #5d6578;
  --primary: #2457ff;
  --primary-dark: #1d46cb;
  --line: #e3e7f1;
  --radius: 14px;
}

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

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.page-container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.section {
  padding: 72px 0;
}

.section__title {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 28px;
}

.hero-banner {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
  background-image: url("assets/hero-bg.jpg");
  background-size: cover;
  background-position: center;
}

.hero-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(9, 13, 26, 0.8), rgba(9, 13, 26, 0.45));
}

.hero-banner__content {
  position: relative;
  z-index: 1;
  color: #ffffff;
}

.hero-banner__eyebrow {
  margin-bottom: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hero-banner__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  max-width: 12ch;
  margin-bottom: 24px;
}

.hero-banner__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.button--primary {
  color: #ffffff;
  background-color: var(--primary);
  box-shadow: 0 14px 24px rgba(36, 87, 255, 0.28);
}

.button--primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

.button--ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
}

.button--ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

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

.category-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 220px;
  cursor: pointer;
}

.category-card__link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9, 13, 26, 0.58), rgba(9, 13, 26, 0.14));
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-card:hover .category-card__meta {
  opacity: 1;
  transform: translateY(0);
}

.category-card__title {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  color: #ffffff;
  font-size: 1.2rem;
}

.category-card__meta {
  position: absolute;
  left: 14px;
  bottom: 44px;
  z-index: 3;
  color: #e9eefb;
  font-size: 0.88rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

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

.product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.product-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 16px 28px rgba(22, 31, 53, 0.12);
}

.product-card__image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.product-card:hover .product-card__image {
  transform: scale(1.04);
}

.product-card__media-link {
  display: block;
}

.product-card__body {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.product-card__title {
  font-size: 1.08rem;
}

.product-card__title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease;
}

.product-card__title-link:hover {
  color: var(--primary-dark);
}

.product-card__price {
  color: var(--primary-dark);
  font-size: 1.05rem;
  font-weight: 800;
}

.button--cart {
  position: relative;
  color: #ffffff;
  background-color: #1d2435;
  box-shadow: 0 8px 14px rgba(16, 24, 43, 0.2);
  overflow: hidden;
}

.button--cart:hover {
  background-color: #2a3450;
  box-shadow: 0 12px 18px rgba(16, 24, 43, 0.28);
}

.button--cart.is-added {
  animation: addedPulse 0.35s ease;
}

.button--cart.is-success {
  background-color: #1d8f5b;
  color: transparent;
}

.button--cart.is-success::before {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 700;
}

.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
  background: rgba(17, 26, 44, 0.82);
  backdrop-filter: blur(3px);
}

.product-card__badge--hot {
  background: #d83d2f;
}

.button--cart .button__pop {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #8be9bb;
  font-weight: 800;
  animation: cartPop 0.45s ease forwards;
}

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

.benefits--highlight {
  position: relative;
  background: linear-gradient(150deg, #ebf1ff 0%, #e3f0ff 45%, #edf3ff 100%);
}

.benefits__lead {
  margin-top: -8px;
  margin-bottom: 24px;
  max-width: 62ch;
  color: #4b5771;
}

.benefit-item {
  padding: 26px;
  border: 1px solid #cfdaf2;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #ffffff 0%, #f6f9ff 100%);
  box-shadow: 0 10px 20px rgba(29, 70, 203, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.benefit-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 24px rgba(29, 70, 203, 0.14);
}

.benefit-item__icon {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #dfe9ff;
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.benefit-item__title {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.benefit-item p {
  color: var(--muted);
}

.site-footer {
  margin-top: 24px;
  padding: 48px 0;
  border-top: 1px solid var(--line);
  background-color: #f1f4fb;
}

.footer__layout {
  display: grid;
  gap: 28px;
  grid-template-columns: 1.3fr 1fr 1fr;
}

.footer__title {
  margin-bottom: 8px;
}

.footer__text {
  color: var(--muted);
}

.footer__subtitle {
  margin-bottom: 10px;
}

.footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.footer__list a {
  color: var(--muted);
  text-decoration: none;
}

.footer__list a:hover {
  color: var(--text);
}

@keyframes addedPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.96);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes cartPop {
  0% {
    opacity: 0;
    transform: translateY(-20%) scale(0.8);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-120%) scale(1);
  }
}

@media (max-width: 1024px) {
  .category__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .products__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benefits__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .page-container {
    width: min(1200px, calc(100% - 32px));
  }

  .section {
    padding: 56px 0;
  }

  .hero-banner {
    min-height: 430px;
  }

  .hero-banner__actions .button {
    width: 100%;
  }

  .category__grid {
    grid-template-columns: 1fr;
  }

  .products__grid {
    grid-template-columns: 1fr;
  }

  .footer__layout {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
