/* css/product.css */
.product-page {
    max-width: 1200px;
    margin: 5px auto;
    padding: 0 20px;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Слайдер на странице товара */
.product-gallery {
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: stretch;
}

.product-image-slider {
    width: 100%;
    height: 100%;
    min-height: 500px;
    background-color: #faf3ee;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-images {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-images img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: block;
}

.slider-images img.active {
    opacity: 1;
    z-index: 1;
}

/* Точки навигации */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.slider-dots .dot.active {
    background: #b33b3b;
    transform: scale(1.2);
    border-color: white;
}

/* Информация о товаре */
.product-info-detail {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-info-detail h1 {
    font-size: 36px;
    font-weight: 600;
    color: #2c2c2c;
    margin: 0;
    text-align: center;
}

.product-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    text-align: center;
}

/* Детальный состав */
.product-composition {
    background: #f9f5f0;
    border-radius: 20px;
    padding: 15px;
    margin: 10px 0 10px 0;
    border: 1px solid #f0e0d6;
}

.composition-title {
    font-size: 20px;
    font-weight: 600;
    color: #b33b3b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.composition-title::before {
    content: '📋';
    font-size: 24px;
}

.composition-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.composition-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e0d0c0;
}

.composition-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.composition-icon {
    font-size: 24px;
    min-width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.03);
}

.composition-content {
    flex: 1;
}

.composition-content strong {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 5px;
}

.composition-content span {
    font-size: 15px;
    color: #666;
    line-height: 1.5;
}

/* Альтернативный вариант в виде сетки */
.composition-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 15px;
}

.composition-card {
    background: white;
    border-radius: 16px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    border: 1px solid #f0e0d6;
}

.composition-card .icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.composition-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: #b33b3b;
    margin-bottom: 8px;
}

.composition-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Характеристики */
.product-meta {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px 0;
    border-top: 1px solid #f0e0d6;
    border-bottom: 1px solid #f0e0d6;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-label {
    font-weight: 600;
    color: #333;
    min-width: 120px;
}

.meta-value {
    color: #b33b3b;
    font-weight: 600;
}

/* ============================================ */
/* ИСПРАВЛЕННЫЙ БЛОК - Выбор количества */
/* ============================================ */
.quantity-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    width: 100%;
}

.quantity-selector label {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    margin-bottom: 5px;
}

.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
}

.quantity-control button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-size: 26px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    color: #333;
    line-height: 1;
}

.quantity-control button:hover {
    background: #f5f5f5;
    border-color: #b33b3b;
    color: #b33b3b;
}

.quantity-control button:active {
    transform: scale(0.95);
}

.quantity-control input {
    width: 40px;
    height: 28px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 30px;
    padding: 0;
    font-weight: 700;
    font-size: 20px;
    color: #333;
    background: #f9f9f9;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

/* Убираем стрелки у числового инпута */
.quantity-control input::-webkit-outer-spin-button,
.quantity-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-control input[type=number] {
    -moz-appearance: textfield;
}

.product-price-detail {
    font-size: 36px;
    font-weight: 700;
    color: #b33b3b;
    margin: 5px 0;
    text-align: center;
    width: 100%;
    line-height: 1.2;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    width: 100%;
}

.add-to-cart-btn,
.back-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 16px 10px;
    border-radius: 40px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.add-to-cart-btn {
    background: #b33b3b;
    color: white;
    border: none;
}

.add-to-cart-btn:hover {
    background: #8f2f2f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(179, 59, 59, 0.3);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

.add-to-cart-btn::before {
    content: '🛒';
    font-size: 20px;
}

.back-btn {
    background: white;
    color: #b33b3b;
    border: 2px solid #b33b3b;
    text-decoration: none;
}

.back-btn:hover {
    background: #b33b3b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(179, 59, 59, 0.2);
}

.back-btn:active {
    transform: translateY(0);
}

.back-btn::before {
    content: '←';
    font-size: 22px;
    line-height: 1;
}

/* ============================================ */
/* АДАПТИВНОСТЬ */
/* ============================================ */
@media (max-width: 992px) {
    .product-detail {
        gap: 30px;
        padding: 30px;
    }
    
    .product-image-slider {
        min-height: 400px;
    }
    
    .composition-grid {
        grid-template-columns: 1fr;
    }
    
    .product-info-detail h1 {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .product-image-slider {
        min-height: 350px;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .add-to-cart-btn,
    .back-btn {
        width: 100%;
        padding: 14px 10px;
        font-size: 16px;
    }
    
    .product-price-detail {
        font-size: 36px;
    }
    
    .product-info-detail h1 {
        font-size: 28px;
    }
    
    .composition-item {
        gap: 10px;
    }
    
    .composition-icon {
        min-width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .quantity-control {
        max-width: 200px;
        gap: 12px;
    }
    
    .quantity-control button {
        width: 42px;
        height: 42px;
        font-size: 22px;
    }
    
    .quantity-control input {
        width: 60px;
        height: 42px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .product-image-slider {
        min-height: 250px;
    }
    
    .quantity-selector {
        gap: 12px;
    }
    
    .slider-dots .dot {
        width: 10px;
        height: 10px;
    }
    
    .composition-title {
        font-size: 18px;
    }
    
    .composition-content strong {
        font-size: 16px;
    }
    
    .composition-content span {
        font-size: 14px;
    }
    
    .product-price-detail {
        font-size: 32px;
    }
    
    .quantity-control {
        max-width: 180px;
        gap: 10px;
    }
    
    .quantity-control button {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }
    
    .quantity-control input {
        width: 55px;
        height: 38px;
        font-size: 16px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    .product-actions {
        gap: 10px;
    }
    
    .add-to-cart-btn,
    .back-btn {
        padding: 12px 8px;
        font-size: 15px;
    }
    
    .product-price-detail {
        font-size: 28px;
    }
}