/* Стили для страницы товара */

/* Хлебные крошки */
.breadcrumbs {
    margin: 20px 0;
}

.breadcrumbs__link {
    color: var(--gray-text);
    font-size: 14px;
    transition: color 0.3s ease;
}

.breadcrumbs__link:hover {
    color: var(--primary-color);
}

/* Детали товара */
.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

/* Галерея изображений */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gallery-main {
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-thumbs {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: var(--primary-color);
}

.gallery-thumb__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Информация о товаре */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.product-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stars {
    display: flex;
    gap: 2px;
}

.rating-count {
    color: var(--gray-text);
    font-size: 14px;
}

.product-pricing {
    display: flex;
    align-items: center;
    gap: 15px;
}

.product-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.product-old-price {
    font-size: 18px;
    color: var(--gray-text);
    text-decoration: line-through;
}

.product-discount {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.product-quantity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-title {
    font-size: 16px;
    margin: 0;
    font-weight: 600;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background-color 0.3s ease;
}

.quantity-btn:hover {
    background-color: var(--border-color);
}

.quantity-value {
    font-size: 16px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.in-stock {
    color: var(--gray-text);
    font-size: 14px;
    margin: 0;
}

.product-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.product-favourite {
    background: none;
    border: 2px solid var(--secondary-color);
    border-radius: 4px;
    cursor: pointer;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
}

.product-favourite:hover {
    background-color: #93dad55b;
}

/* Преимущества */
.product-benefits {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 15px;
}

.benefit-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

#benefit-icon1 {
    background-color: #ff6b3541;
}

#benefit-icon2 {
    background-color: #4ECDC420;
}

#benefit-icon3 {
    background-color: #FFD16630;
}

.benefit-text h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
}

.benefit-text p {
    margin: 0;
    font-size: 12px;
    color: var(--gray-text);
}

/* Табы описания и характеристик */
.product-tabs {
    margin: 60px 0;
}

.tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 15px 30px;
    background: none;
    border: none;
    font-weight: 600;
    color: var(--text-color);
    position: relative;
    cursor: pointer;
    transition: color 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.tabs-content {
    padding: 20px 0;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel p {
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .product-details {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .gallery-main {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .gallery-main {
        height: 300px;
    }
    
    .gallery-thumbs {
        justify-content: center;
    }
    
    .product-title {
        font-size: 20px;
    }
    
    .product-price {
        font-size: 20px;
    }
    
    .product-old-price {
        font-size: 16px;
    }
    
    .product-quantity-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .tabs-nav {
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 12px 20px;
        text-align: left;
    }
    
}

@media (max-width: 576px) {
    .gallery-main {
        height: 250px;
    }
    
    .gallery-thumb {
        width: 60px;
        height: 60px;
    }
    
    .product-title {
        font-size: 18px;
    }
    
    .product-benefits {
        gap: 10px;
    }
    
    .benefit {
        gap: 10px;
    }
    
    .benefit-icon {
        width: 40px;
        height: 40px;
    }
    
    .benefit-text h4 {
        font-size: 12px;
    }
    
    .benefit-text p {
        font-size: 10px;
    }
}