.product-page {
    padding: 60px 0;
    background-color: var(--bg-body);
    min-height: 70vh;
    position: relative;
}

.product-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.88);
    z-index: 5;
    transition: opacity 0.2s ease;
}

.product-loading-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.product-loading-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(0, 0, 0, 0.14);
    border-top-color: #d5e300;
    border-radius: 50%;
    animation: productSpin 0.8s linear infinite;
}

.product-loading-text {
    font-size: 14px;
    color: #4b5563;
}

@keyframes productSpin {
    to { transform: rotate(360deg); }
}

.product-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background-color: var(--bg-surface);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 5px 15px var(--shadow);
    border: 1px solid var(--border);
}

.product-gallery {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.product-main-image {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px;
    color: var(--text-primary);
    margin-bottom: 20px;
    overflow: hidden;
}

.product-main-image > img {
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    border-radius: 14px;
    cursor: pointer;
    display: block;
}

.product-thumbnail > img {
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.image-modal-overlay .image-modal-viewer-img {
    max-height: 90vh;
    max-width: 90vw;
    width: auto;
    height: auto;
    object-fit: contain;
}

.same-orders-product-img {
    height: 200px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.product-favorite-corner {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.product-favorite-corner:hover {
    transform: scale(1.06);
    background: rgba(0, 0, 0, 0.82);
}

.product-favorite-corner.in-wishlist {
    background: #e53935;
}

/* Возрастной рейтинг на главном фото товара (слева снизу) */
.product-gallery .product-age-rating {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    z-index: 2;
}

.product-thumbnails-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.product-thumbnails-wrap .thumb-nav {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.product-thumbnails-wrap .thumb-nav:hover {
    background: var(--accent);
    color: var(--text-primary);
    border-color: var(--accent);
}

.product-thumbnails-wrap .thumb-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.product-thumbnails {
    flex: 1;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    padding: 8px 4px 12px;
    scrollbar-width: thin;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.product-thumbnails::-webkit-scrollbar {
    height: 8px;
}

.product-thumbnails::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.product-thumbnails::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

.product-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.product-thumbnail {
    scroll-snap-align: start;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background-color: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
}

.product-thumbnail:hover {
    transform: scale(1.05);
}

.product-thumbnail.active {
    border: 2px solid var(--accent);
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.product-title {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.rating-stars {
    color: #ffc107;
    margin-right: 15px;
}

.rating-count {
    color: var(--text-muted);
}

.product-price {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.product-description {
    margin-bottom: 30px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.meta-value {
    font-weight: 600;
    color: var(--text-primary);
}

.sku-share-actions {
    margin-left: 10px;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    vertical-align: middle;
}

.sku-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sku-share-btn i {
    font-size: 12px;
}

.sku-share-btn:hover {
    transform: translateY(-1px);
}

.sku-share-btn:active {
    transform: translateY(0);
}

.sku-share-btn--share {
    color: #2d3748;
    background: #f7fafc;
    border-color: #d9e2ec;
}

.sku-share-btn--share:hover {
    background: #edf2f7;
    box-shadow: 0 4px 10px rgba(45, 55, 72, 0.12);
}

.sku-share-btn--copy {
    color: #ffffff;
    background: linear-gradient(135deg, #ff7b00 0%, #ff9500 100%);
    box-shadow: 0 4px 12px rgba(255, 123, 0, 0.28);
}

.sku-share-btn--copy:hover {
    box-shadow: 0 6px 16px rgba(255, 123, 0, 0.35);
}

.sku-share-btn--copy.is-success {
    background: linear-gradient(135deg, #2f9e44 0%, #37b24d 100%);
    box-shadow: 0 6px 16px rgba(47, 158, 68, 0.28);
}

.product-options {
    margin-bottom: 30px;
}

.option-title {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-weight: 600;
}

.color-options, .material-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-option, .material-option {
    padding: 8px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    font-weight: 500;
}

.color-option:hover, .material-option:hover {
    border-color: #d5e300;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(213, 227, 0, 0.2);
}

.color-option.active, .material-option.active {
    border: 3px solid #d5e300;
    background-color: #f9ffd0;
    box-shadow: 0 0 0 3px rgba(213, 227, 0, 0.15), 0 0 15px rgba(213, 227, 0, 0.3);
    transform: scale(1.05);
    font-weight: 700;
}

.color-option.active::after, .material-option.active::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background-color: #d5e300;
    color: #313131;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(213, 227, 0, 0.4);
}

/* Мультицвет: квадратик из 3 секторов (красный, синий, зелёный), такой же по форме как остальные цвета */
.color-option-multicolor {
    background: conic-gradient(#f00 0deg 120deg, #00f 120deg 240deg, #0f0 240deg 360deg) !important;
}
.color-option-multicolor.active {
    background: conic-gradient(#f00 0deg 120deg, #00f 120deg 240deg, #0f0 240deg 360deg) !important;
}

.product-quantity {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.quantity-label {
    margin-right: 15px;
    font-weight: 600;
    color: #555;
}

.quantity-controls {
    display: flex;
    align-items: center;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.quantity-input {
    width: 70px;
    height: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0 10px;
    font-size: 16px;
}

.product-actions {
    display: flex;
    gap: 15px;
}

.add-to-cart {
    flex: 2;
}

.wishlist-btn {
    flex: 1;
    background-color: #f0f0f0;
    color: #313131;
}

.wishlist-btn:hover {
    background-color: #e0e0e0;
}

.add-to-cart.stock-alert-unsubscribe {
    flex: 2;
    background-color: #f0f0f0;
    color: #313131;
    border: 1px solid #ddd;
}

.add-to-cart.stock-alert-unsubscribe:hover {
    background-color: #e8e8e8;
    color: #c62828;
}

.product-details {
    margin-top: 60px;
}

.details-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 15px 30px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #777;
    cursor: pointer;
    position: relative;
}

.tab-btn.active {
    color: #313131;
}

.tab-btn.active:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #d5e300;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid #eee;
}

.specs-table td {
    padding: 15px 0;
}

.specs-table td:first-child {
    font-weight: 600;
    color: #555;
    width: 30%;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.review-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease;
}

.review-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.review-author-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.review-avatar-wrap {
    flex-shrink: 0;
    position: relative;
    display: inline-flex;
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eee;
}

.review-avatar-placeholder {
    width: 48px;
    height: 48px;
    font-size: 36px;
    color: #bbb;
}

.review-meta {
    min-width: 0;
}

.review-author-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.review-author-link,
.review-avatar-link {
    color: inherit;
    text-decoration: none;
}

.review-author-link:hover,
.review-avatar-link:hover {
    text-decoration: underline;
}

.review-avatar-link {
    display: flex;
    flex-shrink: 0;
    border-radius: 50%;
    transition: opacity 0.2s;
}

.review-avatar-link:hover {
    opacity: 0.85;
}

.review-author {
    font-weight: 600;
    color: #313131;
    font-size: 15px;
}

.mini-profile-card {
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    transform: translateX(-50%) translateY(4px);
    width: 220px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #121212;
    color: #fff;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 30;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.review-avatar-wrap:hover .mini-profile-card {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.mini-profile-bg {
    height: 70px;
    background: linear-gradient(135deg, #2a2a2a, #151515);
}

.mini-profile-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-profile-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
}

.mini-profile-content strong {
    font-size: 13px;
}

.mini-profile-content span {
    font-size: 12px;
    opacity: 0.85;
}

.review-level-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}

.review-date {
    color: #777;
    font-size: 13px;
    margin-top: 4px;
}

.review-field,
.review-comment {
    margin: 8px 0;
    font-size: 14px;
    color: #444;
    line-height: 1.5;
}

.review-status-pending .review-status-badge {
    color: #f57c00;
    font-weight: 600;
}

.review-status-rejected .review-status-badge {
    color: #c62828;
    font-weight: 600;
}

.review-my-block {
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e7 100%);
    border-left: 4px solid #ffc107;
    padding: 20px 24px;
    border-radius: 12px;
}

.review-status-rejected.review-my-block {
    background: linear-gradient(135deg, #fff5f5 0%, #ffebee 100%);
    border-left-color: #c62828;
}

.review-status-pending.review-my-block {
    background: linear-gradient(135deg, #fff8f0 0%, #fff3e0 100%);
    border-left-color: #f57c00;
}

/* Форма отзыва */
.reviews-actions {
    margin-bottom: 30px;
}

.review-form-container {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.review-form-container h4 {
    margin-bottom: 20px;
    color: #313131;
}

.review-form .form-group {
    margin-bottom: 20px;
}

.review-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
}

.rating-input input[type="radio"] {
    display: none;
}

.rating-input .star-label {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.rating-input input[type="radio"]:checked ~ .star-label,
.rating-input input[type="radio"]:checked + .star-label,
.rating-input .star-label:hover,
.rating-input .star-label:hover ~ .star-label {
    color: #ffc107;
}

.review-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.review-form textarea:focus {
    outline: none;
    border-color: #d5e300;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #ddd;
    color: #555;
}

.btn-outline:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.review-helpful {
    margin-top: 10px;
    font-size: 14px;
    color: #777;
}

.reviews-eligibility-hint {
    margin: 10px 0 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.45;
}

.review-photos-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #868e96;
}

.review-photos-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.review-photo-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.review-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.review-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.review-photo-link {
    display: block;
    width: 88px;
    height: 88px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-photo-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.review-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 992px) {
    .product-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-main-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .product-page {
        padding: 32px 0;
    }
    .product-container {
        padding: 0 16px;
    }
    .product-content {
        padding: 25px 20px;
    }
    
    .product-thumbnails-wrap .thumb-nav {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 12px;
    }
    
    .product-thumbnail {
        width: 70px;
        height: 70px;
    }
    
    .product-main-image {
        height: 280px;
    }
    
    .product-title {
        font-size: 28px;
    }
    
    .product-price {
        font-size: 30px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    .product-actions .btn {
        width: 100%;
        min-height: 48px;
    }
    
    .details-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        text-align: left;
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }
    
    .tab-btn.active:after {
        display: none;
    }
}

@media (max-width: 480px) {
    .product-page {
        padding: 24px 0;
    }
    .product-container {
        padding: 0 14px;
    }
    .product-content {
        padding: 20px 16px;
        gap: 24px;
    }
    .product-main-image {
        height: 240px;
    }
    .product-title {
        font-size: 22px;
    }
    .product-price {
        font-size: 26px;
    }
    .product-meta {
        flex-direction: column;
        gap: 12px;
    }
    .sku-share-actions {
        margin-left: 0;
        margin-top: 8px;
    }
    .product-quantity {
        flex-wrap: wrap;
        gap: 12px;
    }
    .quantity-controls {
        width: 100%;
        justify-content: flex-start;
    }
    .product-thumbnail {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    .specs-table td:first-child {
        width: 40%;
    }
    .same-orders-products .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Секция товаров из заказов */
.same-orders-products {
    margin-top: 60px;
    padding: 40px 0;
}

.same-orders-products h2 {
    margin-bottom: 30px;
    font-size: 24px;
    color: #313131;
    text-align: center;
}

.same-orders-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.same-orders-products .product-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.same-orders-products .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .same-orders-products .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .same-orders-products h2 {
        font-size: 20px;
    }
}