/* products_list.css */

/* Подключаем Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;700&family=Roboto:wght@400;500&display=swap');

/* Base styles and CSS variables */
:root {
  --primary-color: #301C50;
  --primary-hover: #9747FF;
  --text-color: #4C4C4C;
  --padding-standard: 30px;
  --max-width: 1920px;
  --card-width-1440: 360px;
  --card-width-1920: 384px;
  --card-height: 312px;
  
  /* Notification colors */
  --success-color: #4CAF50;
  --info-color: #2196F3;
  --warning-color: #FF9800;
  --error-color: #F44336;
  
  /* Footer colors */
  --footer-bg: #F8F8F8;
  --footer-text: #333333;
  --footer-link-hover: var(--primary-hover);
}

html {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--padding-standard);
  box-sizing: border-box;
  overflow: hidden;
}

/* Заголовки */
h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  margin: 0;
}
h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  margin: 0;
}

/* По умолчанию для текстов */
p, span, li, a {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeSlideRight {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes lineGrow {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}




/* ===== BACK BUTTON ===== */
.back-button {
  padding: 20px 0;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  color: var(--text-color);
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
}

.btn-back svg {
  margin-right: 8px;
  transition: transform 0.3s ease;
}

.btn-back:hover {
  color: var(--primary-hover);
}

.btn-back:hover svg {
  transform: translateX(-5px);
}

/* ===== PRODUCT DETAIL SECTION ===== */
.product-detail-section {
  width: 100%;
}

.product-intro {
  background-color: #F6F6F6;
  padding: 40px 0;
  width: 100%;
}

.page-title {
  font-size: 42px;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.intro-text {
  max-width: 900px;
  margin-bottom: 20px;
}

.intro-text p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-color);
}

/* Product Grid */
.products-grid {
  /* padding: 60px 0; */
  width: 100%;
}

.products-grid .container {
  padding: 0;
  max-width: 100%;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(var(--card-width-1440))), 1fr));
  gap: 0;
  width: 100%;
}

@media (min-width: 1600px) {
  .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(var(--card-width-1920))), 1fr));
  }
}

.product-card {
  display: flex;
  flex-direction: column-reverse;
  background-color: #fff;
  border: 1px solid #E0E0E0;
  overflow: hidden;
  text-decoration: none;
  height: var(--card-height);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  cursor: pointer;
}

.scroll-animation.visible .product-card {
  animation: cardAppear 0.5s ease forwards;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Создаем эффект появления с задержкой для каждой карточки */
@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-animation.visible .product-card:nth-child(1) { animation-delay: 0.1s; }
.scroll-animation.visible .product-card:nth-child(2) { animation-delay: 0.2s; }
.scroll-animation.visible .product-card:nth-child(3) { animation-delay: 0.3s; }
.scroll-animation.visible .product-card:nth-child(4) { animation-delay: 0.4s; }
.scroll-animation.visible .product-card:nth-child(5) { animation-delay: 0.5s; }
.scroll-animation.visible .product-card:nth-child(6) { animation-delay: 0.6s; }
.scroll-animation.visible .product-card:nth-child(7) { animation-delay: 0.7s; }
.scroll-animation.visible .product-card:nth-child(8) { animation-delay: 0.8s; }

/* Изображение продукта */
.product-image {
  height: 210px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

/* Название продукта */
.product-title {
  padding: 20px;
  font-size: 18px;
  font-weight: 500;
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  flex-grow: 1;
  display: flex;
  align-items: center;
  transition: color 0.3s ease;
}

.product-card:hover .product-title {
  color: var(--primary-hover);
}

/* ===== RESPONSIVE STYLES ===== */
/* Desktop (1440px+) */
@media (min-width: 1440px) {
  .container {
    padding: 0 60px;
  }
  
  .grid-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Tablet (768px - 1439px) */
@media (min-width: 768px) and (max-width: 1439px) {
  .container {
    padding: 0 30px;
    max-width: 100%;
    width: 100%;
  }
  
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .page-title {
    font-size: 36px;
  }
  
}

/* Mobile (320px - 767px) */
@media (max-width: 767px) {
  :root {
    --padding-standard: 15px;
  }
  
  .container {
    padding: 0 15px;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
  }

  
  .page-title {
    font-size: 28px;
    margin-bottom: 20px;
  }
  
  .grid-container {
    grid-template-columns: 1fr;
  }
  
  .product-intro {
    padding: 30px 0;
  }
  
  .products-grid {
    padding: 30px 0;
  }
  
  .product-title {
    font-size: 16px;
    padding: 15px;
  }
  

}

/* Mobile Small (320px - 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 10px;
    max-width: 100%;
    width: 100%;
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .intro-text p {
    font-size: 16px;
  }
  
  .product-image {
    height: 200px;
  }
 
}
