/* products.css - Стили для страницы каталога изделий */

/* Раздел каталога */
#wrap-products {
    padding: 160px 0 80px 0;
    background-color: #fcfcfc;
    font-family: 'PT Sans', sans-serif;
    color: #333;
}

@media (max-width: 991px) {
    #wrap-products {
        padding: 120px 0 50px 0;
    }
}

/* Стили заголовков секций */
.title-section {
    margin-bottom: 25px;
}

.title-section h3,
.title-section h1 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 50px;
    text-align: center;
    color: #111;
}

.title-section h3 span.light,
.title-section h1 span.light {
    font-weight: 300;
    color: #c5a47e;
}

.section-subtitle {
    font-size: 16px;
    color: #888;
    margin-top: -35px;
    margin-bottom: 10px;
    font-weight: normal;
}

/* Переключатели режимов (Типов изделий) */
.type-tabs-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.type-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 2px solid #eaeaea;
}

.type-tabs li {
    margin: 0 15px;
}

@media (max-width: 575px) {
    .type-tabs {
        border-bottom: none;
    }
    .type-tabs li {
        margin: 5px 10px;
    }
    .type-tabs a {
        font-size: 15px;
        padding: 8px 12px;
        border-bottom: 2px solid #eaeaea;
    }
    .type-tabs a.active-tab {
        border-bottom: 2px solid #c5a47e;
    }
}

.type-tabs a {
    display: block;
    padding: 10px 20px;
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    color: #555;
    text-decoration: none;
    letter-spacing: 1px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.type-tabs a:hover {
    color: #c5a47e;
    text-decoration: none;
}

.type-tabs a.active-tab {
    color: #c5a47e;
    border-bottom-color: #c5a47e;
    text-decoration: none;
}

/* Фильтр категорий */
.category-filter-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-filter li {
    margin: 5px 10px;
}

.category-filter a {
    display: block;
    padding: 6px 15px;
    font-size: 14px;
    font-weight: 700;
    color: #777;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.category-filter a:hover {
    color: #c5a47e;
    border-color: #c5a47e;
    text-decoration: none;
}

.category-filter a.active-filter {
    background-color: #c5a47e;
    color: #fff;
    border-color: #c5a47e;
    text-decoration: none;
}

/* Сетка изделий */
#products-grid {
    transition: all 0.4s ease;
}

/* Карточка изделия */
.product-card {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    background: #fff;
    border: 1px solid #eee;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: #c5a47e;
}

/* Обертка изображения */
.product-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.08);
}

/* Название изделия на затемненной 30% полосе */
.product-name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.3); /* Затемнение на 30% */
    color: #fff;
    padding: 10px 15px;
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 2;
    text-align: center;
}

.product-card:hover .product-name-overlay {
    transform: translateY(100%);
    opacity: 0;
}

/* Описание изделия и значок увеличения на ховере */
.product-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75); /* Затемнение на 75% */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
    padding: 20px;
    text-align: center;
}

.product-card:hover .product-hover-overlay {
    opacity: 1;
}

.product-description {
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    transform: translateY(-10px);
    transition: transform 0.3s ease;
}

.product-card:hover .product-description {
    transform: translateY(0);
}

.product-zoom-icon {
    color: #c5a47e;
    font-size: 28px;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.product-card:hover .product-zoom-icon {
    transform: scale(1);
}

/* Стили Лайтбокса (Галереи крупным планом) */
#custom-lightbox {
    display: none;
    position: fixed;
    z-index: 999999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    user-select: none;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 75vh;
    height: auto;
    border: 3px solid #c5a47e;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    animation: fadeInSimple 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.lightbox-close:hover {
    color: #c5a47e;
}

.lightbox-caption {
    margin-top: 15px;
    color: #fff;
    font-family: 'PT Sans', sans-serif;
    text-align: center;
    background: rgba(24, 24, 24, 0.85);
    padding: 10px 20px;
    border-radius: 4px;
    border-bottom: 2px solid #c5a47e;
    min-width: 250px;
}

.lightbox-caption h3 {
    margin: 0 0 5px 0;
    color: #c5a47e;
    font-size: 18px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

.lightbox-caption p {
    margin: 0;
    font-size: 14px;
    color: #ccc;
}

@media (max-width: 768px) {
    .lightbox-close {
        right: 10px;
        top: -50px;
    }
    .lightbox-img {
        max-height: 60vh;
    }
}

/* Анимации */
@keyframes fadeInSimple {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
