/* =========================================================
   PRODUCT REVIEWS
   ========================================================= */

.product-reviews {
    padding: 24px 0;
    color: #222;
}

.product-reviews h2 {
    margin: 0 0 16px;
    color: #111;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.3;
}


/* =========================================================
   RESUMEN
   ========================================================= */

.product-reviews__summary {
    display: flex;
    align-items: center;
    gap: 32px;

    margin-bottom: 18px;
    padding: 12px 16px;

    border: 1px solid #e8e8e8;
    border-radius: 16px;
}


/* Calificación */

.product-reviews__rating {
    display: flex;
    flex-direction: column;
    align-items: center;

    min-width: 120px;
}

.product-reviews__rating-value {
    white-space: nowrap;
    color: #111;
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
}

.product-reviews__rating-value span {
    color: #777;
    font-size: 17px;
    font-weight: 400;
}

.product-reviews__rating-stars {
    position: relative;
    display: inline-block;
    margin-top: 0;
    color: #e5e7eb;
    font-size: 24px;
    letter-spacing: 2px;
    line-height: 1.3;
    white-space: nowrap;
}

.product-reviews__rating-fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: #f5b301;
}

.product-reviews__rating-label { margin-bottom: 6px; color: #666; font-size: 12px; font-weight: 600; }
.product-reviews__summary-text strong { display: block; color: #222; font-size: 18px; font-weight: 600; }
.product-reviews__summary-text p { margin: 6px 0 0; }

.product-reviews__rating-count {
    margin-top: 5px;
    color: #777;
    font-size: 13px;
}


/* Separador */

.product-reviews__summary-divider {
    width: 1px;
    height: 70px;
    background: #e5e5e5;
}


/* Texto resumen */

.product-reviews__summary-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}


/* =========================================================
   LISTA
   ========================================================= */

.product-reviews__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}


/* =========================================================
   REVIEW
   ========================================================= */

.product-reviews__item {
    padding: 16px 20px;
    border: 1px solid #e8e8e8;
    overflow-wrap: anywhere;
}


/* Review adicional */

.product-reviews__item--additional {
    margin-top: 12px;
    margin-left: 48px;
    padding: 12px 16px;

    border: 1px solid #e7e7e7;
    border-radius: 8px;

    background: #fafafa;
}


/* =========================================================
   HEADER DE REVIEW
   ========================================================= */

.product-reviews__header {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 8px;
}


/* Avatar */

.product-reviews__avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 38px;
    height: 38px;

    border-radius: 50%;

    background: #f3f3f3;
    color: #555;

    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}


/* Usuario */

.product-reviews__user {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-reviews__name {
    color: #222;
    font-size: 14px;
    font-weight: 600;
}

.product-reviews__verified {
    color: #777;
    font-size: 11px;
}


/* Fecha */

.product-reviews__header time {
    margin-left: auto;

    color: #999;
    font-size: 12px;
}


/* =========================================================
   ESTRELLAS / INFORMACIÓN
   ========================================================= */

.product-reviews__info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;

    margin-left: 50px;
    margin-bottom: 8px;

    color: #777;
    font-size: 12px;
}

.product-reviews__stars {
    color: #f5b301;
    font-size: 17px;
    letter-spacing: 1px;
    line-height: 1;
}

.product-reviews__empty-stars {
    color: #ddd;
}

.product-reviews__color {
    padding-left: 12px;
    border-left: 1px solid #ddd;
}


/* =========================================================
   ETIQUETA AUTOMÁTICA
   ========================================================= */

.product-reviews__automatic {
    display: inline-flex;
    align-items: center;

    margin-left: 50px;
    margin-bottom: 6px;
    padding: 4px 8px;

    border-radius: 4px;

    background: #f5f5f5;
    color: #f10c33;

    font-size: 11px;
}


/* =========================================================
   CONTENIDO
   ========================================================= */

.product-reviews__content {
    max-width: 720px;

    margin: 0 0 10px 50px;

    color: #333;
    font-size: 14px;
    line-height: 1.6;

    white-space: pre-wrap;
}


/* =========================================================
   FOTOS
   ========================================================= */

.product-reviews__photos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin: 8px 0 10px 50px;
}

.product-reviews__photos a {
    display: block;

    width: 76px;
    height: 76px;

    overflow: hidden;

    border: 1px solid #e2e2e2;
    border-radius: 6px;

    background: #f5f5f5;
}

.product-reviews__photos img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .2s ease;
}

.product-reviews__photos a:hover img {
    transform: scale(1.05);
}


/* =========================================================
   RESPUESTA DE LA TIENDA
   ========================================================= */

.product-reviews__reply {
    margin: 10px 0 10px 50px;
    padding: 10px 12px;

    border-left: 3px solid #f5b301;
    border-radius: 0 6px 6px 0;

    background: #f8f8f8;
}

.product-reviews__reply__store{
    display: flex;
    gap: 5px;
}

.product-reviews__reply strong {
    display: block;

    color: #222;
    font-size: 13px;
}

