/* A-One reviews: card star rating, PDP rating link, and the customer reviews section.
   The review section markup is platform-rendered with inline styles, hence the specificity/!important. */

/* ---------- Star rating (cards + PDP) ---------- */
.aone-rating { display: flex; align-items: center; gap: 6px; margin: 10px 0 4px; color: #66717d; font-size: 12px; line-height: 1; font-variant-numeric: tabular-nums; }
.aone-rating strong { color: #20262e; font-weight: 700; }
.aone-stars { position: relative; display: inline-block; flex: none; color: #d6dbe1; font-size: 13px; letter-spacing: 1px; line-height: 1; }
.aone-stars::before, .aone-stars > span::before { content: "\2605\2605\2605\2605\2605"; }
.aone-stars > span { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--aone-red, #ae0000); white-space: nowrap; }
.aone-card .aone-rating { position: relative; z-index: 2; pointer-events: none; }

.aone-rating--pdp { display: flex; width: fit-content; align-items: center; gap: 8px; margin: 16px 0 0; padding: 0; color: #4b5560; font-size: 14px; text-decoration: none; }
.aone-rating--pdp .aone-stars { font-size: 17px; letter-spacing: 2px; }
.aone-rating--pdp strong { font-size: 15px; }
.aone-rating--pdp .aone-rating-count { padding-left: 10px; border-left: 1px solid #d6dbe1; color: #4b5560; text-decoration: underline; text-decoration-color: #c4cad1; text-underline-offset: 4px; }
.aone-rating--pdp:hover .aone-rating-count { color: var(--aone-red, #ae0000); text-decoration-color: currentColor; }
.aone-rating--pdp:focus-visible { outline: 2px solid var(--aone-red, #ae0000); outline-offset: 4px; }
.sg-theme-review-compact:has(.aone-rating) { margin: 0 !important; padding: 0 !important; }
.vo-content-block:has(> .sg-theme-review-compact .aone-rating) { padding-inline: 0 !important; }

/* ---------- Reviews section ---------- */
.sg-theme-reviews.sg-review-fitment { width: 100%; }
.sg-theme-reviews #product-reviews {
    --rv-ink: #14181d; --rv-text: #3a434d; --rv-muted: #6b7580; --rv-line: #e3e7eb; --rv-soft: #f6f7f9; --rv-red: var(--aone-red, #ae0000);
    display: grid !important; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; row-gap: 20px; align-items: start;
    width: min(100% - 56px, 1520px) !important; max-width: none !important; margin: 56px auto 64px !important; padding: 0 !important;
    border: 0 !important; border-radius: 0 !important; background: none !important; color: var(--rv-text); font-family: inherit;
}
.sg-theme-reviews #product-reviews > * { min-width: 0; margin: 0 !important; }

/* Heading: same rhythm as the "Shop by category" / "Related Products" heads */
.sg-theme-reviews #product-reviews > h2 {
    grid-column: 1 / -1; display: block; padding-bottom: 16px !important; margin-bottom: 10px !important; border-bottom: 1px solid var(--rv-line);
    color: var(--rv-ink) !important; font-size: clamp(30px, 4vw, 42px) !important; font-weight: 800 !important; letter-spacing: -.04em !important;
    line-height: 1.05 !important; text-transform: none !important;
}
.sg-theme-reviews #product-reviews > h2::before {
    content: "What our buyers say"; display: block; margin-bottom: 8px; color: var(--rv-red); font-size: 12px; font-weight: 800;
    letter-spacing: .16em; line-height: 1.2; text-transform: uppercase;
}

/* Summary band: average | distribution | filters */
.sg-theme-reviews #product-reviews > p[aria-label],
.sg-theme-reviews #product-reviews > dl,
.sg-theme-reviews #product-reviews > form[method="GET"] { grid-row: 2; align-self: stretch; padding: 28px !important; border: 1px solid var(--rv-line) !important; border-radius: 0 !important; background: var(--rv-soft) !important; }
.sg-theme-reviews #product-reviews > p[aria-label] {
    grid-column: 1 / span 3; display: flex !important; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px !important;
    color: var(--rv-muted) !important; font-size: 14px !important; line-height: 1.4;
}
.sg-theme-reviews #product-reviews > p[aria-label] > strong { order: -1; color: var(--rv-ink) !important; font-size: 64px !important; font-weight: 800; letter-spacing: -.04em; line-height: .95; }
.sg-theme-reviews #product-reviews > p[aria-label] > span[aria-hidden] { order: -2; color: var(--rv-red) !important; font-size: 13px !important; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.sg-theme-reviews #product-reviews > p[aria-label] > span[aria-hidden]::after { content: " Customer rating"; }
.sg-theme-reviews #product-reviews > dl {
    grid-column: 4 / span 5; display: grid !important; align-content: center; gap: 10px !important; max-width: none !important;
    font-size: 13px !important; color: var(--rv-text);
}
.sg-theme-reviews #product-reviews > dl > div { grid-template-columns: 52px minmax(0, 1fr) 36px !important; gap: 14px !important; }
.sg-theme-reviews #product-reviews > dl dt { color: var(--rv-ink); font-weight: 600; white-space: nowrap; }
.sg-theme-reviews #product-reviews > dl dd { margin: 0; color: var(--rv-muted); text-align: right; }
.sg-theme-reviews #product-reviews > dl dd:has(progress) { display: flex; }
.sg-theme-reviews #product-reviews progress { -webkit-appearance: none; appearance: none; width: 100% !important; height: 8px !important; border: 0; border-radius: 0 !important; background: #e1e5e9; overflow: hidden; }
.sg-theme-reviews #product-reviews progress::-webkit-progress-bar { background: #e1e5e9; border-radius: 0; }
.sg-theme-reviews #product-reviews progress::-webkit-progress-value { background: var(--rv-red); border-radius: 0; }
.sg-theme-reviews #product-reviews progress::-moz-progress-bar { background: var(--rv-red); }

.sg-theme-reviews #product-reviews > form[method="GET"] {
    grid-column: 9 / span 4; display: grid !important; grid-template-columns: 1fr 1fr; align-content: center; gap: 14px !important;
}
.sg-theme-reviews #product-reviews > form[method="GET"]::before { content: "Filter reviews"; grid-column: 1 / -1; color: var(--rv-ink); font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.sg-theme-reviews #product-reviews > form[method="GET"] label { display: grid !important; gap: 7px !important; color: var(--rv-muted) !important; font-size: 11px !important; font-weight: 700 !important; letter-spacing: .12em !important; text-transform: uppercase !important; }
.sg-theme-reviews #product-reviews select {
    width: 100% !important; min-width: 0 !important; min-height: 46px !important; padding: 0 34px 0 12px !important; border: 1px solid #cfd5db !important; border-radius: 0 !important;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2314181d' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center !important;
    -webkit-appearance: none; appearance: none; color: var(--rv-ink) !important; font: 500 14px/1 inherit !important; letter-spacing: 0 !important; text-transform: none !important; cursor: pointer;
}
.sg-theme-reviews #product-reviews select:focus-visible { border-color: var(--rv-red) !important; outline: 2px solid var(--rv-red) !important; outline-offset: 1px; }
.sg-theme-reviews #product-reviews > form[method="GET"] button[type="submit"] {
    grid-column: 1 / -1; width: 100% !important; min-height: 46px !important; padding: 0 20px !important; border: 1px solid var(--rv-red) !important; border-radius: 0 !important;
    background: var(--rv-red) !important; color: #fff !important; font-size: 13px !important; font-weight: 800 !important; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s;
}
.sg-theme-reviews #product-reviews > form[method="GET"] button[type="submit"]:hover { background: #fff !important; color: var(--rv-red) !important; opacity: 1 !important; }

/* Review cards, two per row */
.sg-theme-reviews #product-reviews > article {
    grid-column: span 6; align-self: stretch; display: flex !important; flex-direction: column; gap: 10px;
    padding: 26px 28px !important; border: 1px solid var(--rv-line) !important; background: #fff; transition: border-color .2s, box-shadow .2s;
}
.sg-theme-reviews #product-reviews > article:hover { border-color: #cdd3d9 !important; box-shadow: 0 14px 34px -22px rgba(20, 24, 29, .35); }
.sg-theme-reviews #product-reviews > article > * { margin: 0 !important; }
.sg-theme-reviews #product-reviews > article > p[aria-label] { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 17px !important; letter-spacing: 2px !important; line-height: 1; }
.sg-theme-reviews #product-reviews > article > p[aria-label] > span { color: var(--rv-red) !important; }
.sg-theme-reviews #product-reviews > article > h3 {
    color: var(--rv-ink) !important; font-family: inherit !important; font-size: 17px !important; font-weight: 800 !important; letter-spacing: -.01em !important;
    line-height: 1.3 !important; text-transform: none !important;
}
.sg-theme-reviews #product-reviews > article > p[style] { color: var(--rv-text) !important; font-size: 15px !important; line-height: 1.7 !important; }
.sg-theme-reviews #product-reviews > article > p:not([aria-label]):not([style]) {
    order: 5; margin-top: auto !important; padding-top: 16px; border-top: 1px solid var(--rv-line);
    color: transparent !important; font-size: 0 !important; line-height: 1.3;
}
.sg-theme-reviews #product-reviews > article > p:not([aria-label]):not([style]) > strong { color: var(--rv-ink); font-size: 14px; font-weight: 700; }
.sg-theme-reviews #product-reviews > article > aside {
    order: 4; padding: 14px 16px !important; border: 0 !important; border-left: 3px solid var(--rv-red) !important; border-radius: 0 !important; background: #fbf3f3 !important;
}
.sg-theme-reviews #product-reviews > article > aside > strong { display: block; color: transparent; font-size: 0; }
.sg-theme-reviews #product-reviews > article > aside > strong::before { content: "Reply from A-One Autos"; color: var(--rv-red); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sg-theme-reviews #product-reviews > article > aside > p { margin: 6px 0 0 !important; color: var(--rv-text) !important; font-size: 14px !important; line-height: 1.6 !important; }

