.product-details {
    margin-bottom: 3rem;
}

.product-image-container {
    background-color: #ffffff;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.product-image {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.product-title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: #212529;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

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

.product-rating i {
    margin-right: 0.25rem;
}

.rating-count {
    color: #6c757d;
    margin-left: 0.5rem;
    font-size: 0.875rem;
}

.product-category {
    color: #6c757d;
    font-size: 0.875rem;
}

.product-category a {
    color: #0d6efd;
    text-decoration: none;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d6efd;
    margin-bottom: 1.5rem;
}

.product-description {
    margin-bottom: 1.5rem;
}

.product-description h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-description p {
    color: #495057;
    line-height: 1.6;
}

.product-seller {
    margin-bottom: 1.5rem;
}

.product-seller h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.seller-info {
    display: flex;
    align-items: center;
}

.seller-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
}

.seller-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.seller-faculty {
    color: #6c757d;
    font-size: 0.875rem;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.product-reviews {
    margin-top: 3rem;
}

.product-reviews h3 {
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.add-review-form {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.add-review-form h5 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.rating-input input {
    display: none;
}

.rating-input label {
    cursor: pointer;
    font-size: 1.5rem;
    color: #e4e5e9;
    margin-right: 0.25rem;
    transition: color 0.2s ease;
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label {
    color: #ffc107;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-item {
    background-color: #ffffff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
}

.reviewer-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
}

.reviewer-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.review-date {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0;
}

.review-rating {
    color: #ffc107;
}

.review-content p {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 0;
}

.empty-reviews {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    color: #6c757d;
}

.related-products h3 {
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.related-product-card {
    transition: transform 0.25s cubic-bezier(.4,2,.6,1), box-shadow 0.25s;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    min-height: 100%;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px) scale(1);
    animation: fadeInUp 0.7s cubic-bezier(.4,2,.6,1) forwards;
}

.related-product-card:hover {
    transform: scale(1.035) translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.04);
    z-index: 2;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0) scale(1.035);
    }
}

.related-product-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.related-product-card .product-description {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 1rem;
    min-height: 2.5em;
}

.related-product-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-bottom: 1rem;
}

.related-product-card .add-to-cart-btn {
    font-size: 1rem;
    border-radius: 0.5rem;
    padding: 0.25rem 0.75rem;
}

.related-product-card img.card-img-top {
    border-radius: 1rem 1rem 0 0;
    object-fit: cover;
    height: 180px;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* Dark mode support */
body.dark-mode .product-image-container {
    background-color: #1e1e1e;
}

body.dark-mode .product-title {
    color: #e0e0e0;
}

body.dark-mode .product-description p {
    color: #adb5bd;
}

body.dark-mode .add-review-form {
    background-color: #1a2234;
}

body.dark-mode .review-item {
    background-color: #1e1e1e;
}

body.dark-mode .review-content p {
    color: #adb5bd;
}

body.dark-mode .empty-reviews {
    background-color: #1a2234;
    color: #adb5bd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .review-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}
