@font-face {
  font-family: "TT Hoves Pro";
  src: url("./assets/fonts/TT_Hoves_Pro_Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* primary */
  --primary-white: #ffffff;
  --primary-dark: var(--gray-gray-900);

  /* layout */
  --layout-max-width: 876px;
  --grid-columns: 12;
  --grid-column-width: calc(var(--layout-max-width) / var(--grid-columns));

  /* gray */
  --gray-gray-50: #fafafa;
  --gray-gray-100: #f6f7f9;
  --gray-gray-200: #e5e7ea;
  --gray-gray-300: #ced2d6;
  --gray-gray-400: #9ea5ad;
  --gray-gray-500: #676e76;
  --gray-gray-600: #596066;
  --gray-gray-700: #454c52;
  --gray-gray-800: #383f45;
  --gray-gray-900: #24292e;
  --gray-gray-1000: #1a1d1f;

  /* system */
  --system-green: #53b483;
  --system-orange: #e9a23b;
  --system-red: #f34141;

  /* text */
  --text-primary: var(--gray-gray-900);
  --text-secondary: var(--gray-gray-500);
  --text-disabled: var(--gray-gray-300);
  --text-success: var(--system-green);
  --text-warning: var(--system-orange);
  --text-error: var(--system-red);
  --text-on-color: var(--primary-white);

  /* button */
  --button-text: var(--primary-white);
  --button-primary: var(--gray-gray-900);
  --button-hovered: var(--gray-gray-1000);

  /* background */
  --b-g-primary: var(--gray-gray-100);
  --b-g-secondary: var(--primary-white);

  /* icon */
  --icon-primary: var(--primary-dark);
  --icon-primary-on-color: var(--primary-white);
  --icon-notification: var(--system-red);
  --icon-secondary: var(--gray-gray-400);
  --icon-disabled: var(--gray-gray-300);

  /* border */
  --border-primary: var(--gray-gray-200);

  /* spacing */
  --spacing-x0: 0px;
  --spacing-x1: 4px;
  --spacing-x2: 8px;
  --spacing-x3: 16px;
  --spacing-x4: 20px;
  --spacing-x5: 24px;
  --spacing-x6: 32px;
  --spacing-x7: 48px;
  --spacing-x8: 64px;
  --spacing-x9: 999px;

  /* typography */
  --font-family-base: "TT Hoves Pro", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-weight-regular: 400;
  --line-height-auto: 1.2;
  --font-size-32: 32px;
  --font-size-24: 24px;
  --font-size-20: 20px;
  --font-size-18: 18px;
  --font-size-16: 16px;
  --font-size-14: 14px;
  --font-size-13: 13px;

  /* shadow */
  --shadow-100: 0 0 32px 0 rgba(40, 41, 61, 0.05);
  --accent-red: #bf1b2c;
  --accent-red-hover: #aa1827;
}

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

body {
  margin: 0;
  background-color: var(--b-g-primary);
  color: var(--text-primary);
  font-family: var(--font-family-base);
  font-size: var(--font-size-16);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-auto);
  padding-top: 96px;
}

.text-32 {
  font-size: var(--font-size-32);
  line-height: var(--line-height-auto);
}

.text-24 {
  font-size: var(--font-size-24);
  line-height: var(--line-height-auto);
}

.text-20 {
  font-size: var(--font-size-20);
  line-height: var(--line-height-auto);
}

.text-18 {
  font-size: var(--font-size-18);
  line-height: var(--line-height-auto);
}

.text-16 {
  font-size: var(--font-size-16);
  line-height: var(--line-height-auto);
}

.text-14 {
  font-size: var(--font-size-14);
  line-height: var(--line-height-auto);
}

.text-13 {
  font-size: var(--font-size-13);
  line-height: var(--line-height-auto);
}

.shadow-100 {
  box-shadow: var(--shadow-100);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: var(--spacing-x3) 0;
  -webkit-backdrop-filter: blur(32px);
  backdrop-filter: blur(32px);
  background: rgba(255, 255, 255, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-x5);
  width: 100%;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-x3);
}

.header-profile {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-x3);
  min-width: 0;
}

.header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.header-name {
  color: var(--text-primary);
  white-space: nowrap;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-x2);
  flex-wrap: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-x2);
  padding: var(--spacing-x2) var(--spacing-x3);
  border-radius: var(--spacing-x6);
  border: 1px solid var(--border-primary);
  background-color: var(--b-g-secondary);
  color: var(--text-primary);
  text-decoration: none;
  font-size: var(--font-size-16);
  line-height: var(--line-height-auto);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.chip:hover {
  border-color: var(--gray-gray-300);
  box-shadow: 0 0 0 4px rgba(36, 41, 46, 0.05);
}

