body {
    font-family: 'Arial Rounded MT Bold', Arial, sans-serif;
    background-color: #f8f4f9;
    color: #444;
    margin: 0;
    padding: 0;
}

/* ======== ШАПКА ========= */
/* Стилі для шапки */
header {
    background-color: #f3e0ec;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Логотип та назва магазину */
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    height: 80px;
    width: auto;
}

.store-name {
    font-size: 24px;
    font-weight: bold;
    color: #d87ca6;
    margin-left: 10px;
}

/* Форма пошуку */
.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-form input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #d87ca6;
    border-radius: 20px;
    font-family: 'Arial Rounded MT Bold', Arial, sans-serif;
    font-size: 14px;
    color: #444;
    outline: none;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

.search-form input[type="text"]:focus {
    border-color: #b34d7a;
}

.search-form button {
    padding: 8px 16px;
    background-color: #d87ca6;
    color: white;
    border: none;
    border-radius: 20px;
    font-family: 'Arial Rounded MT Bold', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-form button:hover {
    background-color: #b34d7a;
}

.home-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit; /* Успадковує колір тексту від батьківського елемента */
}

.home-link:hover .logo,
.home-link:hover .store-name {
    opacity: 0.8; /* Ефект при наведенні */
}

/* ========= НАВІГАЦІЯ ========= */
nav {
    background: #ffebef;
    padding: 0.5rem 0;
    margin: 1rem auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 50px;
    max-width: 90%;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    position: relative;
}

nav ul li {
    position: relative;
    margin: 0 0.8rem;
}

nav ul li a {
    text-decoration: none;
    font-size: 0.95rem;
    color: #d87ca6;
    padding: 1rem 1.5rem;
    border-radius: 30px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    font-weight: 500;
    letter-spacing: 0.5px;
}

nav ul li a:hover {
    background: rgba(255, 214, 224, 0.4);
    transform: translateY(-2px);
}

/* Стилі для підменю */
.has-submenu > a::after {
    content: "›";
    display: inline-block;
    margin-left: 0.5rem;
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}

.has-submenu:hover > a::after {
    transform: rotate(0deg);
}

.submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 220px;
    padding: 0.8rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 1000;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column; /* Стовпчик для підкатегорій */
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    margin-top: 0;
}

.submenu li {
    padding: 0.4rem 0;
}

.submenu a {
    color: #666;
    font-size: 0.9rem;
    padding: 0.6rem 1.5rem;
    position: relative;
    transition: all 0.2s ease;
}

.submenu a::before {
    content: "";
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    background: #d87ca6;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.submenu a:hover {
    color: #b34d7a;
    padding-left: 2rem;
}

.submenu a:hover::before {
    opacity: 1;
}

/* Стилі для бургер-меню */
.burger-menu {
    display: none;
    position: fixed;
    right: 20px;
    top: 25px;
    z-index: 1001;
    background: #f3e0ec;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
}

#nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100vh;
    background: #ffebef;
    z-index: 1000;
    transition: left 0.3s ease;
    padding-top: 60px;
    overflow-y: auto;
}

#nav-menu.active {
    left: 0;
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 999;
}

.menu-overlay.active {
    display: block;
}
/* ======== ТОВАРИ ========= */
.products {
    display: grid;
    gap: 25px;
    padding: 20px;
    grid-auto-rows: 1fr;
}

.product img {
    width: 70%;
    border-radius: 10px;
}

/* Ціна */
.price {
    font-weight: bold;
    color: #d87ca6;
    font-size: 18px;
}

.product-image {
    width: 100%;
    height: auto; /* Замість фіксованої висоти */
    max-height: 200px; /* Максимальна висота */
    object-fit: contain; /* Змінити з 'cover' на 'contain' */
    border-radius: 8px;
    margin-bottom: 15px;
    background: #f5f5f5; /* Фон для пустих областей */
}