/* Pagination + sign-in note */
.sg-theme-reviews #product-reviews > nav { grid-column: 1 / -1; display: flex !important; align-items: center; justify-content: center; gap: 10px !important; padding-top: 10px; color: var(--rv-muted); font-size: 14px; }
.sg-theme-reviews #product-reviews > nav a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border: 1px solid var(--rv-ink); color: var(--rv-ink) !important;
    font-size: 12px; font-weight: 800 !important; letter-spacing: .12em; text-decoration: none !important; text-transform: uppercase; transition: background .2s, color .2s;
}
.sg-theme-reviews #product-reviews > nav a:hover { background: var(--rv-ink); color: #fff !important; }
.sg-theme-reviews #product-reviews > p:last-child:not([aria-label]) {
    grid-column: 1 / -1; padding: 16px 20px !important; border: 1px dashed #cfd5db !important; border-radius: 0 !important; background: #fff !important;
    color: var(--rv-muted) !important; font-size: 14px !important; text-align: center;
}
.sg-theme-reviews #product-reviews > p:last-child a { color: var(--rv-red) !important; font-weight: 700 !important; }
/* Write-a-review form (only for eligible buyers) */
.sg-theme-reviews #product-reviews > form[data-review-form] { grid-column: 1 / -1; padding: 28px !important; border: 1px solid var(--rv-line); background: var(--rv-soft); }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
    .sg-theme-reviews #product-reviews > p[aria-label] { grid-column: 1 / span 4; }
    .sg-theme-reviews #product-reviews > dl { grid-column: 5 / span 8; }
    .sg-theme-reviews #product-reviews > form[method="GET"] { grid-row: 3; grid-column: 1 / -1; grid-template-columns: 1fr 1fr auto; align-items: end; }
    .sg-theme-reviews #product-reviews > form[method="GET"] button[type="submit"] { grid-column: auto; width: auto !important; }
}