.chip-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.chip-label {
  white-space: nowrap;
}

.chip-ghost {
  padding-left: var(--spacing-x4);
  padding-right: var(--spacing-x4);
}

.page-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-x7);
  width: 100%;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: var(--spacing-x7) var(--spacing-x3) var(--spacing-x8);
}

.hero-card {
  display: flex;
  align-items: center;
  gap: var(--spacing-x6);
  width: 100%;
  padding: var(--spacing-x6);
  background-color: var(--b-g-secondary);
  border: 1px solid var(--gray-gray-200);
  border-radius: var(--spacing-x5);
  box-shadow: var(--shadow-100);
}

.hero-content {
  flex: 1 1 0;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-x2);
  margin-bottom: var(--spacing-x4);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-x2) var(--spacing-x3);
  border-radius: var(--spacing-x4);
  border: 1px solid var(--gray-gray-200);
  background-color: var(--gray-gray-50);
  color: var(--text-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-auto);
}

.hero-headline {
  margin: 0 0 var(--spacing-x2);
  color: var(--text-primary);
}

.hero-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-size-18);
}

.hero-visual {
  flex-shrink: 0;
  width: 246px;
  height: 232px;
  overflow: hidden;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-card {
  display: flex;
  gap: var(--spacing-x6);
  width: 100%;
  padding: var(--spacing-x6);
  background-color: var(--b-g-secondary);
  border: 1px solid var(--gray-gray-200);
  border-radius: 24px;
  box-shadow: var(--shadow-100);
}

.case-product {
  flex: 0 0 320px;
  background-color: var(--primary-white);
  border: 1px solid var(--gray-gray-200);
  border-radius: 20px;
  box-shadow: var(--shadow-100);
  padding: var(--spacing-x5);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-x4);
  position: relative;
}

.product-media {
  position: relative;
  background-color: #f6f8fb;
  border-radius: 16px;
  padding: var(--spacing-x4);
  overflow: hidden;
}

.product-media img {
  width: 100%;
  display: block;
}

.badge {
  position: absolute;
  top: var(--spacing-x3);
  left: var(--spacing-x3);
  width: 32px;
  height: 32px;
}

.badge-hit {
  display: inline-block;
  background: center / contain no-repeat url("./assets/item-card/hits.svg");
}

.icon-button {
  position: absolute;
  top: var(--spacing-x3);
  right: var(--spacing-x3);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--gray-gray-200);
  background-color: var(--primary-white);
  color: var(--gray-gray-300);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-100);
  transition: color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.icon-button:hover {
  border-color: var(--gray-gray-300);
}

.favorite::before {
  content: "";
  width: 18px;
  height: 18px;
  display: block;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.66 12.98 9.82 19.47c1.18 1.25 3.16 1.25 4.34 0l6.16-6.49a6.5 6.5 0 0 0-.16-8.46 6.18 6.18 0 0 0-8.04-.37 0.62 0.62 0 0 1-.84 0 6.18 6.18 0 0 0-8.04.37 6.5 6.5 0 0 0-.18 8.46Z' stroke='currentColor' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
}

.favorite:hover {
  color: var(--primary-dark);
}

.favorite.is-active {
  color: var(--accent-red);
  border-color: rgba(191, 27, 44, 0.15);
  box-shadow: 0 0 0 4px rgba(191, 27, 44, 0.08);
}

.favorite.is-active::before {
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.66 12.98 9.82 19.47c1.18 1.25 3.16 1.25 4.34 0l6.16-6.49a6.5 6.5 0 0 0-.16-8.46 6.18 6.18 0 0 0-8.04-.37 0.62 0.62 0 0 1-.84 0 6.18 6.18 0 0 0-8.04.37 6.5 6.5 0 0 0-.18 8.46Z' stroke='currentColor' stroke-width='1.5' fill='currentColor'/%3E%3C/svg%3E");
}

.product-price {
  display: flex;
  align-items: center;
  gap: var(--spacing-x2);
}

.price-current {
  font-size: var(--font-size-20);
  font-weight: 600;
}

.price-old {
  font-size: var(--font-size-16);
  color: var(--gray-gray-400);
  text-decoration: line-through;
}

.product-title {
  margin: 0;
  color: var(--text-primary);
}

.product-stock {
  display: flex;
  align-items: center;
  gap: var(--spacing-x2);
  color: var(--text-secondary);
}

.stock-dots {
  display: inline-flex;
  gap: 4px;
}

.stock-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4caf50;
}

