/*! iStage · Recenze produktů z Heureky · v1.0.0
 *  Styly k recenze.js – platí jen pro prvky, které skript vloží (sekce #recenze, souhrn pod názvem produktu,
 *  průměr na kartách v kategoriích), v české i slovenské verzi. ?rc=0 na konci adresy = bez recenzí.
 *  Písmo Poppins je ze složky homepage/fonts (načítá ho produkt.css / homepage.css).
 */

/* ---------- 0) Barvy a písmo (stejné jako detail produktu a sekce z redesignu) ---------- */
html.lng:not(.rc-off) {
  --rc-font: 'HP Poppins', 'Poppins', 'Nunito Sans', Arial, sans-serif;
  --rc-text: 'Nunito Sans', Arial, sans-serif;
  --rc-ink: #0b0d10; --rc-2: #55595f; --rc-3: #6b7079; --rc-line: #e2e2df; --rc-line-2: #cdcdc9; --rc-soft: #f7f7f5;
  --rc-star: #f6c546; --rc-star-off: #d9d9d5;           /* žlutá hvězd Shoptetu (karty a hodnocení vedle sebe vypadají stejně) */
  --rc-ok: #15803d; --rc-ok-bg: #e7f4ec; --rc-no: #d4121a; --rc-blue: #0063c7;
}

/* ---------- 1) Hvězdy po půlkách (výplň z --vi = celé hvězdy a --vf = zbytek) ---------- */
html.lng:not(.rc-off) .rc-stars {
  --s: 14px; --g: 2px;
  display: inline-block; flex: 0 0 auto; width: calc(5 * var(--s) + 4 * var(--g)); height: var(--s); vertical-align: middle;
  background: linear-gradient(90deg, var(--rc-star) calc(var(--vi, 0) * (var(--s) + var(--g)) + var(--vf, 0) * var(--s)), var(--rc-star-off) 0);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' preserveAspectRatio='xMinYMid meet'%3E%3Cpath d='M12 1.8l3.1 6.4 7 1-5.1 4.9 1.2 7L12 17.8l-6.2 3.3 1.2-7L1.9 9.2l7-1z'/%3E%3C/svg%3E") 0 0 / calc(var(--s) + var(--g)) var(--s) repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' preserveAspectRatio='xMinYMid meet'%3E%3Cpath d='M12 1.8l3.1 6.4 7 1-5.1 4.9 1.2 7L12 17.8l-6.2 3.3 1.2-7L1.9 9.2l7-1z'/%3E%3C/svg%3E") 0 0 / calc(var(--s) + var(--g)) var(--s) repeat-x;
}
html.lng:not(.rc-off) .rc-stars-lg { --s: 22px; --g: 3px; }
html.lng:not(.rc-off) .rc-ico { display: inline-block; flex: 0 0 auto; width: 16px; height: 16px; vertical-align: middle; }

/* ---------- 2) Detail produktu – souhrn pod názvem (stejný řádek jako hvězdy Shoptetu, stejná výška) ---------- */
html.lng:not(.rc-off) .type-detail .stars-wrapper.rc-has { flex-wrap: nowrap !important; }
/* „Kód produktu“ byl pod hvězdami na dalším řádku → zůstane tam (výška řádků se nezmění) */
html.lng:not(.rc-off) .type-detail .stars-wrapper.rc-has.rc-wrap { flex: 0 0 100%; max-width: 100%; }
html.lng:not(.rc-off) .type-detail .stars-wrapper.rc-has > :not(.rc-sum) { display: none !important; }
html.lng:not(.rc-off) .type-detail a.rc-sum {
  display: inline-flex; align-items: center; gap: 7px; height: 18px; margin: 0; padding: 0; overflow: hidden; white-space: nowrap;
  font: 600 13px/18px var(--rc-text); color: var(--rc-2) !important; text-decoration: none !important;
}
html.lng:not(.rc-off) .type-detail a.rc-sum strong { font-weight: 800; color: var(--rc-ink); }
html.lng:not(.rc-off) .type-detail a.rc-sum > span:last-child { text-decoration: underline; text-decoration-color: var(--rc-line-2); text-underline-offset: 3px; }
html.lng:not(.rc-off) .type-detail a.rc-sum:hover > span:last-child { color: var(--rc-ink); text-decoration-color: currentColor; }
html.lng:not(.rc-off) .type-detail a.rc-sum:focus-visible { outline: 3px solid var(--rc-blue); outline-offset: 2px; border-radius: 4px; }

