/* Estrellas en página de producto */
.i5-product-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 15px 0;
}

.i5-rating-link {
    font-size: 15px;
    color: #363a41;
    text-decoration: none;
    transition: color 0.3s;
}

.i5-rating-link .i5-rating-average {
    font-weight: 700;
    font-size: 16px;
}

.i5-rating-link .i5-rating-count {
    color: #7a7a7a;
    margin-left: 5px;
}

/* Estrellas en listado de productos */
.i5-product-list-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.i5-rating-text {
    font-size: 13px;
    color: #7a7a7a;
}

.i5-rating-average {
    font-weight: 600;
    color: #363a41;
}

.i5-rating-count {
    color: #7a7a7a;
}

.ps-flex-col-center {
    display: flex;
    flex-direction: column;
    justify-content: center;   /* centra vertical */
    align-items: center;       /* centra horizontal */
    min-height: 120px;
    text-align: center;
  }
  .ps-flex-center {
    display: flex;
    justify-content: center;   /* centra horizontal */
    align-items: center;       /* centra vertical */
    min-height: 120px;
    text-align: center;
  }

.rating-list-widget {
    padding: 0;
}

.rating-list-widget__header {
    padding: 30px 15px;
    margin-bottom: 30px;
    background: #f8f9fa;
    border-radius: 4px;
}

.rating-list-widget__header h3 {
    font-size: 21px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    color: #363a41;
}

.rating-list-widget__header .col-left {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rating-list-widget__header .col-left img {
    max-width: 128px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.rating-list-widget__header .col-center {
    padding: 20px;
}

.rating-list-widget__header .border-left {
    border-left: 1px solid #dee2e6;
}

.rating-total, .rating-number {
    font-size: 32px;
    font-weight: 700;
    margin: 10px 0;
    color: #363a41;
}

.rating-total-label, .rating-number-label {
    font-size: 14px;
    color: #7a7a7a;
    text-transform: uppercase;
    margin: 0;
}

/* Widget de estrellas */
.rating-widget {
    position: relative;
    display: inline-block;
}

.rating-widget__stars {
    position: relative;
    width: 120px;
    height: 24px;
    display: inline-block;
}

.rating-widget__stars--small {
    width: 80px;
    height: 16px;
}

.rating-widget__stars--grey,
.rating-widget__stars--filled {
    position: absolute;
    top: 0;
    left: 0;
    height: 24px;
    background-size: 24px 24px;
    background-repeat: repeat-x;
}

.rating-widget__stars--small.rating-widget__stars--grey,
.rating-widget__stars--small .rating-widget__stars--grey,
.rating-widget__stars--small.rating-widget__stars--filled,
.rating-widget__stars--small .rating-widget__stars--filled {
    height: 16px;
    background-size: 16px 16px;
}

.rating-widget__stars--grey {
    width: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23cccccc" stroke-width="2"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>');
}

.rating-widget__stars--filled {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="%23febd69" stroke="%23febd69" stroke-width="2"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>');
    overflow: hidden;
}

/* Lista de reviews */
.rating-list-widget__ratings-list {
    margin-bottom: 20px;
}

.rating-list-widget__rating {
    padding: 25px 20px;
    margin-bottom: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #fff;
    transition: box-shadow 0.3s;
}

.rating-list-widget__rating:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.rating-list-widget__rating--stars {
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.rating-list-widget__author {
    font-weight: 600;
    font-size: 16px;
    color: #363a41;
}

.rating-list-widget__date {
    color: #7a7a7a;
    font-size: 14px;
    margin-left: auto;
}

.rating-list-widget__confirmed-purchase {
    color: #28a745;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.rating-list-widget__confirmed-purchase .icon-check:before {
    content: "✓";
    font-weight: bold;
}

.rating-list-widget__rating--comment {
    margin-top: 15px;
}

.rating-list-widget__rating--comment .review-title {
    font-size: 18px;
    font-weight: 600;
    color: #363a41;
    margin-bottom: 10px;
}

.rating-list-widget__rating--comment .js-review-body {
    color: #555;
    line-height: 1.6;
    font-size: 15px;
}

/* Respuesta de la tienda */
.rating-list-widget__reply {
    margin-top: 15px;
    margin-left: 20px;
    padding: 12px 16px;
    background: #f4f8fb;
    border-left: 3px solid #2fb5d2;
    border-radius: 0 4px 4px 0;
}

.rating-list-widget__reply--label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #2fb5d2;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.rating-list-widget__reply--text {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

/* Fotos de reviews */
.rating-list-widget__photos {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.rating-list-widget__photo {
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
}

.rating-list-widget__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.rating-list-widget__photo:hover img {
    transform: scale(1.1);
}

/* Botón cargar más */
.rating-list-widget__footer {
    text-align: center;
    padding: 20px 0;
}

.rating-list-widget__footer .btn-link {
    font-size: 16px;
    font-weight: 600;
    color: #2fb5d2;
    text-decoration: none;
    padding: 12px 30px;
    border: 2px solid #2fb5d2;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s;
    background: transparent;
}

.rating-list-widget__footer .btn-link:hover {
    background: #2fb5d2;
    color: #fff;
}

/* Loading */
.rotating {
    animation: i5-rotating 2s linear infinite;
}

@keyframes i5-rotating {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 767px) {
    .rating-list-widget__header .col-left {
        margin-bottom: 20px;
    }
    
    .rating-list-widget__header .col-center {
        border-left: none !important;
        border-top: 1px solid #dee2e6;
        margin-top: 15px;
        padding-top: 20px;
    }
    
    .rating-list-widget__rating--stars {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rating-list-widget__date {
        margin-left: 0;
    }
    
    .rating-total, .rating-number {
        font-size: 24px;
    }
}