/* General styles */
body {
    font-family: 'Playfair Display', serif; /* Элегантный шрифт для заголовков */
    margin: 0;
    padding: 0;
    background-color: #fdfaf6; /* Кремовый фон */
    color: #333;
}

h1, h2, h3 {
    font-weight: 400;
}

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

ul {
    list-style: none;
    padding: 0;
}

/* Шапка и Навигация */
header {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.logo {
    font-size: 32px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

nav ul {
    display: flex;
    justify-content: center;
    gap: 30px;
}

nav a {
    font-size: 16px;
    text-transform: uppercase;
    color: #555;
}

nav a:hover {
    color: #a87f5b; /* Цвет при наведении (золотисто-коричневый) */
}

/* Сетка товаров */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 40px;
    align-items: start;
}

.product-item {
    width: 100% !important;
    height: 350px !important;
    min-height: 350px !important; /* Чтобы точно не сжималось */
    object-fit: cover !important; /* Это обрежет лишнее и заполнит блок */
    object-position: center !important;
    display: block !important;
}

.product-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.product-item h3 {
    font-size: 18px;
    margin: 15px 0 5px;
}

.product-item .price {
    font-size: 16px;
    color: #888;
}

/* Футер */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 40px 0;
    margin-top: 40px;
}

/* Сетка Галереи */
.gallery-container { 
    display: flex; 
    flex-wrap: wrap; 
    padding: 20px; 
    gap: 15px; 
}

.gallery-item { 
    flex: 1 1 calc(33.333% - 15px); /* Ровно 3 колонки с учетом отступов */
    height: 400px; 
    overflow: hidden; 
    background: #eee;
}

.gallery-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; /* Это подгонит разные картинки под размер 400px */
    object-position: center;
    transition: transform 0.5s; 
    display: block;
}

.gallery-item img:hover { 
    transform: scale(1.05); 
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .gallery-item { flex: 1 1 calc(50% - 15px); }
}
@media (max-width: 480px) {
    .gallery-item { flex: 1 1 100%; }
}

/* Жесткая фиксация размеров витрины */
.image-wrapper {
    width: 100%;
    height: 350px; /* Высота коробочки */
    overflow: hidden; /* Всё, что не влезло — отрезаем */
    background-color: #f0f0f0; /* Серый фон, пока грузится фото */
}

.image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Растягиваем фото на всю коробочку без искажений */
    object-position: center !important;
    display: block !important;
}

.product-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Выравнивает текст и цену внизу */
    height: 100%;
}

/* Принудительное отображение текста */
.info {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: #ffffff !important;
    padding: 15px !important;
    min-height: 80px !important;
    border-top: 1px solid #eee !important;
    position: relative !important;
    z-index: 10 !important;
}

.info h3 {
    display: block !important;
    color: #000000 !important;
    font-size: 18px !important;
    margin-bottom: 5px !important;
}

.info .price {
    display: block !important;
    color: #666666 !important;
    font-size: 16px !important;
}


.lang-switch {
    margin-top: 10px;
    font-size: 13px;
    color: #777;
}
.lang-switch a {
    color: #a87f5b;
    text-decoration: none;
}
.page-wrap {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
    line-height: 1.7;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    nav ul {
        flex-wrap: wrap;
        gap: 16px;
    }
}


/* Stanislas final shop layout fix */
.product-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 30px !important;
    padding: 40px !important;
    align-items: stretch !important;
    margin-bottom: 80px !important;
}

.product-grid .product-item {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid #eee !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
}

.product-grid .img-container {
    width: 100% !important;
    height: 350px !important;
    overflow: hidden !important;
    background: #f0f0f0 !important;
    flex: 0 0 auto !important;
}

.product-grid .img-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

.product-grid .info {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #ffffff !important;
    padding: 20px 15px !important;
    min-height: 96px !important;
    border-top: 1px solid #eee !important;
    text-align: center !important;
    position: relative !important;
    z-index: 1 !important;
    flex: 0 0 auto !important;
}

footer {
    clear: both !important;
}
