/* Основные стили для страницы товара */
.product-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #000;
    background-color: #fff;
    line-height: 1.5;
}

/* Хлебные крошки */
.breadcrumbs {
   display: flex;
   align-items: center;
   padding: 15px 0 12px;
   font-size: 14px;
   color: #666;
   flex-wrap: wrap;
}

.breadcrumbs a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: #000;
}

/* Основная сетка */
.product-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

/* Первый ряд: изображение + информация о товаре */
.product-top-row {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 30px;
}

/* Левая колонка - изображение */
.product-image-section {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* УНИФИЦИРОВАННЫЙ СТИЛЬ ДЛЯ ВСЕХ ИЗОБРАЖЕНИЙ */
.product-image {
    width: 460px;
    height: 460px;
    border-radius: 15px;
    object-fit: fill;
}

.no-image {
    width: 250px;
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 15px;
    color: #666;
    font-size: 14px;
}

.no-image i {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.3;
}

/* Центральная колонка - информация о товаре (на всю ширину) */
.product-info-block {
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    width: 100%;
}

.product-title {
    font-size: 20px;
    font-weight: 400;
    color: #000;
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.product-rating {
    display: flex;
    align-items: center;
}

.rating-stars {
    display: flex;
    gap: 2px;
    margin-bottom: 10px;
    color: #0066ff;
}


.rating-count {
    color: #666;
    font-size: 14px;
}

/* Цена */
.price-section {
    margin: 5px 0;
    padding: 5px 0;
}

.price-main {
    font-size: 25px;
    font-weight: 700;
    color: #000;
    margin-bottom: 5px;
}

.price-unit {
    color: #666;
    font-size: 14px;
}

/* Характеристики */
.characteristics {
    margin: 30px 0;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin-bottom: 1px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: #f0f7ff;
    border: 1px solid #d1e3ff;
    color: #0066cc;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
}

/* Описание товара */
.description-section {
}

.product-description {
    color: #333;
    line-height: 1.6;
    font-size: 15px;
    white-space: pre-line;
}

/* Второй ряд: блок покупки и продавец */
.product-bottom-row {
    display: grid;
    gap: 30px;
    align-items: start;
}

/* Левая часть нижнего ряда - пустая или для дополнительной информации */
.product-empty-space {
    /* Можно использовать для дополнительной информации */
}

/* Правая часть нижнего ряда - покупка и продавец */
.product-purchase-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.purchase-card {
    border-radius: 8px;
    padding: 0px;
    background-color: #fff;
}

.seller-card {
    padding: 25px;
    background-color: #f9f9f9;
}

/* Продавец */
.seller-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.seller-avatar {
    width: 48px;
    height: 48px;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
}

.seller-info {
    flex: 1;
}

.seller-name {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-bottom: 3px;
}

.seller-label {
    font-size: 14px;
    color: #666;
}

.profile-link {
    display: flex;
    color: black;
    text-decoration: none;
    font-size: 14px;
    margin-top: 8px;
}

.profile-link:hover {
    color: #0052d4;
}

.chat-link {
    display: block;
    color: black;
    text-decoration: none;
    font-size: 14px;
    margin-top: 10px;
    gap: 5px;
}

.chat-link:hover {
    color: #0052d4;
}

.purchase-title {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    margin-bottom: 25px;
    text-align: center;
}

.stock-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
    padding: 12px;
    background: #f0f7ff;
    border-radius: 6px;
    border: 1px solid #d1e3ff;
    font-size: 16px;
}

.stock-icon {
    color: #10b981;
}

/* Кнопки покупки */
.buy-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
    width: 100%;
}

.btn-primary {
    background: #0066ff;
    color: white;
    background: #000;
    background: linear-gradient(135deg, #000000 0%, #a9abad 100%);
}

.btn-primary:hover {
    background: #0052d4;
    background: linear-gradient(135deg, #000000 0%, #b2b4b6 100%);
}

.btn-secondary {
    background: #fff;
    color: #0066ff;
    border: 2px solid #0066ff;
}

.btn-secondary:hover {
    background: #f0f7ff;
}

.btn-disabled {
    background: #f0f0f0;
    color: #666;
    cursor: not-allowed;
}

/* Гарантии */
.guarantees {
    border-top: 1px solid #eaeaea;
    padding-top: 20px;
}

.guarantee-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #333;
}

.guarantee-icon {
    color: #0066cc;
    width: 20px;
    text-align: center;
}

/* Тестовая информация */
.test-info {
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    background: #fffbf0;
}

.test-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #856404;
    margin-bottom: 10px;
}