/* ---------- Phone ---------- */
@media (max-width: 767px) {
    .sg-theme-reviews #product-reviews { grid-template-columns: minmax(0, 1fr); row-gap: 14px; width: calc(100% - 32px) !important; margin: 36px auto 44px !important; }
    .sg-theme-reviews #product-reviews > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
    .sg-theme-reviews #product-reviews > h2 { font-size: 28px !important; padding-bottom: 12px !important; }
    .sg-theme-reviews #product-reviews > p[aria-label] { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px !important; padding: 20px !important; border-bottom: 0 !important; }
    .sg-theme-reviews #product-reviews > p[aria-label] > span[aria-hidden] { flex-basis: 100%; }
    .sg-theme-reviews #product-reviews > p[aria-label] > strong { font-size: 48px !important; }
    .sg-theme-reviews #product-reviews > dl { margin-top: -14px !important; padding: 4px 20px 20px !important; border-top: 0 !important; }
    .sg-theme-reviews #product-reviews > form[method="GET"] { grid-template-columns: 1fr 1fr; padding: 18px !important; }
    .sg-theme-reviews #product-reviews > form[method="GET"] button[type="submit"] { grid-column: 1 / -1; width: 100% !important; }
    .sg-theme-reviews #product-reviews > article { padding: 20px !important; }
    .sg-theme-reviews #product-reviews > article > p[style] { font-size: 14.5px !important; }
    .aone-rating--pdp { margin-top: 14px; font-size: 13px; }
}

