/* ========== КОНТЕЙНЕР СТРАНИЦЫ ПРОДУКТА ========== */
.product-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ========== ХЛЕБНЫЕ КРОШКИ ========== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    font-size: 14px;
    flex-wrap: wrap;
}

.breadcrumb a { color: #FF6B35; text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { color: #E55A2B; text-decoration: underline; }
.breadcrumb span { color: #CCC; }
.breadcrumb > span:last-child { color: #666; }

/* ========== МАКЕТ СТРАНИЦЫ ПРОДУКТА ========== */
.product-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

/* ========== ГАЛЕРЕЯ ========== */
.product-gallery-section {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.product-main-image {
    flex: 1;
    aspect-ratio: 4/3;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-main-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #BBB;
    font-size: 16px;
    background: #F8FAFC;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
}

.discount-badge-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #E53935;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(229, 57, 53, 0.3);
}

.product-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 80px;
    flex-shrink: 0;
}

.thumbnail {
    width: 80px;
    height: 80px;
    background: #F8FAFC;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    cursor: pointer;
    object-fit: contain;
    padding: 6px;
    transition: all 0.3s;
}

.thumbnail:hover { border-color: #FF6B35; }
.thumbnail.active { border-color: #FF6B35; box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2); }

/* ========== ИНФОРМАЦИЯ О ПРОДУКТЕ ========== */
.product-info-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.product-info-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-info-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 20px;
    align-self: start;
}

/* ========== ЗАГОЛОВОК И МЕТА-ИНФОРМАЦИЯ ========== */
.product-title {
    font-size: 32px;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.3;
    margin: 0;
}

.product-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
}

.product-article { color: #666; }
.product-article strong { color: #1A1A1A; }
.product-category a { color: #FF6B35; text-decoration: none; font-weight: 600; }

/* ========== СЕКЦИЯ ЦЕНЫ ========== */
.product-price-section {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #FFF8F5, #FFE8DC);
    border-radius: 12px;
    border-left: 4px solid #FF6B35;
}

.price-block { display: flex; align-items: baseline; gap: 10px; }
.product-price { font-size: 40px; font-weight: 700; color: #FF6B35; }
.product-price-old { font-size: 22px; color: #999; text-decoration: line-through; }
.product-price-new { font-size: 40px; font-weight: 700; color: #E53935; }

.stock-status { padding: 8px 16px; border-radius: 6px; font-weight: 600; font-size: 14px; }
.stock-status.in-stock { background: rgba(39,174,96,0.15); color: #27AE60; }
.stock-status.out-of-stock { background: rgba(231,76,60,0.15); color: #E74C3C; }

/* ========== СЕКЦИЯ ПОКУПКИ ========== */
.product-purchase {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 25px;
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.quantity-selector label { font-weight: 600; color: #1A1A1A; }

.quantity-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    width: 40px; height: 40px;
    border: none; background: #F8FAFC;
    color: #FF6B35; font-size: 18px; font-weight: 700; cursor: pointer;
}
.qty-btn:hover { background: #FF6B35; color: white; }

#buy-qty {
    width: 60px; height: 40px;
    border: none; text-align: center;
    font-size: 15px; font-weight: 600; background: white;
}
#buy-qty:focus { outline: none; }

.quantity-total {
    margin-left: auto;
    font-weight: 600; color: #1A1A1A; white-space: nowrap;
}

/* ========== ДЕЙСТВИЯ С КОРЗИНОЙ ========== */
.cart-action {
    width: 100%;
}

.cart-action .btn-add-to-cart {
    width: 100%;
    padding: 15px;
    background: #FF6B35;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.cart-action .btn-add-to-cart:hover { background: #E55A2B; }
.cart-action .btn-add-to-cart:disabled { background: #CCC; cursor: not-allowed; }

.cart-action .cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.cart-action .cart-qty-minus,
.cart-action .cart-qty-plus {
    width: 44px; height: 44px;
    border: 2px solid #FF6B35;
    background: #FFF5F0; color: #FF6B35;
    font-size: 20px; font-weight: 700; cursor: pointer;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.cart-action .cart-qty-minus:hover,
.cart-action .cart-qty-plus:hover { background: #FF6B35; color: white; }

.cart-action .cart-qty-input {
    width: 60px; height: 44px;
    border: 2px solid #FF6B35; border-radius: 8px;
    text-align: center; font-size: 16px; font-weight: 700;
    color: #FF6B35; background: white;
}
.cart-action .cart-qty-input:focus { outline: none; }
.cart-action .cart-qty-input::-webkit-inner-spin-button,
.cart-action .cart-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cart-action .cart-qty-input {
    -moz-appearance: textfield;
    appearance: textfield;
}

.cart-action .cart-in-label {
    font-size: 13px; color: #FF6B35; font-weight: 600;
    white-space: nowrap; margin-left: 4px;
}

/* ========== КНОПКИ ПОКУПКИ ========== */
.purchase-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-wishlist, .btn-compare {
    padding: 15px;
    border-radius: 8px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-wishlist {
    background: white; color: #FF6B35;
    border: 2px solid #FF6B35;
}
.btn-wishlist:hover { background: rgba(255,107,53,0.1); }

.btn-compare {
    background: white; color: #666;
    border: 2px solid #E0E0E0;
}
.btn-compare:hover { border-color: #FF6B35; color: #FF6B35; background: #FFF5F0; }

/* ========== ОПИСАНИЕ ПРОДУКТА ========== */
.product-description-info {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.desc-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 20px;
    background: #F8FAFC;
    border-radius: 8px;
    border-left: 3px solid #FF6B35;
}

.desc-meta-label { font-size: 12px; color: #999; text-transform: uppercase; font-weight: 600; }
.desc-meta-value { font-size: 15px; color: #1A1A1A; font-weight: 500; }

/* ========== ВКЛАДКИ ========== */
.product-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #E0E0E0;
    margin-bottom: 0;
}

.product-tab {
    padding: 14px 24px;
    background: none; border: none;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    font-size: 15px; font-weight: 600; color: #999; cursor: pointer;
    transition: all 0.3s;
}
.product-tab:hover { color: #FF6B35; }
.product-tab.active { color: #FF6B35; border-bottom-color: #FF6B35; }

.product-tab-content { display: none; }
.product-tab-content.active { display: block; }

/* ========== ОПИСАНИЕ ========== */
.history-content { font-size: 15px; line-height: 1.8; color: #555; }
.no-data { color: #999; text-align: center; padding: 40px; }

/* ========== ТАБЛИЦА ХАРАКТЕРИСТИК ========== */
.specs-table-wrapper {
    background: white; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table td { padding: 14px 20px; border-bottom: 1px solid #F0F0F0; font-size: 14px; }
.specs-table tr:last-child td { border-bottom: none; }
.spec-label { font-weight: 600; color: #1A1A1A; width: 50%; background: #FAFAFA; }
.specs-table td:last-child { color: #555; }

/* ========== ОТЗЫВЫ ========== */
.review-card-full {
    background: white; border-radius: 12px; padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04); border-left: 4px solid #FF6B35;
    margin-bottom: 12px;
}
.review-card-full .review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.review-card-full .review-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, #FF6B35, #E55A2B);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.review-card-full .review-user-info { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.review-card-full .review-author { font-size: 14px; font-weight: 600; color: #1A1A1A; }
.review-card-full .review-date { font-size: 12px; color: #999; }
.review-card-full .review-stars { font-size: 14px; letter-spacing: 1px; }
.review-card-full .review-text { font-size: 14px; color: #555; line-height: 1.5; margin: 0; }

.no-reviews { color: #999; font-size: 14px; text-align: center; padding: 20px; }

.reviews-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 20px; }
.reviews-page-btn {
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    border: 1px solid #E0E0E0; border-radius: 6px; text-decoration: none;
    color: #666; font-size: 13px; font-weight: 500;
}
.reviews-page-btn.active { background: #FF6B35; color: white; border-color: #FF6B35; }
.reviews-page-btn:hover:not(.active) { border-color: #FF6B35; color: #FF6B35; }

/* ========== ФОРМА ОТЗЫВА ========== */
.review-form-section {
    background: white; padding: 25px; border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid #E0E0E0; margin-top: 20px;
}
.review-form-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #E0E0E0; }
.review-form-icon { width: 40px; height: 40px; border-radius: 50%; background: #FFF5F0; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.review-form-header h3 { font-size: 18px; font-weight: 600; margin: 0; }
.review-form-header p { font-size: 13px; color: #999; margin: 0; }
.review-success { background: #D4EDDA; color: #155724; padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; }

.rating-select { margin-bottom: 20px; }
.rating-label { font-weight: 600; font-size: 14px; display: block; margin-bottom: 10px; }
.stars-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 8px; }
.stars-input input { display: none; }
.stars-input label { font-size: 32px; cursor: pointer; opacity: 0.3; filter: grayscale(100%); transition: all 0.2s; }
.stars-input input:checked ~ label, .stars-input label:hover, .stars-input label:hover ~ label { opacity: 1; filter: grayscale(0%); transform: scale(1.15); }

.review-form textarea {
    width: 100%; padding: 14px 16px; border: 2px solid #E0E0E0;
    border-radius: 8px; font-family: inherit; font-size: 14px; resize: vertical; margin-bottom: 16px;
}
.review-form textarea:focus { outline: none; border-color: #FF6B35; }
.review-login-notice { text-align: center; padding: 30px; color: #666; background: #F8FAFC; border-radius: 8px; }
.review-login-notice a { color: #FF6B35; font-weight: 600; text-decoration: none; }

/* ========== СВЯЗАННЫЕ ПРОДУКТЫ ========== */
.related-products { margin-top: 60px; }
.related-products h2 { font-size: 28px; font-weight: 700; margin-bottom: 30px; color: #1A1A1A; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }

.related-card {
    background: white; border-radius: 12px; overflow: hidden; text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: all 0.3s;
}
.related-card:hover { transform: translateY(-4px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); }
.related-image {
    width: 100%; height: 160px; background: #F8FAFC; overflow: hidden;
    display: flex; align-items: center; justify-content: center; position: relative;
}
.related-image img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.related-image .no-image { color: #AAA; font-size: 13px; }
.related-discount-badge {
    position: absolute; top: 8px; right: 8px;
    background: #E53935; color: white; padding: 3px 8px;
    border-radius: 10px; font-size: 10px; font-weight: 700;
}
.related-info { padding: 12px; }
.related-info h4 { font-size: 13px; font-weight: 600; color: #1A1A1A; margin: 0 0 8px 0; line-height: 1.3; }
.related-price { font-size: 14px; font-weight: 700; color: #FF6B35; }
.related-price .price-old { font-size: 12px; color: #999; text-decoration: line-through; margin-right: 6px; }

/* ========== УВЕДОМЛЕНИЯ ========== */
.catalog-toast {
    position: fixed; bottom: 30px; left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1A1A1A; color: white; padding: 14px 24px;
    border-radius: 10px; font-size: 14px; z-index: 9999;
    opacity: 0; transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2); white-space: nowrap;
}
.catalog-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.catalog-toast a { color: #FF6B35; font-weight: 600; text-decoration: none; }

/* ========== КНОПКИ ========== */
.btn-primary {
    padding: 12px 24px; background: #FF6B35; color: white;
    border: none; border-radius: 8px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.3s;
}
.btn-primary:hover { background: #E55A2B; }

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 1024px) {
    .product-gallery-section { flex-direction: column; }
    .product-thumbnails { flex-direction: row; width: 100%; overflow-x: auto; }
    .thumbnail { width: 60px; height: 60px; flex-shrink: 0; }
    .product-info-wrapper { grid-template-columns: 1fr; }
    .product-info-right { position: static; }
}

@media (max-width: 768px) {
    .product-container { padding: 0 15px; margin: 20px auto; }
    .product-title { font-size: 24px; }
    .product-price, .product-price-new { font-size: 32px; }
    .product-tab { padding: 12px 16px; font-size: 13px; }
}

.cart-action .cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: flex-end;
}

.cart-action .cart-total-label {
    font-size: 15px;
    font-weight: 700;
    color: red;
    white-space: nowrap;
    margin-left: auto;
    min-width: 100px;
    text-align: right;
}