/* ---------- 3) Detail produktu – sekce „Recenze zákazníků“ (nad popisem produktu) ---------- */
html.lng:not(.rc-off) .rc-sec {
  clear: both; margin: 8px 0 44px; padding: 0; color: var(--rc-ink); font-family: var(--rc-text); -webkit-font-smoothing: antialiased;
  scroll-margin-top: 16px;
}
html.lng:not(.rc-off) .rc-sec :is(p, ul, ol, li, h2) { margin: 0; padding: 0; }
html.lng:not(.rc-off) .rc-sec :is(ul, ol) { list-style: none; }
html.lng:not(.rc-off) .rc-sec li::before, html.lng:not(.rc-off) .rc-sec li::after { content: none; }
html.lng:not(.rc-off) .rc-sec .rc-head { margin: 0 0 20px; }
html.lng:not(.rc-off) .rc-sec .rc-eyebrow { margin: 0 0 6px; font: 600 12px/1.5 var(--rc-font); letter-spacing: .09em; text-transform: uppercase; color: var(--rc-3); }
html.lng:not(.rc-off) .rc-sec h2.rc-title {
  margin: 0 !important; padding: 0 !important; border: 0; font-family: var(--rc-font) !important; font-size: 30px !important; font-weight: 600 !important;
  line-height: 1.15 !important; letter-spacing: -.02em; text-align: left; text-transform: none !important; color: var(--rc-ink) !important;
}
html.lng:not(.rc-off) .rc-sec h2.rc-title::before, html.lng:not(.rc-off) .rc-sec h2.rc-title::after { content: none !important; }
html.lng:not(.rc-off) .rc-sec h2.rc-title:focus { outline: 0; }

html.lng:not(.rc-off) .rc-sec .rc-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }

/* souhrn vlevo */
html.lng:not(.rc-off) .rc-sec .rc-card {
  position: sticky; top: 16px; display: grid; grid-template-columns: minmax(0, 1fr);
  padding: 24px; border: 1px solid var(--rc-line); border-radius: 20px; background: var(--rc-soft);
}
html.lng:not(.rc-off) .rc-sec .rc-big { display: flex; align-items: baseline; gap: 6px; margin: 0 0 8px; }
html.lng:not(.rc-off) .rc-sec .rc-big strong { font: 700 52px/1 var(--rc-font); letter-spacing: -.03em; color: var(--rc-ink); }
html.lng:not(.rc-off) .rc-sec .rc-big span { font-size: 15px; font-weight: 600; color: var(--rc-3); }
html.lng:not(.rc-off) .rc-sec .rc-cnt { margin: 10px 0 18px; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--rc-2); }
html.lng:not(.rc-off) .rc-sec .rc-dist { display: grid; gap: 7px; margin: 0 0 18px; }
html.lng:not(.rc-off) .rc-sec .rc-dist li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 22px; align-items: center; gap: 10px; font-size: 13px; line-height: 1; }
html.lng:not(.rc-off) .rc-sec .rc-dk { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--rc-2); }
html.lng:not(.rc-off) .rc-sec .rc-dk .rc-ico { width: 12px; height: 12px; color: var(--rc-star); }
html.lng:not(.rc-off) .rc-sec .rc-bar { display: block; height: 8px; overflow: hidden; border-radius: 99px; background: #e6e6e2; }
html.lng:not(.rc-off) .rc-sec .rc-bar i { display: block; height: 100%; border-radius: inherit; background: var(--rc-star); }
html.lng:not(.rc-off) .rc-sec .rc-dc { text-align: right; font-weight: 600; color: var(--rc-3); }
html.lng:not(.rc-off) .rc-sec .rc-src {
  display: flex; align-items: center; gap: 8px; padding: 14px 0 0; border-top: 1px solid var(--rc-line);
  font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--rc-2);
}
html.lng:not(.rc-off) .rc-sec .rc-src .rc-ico { width: 18px; height: 18px; color: var(--rc-ok); }
html.lng:not(.rc-off) .rc-sec .rc-shop { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--rc-3); }
html.lng:not(.rc-off) .rc-sec .rc-shop strong { color: var(--rc-2); }
html.lng:not(.rc-off) .rc-sec .rc-shopbtn {
  margin: 0; padding: 0; border: 0; background: none; font: inherit; color: var(--rc-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}

/* recenze */
html.lng:not(.rc-off) .rc-sec .rc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
html.lng:not(.rc-off) .rc-sec .rc-item {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 20px 22px;
  border: 1px solid var(--rc-line); border-radius: 20px; background: #fff;
}
html.lng:not(.rc-off) .rc-sec .rc-item[hidden] { display: none !important; }
html.lng:not(.rc-off) .rc-sec .rc-item:focus { outline: 0; }
html.lng:not(.rc-off) .rc-sec .rc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
html.lng:not(.rc-off) .rc-sec .rc-top time { font-size: 12.5px; font-weight: 600; color: var(--rc-3); white-space: nowrap; }
html.lng:not(.rc-off) .rc-sec .rc-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; line-height: 1.4; color: var(--rc-2); }
html.lng:not(.rc-off) .rc-sec .rc-who strong { font-weight: 800; color: var(--rc-ink); }
html.lng:not(.rc-off) .rc-sec .rc-ok { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--rc-ok); }
html.lng:not(.rc-off) .rc-sec .rc-ok .rc-ico { width: 14px; height: 14px; }
html.lng:not(.rc-off) .rc-sec :is(.rc-yes, .rc-no) {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 800; line-height: 1.3;
}
html.lng:not(.rc-off) .rc-sec .rc-yes { background: var(--rc-ok-bg); color: var(--rc-ok); }
html.lng:not(.rc-off) .rc-sec .rc-yes .rc-ico { width: 13px; height: 13px; }
html.lng:not(.rc-off) .rc-sec .rc-no { background: #f1f1ef; color: var(--rc-2); }
html.lng:not(.rc-off) .rc-sec .rc-text { font-size: 14.5px; line-height: 1.6; color: var(--rc-ink); overflow-wrap: anywhere; }
html.lng:not(.rc-off) .rc-sec .rc-empty { font-size: 13.5px; font-style: italic; line-height: 1.5; color: var(--rc-3); }
html.lng:not(.rc-off) .rc-sec .rc-pc { display: grid; gap: 5px; }
html.lng:not(.rc-off) .rc-sec .rc-pc li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.5; color: var(--rc-ink); overflow-wrap: anywhere; }
html.lng:not(.rc-off) .rc-sec .rc-pc .rc-ico { width: 16px; height: 16px; margin-top: 2px; }
html.lng:not(.rc-off) .rc-sec .rc-pros .rc-ico { color: var(--rc-ok); }
html.lng:not(.rc-off) .rc-sec .rc-cons .rc-ico { color: var(--rc-no); }

html.lng:not(.rc-off) .rc-sec .rc-more {
  display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 12px 22px;
  border: 1px solid var(--rc-line-2); border-radius: 99px; background: #fff; box-shadow: none;
  font: 700 14px/1.2 var(--rc-text); color: var(--rc-ink); cursor: pointer; transition: border-color .15s, background .15s;
}
html.lng:not(.rc-off) .rc-sec .rc-more:hover { border-color: var(--rc-ink); background: var(--rc-soft); }
html.lng:not(.rc-off) .rc-sec .rc-more[hidden] { display: none; }
html.lng:not(.rc-off) .rc-sec :is(.rc-more, .rc-shopbtn):focus-visible { outline: 3px solid var(--rc-blue); outline-offset: 2px; }
html.lng:not(.rc-off) .rc-sec .rc-note { max-width: 980px; margin: 20px 0 0; font-size: 12px; line-height: 1.55; color: var(--rc-3); }