/* Tailwind's review rules carry attribute selectors + !important; out-rank them for the band margins. */
.sg-theme-reviews #product-reviews > :is(p[aria-label], dl, form[method="GET"], article, nav) { margin: 0 !important; }
@media (max-width: 767px) {
    .sg-theme-reviews #product-reviews > p[aria-label] { display: grid !important; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 12px !important; }
    .sg-theme-reviews #product-reviews > p[aria-label] > span[aria-hidden] { grid-column: 1 / -1; }
    .sg-theme-reviews #product-reviews > :is(dl) { margin-top: -14px !important; }
}
/* Any other platform paragraph (empty state, notices) spans the full row. */
.sg-theme-reviews #product-reviews > p:not([aria-label]) { grid-column: 1 / -1; }
.sg-theme-reviews #product-reviews > h2 + p:not([aria-label]) { padding: 28px !important; border: 1px solid var(--rv-line) !important; border-radius: 0 !important; background: var(--rv-soft) !important; color: var(--rv-muted) !important; font-size: 15px !important; text-align: center; }
@media (max-width: 767px) { .sg-theme-reviews #product-reviews > :is(dl) { margin-top: -15px !important; } }
@media (max-width: 767px) { .sg-theme-reviews #product-reviews > p[aria-label] + dl { margin-top: -14px !important; } }

/* Rating bars as star filters (links added by aone-reviews.js) */
.sg-theme-reviews #product-reviews > dl.aone-star-filter { gap: 2px !important; }
.sg-theme-reviews #product-reviews > dl.aone-star-filter > div { position: relative; margin: 0 -10px !important; padding: 7px 10px; transition: background-color .15s, opacity .15s, box-shadow .15s; }
.sg-theme-reviews #product-reviews .aone-star-link { color: inherit; text-decoration: none; }
.sg-theme-reviews #product-reviews .aone-star-link::after { content: ""; position: absolute; inset: 0; }
.sg-theme-reviews #product-reviews .aone-star-link:focus-visible { outline: none; }
.sg-theme-reviews #product-reviews > dl.aone-star-filter > div:has(.aone-star-link:focus-visible) { outline: 2px solid var(--rv-red); outline-offset: -2px; }
.sg-theme-reviews #product-reviews > dl.aone-star-filter > div:has(.aone-star-link):hover { background: #fff; box-shadow: inset 3px 0 0 var(--rv-red); }
.sg-theme-reviews #product-reviews > dl.aone-star-filter > div:has(.aone-star-link):hover dt { color: var(--rv-red); }
.sg-theme-reviews #product-reviews > dl.aone-star-filter > div.is-active { background: #fff; box-shadow: inset 3px 0 0 var(--rv-red); }
.sg-theme-reviews #product-reviews > dl.aone-star-filter > div.is-active dt { color: var(--rv-red); font-weight: 800; }
.sg-theme-reviews #product-reviews > dl.aone-star-filter > div.is-active dd:last-child::after { content: " \2715"; color: var(--rv-red); font-weight: 700; }
.sg-theme-reviews #product-reviews > dl.has-active > div:not(.is-active) { opacity: .5; }
.sg-theme-reviews #product-reviews > dl.has-active > div:not(.is-active):hover { opacity: 1; }
.sg-theme-reviews #product-reviews > dl.aone-star-filter > div.is-empty dt { color: var(--rv-muted); font-weight: 500; }

/* PDP: even rhythm title -> rating -> summary (the summary's own 19px top margin was sized for no rating) */
.vo-pdp-details .vo-content-block:has(.aone-rating--pdp) + * .aone-product-summary { margin-top: 12px; }