.product-reviews__reply p {
    margin: 0;

    color: #666;
    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   RESEÑA ADICIONAL
   ========================================================= */

.product-reviews__additional-label {
    display: block;

    margin-bottom: 8px;

    color: #f10c33;

    font-size: 12px;
    font-weight: 600;
}


/* =========================================================
   LIKE
   ========================================================= */

.product-reviews__like {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-left: 50px;
    padding: 8px 12px;
    min-height: 40px;

    border: 1px solid #e5e7eb;
    border-radius: 999px;

    background: #fff;
    color: #626773;

    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;

    cursor: pointer;

    transition:
        color .15s ease,
        background .15s ease,
        border-color .15s ease;
}

.product-reviews__like:hover {
    border-color: #fac2cc;
    background: #fff5f7;
    color: #f10c33;
}

.product-reviews__like-icon { flex-shrink: 0; }
.product-reviews__like[aria-pressed="true"] .product-reviews__like-icon { fill: currentColor; }
.product-reviews__like-count {
    min-width: 23px;
    padding: 3px 6px;
    border-radius: 999px;
    background: #f1f2f4;
    color: #555b65;
    text-align: center;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}
.product-reviews__like[aria-pressed="true"] .product-reviews__like-count { background: #ffe0e7; color: #c40929; }
.product-reviews__like:focus-visible { outline: 2px solid #f10c33; outline-offset: 3px; }

.product-reviews__like[aria-pressed="true"] {
    border-color: #f10c33;
    background: #fff3f5;
    color: #f10c33;
}

.product-reviews__like:disabled {
    opacity: .5;
    cursor: wait;
}


/* =========================================================
   VER MÁS
   ========================================================= */

.product-reviews__more {
    display: block;

    margin: 16px auto 0;
    padding: 9px 22px;

    border: 1px solid #f10c33;
    border-radius: 6px;

    background: #fff;
    color: #f10c33;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background .15s ease,
        color .15s ease;
}

.product-reviews__more:hover {
    background: #f10c33;
    color: #fff;
}


/* =========================================================
   MODAL
   ========================================================= */

.app-modal__dialog:has(.product-reviews__modal-content) { max-width: 820px; }
.product-reviews__modal-content { padding: 0; }
.product-reviews__modal-content[hidden] { display: none !important; }
.product-reviews__photo-viewer img {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}
.product-reviews__photo-back {
    margin: 0 0 16px;
    padding: 8px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    color: #c40929;
    cursor: pointer;
}
.product-reviews__photo-back:focus-visible {
    outline: 2px solid #f10c33;
    outline-offset: 3px;
}
.app-modal__dialog:has(.product-reviews__photo-viewer) { max-width: 900px; }
[data-reviews-storage][hidden] { display: none !important; }

/* =========================================================
   FILTROS
   ========================================================= */

.product-reviews__filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid #eee;
}

.product-reviews__filters label {
    display: flex;
    flex-direction: column;
    gap: 6px;

    color: #555;

    font-size: 11px;
    font-weight: 600;
}

.product-reviews__rating-options { width: 100%; min-width: 0; margin: 0; padding: 0; border: 0; }
.product-reviews__rating-options legend { margin-bottom: 10px; padding: 0; color: #666; font-size: 12px; }
.product-reviews__filter-options { display: flex; flex-wrap: wrap; gap: 8px; }
.product-reviews__filters .product-reviews__filter-option { position: relative; width: auto; cursor: pointer; font-size: 12px; }
.product-reviews__filter-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.product-reviews__filter-option span { display: block; padding: 10px 14px; border: 1px solid #e3e5e8; border-radius: 8px; background: #fff; color: #626773; }
.product-reviews__filter-option:hover span { background: #f8f8f9; }
.product-reviews__filter-option input:checked + span { color: #c40929; border-color: #f10c33; background: #fff3f5; }
.product-reviews__filter-option input:focus-visible + span { outline: 2px solid #f10c33; outline-offset: 3px; }

.product-reviews__filter-check {
    flex-direction: row !important;
    align-items: center;

    align-self: center;

    padding: 6px 0;
}

.product-reviews__filters input {
    accent-color: #f10c33;
}

.product-reviews__clear {
    margin-left: auto;
    padding: 8px 12px;

    border: 1px solid #ddd;
    border-radius: 5px;

    background: #fff;
    color: #666;

    font-size: 12px;

    cursor: pointer;
}

.product-reviews__clear:hover {
    background: #f7f7f7;
}


/* Resultado */

.product-reviews__results {
    margin: 10px 0;

    color: #888;
    font-size: 12px;
}


/* =========================================================
   ESTADOS
   ========================================================= */

.product-reviews__empty {
    padding: 24px;

    border: 1px solid #eee;
    border-radius: 8px;

    background: #fafafa;

    color: #777;
    text-align: center;
}

.product-reviews__status {
    color: #a33116;
    font-size: 13px;
}

.product-reviews__status:empty {
    display: none;
}

.product-reviews [hidden] {
    display: none !important;
}


/* =========================================================
   FOCUS
   ========================================================= */

.product-reviews button:focus-visible,
.product-reviews a:focus-visible,
.product-reviews select:focus-visible {
    outline: 2px solid #f10c33;
    outline-offset: 2px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .product-reviews {
        padding: 18px 0;
    }


    /* Resumen */

    .product-reviews__summary {
        gap: 18px;
        padding: 12px;
    }

    .product-reviews__rating {
        min-width: 95px;
    }

    .product-reviews__rating-value {
        font-size: 34px;
    }

    .product-reviews__summary-divider {
        height: 55px;
    }


    /* Review */

    .product-reviews__item {
        padding: 14px 0;
    }

    .product-reviews__header {
        align-items: flex-start;
    }

    .product-reviews__header time {
        margin-left: auto;
    }

    .product-reviews__info,
    .product-reviews__content,
    .product-reviews__photos,
    .product-reviews__reply,
    .product-reviews__like,
    .product-reviews__automatic {
        margin-left: 46px;
    }


    /* Review adicional */

    .product-reviews__item--additional {
        margin-left: 20px;
        padding: 10px 12px;
    }


    /* Modal */




    /* Filtros */

    .product-reviews__filters {
        align-items: stretch;
        flex-direction: column;
    }

    .product-reviews__filters label,
    .product-reviews__filters select {
        width: 100%;
    }

    .product-reviews__filter-check {
        width: auto !important;
        align-self: flex-start;
    }

    .product-reviews__clear {
        align-self: flex-start;
    }

}
