/* Yêu thích + Đánh giá sách (dùng chung ststore_v2/ststore_v3). Màu theo biến --stv2-* của ststore-v2.css. */

/* ---------- Sao ---------- */
.shop-stars { display: inline-flex; align-items: center; gap: 1px; color: #f5a623; font-size: 12px; line-height: 1; white-space: nowrap; }
.shop-stars .far { color: #d6d6d6; }
.shop-stars__count { margin-left: 4px; color: #8a8a8a; font-size: 12px; }
.shop-stars--lg { font-size: 20px; gap: 3px; }

/* ---------- Nút yêu thích ---------- */
.shop-wish { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer; transition: transform .15s, color .15s, background .15s; }
.shop-wish i { color: inherit; }
.shop-wish--icon { position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255, 255, 255, .95); color: #6b6b6b; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); font-size: 16px; }
.shop-wish--icon:hover { transform: scale(1.08); color: #e4572e; }
.shop-wish.is-active { color: #e4572e; }
.shop-wish--button { padding: 10px 16px; border: 1px solid #e4572e; border-radius: 999px; background: #fff; color: #e4572e; font-weight: 600; font-size: 14px; }
.shop-wish--button.is-active { background: #fff1ec; }

/* ---------- Khối đánh giá trang chi tiết ---------- */
.shop-reviews { margin-top: 24px; padding: 24px; background: #fff; border: 1px solid var(--stv2-line, #e6e6e6); border-radius: 12px; scroll-margin-top: 90px; }
.shop-reviews__title { margin: 0 0 18px; font-size: 20px; font-weight: 800; }
.shop-reviews__summary { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--stv2-line, #e6e6e6); }
.shop-reviews__avg { text-align: center; }
.shop-reviews__avg b { display: block; font-size: 42px; line-height: 1; font-weight: 800; color: var(--stv2-text, #2b2b2b); }
.shop-reviews__avg small { display: block; margin-top: 6px; color: #8a8a8a; }
.shop-reviews__dist { display: flex; flex-direction: column; gap: 6px; }
.shop-reviews__bar { display: grid; grid-template-columns: 34px minmax(0, 1fr) 36px; gap: 8px; align-items: center; font-size: 13px; color: #6b6b6b; }
.shop-reviews__bar i { color: #f5a623; }
.shop-reviews__track { height: 8px; border-radius: 4px; background: #eee; overflow: hidden; }
.shop-reviews__fill { display: block; height: 100%; background: #f5a623; }
.shop-reviews__write { padding: 10px 18px; border: 0; border-radius: 999px; background: var(--stv2-primary, #27ae34); color: #fff; font-weight: 700; cursor: pointer; }
.shop-reviews__login { font-weight: 600; color: var(--stv2-primary, #27ae34); }
.shop-reviews__notice { margin: 16px 0 0; padding: 10px 14px; border-radius: 8px; background: #fff8e6; color: #7a5a00; font-size: 14px; }

.shop-review-form { margin-top: 20px; padding: 20px; border-radius: 10px; background: var(--stv2-bg-soft, #f6f8f4); }
.shop-review-form h4 { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.shop-review-form label.shop-review-form__label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 600; }
.shop-review-form input[type="text"], .shop-review-form textarea { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 14px; }
.shop-review-form textarea { min-height: 110px; resize: vertical; }
.shop-review-form__hint { margin-top: 4px; font-size: 12px; color: #8a8a8a; }
.shop-review-form__actions { display: flex; gap: 10px; margin-top: 16px; }
.shop-review-form__msg { margin-top: 12px; font-size: 14px; }
.shop-review-form__msg.is-error { color: #c62828; }
.shop-review-form__msg.is-success { color: var(--stv2-primary-dark, #1e8a29); font-weight: 600; }
.shop-review-form__preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.shop-review-form__preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid #ddd; }

/* chọn sao: radio đảo chiều để tô các sao bên trái khi rê/chọn */
.shop-rate { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.shop-rate input { position: absolute; opacity: 0; pointer-events: none; }
.shop-rate label { font-size: 28px; color: #d6d6d6; cursor: pointer; line-height: 1; }
.shop-rate label:hover, .shop-rate label:hover ~ label, .shop-rate input:checked ~ label { color: #f5a623; }
.shop-rate input:focus-visible + label { outline: 2px solid var(--stv2-primary, #27ae34); outline-offset: 2px; }
.shop-rate-hint { margin-left: 10px; font-size: 14px; color: #6b6b6b; vertical-align: middle; }

.shop-review-list { margin: 8px 0 0; padding: 0; list-style: none; }
.shop-review { padding: 18px 0; border-bottom: 1px solid var(--stv2-line, #e6e6e6); }
.shop-review:last-child { border-bottom: 0; }
.shop-review__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.shop-review__name { font-weight: 700; }
.shop-review__badge { padding: 2px 8px; border-radius: 999px; background: #e9f7ec; color: var(--stv2-primary-dark, #1e8a29); font-size: 12px; font-weight: 600; }
.shop-review__date { margin-left: auto; font-size: 12px; color: #8a8a8a; }
.shop-review__title { margin: 8px 0 4px; font-weight: 700; }
.shop-review__content { margin: 0; line-height: 1.6; white-space: pre-line; }
.shop-review__images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.shop-review__images img { width: 84px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid #eee; }
.shop-reviews__empty { padding: 18px 0 4px; color: #8a8a8a; }

@media (max-width: 767.98px) {
    .shop-reviews { padding: 16px; }
    .shop-reviews__summary { grid-template-columns: 1fr; text-align: left; }
    .shop-reviews__avg { text-align: left; }
}

/* ---------- Trang Sách yêu thích ---------- */
.shop-wishlist-page { padding: 16px 0 48px; }
.shop-wishlist-empty { padding: 48px 16px; text-align: center; color: #8a8a8a; background: var(--stv2-bg-soft, #f6f8f4); border-radius: 12px; }
.shop-wishlist-empty i { font-size: 40px; color: #e4572e; }
