/* Стили для страницы товара - на основе product.txt */
@import url('index.css');

.product-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

.compact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.back-btn {
    background: transparent;
    border: none;
    color: var(--light);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.back-btn:hover {
    background: var(--glass-bg);
}

.product-title {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    flex: 1;
    padding: 0 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 25px;
    margin-bottom: 25px;
}

.product-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mini-gallery {
    display: flex;
    gap: 10px;
}

.main-image {
    flex: 1;
    background: linear-gradient(135deg, #475569, #334155);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    min-height: 300px;
    max-height: 500px;
    max-width: 100%;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 10px;
    max-width: 100%;
    max-height: 100%;
}

.thumb-strip {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 80px;
}

.mini-thumb {
    width: 80px;
    height: 80px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    aspect-ratio: 1;
    font-size: 20px;
    color: var(--light);
    flex-shrink: 0;
}


.image-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--danger);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.compact-info {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 20px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.platform-badge {
    padding: 4px 10px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.stars {
    color: var(--warning);
}

.compact-tabs {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-btn {
    padding: 10px 15px;
    background: transparent;
    border: none;
    color: var(--gray);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Стили для форматированного описания товара */
.product-description-formatted {
    color: var(--light);
    line-height: 1.8;
    font-size: 15px;
}

.product-description-formatted p {
    margin: 15px 0;
    line-height: 1.8;
}

.product-description-formatted h1,
.product-description-formatted h2,
.product-description-formatted h3,
.product-description-formatted h4,
.product-description-formatted h5,
.product-description-formatted h6 {
    margin: 20px 0 15px 0;
    font-weight: 600;
    color: var(--light);
    line-height: 1.4;
}

.product-description-formatted h1 {
    font-size: 28px;
    color: var(--primary);
}

.product-description-formatted h2 {
    font-size: 24px;
    color: var(--primary);
}

.product-description-formatted h3 {
    font-size: 20px;
}

.product-description-formatted h4 {
    font-size: 18px;
}

.product-description-formatted strong,
.product-description-formatted b {
    font-weight: 600;
}

/* Сохраняем цвет для жирного текста, если он задан */
.product-description-formatted strong span,
.product-description-formatted b span {
    font-weight: 600;
}

.product-description-formatted span strong,
.product-description-formatted span b {
    font-weight: 600;
}

.product-description-formatted em,
.product-description-formatted i {
    font-style: italic;
}

.product-description-formatted u {
    text-decoration: underline;
}

.product-description-formatted s,
.product-description-formatted strike {
    text-decoration: line-through;
    opacity: 0.7;
}

.product-description-formatted ul,
.product-description-formatted ol {
    margin: 15px 0;
    padding-left: 30px;
}

.product-description-formatted li {
    margin: 8px 0;
    line-height: 1.6;
}

.product-description-formatted a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid var(--primary);
    transition: all 0.2s ease;
}

.product-description-formatted a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

.product-description-formatted img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid var(--glass-border);
}

.product-description-formatted blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    margin: 20px 0;
    padding: 15px 20px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--gray);
}

.product-description-formatted code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--primary);
}

.product-description-formatted pre {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
    border: 1px solid var(--glass-border);
}

.product-description-formatted pre code {
    background: transparent;
    padding: 0;
    color: var(--light);
}

.product-description-formatted table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
}

.product-description-formatted table th,
.product-description-formatted table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.product-description-formatted table th {
    background: rgba(99, 102, 241, 0.2);
    font-weight: 600;
    color: var(--primary);
}

.product-description-formatted table tr:last-child td {
    border-bottom: none;
}

.product-description-formatted table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.product-description-formatted hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 25px 0;
}

.product-description-formatted div {
    margin: 10px 0;
}

/* Цветной текст */
.product-description-formatted span {
    display: inline;
}

/* Цветной текст - сохраняем стили из атрибута style */
.product-description-formatted span[style*="color"],
.product-description-formatted span[style*="background-color"] {
    /* Стили применяются напрямую из атрибута style */
}

/* Убеждаемся, что цветной жирный текст отображается правильно */
.product-description-formatted span[style*="color"] strong,
.product-description-formatted span[style*="color"] b,
.product-description-formatted strong span[style*="color"],
.product-description-formatted b span[style*="color"] {
    font-weight: 600;
}

.compact-desc {
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray);
    margin-bottom: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: 13px;
}

.info-label {
    color: var(--gray);
}

.info-value {
    font-weight: 500;
    text-align: right;
}

.mini-reviews {
    margin-top: 20px;
}

.review-summary {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.avg-rating {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.review-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    margin-bottom: 10px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.reviewer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.review-date {
    font-size: 11px;
    color: var(--gray);
}

.review-text {
    font-size: 12px;
    line-height: 1.4;
    color: var(--gray);
}

.purchase-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 20px;
    position: sticky;
    top: 15px;
    height: fit-content;
}

.price-box {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.current-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.old-price {
    font-size: 14px;
    color: var(--gray);
    text-decoration: line-through;
    margin-bottom: 10px;
}

.compact-options {
    margin-bottom: 20px;
}

.option-group {
    margin-bottom: 15px;
}

.option-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--light);
    margin-bottom: 8px;
    display: block;
}

.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 8px 12px;
}

.qty-btn {
    background: transparent;
    border: none;
    color: var(--light);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: var(--glass-bg);
}

.qty-value {
    font-weight: 600;
    font-size: 14px;
    min-width: 30px;
    text-align: center;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stock-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--success);
    margin-top: 15px;
    padding: 10px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 6px;
}

/* Мини-продавец */
.mini-seller {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    margin-top: 15px;
}

.seller-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.seller-details h4 {
    font-size: 14px;
    margin-bottom: 4px;
    font-weight: 600;
}

.seller-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--warning);
}

.seller-rating i {
    color: var(--warning);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-actions .action-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--light);
    font-size: 18px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.header-actions .action-btn:hover {
    background: var(--glass-bg);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.header-actions .action-btn a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.header-actions .action-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--dark);
}

.mini-thumb:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.mini-thumb.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

@media (max-width: 900px) {
    .product-content {
        grid-template-columns: 1fr;
    }
    
    .mini-gallery {
        flex-direction: column;
    }
    
    .main-image {
        min-height: 250px;
        max-height: 400px;
        width: 100%;
    }
    
    .main-image img {
        object-fit: contain;
    }
    
    .thumb-strip {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
    }
    
    .mini-thumb {
        flex-shrink: 0;
    }
}

@media (max-width: 600px) {
    .main-image {
        min-height: 200px;
        max-height: 300px;
        width: 100%;
    }
    
    .main-image img {
        object-fit: contain;
    }
    
    .thumb-strip {
        width: 100%;
    }
    
    .mini-thumb {
        width: 70px;
        height: 70px;
    }
}