/* tablet a mobil: souhrn nahoře (číslo + hvězdy vlevo, rozložení vpravo), recenze pod sebou */
@media (max-width: 991px) {
  html.lng:not(.rc-off) .rc-sec .rc-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  html.lng:not(.rc-off) .rc-sec .rc-card {
    position: static; grid-template-columns: auto minmax(0, 1fr); column-gap: 28px;
    grid-template-areas: "big dist" "stars dist" "cnt dist" "src src" "shop shop";
  }
  html.lng:not(.rc-off) .rc-sec .rc-big { grid-area: big; }
  html.lng:not(.rc-off) .rc-sec .rc-card > .rc-stars { grid-area: stars; }
  html.lng:not(.rc-off) .rc-sec .rc-cnt { grid-area: cnt; margin-bottom: 16px; }
  html.lng:not(.rc-off) .rc-sec .rc-dist { grid-area: dist; align-self: center; margin: 0 0 16px; }
  html.lng:not(.rc-off) .rc-sec .rc-src { grid-area: src; }
  html.lng:not(.rc-off) .rc-sec .rc-shop { grid-area: shop; }
  html.lng:not(.rc-off) .rc-sec .rc-list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 767px) {
  html.lng:not(.rc-off) .rc-sec { margin: 0 0 32px; }
  html.lng:not(.rc-off) .rc-sec h2.rc-title { font-size: 25px !important; }
  html.lng:not(.rc-off) .rc-sec .rc-head { margin-bottom: 16px; }
  html.lng:not(.rc-off) .rc-sec .rc-card { padding: 18px; column-gap: 20px; border-radius: 16px; }
  html.lng:not(.rc-off) .rc-sec .rc-big strong { font-size: 44px; }
  html.lng:not(.rc-off) .rc-sec .rc-stars-lg { --s: 18px; --g: 2px; }
  html.lng:not(.rc-off) .rc-sec .rc-dist li { grid-template-columns: 30px minmax(0, 1fr) 18px; gap: 8px; }
  html.lng:not(.rc-off) .rc-sec .rc-item { padding: 16px 18px; border-radius: 16px; }
  html.lng:not(.rc-off) .rc-sec .rc-more { width: 100%; justify-content: center; }
}

/* ---------- 4) Karty v kategoriích – „★ 4,7 (10)“ vpravo v řádku se značkou (výška řádku jako modul kategorie) ---------- */
html.lng:not(.rc-off) body.type-category .kt-brand.rc-in { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-overflow: clip; }
html.lng:not(.rc-off) body.type-category .kt-brand.rc-in .rc-bn { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
html.lng:not(.rc-off) body.type-category .rc-row { display: flex; align-items: center; justify-content: flex-end; height: 18px; margin: 0; overflow: hidden; }
/* kdyby modul kategorie značku doplnil až po nás, řádek se nezdvojí */
html.lng:not(.rc-off) body.type-category .kt-brand ~ .rc-row { display: none; }
html.lng:not(.rc-off) body.type-category .rc-cr {
  display: inline-flex; flex: 0 0 auto; align-items: center; gap: 3px; margin-left: auto;
  font: 800 12px/1 var(--rc-text); letter-spacing: 0; text-transform: none; white-space: nowrap; color: var(--rc-ink);
}
html.lng:not(.rc-off) body.type-category .rc-cr > span:not(.rc-stars) { margin-left: 1px; font-weight: 600; color: var(--rc-3); }
html.lng:not(.rc-off) body.type-category .rc-cr .rc-ico { width: 13px; height: 13px; color: var(--rc-star); }
/* karta s hodnocením Shoptetu: průměr z Heureky ve stejném řádku místo jeho hvězd */
html.lng:not(.rc-off) body.type-category .stars-wrapper.rc-has > :not(.rc-cr) { display: none !important; }
html.lng:not(.rc-off) body.type-category .stars-wrapper.rc-has .rc-cr { margin-left: 0; }
html.lng:not(.rc-off) body.type-category .rc-cr5 { gap: 6px; font-size: 12.5px; font-weight: 700; }
html.lng:not(.rc-off) body.type-category .rc-cr5 .rc-stars { --s: 17px; --g: 1.75px; }   /* 92 × 17 px jako hvězdy Shoptetu vedle */
html.lng:not(.rc-off) body.type-category .rc-cr5 > span:not(.rc-stars) { margin-left: -3px; }
@media (max-width: 767px) {
  html.lng:not(.rc-off) body.type-category .rc-row { height: 16px; }
  html.lng:not(.rc-off) body.type-category .rc-cr { font-size: 11.5px; }
  html.lng:not(.rc-off) body.type-category .rc-cr .rc-ico { width: 12px; height: 12px; }
}
