/* Armenian font */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Armenian:wght@400;500;600;700&display=swap");

:root {
  --tt-blue: #1947c4;
}

/* SECTION */
.tt-home-section {
  margin: 50px 0;
  font-family: "Noto Sans Armenian", sans-serif;
}

.tt-home-section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.tt-home-section__title {
  font-size: 26px;
  color: var(--tt-blue);
  font-weight: 700;
  margin: 0;
}

/* VIEW ALL BUTTON (desktop / tablet) */
.tt-home-section__view-all {
  padding: 7px 18px;
  background: #fff;
  color: var(--tt-blue);
  border: 1px solid var(--tt-blue);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(25, 71, 196, 0.1);
  transition: background-color 0.25s ease, color 0.25s ease,
    transform 0.25s ease, box-shadow 0.25s ease;
}

.tt-home-section__view-all:hover {
  background: var(--tt-blue);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(25, 71, 196, 0.3);
}

/* MOBILE: кнопка внизу секции */
.tt-home-section__view-all-mobile {
  display: none;
  text-align: right;
  margin-top: 12px;
}

/* GRID (обычный режим – сетка) */
.tt-home-section__grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
  .tt-home-section__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .tt-home-section__grid {
    grid-template-columns: repeat(2, 1fr); /* 2 колонки на мобиле */
  }
}
@media (max-width: 480px) {
  .tt-home-section__grid {
    grid-template-columns: repeat(2, 1fr); /* тоже 2 колонки */
  }
}

/* ===== РЕЖИМ КАРУСЕЛИ (desktop / tablet only) ===== */
.tt-home-section--slider .tt-home-section__grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 20px;
  padding-bottom: 6px;
  scrollbar-width: none; /* Firefox */
}

.tt-home-section--slider .tt-home-section__grid::-webkit-scrollbar {
  display: none; /* Safari/Chrome */
}

.tt-home-section--slider .tt-product-card {
  flex: 0 0 25%;
  max-width: 25%;
  scroll-snap-align: start;
}

/* breakpoint для карусели */
@media (max-width: 1024px) {
  .tt-home-section--slider .tt-product-card {
    flex-basis: 33.3333%;
    max-width: 33.3333%;
  }
}

/* НА МОБИЛЕ: Карусель выключаем, возвращаем обычную сетку 2×2 */
@media (max-width: 768px) {
  .tt-home-section--slider .tt-home-section__grid {
    display: grid;
    overflow: visible;
    scroll-snap-type: none;
    gap: 16px;
  }

  .tt-home-section--slider .tt-product-card {
    flex: 0 0 auto;
    max-width: none;
  }
}

/* =============== CARD + АНИМАЦИЯ =============== */

.tt-product-card {
  height: 100%;
  opacity: 0;
  transform: translateY(12px);
  animation: ttFadeUp 0.55s ease-out forwards;
}

.tt-product-card:nth-child(2) {
  animation-delay: 0.05s;
}
.tt-product-card:nth-child(3) {
  animation-delay: 0.1s;
}
.tt-product-card:nth-child(4) {
  animation-delay: 0.15s;
}
.tt-product-card:nth-child(5) {
  animation-delay: 0.2s;
}
.tt-product-card:nth-child(6) {
  animation-delay: 0.25s;
}

@keyframes ttFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Карточка = колонка, чтобы низ был ровный */
.tt-product-card__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 22px;
  padding: 18px 18px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tt-product-card__inner:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}

.tt-product-card__thumb {
  background: #f3f7f8;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  padding: 20px;
  height: 260px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

/* BADGE */
.tt-product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #ffb800;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: #fff;
  font-weight: 700;
  z-index: 2;
}

/* WISHLIST */
.tt-wishlist-loop-wrap {
  position: absolute;
  top: 12px;
  right: 12px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(-4px);
}

.tt-product-card__inner:hover .tt-wishlist-loop-wrap {
  opacity: 1;
  transform: translateY(0);
}

.tt-wishlist-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: var(--tt-blue);
}

/* INFO-BLOCK: растягиваем, чтобы низ был ровный */
.tt-product-card__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 16px;
}

/* TITLE */
.tt-product-card__title {
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}

.tt-product-card__title a {
  color: #333;
  text-decoration: none;
}
.tt-product-card__title a:hover {
  color: var(--tt-blue);
}

/* ===== НИЗ КАРТОЧКИ: ЦЕНА + КНОПКА ===== */

.tt-product-card__bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* PRICE */
.tt-product-card__price {
  font-weight: 700;
  color: #00813b;
  font-size: 18px;
  text-align: center;
  letter-spacing: 0.01em;
}

/* BUY BUTTON */
.tt-product-card__btn {
  width: 100%;
  max-width: 220px;
  padding: 11px 0;
  text-align: center;
  border-radius: 999px;
  background: var(--tt-blue);
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: 0 6px 18px rgba(25, 71, 196, 0.3);
  transition: background-color 0.25s ease, transform 0.25s ease,
    box-shadow 0.25s ease;
}

.tt-product-card__btn:hover {
  background: #12359a;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(25, 71, 196, 0.4);
}

.tt-product-card__btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(25, 71, 196, 0.28);
}

/* ===== МОБИЛЬНАЯ ВЕРСИЯ ===== */
@media (max-width: 768px) {
  .tt-home-section {
    margin: 32px 0;
  }

  .tt-home-section__header {
    margin-bottom: 10px;
  }

  /* прячем кнопку в хедере, показываем снизу */
  .tt-home-section__view-all {
    display: none;
  }
  .tt-home-section__view-all-mobile {
    display: block;
    margin-top: 10px;
  }

  .tt-home-section__view-all--mobile {
    display: inline-flex;
  }

  /* карточка компактнее на мобиле */
  .tt-product-card__inner {
    padding: 14px 14px 16px;
    border-radius: 18px;
  }

  /* делаем картинку крупнее */
  .tt-product-card__thumb {
    padding: 8px;
    height: 220px;
    border-radius: 16px;
  }

  .tt-product-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .tt-product-card__price {
    font-size: 16px;
  }

  .tt-product-card__btn {
    max-width: 200px;
    padding: 10px 0;
    font-size: 14px;
  }
}

/* ... (ваш предыдущий CSS) ... */

/* Стили для состояний кнопки */
.tt-btn-add.loading {
  cursor: wait;
}

.tt-btn-add.added {
  background-color: #00813b !important; /* Зеленый цвет успеха */
  cursor: default;
  pointer-events: none; /* Блокируем повторный клик */
}

/* На всякий случай фикс для Z-index */
.tt-product-card__btn {
  z-index: 10;
  position: relative;
}
