@import url('./variables.css');
@import url('./fonts.css');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background-color: var(--bg-page);
  /* Фоновый деликатный градиент теплого света */
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.7) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(237, 227, 214, 0.6) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  padding-bottom: 0;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Шапка с атмосферой уюта */
.header {
  text-align: center;
  padding: 70px 0 40px;
  position: relative;
}

.brand-title {
  font-family: 'Shlapak Script', cursive, -apple-system, sans-serif;
  font-size: 5rem;
  font-weight: normal;
  color: var(--text-main);
  line-height: 1.05;
  margin-bottom: 12px;
  text-shadow: 0 2px 10px rgba(197, 160, 89, 0.15);
}

.brand-subtitle {
  font-family: 'Playpen Sans', cursive, sans-serif;
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: 0.03em;
  margin-bottom: 26px;
}

/* Вводная секция каталога */
.intro-section {
  margin: 10px auto 40px;
  text-align: center;
}

.intro-header {
  max-width: 680px;
  margin: 0 auto 28px;
}

.intro-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-accent);
  background: rgba(197, 160, 89, 0.12);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.intro-title {
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 10px;
}

.intro-desc {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.intro-desc strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Главные кнопки витрин */
.store-bar {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.btn-store svg,
.btn-store img.store-icon {
  width: 19px;
  height: 19px;
  border-radius: 5px;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.btn-store:hover svg,
.btn-store:hover img.store-icon {
  transform: scale(1.12);
}

.btn-store.ozon {
  background: #ffffff;
  color: var(--ozon-base);
  border: 1.5px solid rgba(0, 91, 255, 0.2);
}
.btn-store.ozon:hover {
  background: var(--ozon-base);
  color: #ffffff;
  border-color: var(--ozon-base);
  box-shadow: 0 8px 24px rgba(0, 91, 255, 0.25);
  transform: translateY(-2px);
}

.btn-store.avito {
  background: #ffffff;
  color: var(--avito-base);
  border: 1.5px solid rgba(0, 170, 102, 0.25);
}
.btn-store.avito:hover {
  background: var(--avito-base);
  color: #ffffff;
  border-color: var(--avito-base);
  box-shadow: 0 8px 24px rgba(0, 170, 102, 0.25);
  transform: translateY(-2px);
}

/* Блок преимуществ */
.features {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 30px auto 45px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-delicate);
  box-shadow: 0 6px 20px rgba(78, 61, 46, 0.04);
}

.feature-item {
  font-size: 0.92rem;
  color: var(--text-soft);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Фильтры товаров */
.catalog-filter {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 38px;
  flex-wrap: wrap;
}

.filter-btn {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.55);
  color: var(--text-soft);
  padding: 9px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.92rem;
  transition: var(--transition);
  backdrop-filter: blur(6px);
}

.filter-btn:hover {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.filter-btn.active {
  background: var(--text-main);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(51, 43, 37, 0.2);
}

/* Сетка карточек */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 28px;
}

/* Премиальная карточка изделия */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-delicate);
  padding: 16px;
  box-shadow: var(--shadow-warm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(197, 160, 89, 0.4);
}

/* Область слайдера с точками */
.card-slider-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background: #f4efe9;
  margin-bottom: 16px;
}

/* Лента слайдера на Scroll Snap */
.card-slider {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}

.card-slider.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.card-slider::-webkit-scrollbar {
  display: none;
}

/* Отдельный слайд */
.slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Парящая плашка с точками */
.slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  padding: 5px 9px;
  border-radius: 20px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Точки */
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(51, 43, 37, 0.35);
  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
}

.dot.active {
  width: 14px;
  border-radius: 4px;
  background-color: var(--text-main);
}

/* Стрелочки влево/вправо */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-delicate);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card-slider-wrapper:hover .slider-arrow {
  opacity: 1;
}

.slider-arrow:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev { left: 10px; }
.slider-arrow.next { right: 10px; }

/* Тексты карточки */
.product-title {
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.product-dim {
  font-size: 0.88rem;
  color: var(--text-soft);
  margin-bottom: 16px;
  background: var(--bg-card-subtle);
  padding: 3px 10px;
  border-radius: 8px;
  display: inline-block;
  align-self: flex-start;
}

/* Выбор цветов */
.color-swatches {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 6px 0;
}

.swatch-label {
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 500;
}

.swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: var(--transition);
  position: relative;
}

.swatch:hover {
  transform: scale(1.2);
}

.swatch.active {
  transform: scale(1.25);
  box-shadow: 0 0 0 2px var(--gold-accent), 0 3px 8px rgba(0,0,0,0.2);
}

