/* Базовые стили */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --light-color: #f9f9f9;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.korzina {
    color: #2f7d32;
    font-size: 52px;
    margin-right:15px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    /* padding: 0 15px; */
}

.container-for-proizvoditel {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    /* padding: 0 15px; */
}


/* Полноэкранное меню */
.fullscreen-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    z-index: 10000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
}

.fullscreen-menu nav ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.fullscreen-menu nav li {
    margin: 20px 0;
}

.fullscreen-menu nav a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.fullscreen-menu nav a:hover {
    color: var(--primary-color);
}

.close-menu {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 2rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Шапка */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo img {
    height: 50px;
}

.navbar ul {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.navbar a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.navbar a:hover {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.profile-link img {
    position:relative;
    top:5px;
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 10%;
}

.cart-btn {
    background: #2f7d32;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Слайдер */
.hero {
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 0 0 50% 50%;
    box-shadow: 0 4px 15px rgb(0 0 0 / 50%);
}

.swiper-slide {
    background-size: cover !important;
    background-position: center !important;
    height: 100%;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
}

.swiper-slide .container {
    width: 100%;
    padding: 0 30px;
}

.swiper-pagination-bullet {
    background: white !important;
    opacity: 0.7 !important;
}

.swiper-pagination-bullet-active {
    background: var(--primary-color) !important;
    opacity: 1 !important;
}

/* Секции */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: var(--text-color);
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width:100%;/* width: 80px; */
    height: 3px;
    /* background: var(--primary-color); */
    background: linear-gradient(
    to right,
    rgba(255, 255, 0, 0),    /* прозрачное с левой стороны */
    var(--primary-color) 50%, /* яркий центр */
    rgba(255, 255, 0, 0) 100% /* прозрачное с правой стороны */
    );
    margin: 0px auto;
}

/* Категории */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.category-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.category-item:hover {
    transform: translateY(-5px);
}

.heroSwiper {height:100%;}

.category-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    /* padding: 15px; */
    color: white;
    text-align: center;
}

/* Карточки товаров */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 15px;
    text-align: center;
}

.price {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 10px 0;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #45a049;
}

/* Преимущества */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.benefit-item {
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.benefit-item i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Подвал */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 40px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-icons a {
    color: white;
    font-size: 20px;
}

.copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #444;
}

/* Адаптивность */
@media (max-width: 768px) {
    .navbar {
        display: none;
        width: 100%;
        order: 3;
        margin-top: 15px;
    }
    
    .navbar ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero {
        height: 400px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .category-grid,
    .product-grid,
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .category-grid,
    .product-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }


    .container {width:90%;}
    .container-for-proizvoditel {width:90%;}

    .slide-text {font-size:14px!important;width:auto!important;}
    .slide-text2 {font-size:14px!important;width:auto!important;}

    .menu-toggle {font-size:42px;color:#2f7d32;}
    .profile-link img {width:42px;height:42px;}
    .korzina {font-size:40px;margin-right: 5px;}
}


/* Планшетная верстка (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Шапка */
    .header .container {
        padding: 0 20px;
    }

    /* Слайдер */
    .hero {
        height: 400px;
    }

    /* Сетки */
    .category-grid,
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Карточки товаров */
    .product-card {
        margin-bottom: 15px;
    }

    /* Подвал */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 40px;
    }
}

/* Кроссбраузерные стили */
.header {
    -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.product-card {
    -webkit-transition: transform 0.3s ease;
    -moz-transition: transform 0.3s ease;
    -o-transition: transform 0.3s ease;
    transition: transform 0.3s ease;
}

/* Исправление для Safari */
.category-grid,
.product-grid,
.benefits-grid {
    display: -webkit-box;
    display: -ms-flexbox;
    display: grid;
}

/* Фикс для старых Android */
.swiper-container {
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
}



/* Секция производителей */
.manufacturers {
  padding: 60px 0;
  background-color: #f9f9f9;
}

.manufacturers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.manufacturer-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  cursor: pointer;
}

.manufacturer-card:hover {
  transform: translateY(-10px);
  -webkit-box-shadow: 0px 5px 10px 2px rgba(34, 60, 80, 0.3);
  -moz-box-shadow: 0px 5px 10px 2px rgba(34, 60, 80, 0.3);
  box-shadow: 0px 5px 10px 2px rgba(34, 60, 80, 0.3);
}

.manufacturer-overlay h3 {font-size:14px;margin:0;}



.manufacturer-card img {
  width: 100%;
  height: 120px;
  object-fit: cover; 
  display: block;
}

.manufacturer-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px;
  color: white;
  text-align: center;
}

/* Секция промо-карточек */
.promo-cards {
  padding: 60px 0;
  background: #fff;
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.promo-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.promo-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.promo-content {
  padding: 15px;
  background: white;
}

.promo-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.promo-text {
  color: #4CAF50;
  font-weight: bold;
  margin-bottom: 15px;
}

.btn-small {
  padding: 8px 15px;
  font-size: 14px;
}

/* Адаптация для планшетов */
@media (min-width: 768px) and (max-width: 1024px) {
  .manufacturers-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .promo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Адаптация для мобильных */
@media (max-width: 767px) {
  .manufacturers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .promo-grid {
    grid-template-columns: 1fr;
  }
}