/* Робимо так, щоб body займав мінімум 100% висоти екрана */
/* html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

/* Контентна частина (блок між хедером і футером) займає весь вільний простір */
main, .content-wrapper {
    flex: 1 0 auto;
} */

/* Футер просто йде наступним блоком, без фіксованого top */
.footer {
    flex-shrink: 0;
}
.footer {
    background: #585858;
    width: 100%;
    min-height: 246px;
    padding: 40px 0;
    color: #FFFFFF;
    font-family: 'Lato', sans-serif;
    /* Видаляємо position: absolute та top */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 20px;
}

/* Стилі для блоків всередині */
.footer-logo {
    width: 158px;
}

.footer-contacts {
    text-align: center;
}

.contact-text {
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    /* margin-bottom: 10px; */
    max-width: 200px;
}

/* .footer-divider {
    width: 197px;
    border: none;
    border-top: 1px solid #FFFFFF;
    margin: 20px auto;
} */

.footer-socials {
    display: flex;
    gap: 40px;
    margin-top: 20px;
}

/* Соціальні іконки (білі квадрати на вашому скриншоті) */
.social-icon {
    width: 27px;
    height: 27px;
    background: #FFFFFF;
    display: block;
}



/* Спільна обгортка для тексту та карти */
.footer-info-wrapper {
    display: flex;
    align-items: center; /* Центрування по вертикалі */
    gap: 30px;           /* Відстань між текстом і картою */
}

/* Стилі тексту */
.footer-text-content {
    flex: 1;             /* Дозволяє тексту займати вільне місце */
    max-width: 250px;    /* Щоб текст не розтягувався занадто сильно */
}

.contact-text {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 19px;
    text-transform: uppercase;
    color: #FFFFFF;
    margin: 0;
}

.footer-divider {
    width: 100%;         /* Розтягується на всю ширину текстового блоку */
    border: none;
    border-top: 1px solid #FFFFFF;
    margin: 20px 0;
}

/* Контейнер карти */
.footer-map-container {
    width: 201px;
    height: 135px;
    border-radius: 4px;
    overflow: hidden;    /* Щоб карта не виступала за радіус */
}

.footer-map-container iframe {
    width: 100%;
    height: 100%;
}

/* Адаптація для мобільних (якщо екран малий — карта стане під текст) */
@media (max-width: 600px) {
    .footer-info-wrapper {
        flex-direction: column;
        text-align: center;
    }
}


.product-card {
  width: 200px;
  background-color: #ffffff;
  padding: 16px; /* Відповідає p-4 */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* Стандартна тінь shadow */
  /* border-radius: 4px; */
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
}

.product-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.product-title {
  margin-top: 8px; /* Відповідає mt-2 */
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
}

.product-price {
  font-weight: bold; /* font-bold */
  color: #000;
}

.buy-button {
  background-color: #3b82f6; /* bg-blue-500 */
  color: white;
  padding: 4px 12px; /* py-1 px-3 */
  margin-top: 8px; /* mt-2 */
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.buy-button:hover {
  background-color: #2563eb; /* Темніший синій при наведенні */
}


/* Основний контейнер меню */
.filters-menu {
    width: 247px;
    background: #F8F8F8;
    padding: 0 0 20px 0;
    font-family: 'Inter', sans-serif;
    color: #585858;
    position: relative;
}

/* Верхня темна смуга (Rectangle 127) */
.filters-header-line {
    width: 100%;
    height: 20px;
    background: #585858;
    margin-bottom: 30px;
}

/* Загальні стилі для секцій фільтрів */
.filter-group {
    padding: 0 23px 10px 25px;
}

/* Контейнер заголовка з квадратиком */
.filter-title-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

/* Маленький зелений квадрат (Rectangle 128, 131...) */
.icon-square {
    width: 16px;
    height: 16px;
    background: #FF0000;
    flex-shrink: 0;
}

/* Текст заголовка (Prezzo, Larghezza...) */
.filter-title {
    font-weight: 700;
    font-size: 18px;
    line-height: 22px;
    text-transform: uppercase;
    margin: 0;
}

/* --- СЕКЦІЯ ЦІНИ --- */
.price-inputs {
    display: flex;
    gap: 0;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-right: 10px;
}

.input-box {
    width: 100px;
    height: 31px;
    background: #FFFFFF;
    border: 1px solid #D9D9D9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
}

/* Слайдер (Line 57 + Ellipse 3, 4) */
.range-slider {
    position: relative;
    height: 20px;
    /* margin: 10px 10px 0 0; */
}

.slider-track {
    position: absolute;
    top: 50%;
    width: 100%;
    height: 3px;
    background: #B4D44A;
    transform: translateY(-50%);
}

.slider-handle {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    background: #FFFFFF;
    border: 1px solid #D9D9D9;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25);
    border-radius: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.slider-handle.left { left: 0; }
.slider-handle.right { right: 0; }

/* --- СПИСКИ (Чекбокси) --- */
.checkbox-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
}

/* Стилізація самих чекбоксів (Rectangle 132...) */
.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border: 1px solid #D9D9D9;
    background: #FFFFFF;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
}

