/**
 * Style X Gadgets — Reviews System CSS (v3.65.2)
 * Modern, lightweight (~2.5 KB). Loaded only on single product pages.
 */

/* ============================================================
   Section
   ============================================================ */
.xoro-reviews-section {
    max-width: 80rem;
    margin: 2rem auto;
    padding: 0 1rem;
}
@media (min-width: 640px) { .xoro-reviews-section { padding: 0 1.5rem; } }

.xoro-reviews__inner {
    background: #131313;
    border: 1px solid #2a2a2a;
    border-radius: 1.25rem;
    padding: 1.25rem;
}
@media (min-width: 640px) { .xoro-reviews__inner { padding: 2rem; } }

/* ============================================================
   Header
   ============================================================ */
.xoro-reviews__header { text-align: center; margin-bottom: 1.5rem; }
.xoro-reviews__title { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.02em; margin: 0; color: #fff; }
@media (min-width: 640px) { .xoro-reviews__title { font-size: 2rem; } }
.xoro-reviews__sub { color: #9ca3af; font-size: 0.875rem; margin: 0.35rem 0 0; }

/* ============================================================
   Summary (big score + distribution bars)
   ============================================================ */
.xoro-reviews__summary {
    display: grid;
    gap: 1.25rem;
    padding: 1.25rem;
    background: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .xoro-reviews__summary { grid-template-columns: 220px 1fr; align-items: center; }
}

.xoro-reviews__score { text-align: center; }
.xoro-reviews__score-big { font-size: 3.5rem; font-weight: 900; color: #84cc16; line-height: 1; }
.xoro-reviews__score-stars { color: #84cc16; display: flex; justify-content: center; gap: 2px; margin-top: 0.35rem; }
.xoro-reviews__score-count { color: #9ca3af; font-size: 0.8rem; margin-top: 0.35rem; }

.xoro-reviews__bars { display: flex; flex-direction: column; gap: 0.45rem; }
.xoro-reviews__bar-row { display: flex; align-items: center; gap: 0.6rem; }
.xoro-reviews__bar-label { color: #84cc16; font-size: 0.75rem; font-weight: 700; width: 1.75rem; flex-shrink: 0; }
.xoro-reviews__bar { flex: 1; height: 8px; background: #2a2a2a; border-radius: 9999px; overflow: hidden; }
.xoro-reviews__bar-fill { height: 100%; background: linear-gradient(90deg, #84cc16, #e8c878); border-radius: 9999px; transition: width 600ms ease; }
.xoro-reviews__bar-count { color: #6b7280; font-size: 0.7rem; width: 3rem; text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ============================================================
   Review card
   ============================================================ */
/* ============================================================
   Review list — horizontal scroll-snap slider (v3.112.0)
   ============================================================ */
.xoro-reviews__list {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.75rem;
    margin: 0 -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: #84cc16 #2a2a2a;
}
.xoro-reviews__list::-webkit-scrollbar { height: 5px; }
.xoro-reviews__list::-webkit-scrollbar-track { background: #1a1a1a; border-radius: 9999px; }
.xoro-reviews__list::-webkit-scrollbar-thumb { background: #84cc16; border-radius: 9999px; }

.xoro-review-card {
    display: flex;
    gap: 0.85rem;
    padding: 1rem;
    background: #0d0d0d;
    border: 1px solid #222;
    border-radius: 0.85rem;
    animation: xoroFadeIn 300ms ease;
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 85%;
    max-width: 340px;
}
@media (min-width: 640px) { .xoro-review-card { width: 360px; } }
@media (min-width: 1024px) { .xoro-review-card { width: 380px; } }
@keyframes xoroFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.xoro-review__avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #84cc16, #8a6d1f);
    color: #0a0a0a;
    font-weight: 800;
    font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.xoro-review__body { flex: 1; min-width: 0; }
.xoro-review__head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.xoro-review__name { color: #fff; font-weight: 700; font-size: 0.9rem; }
.xoro-review__verified {
    display: inline-flex; align-items: center; gap: 0.2rem;
    color: #22c55e; font-size: 0.68rem; font-weight: 600;
    background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25);
    padding: 0.1rem 0.4rem; border-radius: 9999px;
}
.xoro-review__meta { display: flex; align-items: center; gap: 0.6rem; margin: 0.3rem 0 0.5rem; }
.xoro-review__stars { color: #84cc16; display: inline-flex; gap: 1px; }
.xoro-review__date { color: #6b7280; font-size: 0.72rem; }
.xoro-review__text { color: #d1d5db; font-size: 0.875rem; line-height: 1.55; margin: 0; word-wrap: break-word; }

/* ============================================================
   Review images (v3.111.0)
   ============================================================ */
.xoro-review__images { display: flex; gap: 0.4rem; margin-top: 0.6rem; }
.xoro-review__img { width: 48px; height: 48px; border-radius: 0.5rem; object-fit: cover; border: 1px solid #2a2a2a; cursor: pointer; transition: transform 150ms ease, border-color 150ms ease; flex-shrink: 0; }
.xoro-review__img:hover { transform: scale(1.06); border-color: #84cc16; }

.xoro-review__helpful {
    display: inline-flex; align-items: center; gap: 0.3rem;
    color: #6b7280; font-size: 0.72rem; margin-top: 0.55rem;
}

/* ============================================================
   Load More
   ============================================================ */
.xoro-reviews__more-wrap { text-align: center; margin-top: 1.5rem; }
.xoro-reviews__more {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: transparent;
    color: #84cc16;
    border: 1px solid #84cc16;
    padding: 0.7rem 1.75rem;
    border-radius: 9999px;
    font-weight: 700; font-size: 0.85rem;
    cursor: pointer;
    transition: background 200ms ease, color 200ms ease, transform 150ms ease;
    min-height: 44px;
}
.xoro-reviews__more:hover { background: #84cc16; color: #0a0a0a; }
.xoro-reviews__more:active { transform: scale(0.97); }
.xoro-reviews__more-loading { display: none; }
.xoro-reviews__more-loading svg { animation: xoroSpin 800ms linear infinite; }
@keyframes xoroSpin { to { transform: rotate(360deg); } }
.xoro-reviews__more.is-loading .xoro-reviews__more-text,
.xoro-reviews__more.is-loading .xoro-reviews__more-count { display: none; }
.xoro-reviews__more.is-loading .xoro-reviews__more-loading { display: inline-flex; }
.xoro-reviews__more.is-done {
    color: #6b7280; border-color: #2a2a2a; cursor: default;
}
.xoro-reviews__more.is-done:hover { background: transparent; color: #6b7280; }
.xoro-reviews__more-count { color: #6b7280; font-size: 0.72rem; font-weight: 500; }

/* ============================================================
   Navigation arrows (v3.112.0)
   ============================================================ */
.xoro-reviews__nav { display: flex; justify-content: center; gap: 0.75rem; margin-top: 1rem; }
.xoro-reviews__arrow { width: 40px; height: 40px; border-radius: 50%; background: transparent; border: 1px solid #84cc16; color: #84cc16; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 200ms ease, color 200ms ease, transform 150ms ease; }
.xoro-reviews__arrow:hover { background: #84cc16; color: #0a0a0a; }
.xoro-reviews__arrow:active { transform: scale(0.92); }

/* ============================================================
   Infinite-scroll sentinel (v3.112.0)
   ============================================================ */
.xoro-reviews__sentinel { flex: 0 0 auto; width: 60px; display: flex; align-items: center; justify-content: center; scroll-snap-align: start; }
.xoro-reviews__sentinel-spin { color: #84cc16; display: none; }
.xoro-reviews__sentinel.is-loading .xoro-reviews__sentinel-spin { display: flex; }
.xoro-reviews__sentinel-spin svg { animation: xoroSpin 800ms linear infinite; }
.xoro-reviews__sentinel.is-done { display: none; }

/* ============================================================
   Accessibility
   ============================================================ */
.xoro-reviews__more:focus-visible,
.xoro-review-card:focus-within { outline: 2px solid #84cc16; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .xoro-review-card, .xoro-reviews__bar-fill, .xoro-reviews__more-loading svg, .xoro-reviews__sentinel-spin svg { animation: none !important; transition: none !important; }
    .xoro-reviews__list { scroll-behavior: auto; }
}
