:root {
  --container: 1120px;
  --black: #111111;
  --dark: #202020;
  --muted: #5d5d5d;
  --line: #d2d2d2;
  --accent: #1682f2;
  --accent-dark: #0f6fd1;
  --white: #ffffff;
  --section-gap: 70px;
  --heading-font: "IBMPlexSerif-SemiBold", "IBM Plex Serif", Georgia, serif;
  --body-font: "IstokWeb-Regular", "Istok Web", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--black);
  background: var(--white);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.45;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.container {
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(24, 24, 24, 0.76);
  color: var(--white);
  backdrop-filter: blur(6px);
}

.site-header--dark {
  position: sticky;
  background: var(--dark);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  gap: 28px;
}

.logo,
.footer__logo {
  font-family: var(--heading-font);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  order: 1;
  flex: 1;
  gap: 28px;
  max-width: 850px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav a {
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: #8dc4ff;
}

.nav__phone {
  margin-left: auto;
  white-space: nowrap;
}

.cart-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  order: 2;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.cart-link:hover,
.cart-link:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

.cart-link img {
  width: 28px;
  height: 25px;
  object-fit: contain;
}

.burger {
  display: none;
  order: 3;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--white);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.is-open .burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-open .burger span:nth-child(2) {
  opacity: 0;
}

.site-header.is-open .burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 640px;
  padding: 120px 0 72px;
  color: var(--white);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.68) 0%, rgba(0, 0, 0, 0.38) 46%, rgba(0, 0, 0, 0.2) 100%),
    url("../images/hero.png") center / cover no-repeat;
}

.hero__content {
  position: relative;
  z-index: 1;
}

h1,
h2 {
  margin: 0;
  font-family: var(--heading-font);
  font-weight: 400;
  line-height: 1.12;
}

h1 {
  max-width: 560px;
  font-size: 46px;
}

h2 {
  margin-bottom: 32px;
  font-size: 42px;
}

.hero p {
  max-width: 550px;
  margin: 24px 0 26px;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.22;
}

.button,
.product-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 5px;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.button:hover,
.button:focus-visible,
.product-card:hover .product-card__button,
.product-card:focus-visible .product-card__button {
  background: var(--accent-dark);
}

.section {
  padding-top: var(--section-gap);
}

.collection {
  padding-bottom: var(--section-gap);
}

.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px 28px;
}

.product-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
  color: var(--black);
  outline-offset: 6px;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1.08;
  object-fit: cover;
  background: #d8d8d8;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.product-card:hover img,
.product-card:focus-visible img {
  filter: brightness(0.96);
  transform: translateY(-2px);
}

.product-card__title {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.product-card__price {
  display: block;
  color: var(--muted);
  font-size: 17px;
}

.product-card__button {
  width: max-content;
  margin-top: 2px;
}

.faq {
  padding-bottom: var(--section-gap);
}

.accordion {
  border-top: 1px solid var(--line);
}

.accordion__item {
  border-bottom: 1px solid var(--line);
}

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 72px;
  padding: 18px 0;
  border: 0;
  background: transparent;
  color: var(--black);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.accordion__icon {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-left: 24px;
}

.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 3px;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transition: transform 0.2s ease;
}

.accordion__icon::after {
  transform: rotate(90deg);
}

.accordion__item.is-open .accordion__icon::after {
  transform: rotate(0deg);
}

.accordion__panel {
  padding: 0 48px 20px 0;
}

.accordion__panel p {
  margin: 0;
}

.footer {
  padding: 70px 0;
  background: var(--dark);
  color: var(--white);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.footer__contacts p {
  margin: 0;
  color: #e1e1e1;
}

.single-product-page {
  padding: 34px 0 70px;
}

.product-detail {
  padding-top: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 34px;
  font-size: 20px;
  transition: color 0.2s ease;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--accent);
}

.product-detail__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.95fr);
  gap: 30px;
  align-items: start;
}

.product-gallery {
  min-width: 0;
}

.product-gallery__main {
  position: relative;
  background: #d8d8d8;
}

.product-gallery__main img {
  width: 100%;
  aspect-ratio: 1 / 1.08;
  object-fit: cover;
}

.gallery-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--accent);
  font-size: 56px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.gallery-arrow:hover,
.gallery-arrow:focus-visible {
  color: var(--accent-dark);
  transform: translateY(-50%) scale(1.04);
}

.gallery-arrow span {
  display: block;
  margin-top: -8px;
}

.gallery-arrow--prev {
  left: 38px;
}

.gallery-arrow--next {
  right: 38px;
}

