/* ============================================
   LANDING (Shop main)
   Page styles for index.html (landing sections only)

   Shared layout (top bar/header/footer/mobile-nav): assets/css/layout.css
   ============================================ */

/* --------------------------------------------
   Hero
   -------------------------------------------- */

.hero {
  position: relative;
  height: 640px;
  background: var(--color-black);
  overflow: hidden;
}

/* ВАЖНО: даём опорную высоту для % и absolute-элементов */
.hero .container {
  position: relative;
  height: 100%;
}

.hero__bg {
  position: absolute;
  inset: 0;
}

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

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0) 55%,
      rgba(0, 0, 0, 0.28) 100%
    );
  pointer-events: none;
}

.hero__content {
  position: relative;
  height: 100%;
}

.hero__center {
  position: absolute;
  left: 50%;
  top: 39%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;

  /* gap 32px desktop */
  gap: var(--space-8);

  text-align: center;
}

.hero__logo-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__logo-circle img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.hero__title {
  font-size: var(--text-display);
  font-weight: var(--font-semibold);
  color: var(--color-white);
  line-height: 1.05;
}

.hero__text {
  position: absolute;
  left: 0;

  /* было 84px -> 64 + 20 */
  bottom: calc(var(--space-16) + var(--space-5));

  max-width: 680px;
  color: var(--color-white);

  /* h3 алиас */
  font-size: var(--text-h3);

  font-weight: var(--font-medium);
  line-height: 1.35;
}

.hero__text-line {
  display: block;
}

/* --------------------------------------------
   About
   -------------------------------------------- */

.about-grid {
  display: flex;
  align-items: center; /* контент слева по вертикали по центру (desktop) */
  justify-content: space-between;
  gap: var(--space-8);
}

.about-content {
  display: flex;
  flex-direction: column;
  justify-content: center;

  /* расстояние между заголовком и текстом */
  gap: var(--space-8);

  /* левая колонка уже правой */
  flex: 1;
}

.about-text {
  max-width: 52ch;
  font-size: var(--fs-text-d);
  line-height: 1.65;
  color: var(--color-text-secondary);
}

.about-text p + p {
  margin-top: var(--space-4);
}

.about-images {
  /* правая часть должна быть больше половины:
     57.6% от 1216 ≈ 700px (как в макете), но без px */
  flex: 0 0 57.6%;

  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);

  /* 10px gap — делаем почти “токенами” */
  gap: calc(var(--space-2) + 2px);

  /* 700x500 -> ratio 7/5 */
  aspect-ratio: 7 / 5;
}

.about-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* --------------------------------------------
   Uniqueness
   -------------------------------------------- */

.section--white {
  background: var(--color-white);
}

.uniqueness-grid {
  display: grid;

  /* 489px из 1216px ≈ 40.2% (картинка меньше половины) */
  grid-template-columns: 40.2% 1fr;

  gap: var(--space-8);

  align-items: start;
  margin-top: var(--space-8);
}

.uniqueness-img img {
  width: 100%;
  aspect-ratio: 560 / 540;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.uniqueness-list {
  border-top: 1px solid var(--stroke-landing);
}

.uniqueness-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--stroke-landing);
}

.uniqueness-item__title {
  font-size: var(--fs-h4-d);
  font-weight: var(--font-medium);
  color: var(--color-text-accent);
  margin-bottom: 10px;
}

.uniqueness-item__text {
  font-size: var(--fs-text-d);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.uniqueness-item__num {
  font-size: 64px;
  font-weight: 300;
  color: var(--color-text-tertiary);
  line-height: 1;
  padding-top: 4px;
}

/* --------------------------------------------
   Catalog
   -------------------------------------------- */

.catalog-search {
  margin-top: var(--space-12);
  position: relative;
}

.catalog-search__input {
  width: 100%;
  height: 52px;
  border-radius: 12px;
  border: none;
  background: var(--color-surface-muted);
  padding: 0 16px 0 44px;
  font-size: var(--fs-text-d);
  color: var(--color-text-accent);
}

.catalog-search__input::placeholder {
  color: var(--color-text-tertiary);
}

.catalog-search__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--color-text-tertiary);
  fill: none;
}

.catalog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.badge {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke-landing);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: var(--fs-text-sm-d);
  line-height: 1;
}

.badge:hover {
  border-color: var(--color-border-dark);
}

.catalog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-12);
}

.pagination-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #d5d5d5;
  background: var(--color-white);
  color: #464646;
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.pagination-btn.is-active {
  border-color: var(--color-action);
  color: var(--color-action);
  font-weight: 500;
}

.pagination-btn svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
}

/* --------------------------------------------
   Slider header controls (Similar products / Reviews)
   -------------------------------------------- */

.slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.slider-controls {
  display: inline-flex;
  gap: 12px;
}

.circle-control {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--stroke-landing);
  background: transparent;
  color: var(--color-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.circle-control svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}

.progress-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.progress-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(146, 153, 147, 0.35);
}

.progress-dots span.is-active {
  width: 44px;
  background: rgba(146, 153, 147, 0.75);
}

/* --------------------------------------------
   Similar products
   -------------------------------------------- */

.similar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  margin-block: var(--space-12);
}

/* --------------------------------------------
   Quality section
   -------------------------------------------- */

.quality {
  margin-block: var(--layout-space-section);
}

.quality__image {
  height: 520px;
  overflow: hidden;
}

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

.quality__content {
  padding-top: 28px;
}

.quality__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.quality__title {
  font-size: var(--fs-h1-d);
  font-weight: var(--font-semibold);
  color: var(--color-text-accent);
  line-height: 1.05;
}