.no-image {
    height: 200px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Стилі для карток товарів */
.product-link {
    display: flex; /* Робимо посилання флекс-контейнером */
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.product-link:hover {
    transform: scale(1.02);
    z-index: 2;
}

.product {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex: 1; /* Заповнює всю доступну висоту посилання */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Короткий опис */
.short-description {
    flex: 1; /* Опис займає весь вільний простір */
    margin: 12px 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Обмеження кількості рядків */
    -webkit-box-orient: vertical;
}

/* Стилі для сторінки товару */
.product-details {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.product-card {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.product-main-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.product-info h1 {
    margin-bottom: 1rem;
    color: #333;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: #d87ca6;
    text-decoration: none;
    font-weight: 500;
}

/* Стилі для розмірів товарів */
.sizes {
    margin-top: 15px;
    text-align: center;
    width: 100%;
}

.sizes h3 {
    font-size: 16px;
    color: #d87ca6;
    margin-bottom: 10px;
    font-weight: bold;
}

.sizes ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sizes ul li {
    background-color: #ffebef;
    color: #d87ca6;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sizes ul li:hover {
    background-color: #d87ca6;
    color: #fff;
    cursor: pointer;
}

.sizes ul li.hidden-size {
    display: none; /* Приховуємо розміри, які не відображаються за замовчуванням */
}

.sizes .show-more-sizes {
    background: none;
    border: none;
    color: #d87ca6;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    text-decoration: underline;
}

.sizes .show-more-sizes:hover {
    color: #b34d7a;
}




/* ========= ФІЛЬТР ========= */
.filter-menu {
    position: relative;
    z-index: 1000;
}

/* Кнопка фільтра */
.filter-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f8d8e8;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem; /* Додаємо розмір шрифту, як у інших елементів навігації */
    color: #d87ca6; /* Колір тексту, як у навігації */
    text-decoration: none; /* Видаляємо підкреслення */
    border: none; /* Видаляємо рамку */
    margin: 8px 0 0;
}

.filter-trigger:hover {
    background: rgba(255, 214, 224, 0.4); /* Ефект при наведенні, як у навігації */
    transform: translateY(-2px); /* Ефект при наведенні, як у навігації */
}

.filter-trigger i {
    color: #d87ca6;
    font-size: 16px;
}

/* Модальне вікно фільтра */
.filter-modal {
    position: fixed;
    top: 0;
    left: -100%;
    width: 90%;
    max-width: 400px;
    height: 100vh;
    background: white;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
    padding: 20px;
    overflow-y: auto;
}

.filter-modal.active {
    left: 0;
}

/* Оверлей */
.filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1001;
}

.filter-overlay.active {
    display: block;
}

/* Заголовок фільтра */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.filter-title {
    font-size: 20px;
    color: #d87ca6;
    margin: 0;
}

.close-filter {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 5px;
}

/* Стилі форми */
.filter-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-group {
    position: relative;
}

.filter-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #444;
}

.filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    appearance: none;
    font-size: 14px;
}

.filter-select:focus {
    border-color: #d87ca6;
    outline: none;
}

/* Стилі для розмірів */
.sizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
}

.size-label {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #eee;
}

.size-label:hover {
    background: #fff0f5;
}

.size-checkbox:checked + .size-label {
    background: #ffe5ee;
    border-color: #d87ca6;
}

/* Кнопка застосування */
.apply-button {
    background: #d87ca6;
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 15px;
}

.apply-button:hover {
    background: #c56b95;
}



/* ======== Футер ========= */
/* Стилі для футера */
.main-footer {
    background-color: #f3e0ec;
    padding: 30px 0;
    margin-top: 40px;
    border-top: 1px solid #e0c8d8;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    padding: 0 20px;
    justify-content: space-around;
}

/* Контейнер для лого та назви */
.footer-logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Логотип у футері */
.footer-logo {
    height: 30px; /* Налаштуйте висоту за потребою */
    width: auto; /* Зберігає пропорції */
}

/* Назва магазину у футері */
.footer-store-name {
    font-size: 20px;
    font-weight: bold;
    color: #d87ca6;
}

/* Соціальні мережі */
.social-links {
    display: flex;
    gap: 20px;
}

.social-icon {
    color: #d87ca6;
    font-size: 24px;
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: #b34d7a;
}

/* Інформація */
.footer-info {
    text-align: center;
    color: #666;
}

.footer-info a {
    color: #d87ca6;
    text-decoration: none;
}



/* Галерея */
.gallery-section {
    position: relative;
    margin-bottom: 2rem;
}