.product-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.product-gallery__thumb {
  padding: 0;
  border: 2px solid transparent;
  background: #d8d8d8;
  cursor: pointer;
  transition: border-color 0.2s ease, filter 0.2s ease;
}

.product-gallery__thumb:hover,
.product-gallery__thumb:focus-visible,
.product-gallery__thumb.is-active {
  border-color: var(--accent);
}

.product-gallery__thumb img {
  width: 100%;
  aspect-ratio: 1 / 1.08;
  object-fit: cover;
}

.product-info h1 {
  max-width: none;
  font-size: 42px;
}

.product-info__sku {
  margin: 2px 0 30px;
  font-size: 18px;
}

.product-info__price {
  margin: 0 0 28px;
  font-family: var(--heading-font);
  font-size: 42px;
  line-height: 1;
}

.product-sizes {
  margin-bottom: 34px;
}

.product-sizes__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.product-sizes__head p {
  margin: 0;
  font-size: 20px;
}

.product-sizes__head a {
  color: var(--accent);
  font-size: 16px;
}

.product-sizes__head a:hover,
.product-sizes__head a:focus-visible {
  color: var(--accent-dark);
}

.product-sizes__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-sizes__list label {
  cursor: pointer;
}

.product-sizes__list input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.product-sizes__list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 11px;
  border: 1px solid var(--black);
  border-radius: 4px;
  background: var(--white);
  font-size: 16px;
  line-height: 1;
}

.product-sizes__list input:checked + span,
.product-sizes__list input:focus-visible + span {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.product-info__cart {
  min-height: 46px;
  margin-bottom: 46px;
  border: 0;
  font-size: 20px;
  cursor: pointer;
}

.product-description h2 {
  margin: 0 0 16px;
  font-family: var(--body-font);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.product-description h2:not(:first-child) {
  margin-top: 28px;
}

.product-description p {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

@media (max-width: 900px) {
  :root {
    --section-gap: 54px;
  }

  .container {
    width: min(100% - 32px, var(--container));
  }

  .header__inner {
    min-height: 68px;
    gap: 10px;
  }

  .burger {
    display: block;
  }

  .nav {
    position: absolute;
    top: 68px;
    left: 0;
    display: grid;
    width: 100%;
    max-width: none;
    padding: 22px 16px 28px;
    background: rgba(24, 24, 24, 0.96);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .cart-link {
    margin-left: auto;
    width: 40px;
    height: 40px;
  }

  .cart-link img {
    width: 26px;
    height: 23px;
  }

  .site-header.is-open .nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav__phone {
    margin-left: 0;
  }

  .hero {
    min-height: 560px;
    padding-top: 112px;
  }

  h1 {
    font-size: 38px;
  }

  h2 {
    font-size: 34px;
  }

  .hero p {
    max-width: 480px;
    font-size: 21px;
  }

  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .single-product-page {
    padding: 28px 0 54px;
  }

  .product-detail__grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .product-info h1,
  .product-info__price {
    font-size: 36px;
  }

  .product-description p {
    font-size: 18px;
  }
}

@media (max-width: 600px) {
  .container {
    width: min(100% - 24px, var(--container));
  }

  .logo {
    font-size: 21px;
  }

  .hero {
    min-height: 520px;
    padding-bottom: 48px;
  }

  .hero__bg {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.5) 100%),
      url("../images/hero.png") 60% center / cover no-repeat;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    margin-bottom: 24px;
    font-size: 31px;
  }

  .hero p {
    font-size: 19px;
  }

  .products {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .product-card__button {
    width: 100%;
  }

  .back-link {
    margin-bottom: 24px;
    font-size: 18px;
  }

  .product-gallery__main img {
    aspect-ratio: 1 / 1.12;
  }

  .gallery-arrow {
    width: 46px;
    height: 46px;
    font-size: 46px;
  }

  .gallery-arrow--prev {
    left: 16px;
  }

  .gallery-arrow--next {
    right: 16px;
  }

  .product-gallery__thumbs {
    gap: 10px;
    margin-top: 12px;
  }

  .product-info h1,
  .product-info__price {
    font-size: 31px;
  }

  .product-info__sku {
    margin-bottom: 24px;
  }

  .product-sizes__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .product-info__cart {
    width: 100%;
    margin-bottom: 36px;
    font-size: 18px;
  }

  .product-description h2 {
    font-size: 18px;
  }

  .product-description p {
    font-size: 17px;
  }

  .accordion__trigger {
    min-height: 64px;
  }

  .footer {
    padding: 48px 0;
  }

  .footer__inner {
    align-items: flex-start;
    flex-direction: column-reverse;
  }
}
