/* === MODAL STYLES === */
.ets_mp_popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    overflow-y: auto;
}

.ets_mp_popup .mp_pop_table {
    display: table;
    width: 100%;
    height: 100%;
}

.ets_mp_popup .panel {
    display: inline-block;
    text-align: left;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    position: relative;
}

.ets_mp_popup .panel-heading {
    padding: 1.5rem;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ets_mp_popup .panel-heading svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.ets_mp_close_popup {
    top: -20px;
    right: 80px;
}

/* === ESTILOS GENERALES === */
.ets_mp_shop_reviews {
    margin: 2rem 0;
}

/* === FORMULARIO DE RESEÑA === */
.form-wrapper {
    padding: 1.5rem;
}

.review-form-section,
.detailed-ratings-section {
    margin-bottom: 2rem;
}

.form-control-label {
    padding: 5px 10px;
}

.form-text {
    margin-top: 0.25rem;
    margin-left: 0.25rem;
}

.detailed-ratings-section h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.detailed-ratings-section h4 small {
    color: #666;
    font-weight: 400;
    font-size: 0.85rem;
}

.review-form .form-group {
    margin-bottom: 20px;
    position: relative;
}

.review-form .form-group.has-error .form-control {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.review-form .form-group.has-error label {
    color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* === SISTEMA DE ESTRELLAS === */
.star-rating {
    display: flex;
    gap: 2px;
}

.star-rating .star {
    font-size: 1.5rem;
    color: #ddd;
    transition: color 0.2s ease;
}

.star-rating .star.filled {
    color: #ffa500;
}

.star-rating.small .star {
    font-size: 1rem;
}

/* === SISTEMA DE ESTRELLAS INTERACTIVO === */
.star-rating-input {
    font-size: 24px;
    cursor: pointer;
    margin: 10px 0;
    display: flex;
    gap: 5px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.star-rating-input .star {
    color: #ddd;
    transition: color 0.2s ease;
    cursor: pointer;
    user-select: none;
    border: none !important;
    background: none !important;
    outline: none !important;
    font-family: inherit;
    font-size: inherit;
    line-height: 1;
    padding: 0;
    margin: 0;
    width: auto;
    height: auto;
    pointer-events: auto;
    touch-action: manipulation;
}

.star-rating-input .star:hover,
.star-rating-input .star.hover {
    color: #ffc107;
}

.star-rating-input .star.selected,
.star-rating-input .star.active,
.star-rating-input .star.filled {
    color: #ffc107;
}

.star-rating-input .star:focus,
.star-rating-input .star:active {
    outline: none;
    border: none;
    box-shadow: none;
}

/* === CONTADOR DE CARACTERES === */
.character-counter {
    display: block;
    text-align: right;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.character-counter.text-warning {
    color: #856404 !important;
}

.character-counter.text-danger {
    color: #721c24 !important;
}

.review-textarea {
    resize: vertical;
    min-height: 100px;
}

/* === REGLAMENTO DE RESEÑAS === */
.review-guidelines {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.review-guidelines h5 {
    margin: 0 0 0.75rem 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.review-guidelines ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.review-guidelines li {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

/* === BOTONES === */
.review-form button[type="submit"] {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.review-form button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.review-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* === RESUMEN DE RESEÑAS === */
.shop-reviews-summary {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.shop-reviews-summary h3 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.reviews-overview {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* === CALIFICACIÓN PROMEDIO === */
.rating-summary {
    flex: 1;
}

.average-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rating-value {
    font-size: 3rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.total-reviews {
    color: #666;
    font-size: 0.9rem;
}

/* === DESGLOSE DE CALIFICACIONES === */
.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.rating-label {
    min-width: 30px;
    color: #666;
}

.bar-container {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffa500, #ff8c00);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.rating-count {
    min-width: 30px;
    color: #666;
    font-size: 0.8rem;
}

/* === CALIFICACIONES DETALLADAS === */
.detailed-ratings {
    flex: 1;
    max-width: 300px;
}

.detailed-ratings h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.rating-name {
    min-width: 100px;
    color: #555;
    font-size: 0.9rem;
}

.rating-item .rating-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    min-width: 30px;
}

/* === SECCIÓN DE ESCRIBIR RESEÑA === */
.write-review-section {
    text-align: center;
    margin: 20px 0;
}

.write-review-section .btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    background: #C50A59;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.write-review-section .btn svg {
    color: white;
}

.write-review-section .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(197,10,89,0.3);
}

/* === LISTA DE RESEÑAS === */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 20px;
}

.review-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
    animation: fadeIn 0.3s ease;
}

.review-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* === CABECERA DE RESEÑA === */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.reviewer-name {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #e8f5e8;
    color: #2e7d32;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.verified-badge svg {
    fill: currentColor;
    width: 12px;
    height: 12px;
}

.review-date {
    color: #666;
    font-size: 0.85rem;
}

.review-rating {
    display: flex;
    align-items: center;
}

/* === CONTENIDO DE RESEÑA === */
.review-title {
    margin: 0 0 0.75rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.review-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* === CALIFICACIONES DETALLADAS EN RESEÑA === */
.detailed-review-ratings {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.rating-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #555;
}

.rating-stars {
    display: flex;
    gap: 1px;
}

.rating-stars .star {
    font-size: 0.8rem;
    color: #ddd;
}

.rating-stars .star.filled {
    color: #ffa500;
}

/* === RESPUESTA DEL ADMINISTRADOR === */
.admin-response {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 6px 6px 0;
}

.admin-response strong {
    color: #007bff;
    margin-bottom: 0.5rem;
    display: block;
}

.response-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.response-date {
    color: #666;
    font-size: 0.8rem;
    font-style: italic;
}

/* === ACCIONES DE RESEÑA === */
.review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.helpfulness-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.helpfulness-question {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.vote-helpful,
.vote-not-helpful {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid #e9ecef;
    background: #fff;
    color: #666;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

.vote-helpful:hover {
    background: #e8f5e8;
    border-color: #4caf50;
    color: #4caf50;
}

.vote-not-helpful:hover {
    background: #ffeaea;
    border-color: #f44336;
    color: #f44336;
}

.vote-helpful.voted {
    background: #e8f5e8;
    border-color: #4caf50;
    color: #4caf50;
}

.vote-not-helpful.voted {
    background: #ffeaea;
    border-color: #f44336;
    color: #f44336;
}

.vote-count {
    font-weight: 600;
}

.report-review {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid #e9ecef;
    background: #fff;
    color: #666;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    margin-left: auto;
    cursor: pointer;
}

.report-review:hover {
    background: #fff3e0;
    border-color: #ff9800;
    color: #ff9800;
}

/* === CARGAR MÁS RESEÑAS === */
.load-more-reviews {
    text-align: center;
    margin-top: 2rem;
}

#load-more-reviews-btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

#load-more-reviews-btn:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* === SIN RESEÑAS === */
.no-reviews {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.no-reviews p {
    font-size: 1.1rem;
    margin: 0;
}

/* === MENSAJES DE NOTIFICACIÓN === */
.notification-content .notification-message{
    font-size: 16px;
}

.review-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 4px;
    border: 1px solid #c3e6cb;
}

.review-notification.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.review-notification.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* === RESPONSIVE === */
@media (max-width: 576px) {
    .shop-reviews-summary {
        padding: 1rem;
    }
    .reviews-overview {
        gap: 1rem;
    }
    .rating-value {
        font-size: 2.5rem;
    }
    .review-item {
        padding: 1rem;
    }
    .review-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .helpfulness-actions {
        justify-content: center;
    }
    .report-review {
        margin-left: 0;
        align-self: center;
    }
    .detailed-review-ratings {
        flex-direction: column;
        gap: 0.5rem;
    }
} /* Llave de cierre añadida o corregida */

@media (max-width: 768px) { /* Asegurándose que este media query esté bien formado */
    .shop-reviews-section {
        margin-top: 30px;
        padding: 20px;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 5px;
    }
    .shop-reviews-section h3 {
        margin-bottom: 20px;
        font-size: 24px;
        color: #333;
    }
    .rating-stars {
        display: inline-block;
        font-size: 16px;
        color: #ddd;
        margin-right: 10px;
    }
    .rating-stars .star {
        cursor: pointer;
        transition: color 0.2s;
    }
    .rating-stars .star.filled,
    .rating-stars .star:hover,
    .rating-stars .star:hover ~ .star {
        color: #ffc107;
    }
    .review-item {
        border-bottom: 1px solid #eee;
        padding: 15px 0;
        margin-bottom: 15px;
    }
    .review-item:last-child {
        border-bottom: none;
    }
    .review-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }
    .review-author {
        font-weight: bold;
        color: #333;
    }
    .review-date {
        color: #666;
        font-size: 12px;
    }
    .review-content {
        margin: 10px 0;
        line-height: 1.6;
        color: #555;
    }
    .review-actions {
        margin-top: 10px;
    }
    .review-actions button {
        margin-right: 10px;
        padding: 5px 10px;
        border: 1px solid #ddd;
        background: #f8f9fa;
        cursor: pointer;
        border-radius: 3px;
        font-size: 12px;
    }
    .review-actions button:hover {
        background: #e9ecef;
    }
    .review-actions .btn-edit {
        color: #007bff;
        border-color: #007bff;
    }
    .review-actions .btn-delete {
        color: #dc3545;
        border-color: #dc3545;
    }
    .review-actions .btn-helpful {
        color: #28a745;
    }
    .review-actions .btn-report {
        color: #6c757d;
    }
    .review-form {
        background: #f8f9fa;
        padding: 20px;
        border-radius: 5px;
        margin-bottom: 20px;
    }
    .review-form .form-group {
        margin-bottom: 15px;
    }
    .review-form label {
        display: block;
        margin-bottom: 5px;
        font-weight: bold;
        color: #333;
    }
    .review-form textarea {
        width: 100%;
        min-height: 100px;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 3px;
        resize: vertical;
    }
    .review-form .btn-submit {
        background: #007bff;
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 3px;
        cursor: pointer;
    }
    .review-form .btn-submit:hover {
        background: #0056b3;
    }
    .reviews-pagination {
        text-align: center;
        margin-top: 20px;
    }
    .reviews-pagination button {
        padding: 8px 16px;
        background: #007bff;
        color: white;
        border: none;
        border-radius: 3px;
        cursor: pointer;
    }
    .reviews-pagination button:hover {
        background: #0056b3;
    }
    .reviews-pagination button:disabled {
        background: #6c757d;
        cursor: not-allowed;
    }
    .alert {
        padding: 12px;
        margin-bottom: 15px;
        border-radius: 3px;
    }
    .alert-success {
        background: #d4edda;
        color: #155724;
        border: 1px solid #c3e6cb;
    }
    .alert-error {
        background: #f8d7da;
        color: #721c24;
        border: 1px solid #f5c6cb;
    }
    .loading {
        text-align: center;
        padding: 20px;
        color: #666;
    }
}

/* === ANIMACIONES === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-item {
    animation: fadeIn 0.3s ease;
}

/* === REGLA UNIVERSAL PARA PREVENIR TRANSFORMACIONES EN ESTRELLAS === */
[class*="star-rating"] .star,
.star-rating-input .star,
.rating-stars .star {
    transform: none !important;
    transition: none !important;
    animation: none !important;
    will-change: auto !important;
    backface-visibility: visible !important;
    perspective: none !important;
    transform-origin: 50% 50% !important;
    transform-style: flat !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    /* SOLO PERMITIR CAMBIO DE COLOR */
    transition: color 0.1s ease !important;
}

/* ESTADO HOVER LIMPIO - SOLO COLOR */
.star-rating-input .star:hover,
.star-rating-input .star.hover {
    color: #ffa500 !important;
}

.star-rating-input .star.filled,
.star-rating-input .star.active {
    color: #ffa500 !important;
}

/* === HIGH CONTRAST MODE === */
@media (prefers-contrast: high) {
    .star-rating .star.filled,
    .star-rating-input .star.filled {
        color: #ff6600;
    }

    .review-item {
        border-width: 2px;
    }
}

.review-restriction-notice {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.review-restriction-notice:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.review-restriction-notice h4 {
    font-family: inherit;
}

.review-restriction-notice p {
    font-family: inherit;
}

.review-restriction-notice a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.review-restriction-notice a:hover {
    color: #0056b3;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .review-restriction-notice {
        margin: 15px 10px !important;
        padding: 15px !important;
        flex-direction: column;
        text-align: center;
    }

    .review-restriction-notice svg {
        margin-right: 0 !important;
        margin-bottom: 10px;
        margin-top: 0 !important;
    }

    .no-reviews {
        margin: 20px 10px !important;
        padding: 30px 15px !important;
    }

    .write-review-section .btn {
        width: 100%;
        justify-content: center;
    }
}

.character-counter {
    display: block;
    text-align: right;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.character-counter.text-warning {
    color: #856404 !important;
}

.character-counter.text-danger {
    color: #721c24 !important;
}

.review-textarea {
    resize: vertical;
    min-height: 100px;
}

/* === SISTEMA DE ESTRELLAS MEJORADO === */
.star-rating-input {
    font-size: 24px;
    cursor: pointer;
    margin: 10px 0;
    display: flex;
    gap: 5px;
    pointer-events: auto;
    /* Aislar completamente de eventos de texto */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.star-rating-input .star {
    color: #ddd;
    transition: color 0.2s ease;
    margin-right: 5px;
    cursor: pointer;
    user-select: none;
    /* Evitar comportamientos de input */
    border: none !important;
    background: none !important;
    outline: none !important;
    font-family: inherit;
    font-size: inherit;
    line-height: 1;
    padding: 0;
    margin: 0;
    width: auto;
    height: auto;
    /* Bloquear cualquier evento de entrada de texto */
    pointer-events: auto;
    touch-action: manipulation;
}

.star-rating-input .star:hover,
.star-rating-input .star.hover {
    color: #ffc107;
}

.star-rating-input .star.selected {
    color: #ffc107;
}

/* Evitar que las estrellas interfieran con otros elementos */
.star-rating-input .star:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.star-rating-input .star:active {
    outline: none;
    border: none;
}

/* === REGLAMENTO DE RESEÑAS === */
.review-guidelines {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.review-guidelines h5 {
    margin: 0 0 0.75rem 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.review-guidelines ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.review-guidelines li {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}