/* ========== ОБЩИЕ СТИЛИ ========== */
.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 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-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; }

/* ========== ЦЕНЫ ========== */
.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-old {
    font-size: 22px;
    color: #999;
    text-decoration: line-through;
}

.product-price-new {
    font-size: 40px;
    font-weight: 700;
    color: #E53935;
}

.price-explanation {
    font-size: 12px;
    color: #999;
    text-align: right;
    margin-top: -8px;
    margin-bottom: 8px;
}

.stock-status {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    margin-left: auto;
}

.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;
}

/* ========== БЭЙДЖ СКИДКИ ========== */
.price-saving-banner {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    color: #2E7D32;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
    border: 1px solid rgba(46, 125, 50, 0.15);
}

.price-saving-banner strong {
    font-size: 18px;
    color: #1B5E20;
}

.price-block { display: flex; align-items: baseline; gap: 10px; }
.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; }

/* ========== ПОКУПКА ========== */
.product-purchase {
    display: flex; flex-direction: column; gap: 15px;
    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; }
#quantity { width: 60px; height: 40px; border: none; text-align: center; font-size: 15px; font-weight: 600; background: white; }
.quantity-total { margin-left: auto; font-weight: 600; color: #1A1A1A; white-space: nowrap; }

.purchase-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-add-to-cart {
    padding: 15px; background: #FF6B35; color: white;
    border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn-add-to-cart:hover { background: #E55A2B; }
.btn-wishlist {
    padding: 15px; background: white; color: #FF6B35;
    border: 2px solid #FF6B35; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn-add-to-cart:disabled { background: #CCC !important; cursor: not-allowed; }
.btn-wishlist:hover { background: rgba(255,107,53,0.1); }

/* ========== ТАБЛИЦА ХАРАКТЕРИСТИК ========== */
.specs-table-wrapper {
    background: white; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-top: 0;
}
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table th {
    padding: 12px 16px; text-align: left; font-weight: 600;
    color: #1A1A1A; background: #FAFAFA; border-bottom: 2px solid #E0E0E0; font-size: 13px;
}
.specs-table td {
    padding: 12px 16px; border-bottom: 1px solid #F0F0F0; font-size: 13px; color: #555;
}
.specs-table tr:last-child td { border-bottom: none; }
.item-link { color: #FF6B35; text-decoration: none; font-weight: 500; }
.item-link:hover { text-decoration: underline; }
.item-discount-badge {
    display: inline-block; font-size: 10px; padding: 1px 6px;
    border-radius: 8px; background: #FFEBEE; color: #E53935; font-weight: 600; margin-left: 6px;
}
.price-old { text-decoration: line-through; color: #999; font-size: 12px; display: block; }
.price-new { color: #E53935; font-weight: 600; }

/* ========== РАСЧЕТ ЦЕНЫ ========== */
.price-calculation {
    margin-top: 20px; background: white; border-radius: 12px;
    padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.price-row {
    display: flex; justify-content: space-between; padding: 10px 0;
    border-bottom: 1px solid #F0F0F0; font-size: 14px;
}
.price-row:last-child { border-bottom: none; }
.price-row.discount { color: #27AE60; }
.discount-price { color: #27AE60; font-weight: 600; }
.price-row.total { font-weight: 700; font-size: 16px; }
.total-price { font-size: 24px; color: #FF6B35; }

.price-saving-banner {
    background: linear-gradient(135deg, #D4EDDA, #C3E6CB);
    color: #155724; padding: 12px 16px; border-radius: 8px;
    margin-bottom: 20px; font-size: 14px; text-align: center;
}
.price-saving-banner strong { font-size: 16px; }

/* ========== УВЕДОМЛЕНИЯ ========== */
.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; }

/* ========== АДАПТИВНОСТЬ ========== */
@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-title { font-size: 24px; }
    .product-price-new { font-size: 32px; }
    .purchase-buttons { grid-template-columns: 1fr; }
}

/* ========== СЕТ ТОВАРОВ ========== */
.set-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.set-item-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    gap: 12px;
    padding: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.set-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.set-item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: #F8FAFC;
    flex-shrink: 0;
    position: relative;
}

.set-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    background: #F8FAFC;
}

.set-item-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #BBB;
    font-size: 12px;
}

.set-item-image .discount-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 700;
    background: #E53935;
    color: white;
    z-index: 1;
}

.set-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.set-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #1A1A1A;
    text-decoration: none;
    line-height: 1.3;
}

.set-item-name:hover { color: #FF6B35; }

.set-item-desc {
    font-size: 11px;
    color: #999;
    margin: 0;
    line-height: 1.4;
}

.set-item-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: #888;
}

.set-item-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    flex-wrap: wrap;
}

.set-item-qty {
    font-size: 11px;
    color: #999;
    background: #F0F0F0;
    padding: 2px 8px;
    border-radius: 8px;
}

.set-item-price {
    font-size: 15px;
    font-weight: 700;
    color: #FF6B35;
}

.set-item-price .price-old {
    font-size: 11px;
    text-decoration: line-through;
    color: #999;
    display: block;
}

.set-item-price .price-new {
    color: #E53935;
}

.stock-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    margin-left: auto;
}

.stock-badge.in-stock {
    background: rgba(39,174,96,0.1);
    color: #27AE60;
}

.stock-badge.out-of-stock {
    background: rgba(150,150,150,0.1);
    color: #999;
}

@media (max-width: 768px) {
    .set-items-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== РЕКОМЕНДУЕМЫЕ ТОВАРЫ ========== */
.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; }

/* ========== ОТЗЫВЫ ========== */
.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; }

.btn-primary {
    padding: 12px 24px; background: #FF6B35; color: white;
    border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-primary:hover { background: #E55A2B; }

/* ========== РАСЧЕТ ЦЕНЫ ========== */
.price-calculation {
    margin-top: 20px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.breakdown-title {
    font-size: 15px;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #E0E0E0;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: #555;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.breakdown-name {
    font-weight: 500;
    color: #1A1A1A;
}

.breakdown-qty {
    font-size: 12px;
    color: #999;
}

.breakdown-price {
    font-weight: 600;
    color: #1A1A1A;
    white-space: nowrap;
}

.breakdown-divider {
    height: 1px;
    background: #E0E0E0;
    margin: 8px 0;
}

.breakdown-row.discount {
    color: #27AE60;
}

.breakdown-row.discount .breakdown-price {
    color: #27AE60;
}

.breakdown-row.total {
    font-weight: 700;
    font-size: 16px;
    color: #1A1A1A;
    padding-top: 12px;
    margin-top: 4px;
    border-top: 2px solid #E0E0E0;
}

.breakdown-row.total .breakdown-price {
    font-size: 20px;
    color: #FF6B35;
}

.cart-action .btn-add-to-cart {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-wishlist-full {
    width: 100%;
    padding: 15px;
    background: white;
    color: #FF6B35;
    border: 2px solid #FF6B35;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}
.btn-wishlist-full:hover { background: rgba(255,107,53,0.1); }

/* ========== ДЕЙСТВИЯ С КОРЗИНОЙ ========== */
.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%;
    justify-content: flex-end;
}

.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-total-label {
    font-size: 15px; font-weight: 700; color: red;
    white-space: nowrap; margin-left: auto; min-width: 100px; text-align: right;
}

.btn-wishlist-full {
    width: 100%;
    padding: 15px;
    background: white;
    color: #FF6B35;
    border: 2px solid #FF6B35;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}
.btn-wishlist-full:hover { background: rgba(255,107,53,0.1); }

/* ========== ПОКУПКА ========== */
.product-purchase {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 25px;
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
}