/**
 * Star Rating and Product Display Fixes
 * Ensures correct display of stars and product images
 */

/* Force star-ratings to use the correct background images */
.star-ratings-rating-full, 
.star-ratings-rating-empty {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    background-size: 16px !important;
    margin: 0 1px !important;
    padding: 0 !important;
    background-repeat: no-repeat !important;
}

.star-ratings-rating-full {
    background: url('/static/star-ratings/images/stars.png') no-repeat 0 0 !important;
    background-position: 0 0 !important;
}

.star-ratings-rating-empty {
    background: url('/static/star-ratings/images/stars.png') no-repeat 0 -16px !important;
    background-position: 0 -16px !important;
}

.star-ratings ul {
    padding: 0 !important;
    margin: 0 !important;
    display: inline-block !important;
}

.star-ratings ul li {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure the foreground container displays correctly */
.star-ratings-rating-foreground {
    display: block !important;
}

/* Hide any emoji-style icons */
.star-ratings i.fa,
.star-ratings span.fa,
.star-ratings i.fas,
.star-ratings span.fas,
.star-ratings i.far,
.star-ratings span.far {
    display: none !important;
}

/* Enhanced manual star rating display */
.enhanced-ratings {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stars-display span {
    color: gold !important;
    font-size: 28px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
    letter-spacing: 2px;
}

/* Interactive stars styling */
.selectable-star {
    color: #ddd;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.selectable-star.selected,
.selectable-star:hover {
    color: gold !important;
}

/* Enhanced product gallery display */
.product-gallery-main {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
    height: 550px !important; /* Increased height */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-gallery-main img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    padding: 15px; /* Added padding */
}

.product-gallery-main img:hover {
    transform: scale(1.05); /* Zoom effect on hover */
    cursor: pointer; /* Show pointer cursor on hover */
}

/* Add a hint that image is clickable */
.product-gallery-main:after {
    content: "🔍";
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(255,255,255,0.8);
    padding: 8px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