.checkbox-item input[type="checkbox"]:checked {
    background: #585858; /* Колір при виборі */
}

/* --- КОЛЬОРИ (Colore) --- */
.color-list {
    list-style: none;
    padding: 0;
}

.color-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.color-swatch {
    width: 42px;
    height: 42px;
    border: 1px solid #D9D9D9;
    background-size: cover;
    background-position: center;
    margin-right: 12px;
}

/* Текстури для кольорів */
.color-swatch.white { background-color: #FFFFFF; }
.color-swatch.golden-oak { background-image: url('Golden oak.jpg'); }
.color-swatch.anthracite { background-image: url('Антрацит Сірий.jpg'); }

.color-check {
    margin-left: auto; /* Відсовує чекбокс вправо */
    width: 16px;
    height: 16px;
    border: 1px solid #D9D9D9;
}

/* --- КНОПКИ ТА РОЗДІЛЮВАЧІ --- */
.btn-show-more {
    width: 200px;
    height: 30px;
    background: #FFFFFF;
    border: 1px solid #D9D9D9;
    font-size: 14px;
    text-transform: uppercase;
    color: #585858;
    cursor: pointer;
    margin-top: 10px;
    /* margin-left: 20px; */
    display: block;
    text-align: center;
}

.filter-divider {
    border: 0;
    border-top: 1px solid #585858;
    margin: 20px 25px;
    width: 200px;
}



/* Контейнер всієї секції товарів (Rectangle 126) */
.products-container {
    width: 945px;
    background: #F8F8F8;
    position: relative;
    font-family: 'Inter', sans-serif;
}

/* Верхня декоративна смуга (Rectangle 155) */
.products-header-line {
    width: 100%;
    height: 20px;
    background: #FF0000;
}

/* Сітка карток товарів */

/* Картка товару (Rectangle 156, 157...) */
.product-card {
    width: 200px;
    height: 314px;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-sizing: border-box;
    padding: 10px;
    transition: transform 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Обгортка для зображення (Mask group) */
.product-image-wrapper {
    width: 182px;
    height: 182px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image-wrapper img {
    max-width: 176px;
    max-height: 176px;
    object-fit: contain;
}

/* Назва товару */
.product-title {
    margin-top: 10px;
    width: 100%;
    height: 68px; /* Фіксована висота як у Figma для вирівнювання */
    font-size: 14px;
    line-height: 17px;
    text-align: center;
    color: #585858;
    font-weight: 400;
    overflow: hidden;
}

/* Декоративна лінія (Line 18, 64...) */
.product-divider {
    width: 177px;
    border: 0;
    border-top: 1px solid #585858;
    margin: 5px 0;
}

/* Контейнер ціни та кнопки */
.product-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    /* padding-bottom: 5px; */
}

/* Ціна (€500) */
.product-price {
    font-weight: 700;
    font-size: 20px;
    line-height: 24px;

    color: #585858;
    white-space: nowrap;
}

/* Кнопка "Купити" (Rectangle 13 / 175) */
.btn-buy {
    width: 100px;
    height: 32px;
    background: #FF0000;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-buy:hover {
    background: #e60202;
}

.btn-buy span {
    color: #FFFFFF;
    font-weight: 700;
    font-size: 12px;
    /* line-height: 15px; */
    text-transform: none; /* Для "Acquistare" або "Купити" */
}

/* Іконка кошика всередині кнопки (Vector) */
.btn-buy svg {
    width: 20px;
    height: 15px;
    fill: white;
}


/* Контейнер main, який містить сітку */
.products-main-area {
    background: #F8F8F8; /* Rectangle 126 */
    position: relative;
    padding-top: 0; /* Щоб блакитна лінія була впритул до верху */
    min-height: 1096px;
    border-radius: 2px;
    overflow: hidden;
}

/* Блакитна смуга зверху товарів (Rectangle 155) */
.products-top-bar {
    width: 100%;
    height: 20px;
    background: #FF0000;
    margin-bottom: 30px;
}

/* Оновлюємо сітку, щоб вона мала правильні відступи всередині сірого фону */

.range-slider {
    position: relative;
    height: 30px; /* збільшимо область для зручності */
    /* margin: 10px 20px; */
    cursor: pointer;
}

.slider-track {
    position: absolute;
    top: 50%;
    width: 100%;
    height: 3px;
    background: #FF0000; /* зелений з макета */
    transform: translateY(-50%);
}

.slider-handle {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    background: #FFFFFF;
    border: 1px solid #D9D9D9;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    cursor: grab;
}

.slider-handle:active {
    cursor: grabbing;
}





/* --- СТИЛІ МОДАЛЬНОГО ВІКНА --- */
.order-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none; /* Керується через JS (flex/none) */
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.order-modal-overlay.flex {
    display: flex;
}

.order-modal-content {
    background: #F8F8F8;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    position: relative;
    border-top: 40px solid #585858; /* Rectangle 127 стиль */
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-close-btn {
    position: absolute;
    top: -38px;
    right: 10px;
    color: white;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
}

.modal-product-info {
    font-size: 14px;
    color: #6B98BF;
    margin-bottom: 20px;
    font-weight: 700;
}

.modal-field {
    margin-bottom: 15px;
}

.modal-label {
    display: block;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    color: #585858;
    margin-bottom: 5px;
}

.modal-input {
    width: 100%;
    background: #FFFFFF;
    border: 1px solid #D9D9D9;
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    box-sizing: border-box;
}

.modal-input:focus {
    outline: 2px solid #FF0000;
    border-color: transparent;
}

.modal-textarea {
    height: 80px;
    resize: none;
}

.modal-submit-btn {
    width: 100%;
    height: 45px;
    background: #585858;
    color: white;
    border: none;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
    letter-spacing: 1px;
}

.modal-submit-btn:hover {
    background: #000000;
}

.modal-footer-note {
    font-size: 10px;
    color: #999;
    text-align: center;
    margin-top: 15px;
}


/* Приховуємо елементи за замовчуванням */
.hidden-option {
    display: none !important;
}

/* Коли батьківський клас має .is-expanded, показуємо все */
.expandable-filter.is-expanded .hidden-option {
    display: flex !important;
}

/* Стиль кнопки з вашого скриншоту */
.btn-show-more-toggle {
    background: #FFFFFF;
    border: 1px solid #D9D9D9;
    color: #585858;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    width: 200px;
    height: 35px;
    margin-top: 10px;
    cursor: pointer;
    display: block;
    transition: all 0.2s ease;
}

.btn-show-more-toggle:hover {
    background: #f0f0f0;
}


/* Базові приховання для MOSTRA ALTRO */
.hidden-option { display: none !important; }
.expandable-filter.is-expanded .hidden-option { display: flex !important; }

/* Стилі для кнопки MOSTRA ALTRO */
.btn-show-more-toggle {
    background: transparent;
    border: 1px solid #D9D9D9;
    padding: 5px 10px;
    font-size: 12px;
    margin-top: 10px;
    cursor: pointer;
    width: 100%;
}

/* МОБІЛЬНЕ МЕНЮ (Drawer) */
@media (max-width: 1024px) {
    .filters-menu {
        position: fixed;
        top: 0;
        left: -300px; /* Сховано зліва */
        width: 247px;
        height: 100vh;
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
        overflow-y: auto;
    }

    .filters-menu.active {
        left: 0; /* Висуваємо */
    }

    .filter-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 998;
        display: none;
    }

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

    .mobile-filter-btn {
        display: flex;
        align-items: center;
        gap: 10px;
        background: #585858;
        color: white;
        padding: 10px 20px;
        margin-bottom: 20px;
        font-weight: bold;
    }

    .close-filters {
        position: absolute;
        right: 15px;
        top: 10px;
        font-size: 30px;
        color: white;
        background: none;
        border: none;
    }
}

/* Додаткові кнопки */
.btn-ok-filter {
    background: #FFFFFF;
    border: 1px solid #D9D9D9;
    width: 100%;
    margin-top: 15px;
    padding: 8px;
    cursor: pointer;
}

.reset-link {
    display: block;
    text-align: center;
    margin: 20px;
    color: #585858;
    text-decoration: underline;
}
.mobile-filter-toggle {
    display: none; /* За замовчуванням прихована (для ПК) */
    /* position: fixed; */
    bottom: 20px;
    left: 50%;
    /* transform: translateX(-50%); */
    z-index: 100;
    background: #585858; /* Ваш темний колір */
    color: #FFFFFF;
    border: none;
    padding: 5px;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    align-items: center;
    gap: 12px;
    cursor: pointer;
    /* border-radius: 4px; Легке закруглення */
}

@media (max-width: 1024px) {
    .mobile-filter-toggle {
        display: flex; /* Робимо видимою */
    }
}

.mobile-filter-toggle:active {
    transform: translateX(-50%) scale(0.95);
}
/* \ */

/* Оновлена сітка товарів */
.products-grid {
    display: grid;
    /* На телефонах — 1-2 колонки, на десктопах — 4 */
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); 
    gap: 28px 40px;
    /* margin-left: 23px; Прибираємо фіксований відступ для центрирування */
    padding: 10px 23px;
    width: 100%;
}

/* 
.products-grid {
    display: grid;
  
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); 
    gap: 20px; 
    margin-left: 0; 
    padding: 10px;
    width: 100%;
} */


/* .products-grid {
    display: grid;
    grid-template-columns: repeat(4, 200px); /* 4 колонки по 200px */
    /* gap: 28px 40px; Відступи між картками (вертикальні та горизонтальні) */
    /* padding: 32px 10px; Внутрішні відступи від країв контейнера */
    /* margin-left: 23px;  */
/* } */


@media (min-width: 1225px) {
    .products-grid {
        grid-template-columns: repeat(4, 200px);
        /* margin-left: 23px; */
        width: 945px;
    }
}




/* Стилі для мобільної версії */
@media (max-width: 1023px) {
    .filters-header-line {
        display: flex;
        justify-content: flex-end; /* Зміщує хрестик вправо */
        /* padding: 10px 15px; */
        height: 40px;
    }

    .close-sidebar {
        background: none;
        border: none;
        font-size: 30px; 
        line-height: 1;
        color: #fff;
        cursor: pointer;
        padding: 5px;
        /* top: -40px; */
    }
    
}

.color-dot:hover {
    transform: scale(1.2);
}
.product-image-wrapper img {
    height: 250px; /* або ваша висота */
    object-fit: cover;
    width: 100%;
}
.cursor-pointer {
    cursor: pointer;
}
.modal-close-btn-detail {
    position: absolute;
    /* Від’ємне значення top виносить кнопку на темну смужку */
    top: -32px; 
    right: 12px;
    color: white;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    /* Важливо: z-index має бути вищим за border-top модалки */
    z-index: 5000; 
    line-height: 1;
    transition: opacity 0.2s;
}

.modal-close-btn-detail:hover {
    opacity: 0.7;
}

/* Переконайся, що контент модалки не обрізає кнопку */
.order-modal-content {
    /* overflow: hidden може обрізати кнопку, якщо вона виходить за межі. 
       Але оскільки у нас темна смужка — це border-top, ми дозволяємо бачити кнопку */
    overflow: visible !important; 
}

.detail-modal {
    max-width: 80vh;
    max-height: 80vh;
}

#detail-modal .order-modal-content {
    width: 90%;
    max-width: 900px; /* Обмежуємо ширину на десктопах */
    max-height: 90vh; /* Щоб не виходила за межі екрана по висоті */
    overflow-y: auto; /* Скрол всередині, якщо контенту багато */
}

