:root {
    --primary: #27ae60;
    --secondary: #3498db;
    --bg: #f7f7f7;
    --card-bg: #fff;
    --text-primary: #333;
    --text-muted: #777;
    --border-radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --transition: all 0.2s ease;
    --font: 'Arial', sans-serif;
}

body {
    font-family: var(--font);
}

.product-page .container {
    max-width: 1100px;
    margin: 1.5rem auto 3rem auto;
    padding: 0 1rem;
}

.product-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.6);
}

/* Заголовок */
.part-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.part-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.part-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Основной блок: Фотографии и описание */
.main-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Фотосекция */
.photo-section {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.main-image-wrapper {
    position: relative;
    background: #eaeaea;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image {
    max-height: 300px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.main-image:hover {
    transform: scale(1.02);
}

.image-zoom-hint {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
}

.thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.thumbnail {
    flex: 0 0 60px;
    height: 60px;
    border: 1px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background: #fff;
}

.thumbnail:hover, .thumbnail.active {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 1rem;
}

/* Описание и характеристики */
.details-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.price {
    font-size: 2rem;
    color: var(--primary);
    font-weight: bold;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    display: inline-block;
}

.specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.spec {
    background: #f0f0f0;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.spec:hover {
    background: #e0e0e0;
}

.spec-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.spec-value {
    font-weight: 500;
    color: var(--text-primary);
}

.description {
    background: #f0f0f0;
    padding: 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.actions .btn {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
}

.btn-primary {
    background: var(--primary);
    border: none;
    color: #fff;
    box-shadow: 0 1px 3px rgba(39,174,96,0.3);
}

.btn-primary:hover {
    background: #229954;
    transform: translateY(-1px);
}

.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}

/* Продавец */
.seller {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid #ccc;
    margin-top: 2rem;
}

.seller-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.seller-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.seller-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.seller-rating {
    font-size: 0.9rem;
    color: #00ffff;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.seller-rating i {
    font-size: 1rem;
    color: #f1c40f;
}

.seller-rating span {
    font-weight: 500;
}

.seller-details {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-icon {
    font-size: 1rem;
    color: var(--text-muted);
    width: 20px;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    width: 120px;
    margin-right: 10px;
}

.detail-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Кнопка Telegram */
.btn-telegram {
    background: #0088cc; /* Фирменный синий цвет Telegram */
    color: #fff;
    border: none;
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    border-radius: var(--border-radius);
    text-transform: uppercase;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
    box-shadow: 0 1px 3px rgba(0, 136, 204, 0.3); /* Тень в тон Telegram */
}

.btn-telegram:hover {
    background: #0077b3; /* Более темный оттенок Telegram при наведении */
    transform: translateY(-1px);
    color: #fff;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .product-page .container {
        width: 100%;
        max-width: none;
        margin: 1rem 0 2rem 0;
        padding: 0;
    }

    .product-section {
        width: 100%;
        border-radius: 0;
        box-shadow: none;
        border-left: none;
        border-right: none;
        padding: 1rem;
    }

    .part-header {
        margin-bottom: 1rem;
    }

    .part-title {
        font-size: 1.5rem;
    }

    .part-subtitle {
        font-size: 0.9rem;
    }

    .main-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .main-image-wrapper {
        height: 220px;
    }

    .main-image {
        max-height: 200px;
    }

    .thumbnails {
        gap: 0.4rem;
    }

    .thumbnail {
        flex: 0 0 50px;
        height: 50px;
    }

    .image-zoom-hint {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }

    .no-image {
        font-size: 0.85rem;
    }

    .details-section {
        gap: 0.8rem;
    }

    .price {
        font-size: 1.8rem;
        padding: 0.3rem 0.6rem;
    }

    .specs {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .spec {
        padding: 0.4rem;
        font-size: 0.85rem;
    }

    .spec-label {
        font-size: 0.7rem;
    }

    .spec-value {
        font-size: 0.85rem;
    }

    .description {
        padding: 0.6rem;
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .actions {
        flex-direction: column;
        gap: 0.6rem;
    }

    .actions .btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .seller {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        padding: 0.8rem 0;
        margin-top: 1.5rem;
    }

    .seller-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .seller-name {
        font-size: 0.95rem;
    }

    .seller-rating {
        font-size: 0.85rem;
        padding: 0.15rem 0.5rem;
    }

    .seller-rating i {
        font-size: 0.9rem;
    }

    .seller-details {
        gap: 0.6rem;
        margin-top: 0.8rem;
    }

    .detail-item {
        gap: 0.4rem;
    }

    .detail-icon {
        font-size: 0.9rem;
    }

    .detail-label {
        font-size: 0.7rem;
        width: 100px;
        margin-right: 8px;
    }

    .detail-value {
        font-size: 0.8rem;
    }

    .btn-telegram {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .product-page .container {
        margin: 0.8rem 0 1.5rem 0;
    }

    .product-section {
        padding: 0.8rem;
    }

    .part-title {
        font-size: 1.3rem;
    }

    .part-subtitle {
        font-size: 0.85rem;
    }

    .main-image-wrapper {
        height: 180px;
    }

    .main-image {
        max-height: 160px;
    }

    .thumbnails {
        gap: 0.3rem;
    }

    .thumbnail {
        flex: 0 0 45px;
        height: 45px;
    }

    .image-zoom-hint {
        font-size: 0.6rem;
        padding: 0.1rem 0.3rem;
    }

    .price {
        font-size: 1.6rem;
        padding: 0.25rem 0.5rem;
    }

    .spec {
        padding: 0.3rem;
        font-size: 0.8rem;
    }

    .spec-label {
        font-size: 0.65rem;
    }

    .spec-value {
        font-size: 0.8rem;
    }

    .description {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .actions .btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
        max-width: 260px;
    }

    .seller {
        gap: 0.6rem;
        padding: 0.6rem 0;
        margin-top: 1rem;
    }

    .seller-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .seller-name {
        font-size: 0.9rem;
    }

    .seller-rating {
        font-size: 0.8rem;
        padding: 0.1rem 0.4rem;
    }

    .seller-rating i {
        font-size: 0.85rem;
    }

    .seller-details {
        gap: 0.5rem;
        margin-top: 0.6rem;
    }

    .detail-icon {
        font-size: 0.85rem;
    }

    .detail-label {
        font-size: 0.65rem;
        width: 90px;
        margin-right: 6px;
    }

    .detail-value {
        font-size: 0.75rem;
    }

    .btn-telegram {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
        max-width: 260px;
    }
}