.catalog {
    padding: 60px 0;
    background-color: #fff;
    overflow-x: hidden;
    width: 100%;
}

.catalog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.catalog-title {
    font-size: 40px;
    font-weight: 400;
    text-transform: uppercase;
    margin-bottom: 40px;
    color: #333;
    font-family: 'Bebas Neue Regular', sans-serif;
    position: relative;
    padding-top: 20px;
    letter-spacing: 0em;
    line-height: 1.2;
}

.catalog-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 600px;
    height: 1px;
    background-color: rgb(25, 142, 56);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
}

.catalog-card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.catalog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.card-image {
    position: relative;
    height: 550px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.45));
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
}

.card-title {
    font-family: 'Bebas Neue Regular', sans-serif;
    font-size: 48px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0em;
    text-transform: uppercase;
}

.card-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    margin-bottom: 10px;
}

.price-label {
    font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    color: white;
    white-space: nowrap;
}

.price-subtitle {
    font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: white;
    white-space: nowrap;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 15px;
}

.card-details {
    font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: white;
    max-width: 65%;
}

.card-right-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.card-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-buttons button {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    min-width: 130px;
}

.btn-consultation {
    background-color: rgba(255, 255, 255, 0.95);
    color: #000;
}

.btn-consultation:hover {
    background-color: white;
    transform: scale(1.05);
}

.btn-more {
    background-color: rgb(25, 142, 56);
    color: white;
}

.btn-more:hover {
    background-color: rgb(20, 120, 45);
    transform: scale(1.05);
}

/* Модальное окно товара */
.product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    padding: 20px;
    overflow-y: auto;
}

.product-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.product-modal-content {
    background: white;
    border-radius: 15px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.product-modal-overlay.active .product-modal-content {
    transform: scale(1);
}

.product-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border: 2px solid #333;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    transition: all 0.3s;
}

.product-modal-close:hover {
    background: #333;
    color: white;
    transform: rotate(90deg);
}

.product-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

/* Галерея */
.product-gallery {
    position: sticky;
    top: 20px;
}

.gallery-main {
    width: 100%;
    aspect-ratio: 4/3;
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.gallery-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.gallery-thumb:hover {
    transform: scale(1.05);
}

.gallery-thumb.active {
    border-color: rgb(25, 142, 56);
}

/* Детали товара */
.product-details h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.product-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.product-price-block {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.product-price {
    font-size: 36px;
    font-weight: 700;
    color: rgb(25, 142, 56);
}

.product-old-price {
    font-size: 24px;
    color: #999;
    text-decoration: line-through;
}

.btn-consultation-small {
    background-color: rgb(25, 142, 56);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
    display: inline-block;
}

.btn-consultation-small:hover {
    background-color: rgb(20, 120, 45);
    transform: scale(1.05);
}

.product-description {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 25px;
}

.product-characteristics {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.product-characteristics h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.product-characteristics ul {
    list-style: none;
    padding: 0;
}

.product-characteristics li {
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
    font-size: 14px;
    color: #555;
}

.product-characteristics li:last-child {
    border-bottom: none;
}

.btn-order {
    width: 100%;
    background-color: rgb(25, 142, 56);
    color: white;
    padding: 18px 30px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    text-transform: uppercase;
}

.btn-order:hover {
    background-color: rgb(20, 120, 45);
}

/* Полноэкранная галерея */
.fullscreen-gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.fullscreen-gallery-overlay.active {
    opacity: 1;
    visibility: visible;
}

.gallery-image-container {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image-container img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    user-select: none;
}

.gallery-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 20001;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.gallery-close:hover {
    background: white;
    color: black;
    transform: rotate(90deg);
}

.gallery-prev,
.gallery-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 20001;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.gallery-prev {
    left: 30px;
}

.gallery-next {
    right: 30px;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(255, 255, 255, 0.9);
    color: black;
    transform: translateY(-50%) scale(1.1);
    border-color: white;
}

.gallery-counter {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 16px;
    z-index: 20001;
}

/* Индикатор свайпа для мобильных */
.swipe-hint {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    z-index: 20001;
    display: none;
    text-align: center;
}

/* Скрываем стрелки на мобильных */
@media (max-width: 992px) {
    .gallery-prev,
    .gallery-next {
        display: none;
    }
    
    .swipe-hint {
        display: block;
    }
}

/* Адаптивность */
@media (max-width: 992px) {
    .product-modal-body {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px;
    }

    .product-gallery {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .product-modal-body {
        padding: 20px;
    }

    .product-modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }

    .product-details h2 {
        font-size: 26px;
    }

    .product-price {
        font-size: 28px;
    }

    .product-old-price {
        font-size: 18px;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .gallery-prev,
    .gallery-next {
        width: 50px;
        height: 50px;
        font-size: 32px;
    }
    
    .gallery-prev {
        left: 10px;
    }
    
    .gallery-next {
        right: 10px;
    }
    
    .gallery-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .btn-consultation-small {
        font-size: 13px;
        padding: 8px 16px;
    }
}

/* Адаптивность для каталога - переопределение */
@media (max-width: 768px) {
    .catalog-title {
        font-size: 30px;
        padding-top: 15px;
    }

    .catalog-title::before {
        max-width: 400px;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
    }
    
    .card-image {
        height: 350px !important;
    }
    
    .card-title {
        font-size: 40px;
    }
    
    .price-label {
        font-size: 20px;
    }
    
    .price-subtitle {
        font-size: 12px;
    }
    
    .card-buttons button {
        min-width: 110px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .catalog-title {
        font-size: 24px;
        padding-top: 12px;
    }

    .catalog-title::before {
        max-width: 300px;
    }
    
    .card-image {
        height: 350px !important;
    }
    
    .card-title {
        font-size: 40px;
    }
    
    .price-label {
        font-size: 18px;
    }
    
    .card-details {
        font-size: 13px;
    }
    
    .card-buttons button {
        padding: 8px 14px;
        font-size: 11px;
        min-width: 100px;
    }
}