.test-info div {
    color: #856404;
    font-size: 14px;
    line-height: 1.5;
}

/* Отзывы */
.reviews-section {
    background: #fff;
    border-radius: 8px;
    margin-top: 40px;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
}

.reviews-title {
    font-size: 20px;
    font-weight: 600;
    color: #000;
}

.reviews-stats {
    display: flex;
    align-items: center;
    gap: 15px;
}

.average-rating {
    font-size: 20px;
    font-weight: 600;
    color: #000;
}

.total-reviews {
    color: #666;
    font-size: 14px;
}

.write-review {
    background: #0066ff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* Список отзывов */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.review-card {
    background: #f8f9fa;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 20px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.reviewer-name {
    font-weight: 600;
    color: #000;
}

.review-date {
    color: #666;
    font-size: 13px;
}

.review-rating {
    color: #ffc107;
    margin-bottom: 10px;
}

.review-text {
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

.no-reviews {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-reviews i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}

/* Похожие товары */
.similar-products {
    margin-top: 40px;
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(242px, 1fr));
    margin-top: 20px;
}

.similar-product {
    background: #fff;
    border-radius: 8px;
    padding: 4px;
    text-decoration: none;
    color: #000;
    transition: all 0.2s;
}

.similar-product:hover {
    border-color: #0066ff;
}

/* Для карточек похожих товаров */
.similar-image {
    width: 100%;
    height: 240px;
    object-fit: fill;
    border-radius: 8px;
    margin-bottom: 12px;
}

.similar-no-image {
    width: 100%;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #666;
    margin-bottom: 12px;
}

.similar-no-image i {
    font-size: 36px;
    opacity: 0.3;
}

.similar-title {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    margin-bottom: 10px;
    line-height: 1.4;
}

.similar-price {
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .product-top-row {
        grid-template-columns: 450px 1fr;
    }
    
    .product-image {
        width: 300px;
        height: 330px;
    }
    .product-bottom-row {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px;
    }
    
    .reviews-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .product-page-container {
        padding: 15px;
    }
    
    .product-top-row {
        grid-template-columns: 1fr;
    }
    
    .product-image-section {
        margin-bottom: -29px;
    }
     .container {
        width: 100%;
        padding: 0px;
    }
    .product-page-container {
        padding: 0px;
    }
    
    .product-image {
        width: 100%;
        height: 450px;
        border-radius: 0px;
    }
    
    .no-image {
        width: 300px;
        height: 300px;
    }
    
    .product-title {
        font-size: 15px;
    }
    
    .price-main {
        font-size: 28px;
    }
    
    .btn {
        padding: 10px;
        font-size: 15px;
    }
    
    .similar-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    }
}

@media (max-width: 480px) {
    .product-image {
        width: 100%;
        height: 400px;
        border-radius: 0px;
    }
    .container {
        width: 100%;
        padding: 0px;
    }
    .product-page-container {
        padding: 0px;
    }
    
    .no-image {
        width: 100%;
        height: 400px;
    }
    .similar-grid {
        grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
        gap: 0px;

    }
    .price-main {
        font-size: 20px;
    }
    
    .reviews-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.description-section {
    background: #fff;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #000;
    margin: 0 0 20px 0;
}

.characteristics-list {
    margin-bottom: 25px;
}

.char-item {
    margin-bottom: 15px;
}

.char-label {
    font-weight: 400;
    color: #666;
    font-size: 15px;
    margin-bottom: 4px;
}

.char-value {
    color: #333;
    font-size: 16px;
    line-height: 1.5;
}

.description-text {
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}

.description-text p {
    margin-bottom: 12px;
}

.description-text ul,
.description-text ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.description-text li {
    margin-bottom: 8px;
}

.description-text br {
    margin-bottom: 8px;
    display: block;
    content: "";
}


@media (max-width: 768px) {
    .mobile-breadcrumb {
        display: block;
        margin-bottom: 15px;
    }
}

/* Общие стили */
.product-page-container {
    position: relative;
}

/* Десктопные крошки */
.breadcrumbs-container {
    margin-bottom: 10px;
}

.load-more-similar-btn {
    display: block;
    width: 100%;
    margin: 30px auto;
    padding: 15px 24px;
    background: #0663fb;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.load-more-similar-btn.loading {
    position: relative;
    color: transparent;
}

.load-more-similar-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite
}