/* Стилі для модалки деталей на мобільних */
@media (max-width: 768px) {
    #detail-modal .order-modal-overlay {
        /* Дозволяємо самій підкладці скролитися, якщо модалка висока */
        align-items: flex-start; 
        padding-top: 50px; /* Місце для хрестика зверху */
        overflow-y: auto;
    }

    #detail-modal .order-modal-content {
        /* Міняємо flex на column, щоб фото було над текстом */
        flex-direction: column; 
        max-height: none; /* Прибираємо обмеження висоти, щоб скрол йшов по всій сторінці */
        margin-bottom: 20px;
        width: 95%; /* Трохи ширше на телефонах */
    }

    /* Налаштування зображення, щоб воно не займало весь екран */
    #detail-main-img {
        height: auto;
        max-height: 300px;
    }

    /* Фіксуємо кнопку закриття, щоб вона не тікала при скролі (опціонально) 
       або просто залишаємо її над модалкою */
    .modal-close-btn-detail {
        top: -40px;
        position: absolute;
    }
}

/* Загальне правило для плавності скролу на iOS */
#detail-modal .order-modal-content, 
#detail-modal .order-modal-overlay {
    -webkit-overflow-scrolling: touch;
}

/* Стиль для оверлею модалки деталей */
#detail-modal.order-modal-overlay {
    display: none; /* за замовчуванням */
    overflow-y: auto; /* Дозволяємо вертикальну прокрутку оверлею */
    padding: 20px 0; /* Невеликий відступ, щоб модалка не липла до країв */
    -webkit-overflow-scrolling: touch;
}