.product-actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-x3);
  margin-top: auto;
  position: relative;
  min-height: 60px;
}

.primary-cta {
  padding: var(--spacing-x3) var(--spacing-x4);
  background: var(--accent-red);
  color: var(--primary-white);
  border: 1px solid var(--accent-red-hover);
  border-radius: 18px;
  font-size: var(--font-size-16);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-x2);
  width: 100%;
  position: absolute;
  inset: 0;
  transition: opacity 200ms ease, transform 200ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.cta-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
}

.primary-cta:hover {
  background: var(--accent-red-hover);
}

.quantity-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-x3);
  padding: var(--spacing-x3) var(--spacing-x4);
  background: var(--accent-red);
  border: 1px solid var(--accent-red-hover);
  border-radius: 18px;
  color: var(--primary-white);
  font-size: var(--font-size-16);
  width: 100%;
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.case-product.is-added .primary-cta {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

.case-product.is-added .quantity-cta {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.qty-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.08);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.qty-btn::before {
  content: "";
  width: 24px;
  height: 24px;
  display: block;
}

.qty-btn.minus::before {
  mask: center / contain no-repeat url("./assets/item-card/Minus.svg");
  -webkit-mask: center / contain no-repeat url("./assets/item-card/Minus.svg");
  background: var(--primary-white);
}

.qty-btn.plus::before {
  mask: center / contain no-repeat url("./assets/item-card/Plus.svg");
  -webkit-mask: center / contain no-repeat url("./assets/item-card/Plus.svg");
  background: var(--primary-white);
}

.primary-cta {
  margin-top: auto;
  padding: var(--spacing-x3) var(--spacing-x4);
  background: #c1272d;
  color: var(--primary-white);
  border: 1px solid #b02026;
  border-radius: 14px;
  font-size: var(--font-size-16);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-x2);
}

.cta-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 3h1.5l1.2 7.2a1 1 0 0 0 1 .8h5.8a1 1 0 0 0 1-.8l.7-3.7H6' stroke='white' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='7' cy='13.5' r='1' fill='white'/%3E%3Ccircle cx='12.5' cy='13.5' r='1' fill='white'/%3E%3C/svg%3E");
}

.primary-cta:hover {
  filter: brightness(0.95);
}

.case-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-x4);
  padding-top: var(--spacing-x2);
}

.case-meta {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-x2);
  color: var(--text-secondary);
}

.case-divider {
  color: var(--gray-gray-300);
}

.case-title {
  margin: 0;
  color: var(--text-primary);
}

.case-text {
  margin: 0;
  color: var(--text-primary);
}

.secondary-cta {
  margin-top: auto;
  align-self: flex-start;
  padding: var(--spacing-x3) var(--spacing-x6);
  border: 1px solid var(--gray-gray-200);
  border-radius: 22px;
  color: var(--text-primary);
  text-decoration: none;
  background: var(--primary-white);
}

.secondary-cta:hover {
  border-color: var(--gray-gray-300);
}

@media (max-width: 1024px) {
  .header-inner {
    padding: 0 var(--spacing-x4);
  }

  .hero-card {
    gap: var(--spacing-x5);
  }

  .case-card {
    gap: var(--spacing-x5);
  }
}

@media (max-width: 720px) {
  body {
    padding-top: 84px;
  }

  .site-header {
    padding: var(--spacing-x2) 0;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-x3);
    padding: 0 var(--spacing-x4);
  }

  .header-actions {
    flex-wrap: wrap;
    gap: var(--spacing-x3);
  }

  .chip {
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    gap: var(--spacing-x3);
    box-shadow: none;
  }

  .chip:hover {
    border-color: transparent;
    box-shadow: none;
  }

  .chip-icon {
    display: none;
  }

  .hero-card {
    flex-direction: column-reverse;
    width: 100%;
    gap: var(--spacing-x4);
    padding: var(--spacing-x5);
  }

  .hero-visual {
    width: 100%;
    max-width: 320px;
    height: auto;
    aspect-ratio: 246 / 232;
    align-self: center;
  }

  .hero-visual img {
    height: 100%;
  }

  .hero-headline {
    font-size: var(--font-size-24);
  }

  .case-card {
    flex-direction: column;
    padding: var(--spacing-x5);
  }

  .case-product {
    width: 100%;
    flex: initial;
  }

  .secondary-cta {
    width: 100%;
    text-align: center;
  }
}

/* Фон для главной страницы */
.main-page-bg {
  position: relative;
}

.main-page-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(36, 41, 46, 0.07) 1px, transparent 0);
  background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 40%, transparent 100%);
}
