:root {
    --primary-bg: #FFFFFF;
    --accent-pink: #fae0be;
    --text-dark: #222222;
    --secondary-bg: #F5F5F5;
    --sale-badge: #ce796b;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-dark);
    background-color: var(--primary-bg);
    line-height: 1.5;
    padding-top: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Кнопки */
.btn-primary {
    background-color: var(--accent-pink);
    color: var(--text-dark);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary:hover {
    background-color: #f5c8d4;
    transform: translateY(-2px);
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    font-size: 18px;
    color: var(--text-dark);
    margin-left: 15px;
}

.count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-pink);
    color: var(--text-dark);
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Шапка */
.header {
    background-color: var(--primary-bg);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

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

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
}

.nav-list {
    display: flex;
    gap: 24px;
}

.nav-list a {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-list a:hover {
    color: #d94a7a;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-pink);
    transition: var(--transition);
}

.nav-list a:hover::after {
    width: 100%;
}

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

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

/* Главный баннер */
.hero {
    background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), 
                url('https://images.unsplash.com/photo-1525507119028-ed4c629a60a3?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 16px;
}

.hero p {
    font-size: 20px;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Каталог */
.catalog {
    padding: 80px 0;
}

.catalog h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.category-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 300px;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.category-card h3 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    padding: 16px;
    margin: 0;
    text-align: center;
    font-size: 20px;
}

.filters {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-bottom: 24px;
}

.filters select {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: white;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    height: 380px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.sale-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--sale-badge);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    z-index: 2;
}

.product-details {
    padding: 16px;
}

.product-title {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 500;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.current-price {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-dark);
}

.old-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    padding: 0 16px 16px;
}

.heart-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #ccc;
    transition: var(--transition);
}

.heart-btn.active i {
    color: var(--sale-badge);
}

/* О компании */
.about {
    padding: 80px 0;
    background-color: var(--secondary-bg);
}

.about .container {
    display: flex;
    gap: 40px;
    align-items: center;
}

.about-content {
    flex: 1;
}

.about-content h2 {
    margin-bottom: 24px;
    font-size: 32px;
}

.about-content p {
    margin-bottom: 24px;
    font-size: 18px;
    line-height: 1.6;
}

.about-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.features {
    display: flex;
    gap: 24px;
    margin-top: 32px;
}

.feature {
    text-align: center;
    flex: 1;
}

