/* Modern Product Reviews - Display Styles */

.mpr-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    width: 100%;
    margin: 30px auto;
    padding: 0 20px;
}

/* Tabs */
.mpr-tabs {
    display: flex;
    gap: 30px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 30px;
}

.mpr-tab {
    background: none;
    border: none;
    padding: 15px 5px;
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.mpr-tab:hover {
    color: #111827;
}

.mpr-tab.active {
    color: #111827;
    font-weight: 600;
}

.mpr-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #ff6b35;
}

/* Tab Content - FIXED */
.mpr-tab-content {
    display: none !important; /* Force hide inactive tabs */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.mpr-tab-content.active {
    display: block !important; /* Force show active tab */
    opacity: 1;
    visibility: visible;
}

/* Summary Section */
.mpr-summary {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 30px;
}

.mpr-rating-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.mpr-score {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 10px;
    color: #111827;
}

.mpr-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.mpr-star {
    font-size: 24px;
    color: #ff6b35;
}

.mpr-star-empty {
    color: #d1d5db;
}

.mpr-stars-small .mpr-star {
    font-size: 16px;
}

.mpr-satisfaction {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.mpr-based-on {
    font-size: 14px;
    color: #6b7280;
}

.mpr-verified {
    color: #10b981;
    font-weight: 500;
}

/* Metrics */
.mpr-metrics {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mpr-metric {
    display: grid;
    grid-template-columns: 140px 1fr 50px;
    align-items: center;
    gap: 15px;
}

.mpr-metric-label {
    font-size: 14px;
    color: #374151;
}

.mpr-metric-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.mpr-metric-fill {
    height: 100%;
    background: #ff6b35;
    border-radius: 4px;
    transition: width 0.3s;
}

.mpr-metric-score {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    text-align: right;
}

/* Filters */
.mpr-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.mpr-filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mpr-filter-btn,
.mpr-rating-filter {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    background: white;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s;
}

.mpr-filter-btn:hover,
.mpr-rating-filter:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.mpr-filter-btn.active {
    background: #111827;
    color: white;
    border-color: #111827;
}

.mpr-rating-filter {
    padding: 8px 12px;
}

.mpr-sort-select {
    padding: 8px 30px 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* Tags */
.mpr-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 30px;
}

.mpr-tags-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.mpr-tag-btn {
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    background: white;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s;
}

.mpr-tag-btn:hover {
    border-color: #ff6b35;
    color: #ff6b35;
}

.mpr-tag-btn.active {
    background: #fff7ed;
    border-color: #ff6b35;
    color: #ff6b35;
}

/* Reviews List */
.mpr-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.mpr-review-item {
    padding: 25px 0;
    border-bottom: 1px solid #e5e7eb;
}

.mpr-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.mpr-reviewer-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.mpr-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ff6b35;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
}

.mpr-reviewer-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mpr-reviewer-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mpr-country-flag {
    font-size: 16px;
}

.mpr-verified-badge {
    font-size: 12px;
    color: #10b981;
}

.mpr-review-date {
    font-size: 14px;
    color: #6b7280;
}

.mpr-review-rating {
    margin-bottom: 12px;
}

.mpr-review-rating .mpr-star {
    font-size: 18px;
}

.mpr-review-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 12px 0;
}

.mpr-review-content {
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 15px;
}

.mpr-recommend-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #ecfdf5;
    color: #047857;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 15px;
}

.mpr-recommend-badge svg {
    width: 16px;
    height: 16px;
}