.swatch[data-color="sand"] { background-color: var(--color-sand); }
.swatch[data-color="bordo"] { background-color: var(--color-bordo); }
.swatch[data-color="milk"] { background-color: var(--color-milk); }
.swatch[data-color="graphite"] { background-color: var(--color-graphite); }
.swatch[data-color="olive"] { background-color: var(--color-olive); }
.swatch[data-color="terracotta"] { background-color: var(--color-terracotta); }
.swatch[data-color="skygray"] { background-color: var(--color-skygray); }
.swatch[data-color="mustard"] { background-color: var(--color-mustard); }
.swatch[data-color="black"] { background-color: var(--color-black); }

/* Кнопки в карточке */
.card-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
}

.card-actions .btn-store {
  flex: 1;
  padding: 10px 12px;
  font-size: 0.85rem;
  border-radius: 12px;
}

.card-actions .btn-store svg,
.card-actions .btn-store img.store-icon {
  width: 15px;
  height: 15px;
  border-radius: 4px;
}

.card-actions .btn-store.ozon {
  background: var(--ozon-soft);
  color: var(--ozon-base);
  border: 1px solid rgba(0, 91, 255, 0.15);
}
.card-actions .btn-store.ozon:hover {
  background: var(--ozon-base);
  color: #ffffff;
}

.card-actions .btn-store.avito {
  background: var(--avito-soft);
  color: var(--avito-base);
  border: 1px solid rgba(0, 170, 102, 0.2);
}
.card-actions .btn-store.avito:hover {
  background: var(--avito-base);
  color: #ffffff;
}

/* Секция "О мастере" */
.about-section {
  margin-top: 70px;
}

.about-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-delicate);
  box-shadow: var(--shadow-warm);
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.about-photo-wrapper {
  flex: 0 0 280px;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  background: #f0ece6;
  box-shadow: 0 8px 24px rgba(78, 61, 46, 0.08);
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-content {
  flex: 1;
}

.about-tag {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-accent);
  display: inline-block;
  margin-bottom: 8px;
}

.about-title {
  font-family: 'Playpen Sans', cursive, sans-serif;
  font-size: 2.3rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 18px;
}



.about-text {
  font-size: 0.98rem;
  color: var(--text-soft);
  margin-bottom: 14px;
  line-height: 1.65;
}

.about-text strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Преимущества внизу секции мастера */
.about-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-delicate);
}

.about-feat-item {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.about-feat-item strong {
  font-size: 1.25rem;
  color: var(--text-main);
  font-weight: 700;
  margin-bottom: 2px;
}

.about-feat-item span {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.3;
}

/* Подвал сайта */
.footer {
  margin-top: 70px;
  padding: 24px 0;
  border-top: 1px solid var(--border-delicate);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-copy {
  font-size: 0.88rem;
  color: var(--text-soft);
  font-weight: 500;
}

.footer-note {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Адаптив: Планшеты и мобильные */
@media (max-width: 630px) {
  /* Шапка и интро */
  .brand-title {
    font-size: 3.6rem;
  }
  .brand-subtitle {
    font-size: 1.15rem;
  }
  .intro-title {
    font-size: 1.45rem;
    line-height: 1.3;
  }
  .intro-desc {
    font-size: 1.05rem;
    line-height: 1.65;
  }
  .features {
    border-radius: 20px;
    gap: 12px;
  }

  /* Стрелки слайдера видны на мобильных */
  .slider-arrow {
    opacity: 0.85;
  }

  /* Сетка ровно по 2 карточки */
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-card {
    padding: 10px;
    border-radius: 16px;
  }

  .card-slider-wrapper {
    border-radius: 12px;
    margin-bottom: 10px;
  }

  .product-title {
    font-size: 0.98rem;
    line-height: 1.25;
  }

  .product-dim {
    font-size: 0.75rem;
    padding: 2px 7px;
    margin-bottom: 8px;
  }

  .swatch {
    width: 20px;
    height: 20px;
  }

  .card-actions {
    gap: 6px;
  }

  .card-actions .btn-store {
    padding: 8px 6px;
    font-size: 0.78rem;
    gap: 4px;
  }

  .card-actions .btn-store img.store-icon {
    width: 13px;
    height: 13px;
  }

  /* Секция "О мастере" */
  .about-card {
    flex-direction: column;
    padding: 24px;
    gap: 24px;
    text-align: center;
  }

  .about-photo-wrapper {
    flex: none;
    width: 200px;
    margin: 0 auto;
  }

  .about-title {
    font-size: 2.2rem;
  }

  .about-features {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Для самых узких экранов (меньше 380px) */
@media (max-width: 380px) {
  .cards-grid {
    gap: 8px;
  }
  .product-card {
    padding: 8px;
  }
}