.cart-message {
  margin-top: 15px;
  padding: 10px 15px;
  border-radius: 6px;
  font-size: 14px;
}

.cart-message.success {
  background: #e8f7ee;
  color: #1e824c;
}

.cart-message.error {
  background: #fdecea;
  color: #c0392b;
}
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.main-image-container { width: 100%; /*aspect-ratio: 3/4;*/ overflow: hidden; background: #f5f5f5; border-radius: 8px; }
.main-image { width: 100%; height: 100%; object-fit: cover; }

.thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    min-height: 110px; /* Чтобы контейнер не схлопывался, когда картинок мало */
}

.thumb {
    width: 80px;
    height: 100px;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    transition: 0.2s border-color;
}

.thumb.active {
    border-color: #000;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Адаптивность для карточки товара */
/* Мобильная адаптация карточки товара */
@media (max-width: 768px) {
    .product-layout {
        display: block !important; /* Отменяем гриды/флекс */
    }

    .product-gallery {
        width: 100%;
        margin-bottom: 20px;
    }

    .main-image-container img {
        width: 100%;
        height: auto;
        max-height: 450px;
        object-fit: cover;
    }

    /* Делаем миниатюры горизонтальным скроллом */
    .thumbnails {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 10px;
    }

    .thumb {
        flex: 0 0 70px; /* Фиксированная ширина миниатюр */
        height: 70px;
    }

    .product-info {
        width: 100%;
        padding: 0 10px;
    }

    .product-info h1 {
        font-size: 22px;
        margin-bottom: 10px;
    }

    /* Делаем поля выбора (select) крупнее для пальцев */
    .product-form label {
        display: block;
        margin-bottom: 15px;
    }

    .product-form select, 
    .product-form input {
        width: 100%;
        height: 45px; /* Удобная высота для клика */
        font-size: 16px; /* Предотвращает зум на iPhone */
    }

    .btn-primary {
        width: 100%;
        padding: 15px;
        font-size: 18px;
    }
}