#detail-modal.order-modal-overlay.flex {
    display: flex;
    /* На маленьких екранах вирівнюємо по верхньому краю, а не по центру */
    align-items: flex-start; 
}

@media (min-width: 768px) {
    #detail-modal.order-modal-overlay.flex {
        align-items: center; /* На десктопі повертаємо центр */
    }
}

/* На телефонах робимо блоки один під одним */
@media (max-width: 767px) {
    #detail-modal .order-modal-content {
        flex-direction: column !important;
        width: 95% !important;
        margin: 40px auto 20px auto; /* Залишаємо місце зверху для хрестика */
        max-height: none !important; /* Дозволяємо розтягуватися по контенту */
    }

    #detail-modal .md\:w-1\/2 {
        width: 100% !important;
    }

    /* Щоб фото не було занадто великим на весь екран */
    #detail-main-img {
        height: auto !important;
        max-height: 300px !important;
    }
    
    /* Хрестик закриття на мобільних */
    .modal-close-btn-detail {
        top: -35px !important;
        right: 5px !important;
        position: absolute;
    }
}

/* Переконуємося, що права колонка розтягується і дозволяє mt-auto */
.md\:w-1\/2.p-8.flex.flex-col {
    min-height: 450px; /* Мінімальна висота для десктопа */
}

/* Кольори в деталях робимо трохи більшими, як на скріншоті */
#detail-colors div {
    width: 45px !important;
    height: 45px !important;
    border: 1px solid #D9D9D9;
}

/* Кнопка закриття */
.modal-close-btn-detail {
    top: -34px !important;
    right: 15px !important;
    font-size: 32px !important;
}