.product-main-image {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    cursor: zoom-in;
    border-radius: 12px;
    margin-bottom: 15px;
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.thumbnail {
    width: 100%;
    max-width: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.thumbnail:hover {
    transform: scale(1.05);
}

/* Модальне вікно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
}

.gallery-slide {
    display: none;
    height: 100%;
    text-align: center;
}

.gallery-slide img {
    max-height: 90vh;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 1001;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    padding: 20px;
    user-select: none;
    z-index: 1001;
}

.next { right: 0; }
.prev { left: 0; }

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    padding: 20px 0;
}

.page-link {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.page-link:hover {
    background-color: #f5f5f5;
}

.page-link.active {
    background-color: #d87ca6;
    color: white;
    border-color: #d87ca6;
}

/* ======== АДАПТИВНІСТЬ ========= */
/* Навігація для екранів середньої ширини */
@media (max-width: 1024px) {
    nav ul {
        flex-wrap: wrap; /* Дозволяє елементам переноситися на новий рядок */
        justify-content: flex-start; /* Вирівнює елементи по лівому краю */
        padding: 0 10px; /* Додаємо відступи */
    }

    nav ul li {
        margin: 0.5rem; /* Зменшуємо відступи між елементами */
    }

    nav ul li a {
        padding: 0.8rem 1.2rem; /* Зменшуємо відступи всередині елементів */
        font-size: 0.9rem; /* Зменшуємо розмір шрифту */
    }

    .filter-trigger {
        padding: 0.8rem 1.2rem; /* Зменшуємо відступи для кнопки фільтру */
        font-size: 0.9rem; /* Зменшуємо розмір шрифту */
    }

    .filter-modal {
        width: 80%; /* Зменшуємо ширину модального вікна */
        max-width: none; /* Видаляємо обмеження максимальної ширини */
    }

    .filter-form {
        gap: 15px; /* Зменшуємо відступи між елементами форми */
    }

    .filter-select {
        padding: 10px; /* Зменшуємо відступи всередині селектора */
    }

    .apply-button {
        padding: 12px; /* Зменшуємо відступи для кнопки */
    }
}

@media (max-width: 768px) {
    .store-name {
        font-size: 20px;
    }
    
    header h1 {
        font-size: 24px;
    }

    .header-content {
        flex-direction: column; /* Елементи шапки стають один під одним */
        align-items: center; /* Вирівнювання по центру */
        gap: 15px; /* Відступ між логотипом і формою пошуку */
    }

    .search-form {
        width: 100%; /* Форма пошуку займає всю ширину */
        max-width: 400px; /* Обмеження максимальної ширини */
    }

    .search-form input[type="text"] {
        flex-grow: 1; /* Поле пошуку займає весь доступний простір */
    }

    .burger-menu {
        display: block;
    }

    /* Основне меню */
    #nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        padding-top: 0;
        overflow-y: visible;
    }

    #nav-menu.active {
        left: 0;
    }

    /* Пункти меню */
    nav ul {
        flex-direction: column;
        padding: 0 20px;
    }

    nav ul li {
        margin: 0;
        border-bottom: 1px solid rgba(216, 124, 166, 0.15);
    }

    nav ul li a {
        padding: 18px 15px;
        font-size: 16px;
        border-radius: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* Іконка стрілки */
    .has-submenu > a::after {
        content: ">";
        font-size: 14px;
        transition: transform 0.3s;
    }

    /* Підменю для мобілок */
    .submenu {
        display: none;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    .has-submenu:hover .submenu {
        display: block;
    }

    .submenu.active {
        display: block;
    }

    .submenu li {
        border-bottom: none;
    }

    .submenu a {
        padding: 15px 20px !important;
        font-size: 14px !important;
        color: #b34d7a !important;
    }

    /* Затемнення фону */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.3);
        z-index: 999;
    }

    .menu-overlay.active {
        display: block;
    }

    .filter-modal {
        position: absolute;
        top: 100%;
        left: auto;
        right: 0;
        height: auto;
        max-height: 80vh;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        transform: translateY(10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    .filter-modal.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .filter-overlay {
        display: none !important;
    }

    .footer-logo {
        height: 25px;
    }

    .footer-store-name {
        font-size: 18px;
    }

    .social-links {
        gap: 15px;
    }

    .social-icon {
        font-size: 20px;
    }
    
    .products {
        grid-template-columns: 1fr;
    }
    .products {
        gap: 20px;
    }
    
    .product {
        min-height: auto; /* Гнучка висота на мобільних */
        padding: 15px;
    }
    .product img {
        width: 100%;
        max-width: 250px;
    }

    .product-card {
        grid-template-columns: 1fr;
    }

    .product-main-image {
        max-height: 400px;
    }
    
    .close {
        top: 15px;
        right: 20px;
        font-size: 30px;
    }
    
    .prev, .next {
        font-size: 30px;
        padding: 10px;
    }

    .sizes ul li {
        padding: 6px 10px;
        font-size: 13px;
    }

    .sizes h3 {
        font-size: 15px;
    }
}


@media (min-width: 769px) {
    .burger-menu {
        display: none !important;
    }
    
    #nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        padding-top: 0;
        overflow-y: visible;
    }
    
    .submenu {
        display: none;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .has-submenu:hover .submenu {
        display: block;
    }
}

/* ========= Кількість колонок ========= */
@media (min-width: 1200px) {
    .products {
        grid-template-columns: repeat(4, 1fr); /* 4 колонки на великих екранах */
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .products {
        grid-template-columns: repeat(3, 1fr); /* 3 колонки на середніх екранах */
    }
}

@media (max-width: 767px) {
    .products {
        grid-template-columns: repeat(2, 1fr); /* 2 колонки на малих екранах */
    }
}

@media (max-width: 480px) {
    .products {
        grid-template-columns: 1fr; /* 1 колонка на дуже малих екранах */
    }
}