.view-all {
    font-size: 16px;
    color: #000000;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.view-all:hover {
    color: #0052d4;
}




/* Кнопка назад поверх изображения (скрыта на десктопе) */
.mobile-back-overlay {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.circle-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    color: #333;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.circle-back-btn:hover {
    background: white;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.circle-back-btn:active {
    transform: scale(0.95);
}

.circle-back-btn svg {
    width: 20px;
    height: 20px;
}



.reviews-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.review-card {
    background: #f8f9fa;
    border: 1px solid #f8f9fa;
    border-radius: 5px;
    padding: 10px;
}

.rounded-circle {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.border-top {
    display: grid;
    grid-template-columns: 170px 2fr;
}

.rounded {
    height: 100px;
    width: 150px;
    object-fit: cover;
    border-radius: 10px;
}


.margin-lio {
    align-items: center;
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 15px;
    gap: 8px;
}

.text-muted-main {
    margin-left: auto;
    color: #979191;
    font-size: 15px;
}

.text-success {
    font-size: 18px;
    color: #000000;
    font-weight: 600;
}

.text-product {
    text-decoration: none;
    color: #000000;
    font-size: 15px;
    font-weight: 200;
}

.mb {
    margin-bottom: 10px;
}
/* Стили для блока гарантии */
.guarantee-block {
    align-items: center;
    margin-top: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}



.guarantee-icon {
    color: #28a745;
    font-size: 20px;
    flex-shrink: 0;
}

.guarantee-text {
    display: flex;
    align-items: center;
    flex: 1;
}
.guarantee-title:hover {
    color: #0052d4;
}

.guarantee-title {
    font-size: 16px;
    color: #000000;
    font-weight: 500;
}

.guarantee-arrow {
    color: #6c757d;
    font-size: 20px;
    font-weight: bold;
}

/* Модальное окно гарантии */
.guarantee-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}

.guarantee-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.guarantee-modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 20px 20px 0 0;
    animation: slideUp 0.3s ease-out;
    max-height: 85vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.guarantee-modal-header {
    display: flex;
    align-items: center;
    justify-content: end;
    padding: 20px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 2;
}

.guarantee-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}

.guarantee-modal-title i {
    color: #28a745;
    font-size: 20px;
}

.guarantee-modal-close {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
}



.guarantee-modal-body {
    padding: 20px;
}

.guarantee-main-text {
    background: #f0f9ff;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: -30px;
}

.guarantee-main-text p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: #1f2937;
}

.guarantee-main-text strong {
    color: #1e40af;
}

.guarantee-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.guarantee-step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.step-number {
    width: 100%;
    height: 100px;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 75px;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: -60px;
    z-index: 2;
}

.list-card {
    display: flex;
    justify-content: center;
    font-size: 20px;
    color: #000;
    margin-top: -15px;
}

.last_pi {
    width: 40px;
    height: 40px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #000;
}

.last_pi svg {
    width: 35px;
    height: 35px;
}

.last_pi svg:hover {
    color: #0052d4;
}

.step-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.4;
    color: #374151;
    padding-top: 4px;
}

.guarantee-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #4b5563;
}

.feature i {
    color: #10b981;
    font-size: 18px;
    width: 24px;
}

/* Десктопная версия */
@media (min-width: 768px) {
    .guarantee-modal-content {
        top: 50%;
        left: 50%;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 500px;
        max-height: 80vh;
        border-radius: 16px;
        animation: fadeIn 0.3s ease-out;
    }
    
    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translate(-50%, -60%);
        }
        to {
            opacity: 1;
            transform: translate(-50%, -50%);
        }
    }
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .breadcrumbs {
        display: none; 
    }
    .reviews-section {
        padding: 10px;
    }
    
    .mobile-back-overlay {
        display: block; 
    }
    .purchase-card {
        padding: 3px;
    }

    .similar-products {
        padding: 10px;
    }

    .similar-image {
        height: 160px;
    }

    .similar-no-image {
        height: 160px;
    }

}