/* styles/pages/product.css */

.product-page {
    min-height: 100vh;
    padding: 150px 40px 100px;
    background: #3b3b3b;
}

.product-page-layout {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

/* Seller */

.product-seller-sidebar {
    min-width: 0;
}

.product-seller-card {
    padding: 25px;
    background: #292929;
}

.product-seller-card h2 {
    margin: 0 0 20px;
    color: #fff;
    font-size: 20px;
    font-weight: 300;
}

.product-seller-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-seller-avatar {
    width: 55px;
    height: 55px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
}

.product-seller-identity {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#product-seller-name {
    overflow: hidden;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#product-seller-username {
    overflow: hidden;
    color: #a226ff;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-seller-meta {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #aaa;
    font-size: 12px;
}

.product-seller-company {
    margin-top: 18px;
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid #444;
    color: #aaa;
    font-size: 12px;
}

.product-seller-company strong {
    color: #ddd;
    font-weight: 400;
}

.product-seller-company[hidden] {
    display: none;
}

.product-seller-page {
    margin-top: 20px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #a226ff;
    border-radius: 18px;
    color: #fff;
    font-size: 12px;
    text-decoration: none;
    transition: background .2s, opacity .2s;
}

.product-seller-page:hover {
    background: #a226ff;
}

/* Produkt */

.product-details {
    min-width: 0;
    padding: 35px;
    background: #292929;
}

.product-main {
    min-width: 0;
}

.product-title {
    margin: 0 0 12px;
    color: #fff;
    font-size: 30px;
    font-weight: 300;
}

.product-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #aaa;
    font-size: 12px;
}

.product-meta > span:not(:first-child)::before {
    content: "•";
    margin-right: 8px;
    color: #666;
}

.product-meta .language {
    padding: 2px 7px;
    border: 1px solid #a226ff;
    border-radius: 10px;
    color: #ccc;
}

.product-meta .creator {
    color: #a226ff;
}

.product-images {
    width: 100%;
    margin-top: 30px;
    display: flex;
    gap: 12px;
    overflow-x: auto;
}

.product-images img {
    width: 100%;
    max-height: 520px;
    border-radius: 6px;
    object-fit: contain;
    background: #222;
}

.product-description {
    margin: 30px 0 0;
    color: #ddd;
    font-size: 15px;
    line-height: 1.7;
    white-space: pre-line;
    margin-bottom: 25px;
}

.product-actions {
    margin-top: 30px;
    padding: 30px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #444;
}

.product-actions .price {
    color: #fff;
    font-size: 24px;
    font-weight: 400;
}

.product-cart-icon {
    width: 34px;
    height: 34px;
    object-fit: contain;
    cursor: pointer;
    transition: opacity .2s, transform .2s;
}

.product-cart-icon:hover {
    opacity: .7;
    transform: scale(1.05);
}

/* Bewertungen */

.product-reviews {
    padding-top: 30px;
    border-top: 1px solid #a226ff;
}

.product-reviews h2 {
    margin: 0 0 20px;
    color: #fff;
    font-size: 22px;
    font-weight: 300;
}

.product-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-review-empty {
    padding: 18px;
    background: #333;
    border-radius: 6px;
    color: #999;
    font-size: 13px;
}

/* Scrollbar Bilder */

.product-images::-webkit-scrollbar {
    height: 4px;
}

.product-images::-webkit-scrollbar-track {
    background: transparent;
}

.product-images::-webkit-scrollbar-thumb {
    background: #a226ff;
    border-radius: 2px;
}

.product-images {
    scrollbar-width: thin;
    scrollbar-color: #a226ff transparent;
}

.product-stats-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    border-top: 1px solid #444;
    padding-top: 30px;
    margin-top: 30px;
}

.product-purchases,
.product-rating,
.stars-container,
.stars {
    display: flex;
    align-items: center;
}

.product-purchases {
    gap: 6px;
    color: #a8a8a8;
    font-size: 16px;
}

.stars-container {
    gap: 8px;
}

.stars {
    gap: 2px;
}

.star {
    font-size: 18px;
}

.star.empty {
    opacity: 0.4;
}

.star.half {
    opacity: 0.7;
}

.rating-number {
    color: #a8a8a8;
    font-size: 14px;
}

.product-page-image-slider {
    height: unset;
}

/* Responsive */

@media (max-width: 1100px) {
    .product-page-layout {
        width: 90%;
        grid-template-columns: 220px minmax(0, 1fr);
    }
}

@media (max-width: 800px) {
    .product-page {
        padding: 120px 15px 70px;
    }

    .product-page-layout {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .product-seller-card,
    .product-details {
        padding: 25px 20px;
    }

    .product-seller-meta {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .product-images img {
        max-height: 400px;
    }
}

@media (max-width: 500px) {
    .product-title {
        font-size: 25px;
    }

    .product-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .product-meta > span:not(:first-child)::before {
        display: none;
    }

    .product-actions .price {
        font-size: 20px;
    }
}