.mpr-review-images {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.mpr-review-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.mpr-review-image:hover {
    transform: scale(1.05);
}

.mpr-aspect-ratings-display {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.mpr-aspect-display-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
}

.mpr-review-footer {
    display: flex;
    gap: 15px;
}

.mpr-helpful-btn,
.mpr-show-response-btn {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s;
}

.mpr-helpful-btn:hover,
.mpr-show-response-btn:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.mpr-helpful-btn.active {
    border-color: #ff6b35;
    color: #ff6b35;
    background: #fff7ed;
}

.mpr-vendor-response {
    margin-top: 15px;
    padding: 15px;
    background: #f9fafb;
    border-left: 3px solid #ff6b35;
    border-radius: 4px;
}

.mpr-response-header {
    margin-bottom: 8px;
}

.mpr-response-content {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
}

/* Store Reviews */
.mpr-store-summary {
    text-align: center;
    padding: 40px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 30px;
}

.mpr-score-large {
    font-size: 72px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 15px;
    color: #111827;
}

.mpr-stars-large {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.mpr-stars-large .mpr-star {
    font-size: 32px;
}

.mpr-no-reviews {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

/* View More Button - Desktop Only */
.mpr-view-more-container {
    text-align: center;
    padding: 30px 0;
    margin-top: 20px;
}

.mpr-view-more-btn {
    padding: 12px 32px;
    background: white;
    border: 2px solid #ff6b35;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    color: #ff6b35;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
}

.mpr-view-more-btn:hover {
    background: #ff6b35;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.mpr-view-more-btn:active {
    transform: translateY(0);
}

/* Mobile Carousel Styles */
.mpr-carousel-wrapper {
    position: relative;
    overflow: visible; /* CHANGED: Allow overflow to be visible */
    margin: 0 -15px; /* ADJUSTED: Better spacing */
    padding: 0 15px;
    width: calc(100% + 30px); /* ADDED: Account for negative margins */
    left: -15px; /* ADDED: Compensate for margin */
}

.mpr-carousel {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 15px; /* ADJUSTED: Smaller gap for better visibility */
    overflow: visible !important; /* CHANGED: Allow items to overflow */
    position: relative;
}

.mpr-carousel .mpr-review-item {
    flex: 0 0 calc(100vw - 60px) !important; /* CHANGED: Use viewport width minus padding */
    min-width: calc(100vw - 60px) !important;
    max-width: calc(100vw - 60px) !important;
    width: calc(100vw - 60px) !important; /* ADDED: Explicit width */
    transition: opacity 0.4s, transform 0.4s;
    display: block !important;
    box-sizing: border-box !important;
    padding: 0 !important; /* ADDED: Remove any inherited padding */
    overflow: visible !important; /* ADDED: Ensure content is visible */
}

/* Ensure review content is fully visible */
.mpr-carousel .mpr-review-item .mpr-review-content,
.mpr-carousel .mpr-review-item .mpr-review-title,
.mpr-carousel .mpr-review-item .mpr-review-header {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
}

.mpr-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 1;
    pointer-events: auto;
}

.mpr-carousel-nav:hover {
    background: #ff6b35;
    border-color: #ff6b35;
}

.mpr-carousel-nav:hover svg {
    stroke: white;
}

.mpr-carousel-nav.prev {
    left: 10px;
}

.mpr-carousel-nav.next {
    right: 10px;
}

.mpr-carousel-nav svg {
    width: 20px;
    height: 20px;
    stroke: #374151;
    transition: stroke 0.3s;
}

.mpr-carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.mpr-carousel-nav:disabled:hover {
    background: white;
    border-color: #e5e7eb;
}

.mpr-carousel-nav:disabled:hover svg {
    stroke: #374151;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mpr-container {
        padding: 0 15px;
    }
    
    .mpr-summary {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .mpr-rating-box {
        align-items: center;
        text-align: center;
    }
    
    .mpr-metric {
        grid-template-columns: 100px 1fr 45px;
        gap: 10px;
    }
    
    .mpr-metric-label {
        font-size: 13px;
    }
    
    .mpr-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mpr-filter-buttons {
        width: 100%;
    }
    
    .mpr-filter-btn,
    .mpr-rating-filter {
        flex: 1;
        min-width: auto;
    }
    
    .mpr-sort-select {
        width: 100%;
    }
    
    .mpr-review-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .mpr-score {
        font-size: 42px;
    }
    
    .mpr-score-large {
        font-size: 56px;
    }
    
    /* Hide view more button on mobile */
    .mpr-view-more-container {
        display: none;
    }
    
    /* CRITICAL: Mobile carousel specific adjustments */
    .mpr-carousel-wrapper {
        overflow: hidden !important; /* CHANGED: Hide overflow on wrapper */
        position: relative;
        width: 100% !important;
        left: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .mpr-carousel {
        overflow: visible !important; /* Allow items to overflow */
        padding: 0 15px; /* Add padding for spacing */
    }
    
    .mpr-carousel .mpr-review-item {
        flex: 0 0 calc(100% - 30px) !important; /* ADJUSTED: Full width minus padding */
        min-width: calc(100% - 30px) !important;
        max-width: calc(100% - 30px) !important;
        width: calc(100% - 30px) !important;
        margin: 0 !important;
    }
    
    /* Ensure all review content is visible */
    .mpr-carousel .mpr-review-item * {
        max-width: 100%;
        overflow: visible !important;
    }
    
    .mpr-carousel-nav {
        width: 36px;
        height: 36px;
    }
    
    .mpr-carousel-nav.prev {
        left: 5px;
    }
    
    .mpr-carousel-nav.next {
        right: 5px;
    }
}

@media (max-width: 480px) {
    .mpr-tabs {
        gap: 15px;
    }
    
    .mpr-tab {
        font-size: 14px;
        padding: 12px 5px;
    }
    
    .mpr-review-image {
        width: 60px;
        height: 60px;
    }
    
    .mpr-carousel .mpr-review-item {
        flex: 0 0 95%;
        min-width: 95%;
    }
    
    .mpr-carousel-nav {
        width: 32px;
        height: 32px;
    }
    
    .mpr-carousel-nav svg {
        width: 16px;
        height: 16px;
    }
}

/* Desktop - ensure normal layout */
@media (min-width: 769px) {
    .mpr-reviews-list {
        display: flex !important;
        flex-direction: column;
    }
    
    .mpr-review-item {
        flex: none !important;
        min-width: auto !important;
        width: 100% !important;
    }
    
    /* Ensure carousel classes don't affect desktop */
    .mpr-carousel-wrapper {
        overflow: visible;
        margin: 0;
        padding: 0;
    }
    
    .mpr-carousel-nav {
        display: none;
    }
}

/* Multiple instance support - ensure isolation */
.mpr-container + .mpr-container {
    margin-top: 40px;
}