:root {
    --market-text-dark: #31353B;
    --market-text-light: #6D7588;
    --market-bg-light: #F3F4F5;
    --market-border-color: #E5E7E9;
}

.product-image-gallery {
    position: sticky;
    top: 2rem;
}

/* Image Zoom Loupe Styles */
.img-zoom-container {
    position: relative;
}

.img-zoom-lens {
    position: absolute;
    border: 1px solid #d4d4d4;
    /*set the size of the lens:*/
    width: 80px;
    height: 80px;
    display: none;
    pointer-events: none; /* The lens should not be clickable */
}

.img-zoom-result {
    border: 1px solid #d4d4d4;
    /*set the size of the result div:*/
    width: 400px;
    height: 400px;
    position: absolute;
    right: -420px; /* Position it to the right of the product info */
    top: 0;
    display: none;
    z-index: 100;
    background-color: white;
    background-repeat: no-repeat;
}


.product-details {
    padding-left: 2rem;
}

.breadcrumb {
    font-size: 0.9rem;
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--market-text-dark);
    margin-bottom: 1rem;
}

.product-meta-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--market-text-light);
}

.product-meta-info .meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.product-meta-info .meta-divider {
    color: var(--market-border-color);
}

.product-price-section {
    background-color: var(--market-bg-light);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 1.5rem;
}

.product-price-section .price-original {
    font-size: 1rem;
    text-decoration: line-through;
    color: var(--market-text-light);
    margin-bottom: 0.25rem;
}

.product-price-section .price-discounted,
.product-price-section .price-normal {
    font-size: 2.25rem;
    font-weight: 700;
    color: #d32f2f; /* A strong red for discounted price */
}

.product-price-section .price-normal {
    color: var(--market-text-dark);
}

.product-description .section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--market-text-dark);
    border-bottom: 2px solid var(--market-border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.product-description p {
    color: var(--market-text-light);
    line-height: 1.7;
}

.card .section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Reviews Section */
.reviews-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--market-border-color);
}

.reviews-section .section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--market-text-dark);
    margin-bottom: 1.5rem;
}

.review-summary {
    background-color: var(--market-bg-light);
    border-radius: 0.5rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.summary-rating .rating-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--market-text-dark);
    margin-left: 0.5rem;
}

.summary-rating .rating-max {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--market-text-light);
}

.summary-text p {
    font-size: 1rem;
    color: var(--market-text-light);
}

.review-list {
    margin-top: 2rem;
}

.review-item {
    border-bottom: 1px solid var(--market-border-color);
    padding: 1.5rem 0;
}

.review-item:last-child {
    border-bottom: none;
}

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

.review-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--market-primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.review-meta {
    text-align: right;
}

.review-stars {
    font-size: 1rem; /* Slightly larger stars */
    margin-bottom: 0.25rem;
}

.review-date {
    font-size: 0.8rem;
}

.review-body p {
    margin: 0;
    line-height: 1.6;
    color: var(--market-text-dark);
}

/* Image Zoom Modal Styles */
.image-zoom-modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.85);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 800px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
}


@media (max-width: 1200px) {
    .img-zoom-result {
       display: none !important; /* Hide loupe result on smaller screens */
    }
}


@media (max-width: 768px) {
    .product-details {
        padding-left: 0;
        margin-top: 2rem;
    }
    .product-title {
        font-size: 1.5rem;
    }
    .product-price-section .price-discounted,
    .product-price-section .price-normal {
        font-size: 1.75rem;
    }
    .modal-content {
        width: 95%;
    }
}