/* --------------------------------------------
   Catalog: "Show all" (mobile)
   -------------------------------------------- */

.btn-outline {
  width: 100%;
  height: 52px;
  border-radius: 999px;
  border: 1px solid var(--stroke-landing);
  background: transparent;
  color: var(--color-text-tertiary);
  font-size: var(--fs-text-d);
  font-weight: var(--font-medium);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.catalog-showall {
  display: none;
  margin-top: 24px;
}

.quality__text {
  color: var(--color-text-secondary);
  font-size: var(--fs-text-d);
  line-height: 1.65;
}

/* --------------------------------------------
   Reviews
   -------------------------------------------- */

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-block: var(--space-12);
}

.review-card {
  border: 1px solid var(--stroke-landing);
  background: var(--color-white);
  padding: 24px;
}

.review-stars {
  letter-spacing: 2px;
  margin-bottom: 14px;
  color: var(--color-text-accent);
}

.review-text {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.review-author {
  margin-top: 18px;
  color: var(--color-text-tertiary);
}

/* --------------------------------------------
   Contacts
   -------------------------------------------- */

.contacts-top {
  display: grid;
  grid-template-columns: 1fr 1.45fr;

  /* чтобы левый текст центрировался по вертикали относительно карты */
  align-items: stretch;
}

/* центр по вертикали для блока с h2 + subtitle */
.contacts-top > div:first-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contacts-map img {
  width: 100%;

  /* карта выше (похоже на макет), без “голых” px: 64*5 = 320 */
  height: calc(var(--space-16) * 5);

  object-fit: cover;
}

.contacts-bottom {
  margin-top: var(--space-16);

  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: var(--space-6);
}

/* внутри каждой колонки — вертикальный ритм как в фигме */
.contacts-bottom > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.contact-block {
  /* убираем линию у каждого блока (в макете линия только у нижнего) */
  padding-bottom: 0;
  border-bottom: none;
}

.contact-block h3 {
  font-size: var(--fs-h4-d);
  font-weight: var(--font-semibold);
  color: var(--color-text-accent);
  margin-bottom: var(--space-3);
}

.contact-block p,
.contact-block a {
  font-size: var(--fs-text-d);
  color: var(--color-text-secondary);
  text-decoration: none;
}

/* линия только под нижним блоком в каждой колонке (Телефон / Соцсети) */
.contacts-bottom > div .contact-block:last-child {
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--stroke-landing);
}

.contact-inline {
  display: flex;

  /* как на десктопе: две строки в одну линию с разносом */
  justify-content: space-between;

  gap: var(--space-16);
  flex-wrap: nowrap;
}

/* --------------------------------------------
   Footer
   -------------------------------------------- */


@media (max-width: 768px) {
  .hero {
    height: 595px;
  }

  .hero__center {
    top: 22%;

    /* gap 24px mobile */
    gap: var(--space-6);
  }

  .hero__logo-circle {
    width: 50px;
    height: 50px;
  }

  .hero__logo-circle img {
    width: 24px;
    height: 24px;
  }

  .hero__title {
    font-size: var(--text-display);
    font-weight: var(--font-semibold);
  }

  .hero__text {
    /* было 72px -> 48 + 24 */
    bottom: calc(var(--space-12) + var(--space-6));

    max-width: 340px;
    font-size: var(--fs-h1-m);
    line-height: 1.35;
  }

  .section-title {
    font-size: var(--fs-h1-m);
  }

  .about-grid {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-6); /* текст сверху, картинки ниже */
  }

  .about-content {
    flex: 0 0 auto;
    gap: var(--space-6);
  }

  .about-text {
    font-size: var(--fs-text-m);
    max-width: none;
  }

  .about-images {
    flex: 0 0 auto;
    width: 100%;
  }

  .uniqueness-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .uniqueness-item__title {
    font-size: 16px;
  }

  .uniqueness-item__text {
    font-size: var(--fs-text-m);
  }

  .uniqueness-item__num {
    font-size: 44px;
  }

  .catalog-search {
    margin-top: var(--space-8);
  }

  .catalog-search__input {
    height: 44px;
    font-size: var(--fs-text-m);
  }

  .catalog-tags {
    flex-wrap: nowrap;
    overflow: auto hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .badge {
    flex: 0 0 auto;
    font-size: 12px;
  }
  .similar-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-block: var(--space-4);
  }

  /* Show only 2 cards on mobile (hide 3rd and 4th) */
  .similar-grid .product-card:nth-child(n + 3) {
    display: none;
  }

  .quality__image {
    height: 360px;
  }

  .quality__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .quality__title {
    font-size: var(--fs-h1-m);
  }

  .btn-outline {
    height: 52px;
    font-size: var(--fs-text-m);
  }

  .catalog-showall {
    display: block;
  }

  .quality__text {
    font-size: var(--fs-text-m);
  }

  .reviews-grid {
    grid-template-columns: 1fr;
    margin-block: var(--space-8);
  }

  /* Show only 1 review card on mobile (hide 2nd and 3rd) */
  .reviews-grid .review-card:nth-child(n + 2) {
    display: none;
  }

  .contacts-top {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .contacts-map img {
    /* 64*3 + 8 = 200 */
    height: calc(var(--space-16) * 3 + var(--space-2));
  }

  .contacts-bottom {
    grid-template-columns: 1fr;

    /* расстояние между “первой колонкой” (Адрес/Телефон)
       и “второй” (Email/Соцсети) как в макете */
    gap: var(--space-8);
  }

  .contacts-bottom > div {
    gap: var(--space-8);
  }

  .contact-inline {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

}
