.img-thumbnail {
    width: 150px;
    height: 150px;
    cursor: pointer;
    border: 2px solid gray;
    transition: transform 0.3s, border-color 0.3s;
}

.img-thumbnail:hover {
    transform: scale(1.1);
    border-color: blue;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
}

#close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}



body {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.header-container {
    display: flex;
    align-items: center;
    height: 80px;
    background: linear-gradient(to right, #D0C1E2, #8C9E9D, #A88DC3);
    padding: 10px 20px;
    margin-bottom: 20px;
    border-radius: 0 0 10px 10px;
}

.logo {
    height: 60px;
    margin-right: 20px;
}

.header-title {
    font-size: 1.5rem;  /* Уменьшение заголовка в 2 раза */
    font-weight: bold;
    margin: 0;
    flex-grow: 1;
    text-align: center;
}


#original-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ccc; /* Добавим рамку, чтобы проверить, отображается ли контейнер */
    min-height: 300px; /* Делаем контейнер видимым, если он пустой */
}


/* Контейнер галереи */
.fade-in {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

/* Убираем скрытие изображений! */
.fade-in-item {
    opacity: 1; /* Исправлено: теперь видно сразу */
    transform: scale(0.8); /* Плавный эффект увеличения */
    transition: transform 0.3s ease-out;
}

/* Эффект появления */
.fade-in-item.fade-in-visible {
    transform: scale(1); /* Увеличение до нормального размера */
}


.top-toast {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, rgba(215, 243, 227, 0.98), rgba(232, 245, 233, 0.98)); /* Додаємо прозорість */
    color: #2e7d32; /* Глибокий зелений для акценту */
    padding: 14px 24px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px; /* Менш округлені кути */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    z-index: 1000;
    text-align: center;
    white-space: nowrap;
    max-width: 80%;
    animation: fadeInOut 4s ease-in-out;
}

/* Анімація плавної появи та зникнення */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    10% {
        opacity: 0.98; /* Трохи менш насичений */
        transform: translateX(-50%) translateY(0);
    }
    90% {
        opacity: 0.98;
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}



/* Контейнер изображения */
.image-wrapper {
    position: relative;
    display: inline-block;
}

/* 🔴 КРУГЛЫЙ, НЕ НАВЯЗЧИВЫЙ ШТАМП */
.crossed-out::after {
    content: "FAIL COLOR";
    position: absolute;
    bottom: 5px; /* Отступ от нижнего края */
    right: 5px;  /* Отступ от правого края */
    width: 40px; /* Чуть меньше размер */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(204, 0, 0, 0.8); /* Темно-красный, менее яркий */
    color: white;
    font-size: 9px;
    font-weight: bold;
    text-transform: uppercase;
    opacity: 0;
    border-radius: 50%; /* Делаем его круглым */
    transition: opacity 0.3s ease-in-out, transform 0.2s ease-out;
    pointer-events: none;
    z-index: 2; /* Чтобы всегда был поверх */

    /* Мягкий эффект */
    border: 2px solid rgba(204, 0, 0, 0.9);
    box-shadow: 0 2px 6px rgba(204, 0, 0, 0.5);
}

/* 🟥 Показываем штамп с плавной анимацией */
.crossed-visible::after {
    opacity: 0.9;
    transform: scale(1.1) rotate(0deg);
    transition: transform 0.2s ease-out, opacity 0.2s ease-in;
}

/* 🔄 Мягкий эффект появления */
@keyframes stamp-effect {
    0% { transform: scale(1.2) rotate(3deg); opacity: 0.5; }
    50% { transform: scale(1) rotate(-3deg); opacity: 0.8; }
    100% { transform: scale(1.1) rotate(0deg); opacity: 0.9; }
}

.crossed-visible::after {
    animation: stamp-effect 0.25s ease-out;
}




/* 🔹 Кликабельный цвет + крестик (по умолчанию без фона) */
.color-clickable {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.15s ease-in-out;
}

/* 🔴 При наведении - красный, если крестик НЕ стоит */
.color-clickable.no-mismatch:hover {
    background-color: rgba(255, 0, 0, 0.2);
}

/* 🟢 При наведении - зеленый, если крестик стоит */
.color-clickable.mismatch:hover {
    background-color: rgba(0, 128, 0, 0.2);
}

/* ✖️ Крестик (по умолчанию зеленый) */
.color-clickable span {
    margin-left: 5px;
    font-size: 16px;
    transition: transform 0.15s ease-in-out, color 0.3s ease;
    color: green; /* По умолчанию зеленый */
}

/* 🔹 Эффект небольшого увеличения крестика при наведении */
.color-clickable:hover span {
    transform: scale(1.1);
}





/* 🔹 Кликабельный ID товара (ссылка) */
.product-id {
    cursor: pointer;
    color: blue;
    text-decoration: underline;
    transition: color 0.3s ease;
}

/* 🔹 Эффект при наведении */
.product-id:hover {
    color: darkblue;
}
.color-label {

    white-space: normal; /* Позволяет перенос строк */
    text-align: center; /* Выравнивание текста */
    max-width: 110px; /* Чтобы текст не растягивал контейнер */
}








    /* Выпадающая палитра */
    .color-popup {
        display: none;
        position: absolute;
         top: 42px; /* Принудительно открываем ниже кнопки */
        background: white;
        border-radius: 8px;
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
        padding: 10px;
        margin-top: 5px;
        width: 250px;
        flex-wrap: wrap;
        justify-content: center;
            z-index: 3000; /* Подняли выше всех */
    }

    /* Кнопки цвета */
    .color-option {
        display: inline-block;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        cursor: pointer;
        margin: 5px;
        border: 2px solid transparent;
        transition: transform 0.2s, border 0.2s;
    }

    /* Кнопка "Без цвета" */
    .none-color {
        background: repeating-linear-gradient(45deg, #ccc, #ccc 5px, #fff 5px, #fff 10px);
        border: 2px solid gray;
    }

    /* Подсветка выбранного цвета */
    .color-option:hover, .color-option.selected {
        transform: scale(1.2);
        border: 2px solid white;
    }