.feature-icon {
    width: 70px;
    height: 70px;
    background-color: var(--accent-pink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    font-weight: 600;
}

/* Контакты */
.contacts {
    padding: 80px 0;
}

.contacts .container {
    display: flex;
    gap: 40px;
}

.contacts-info {
    flex: 1;
}

.contacts-info h2 {
    margin-bottom: 24px;
    font-size: 32px;
}

.contacts-info p {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.contacts-map {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 500px;
}

.contacts-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.contact-form {
    margin-top: 32px;
    background-color: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.contact-form h3 {
    margin-bottom: 16px;
    font-size: 24px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
}

.contact-form textarea {
    height: 120px;
    resize: vertical;
}

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

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

.footer-column h3 {
    margin-bottom: 16px;
    font-size: 20px;
    color: white;
}

.footer-column p {
    margin-bottom: 8px;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a:hover {
    color: var(--accent-pink);
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-pink);
    color: var(--text-dark);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    color: var(--text-dark);
}

.modal-body {
    padding: 40px;
    display: flex;
    gap: 40px;
}

.modal-images {
    flex: 1;
}

.modal-main-image {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.modal-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-thumbnails {
    display: flex;
    gap: 10px;
}

.modal-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
}

.modal-thumbnail:hover,
.modal-thumbnail.active {
    opacity: 1;
}

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

.modal-info {
    flex: 1;
}

.modal-title {
    font-size: 28px;
    margin-bottom: 16px;
}

.modal-price {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.modal-current-price {
    font-size: 24px;
    font-weight: 600;
}

.modal-old-price {
    font-size: 20px;
    color: #999;
    text-decoration: line-through;
}

.modal-description {
    margin-bottom: 24px;
    line-height: 1.6;
}

.modal-sizes {
    margin-bottom: 24px;
}

.modal-sizes h4 {
    margin-bottom: 12px;
    font-size: 18px;
}

.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.size-option {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.size-option:hover,
.size-option.selected {
    background-color: var(--accent-pink);
    border-color: var(--accent-pink);
}

.modal-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

/* Корзина */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -800px;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.cart-drawer.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 500;
    margin-bottom: 8px;
}

.cart-item-price {
    color: #666;
    margin-bottom: 8px;
}

.cart-item-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn {
    background: none;
    border: none;
    color: #ff4d4d;
    cursor: pointer;
    margin-left: 10px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.cart-footer p {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
}

/* Избранное */
.favorites-drawer {
    position: fixed;
    top: 0;
    left: -400px;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: #fff;
    box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.favorites-drawer.active {
    left: 0;
}

.drawer-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.favorite-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

.favorite-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.favorite-details {
    flex: 1;
}

.favorite-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

/* Поиск */
#search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 16px;
    width: 200px;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .nav-list {
        gap: 16px;
    }
    
    .about .container,
    .contacts .container {
        flex-direction: column;
    }
    
    .about-image,
    .contacts-map {
        width: 100%;
    }
    
    .modal-body {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: white;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 99;
    }
    
    .nav.active {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-menu {
        display: block;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-main-image {
        height: 300px;
    }
    
    #search-input { 
        display: none;
    }
}

@media (max-width: 480px) {
    .categories-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    
    .filters {
        flex-direction: column;
    }
    
    .features {
        flex-direction: column;
    }
    
    .cart-drawer {
        max-width: 100%;
    }
    
    .hero h1 {
        font-size: 28px;
    }
}

@media (max-width: 360px) {
    .category-card {
        height: 160px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-title {
        font-size: 13px;
    }
    
    .current-price {
        font-size: 15px;
    }
}

/* Заглушка данных */
.data-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background-color: var(--secondary-bg);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.data-placeholder i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ccc;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0,0,0,0.1);
    border-left-color: var(--accent-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Стили для пагинации */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 5px;
  }
  
  .pagination-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
  }
  
  .pagination-btn:hover:not(:disabled) {
    background: #f8f8f8;
    border-color: #d0d0d0;
  }
  
  .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .pagination-btn.active {
    background:#ce796b;
    color: white;
    border-color: #ce796b;
  }


  
  /* --------------- мобильная версия: 3 товара в ряд и компактные размеры --------------- */
@media (max-width: 768px) {
    /* три колонки вместо двух */
    .products-grid {
      grid-template-columns: repeat(2, 1fr) !important;
      gap: 12px;
    }
  
    /* сами карточки чуть потоньше и поменьше */
    .product-card {
      border-radius: 6px;
      overflow: hidden;
    }
  
    .product-image {
      height: 160px; /* было 280px */
    }
  
    .product-details {
      padding: 12px;
    }
  
    .product-title {
      font-size: 10px; /* вместо 18px */
      margin-bottom: 6px;
    }
  
    .product-price .current-price,
    .product-price .old-price {
      font-size: 10px; /* вместо 18px/16px */
    }
  
    /* sale-бейдж */
    .sale-badge {
      width: 28px;
      height: 28px;
      font-size: 12px;
      top: 8px;
      right: 8px;
    }
  
    /* кнопки */
    .btn-primary {
      padding: 6px 12px;
      font-size: 10px;
      border-radius: 4px;
    }
  
    .pagination-btn {
      width: 28px;
      height: 28px;
      font-size: 12px;
    }
  }


  /* Блок «Цвета» в модалке */
.modal-colors {
    margin-bottom: 24px;
  }
  
  .modal-colors h4 {
    margin-bottom: 12px;
    font-size: 18px;
  }
  
  /* Контейнер кнопок-цветов */
  .color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  /* Сам элемент-цвет */
  .color-option {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
  }
  
  /* Hover и выбранный цвет */
  .color-option:hover,
  .color-option.selected {
    background-color: var(--accent-pink);
    border-color: var(--accent-pink);
    color: var(--text-dark);
  }

  /* категория */
.product-category {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-pink);
    text-transform: uppercase;
    margin: 0 16px 8px;
    letter-spacing: 0.05em;
  }
  
  /* контейнеры размеров и цветов */
  .product-sizes,
  .product-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 16px 16px;
  }
  
  /* общий стиль тегов */
  .size-tag,
  .color-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-dark);
    background-color: var(--secondary-bg);
    border: 1px solid var(--accent-pink);
    border-radius: 999px;
    padding: 4px 12px;
    transition: var(--transition);
    cursor: default;
  }
  
  /* hover-эффект */
  .size-tag:hover,
  .color-tag:hover {
    background-color: var(--accent-pink);
    color: #fff;
    border-color: var(--accent-pink);
  }

  /* ------------------------------------- */
/* Адаптация .product-category, .product-sizes и .product-colors для планшетов и мобильных */
/* ------------------------------------- */

/* Планшеты и небольшие десктопы */
@media (max-width: 1024px) {
    .product-category {
      font-size: 0.6875rem;      /* было 0.75rem */
      margin: 0 12px 6px;        /* чуть меньше боковых и нижнего отступа */
    }
    .product-sizes,
    .product-colors {
      gap: 6px;                  /* менее крупные отступы между «пиллами» */
      margin: 0 12px 12px;
    }
    .size-tag,
    .color-tag {
      font-size: 0.6875rem;      /* чуть мелче */
      padding: 3px 10px;         /* уменьшена внутренняя «прослойка» */
    }
  }
  
  /* Смартфоны */
  @media (max-width: 768px) {
    .product-category {
      font-size: 0.625rem;       /* ещё чуть меньше */
      margin: 0 8px 4px;
    }
    .product-sizes,
    .product-colors {
      gap: 4px;
      margin: 0 8px 8px;
    }
    .size-tag,
    .color-tag {
      font-size: 0.625rem;
      padding: 2px 8px;
    }
  }
/* Обновлённые стили фильтров в каталоге */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;   /* <-- центрируем */
    margin-bottom: 24px;
  }
  
  /* остальной код без изменений */
  .filters select,
  .filters input[type="number"] {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    min-width: 140px;
    transition: var(--transition);
  }
  
  .filters select:focus,
  .filters input[type="number"]:focus {
    border-color: var(--accent-pink);
    outline: none;
    box-shadow: 0 0 0 2px rgba(237, 159, 176, 0.4);
  }
  
  .filter-group {
    display: flex;
    gap: 8px;
  }
  
  /* Адаптация под узкие экраны */
  @media (max-width: 768px) {
    .filters {
      gap: 8px;
      justify-content: center;
    }
    .filter-group {
      width: 100%;
      justify-content: space-between;
    }
    .filters select,
    .filters input[type="number"] {
      flex: 1 1 45%;
      min-width: 0;
    }
  }
  
  @media (max-width: 480px) {
    .filters {
      flex-direction: column;
      align-items: stretch;
      gap: 8px;
    }
    .filters select,
    .filters input[type="number"] {
      width: 100%;
    }
  }