/* =========================================================================
 * Google Reviews widget – pixel-perfect dle dodaného designu
 * Namespace .grw aby nic neuniklo do theme.
 * ========================================================================= */

.grw {
    --grw-blue: #1a73e8;
    --grw-blue-hover: #1666d0;
    --grw-star: #fbbc04;
    --grw-star-empty: #dadce0;
    --grw-panel: #f5f6f7;
    --grw-card: #f6f7f8;
    --grw-text: #1f1f1f;
    --grw-muted: #5f6368;

    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 8px 0 32px;
    box-sizing: border-box;
    font-family: Roboto, Arial, "Helvetica Neue", Helvetica, sans-serif;
    color: var(--grw-text);
}
.grw *,
.grw *::before,
.grw *::after { box-sizing: border-box; }

/* Homepage: zarovnat obsah na stejný okraj jako ostatní bloky (.jms-row = 30px)
   + víc prostoru nad/pod, ať widget nenalepuje na sousední bloky. */
#gr_home { padding: 56px 30px; }

.grw-title {
    text-align: center;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 28px;
    color: var(--grw-text);
}

/* ---------- Header panel ---------- */
.grw-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: var(--grw-panel);
    border-radius: 16px;
    padding: 26px 32px;
    margin-bottom: 28px;
}
.grw-header-left { display: flex; flex-direction: column; gap: 10px; }

.grw-brand { display: flex; align-items: baseline; gap: 8px; }
.grw-wordmark { font-size: 24px; font-weight: 500; letter-spacing: -.5px; }
.grw-wordmark > span { font-weight: 500; }
.grw-brand-text { font-size: 22px; font-weight: 700; color: var(--grw-text); }

.grw-rating { display: flex; align-items: center; gap: 10px; }
.grw-rating-num { font-size: 22px; font-weight: 700; }

.grw-stars { position: relative; display: inline-block; font-size: 22px; line-height: 1; letter-spacing: 1px; }
.grw-stars-bg { color: var(--grw-star-empty); }
.grw-stars-fg {
    position: absolute; top: 0; left: 0; overflow: hidden; white-space: nowrap;
    color: var(--grw-star); width: var(--grw-fill, 100%);
}
.grw-rating-count { font-size: 14px; color: var(--grw-muted); }

/* Tlačítko „Zobrazit všechny recenze" – otevírá popup (product_rating.js).
   Je to <button>, proto resety navíc (cursor, font, appearance).
   Vzhled dle theme konvence červených tlačítek (custom.css .btn-success/
   .btn-contact): #ab0d09, hover invertuje do bílé s červeným textem,
   radius 3px (theme standard). Rámeček 1px stále, ať hover nemění rozměry. */
.grw-cta {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    background: #ab0d09; color: #fff;
    font-size: 15px; font-weight: 600;
    font-family: inherit;
    border: 1px solid #ab0d09; cursor: pointer;
    -webkit-appearance: none; appearance: none;
    padding: 12px 26px; border-radius: 3px;
    text-decoration: none; white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.grw-cta:hover { background: #fff; color: #ab0d09; text-decoration: none; }
/* :focus-visible, NE :focus – po zavření popupu se focus vrací na tlačítko
   a u myši by kroužek zůstal viset. Starší prohlížeče pravidlo zahodí a
   nechají výchozí UA focus ring (outline nikde nenulujeme). */
.grw-cta:focus-visible { outline: 2px solid #ab0d09; outline-offset: 2px; }

/* ---------- Carousel ---------- */
.grw-carousel-wrap { position: relative; }
.grw-track {
    display: flex; gap: 20px;
    overflow-x: auto; overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 6px;
    scrollbar-width: none;
}
.grw-track::-webkit-scrollbar { display: none; }

/* ---------- Card ---------- */
.grw-card {
    flex: 0 0 318px; width: 318px;
    background: var(--grw-card);
    border-radius: 12px;
    padding: 20px;
    scroll-snap-align: start;
    display: flex; flex-direction: column;
}

.grw-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

.grw-avatar { position: relative; flex: 0 0 auto; width: 40px; height: 40px; }
.grw-avatar > img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; }
.grw-avatar-initial {
    width: 40px; height: 40px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center;
    color: #fff; font-size: 18px; font-weight: 600; line-height: 1;
    text-transform: uppercase; user-select: none;
}
.grw-avatar-g {
    position: absolute; right: -2px; bottom: -2px;
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 1.5px #fff;
}

.grw-card-meta { display: flex; flex-direction: column; gap: 2px; }
.grw-card-name { display: flex; align-items: center; gap: 5px; font-size: 16px; font-weight: 600; }
.grw-verified { display: inline-flex; }
.grw-card-when { font-size: 13px; color: var(--grw-muted); }

.grw-card-stars { display: flex; gap: 1px; margin-bottom: 12px; font-size: 18px; line-height: 1; }
.grw-star { color: var(--grw-star-empty); }
.grw-star.is-on { color: var(--grw-star); }

.grw-card-text {
    font-size: 15px; line-height: 1.5; color: var(--grw-text);
    overflow: hidden;
    display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 12;
}
.grw-card.is-expanded .grw-card-text { -webkit-line-clamp: unset; }

.grw-readmore {
    align-self: flex-start;
    background: none; border: 0; padding: 4px 0 0;
    color: var(--grw-blue); font-size: 15px; cursor: pointer;
}
.grw-readmore:hover { text-decoration: underline; }

/* ---------- Photos ---------- */
.grw-photos { display: grid; gap: 8px; margin-top: 14px; }
.grw-photos--1 { grid-template-columns: 1fr; }
.grw-photos--2,
.grw-photos--3,
.grw-photos--4 { grid-template-columns: 1fr 1fr; }

.grw-photo { position: relative; display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 1 / 1.18; }
.grw-photo > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grw-photo-more {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.5); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 700;
}

/* ---------- Nav arrows ---------- */
.grw-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border-radius: 50%;
    border: 0; background: #9aa0a6; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 2; opacity: .9;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.grw-nav:hover { opacity: 1; }
.grw-nav--prev { left: -10px; }
.grw-nav--next { right: -10px; }
.grw-nav[disabled] { opacity: .35; cursor: default; }

/* ---------- Dots ---------- */
.grw-dots { display: flex; justify-content: center; gap: 7px; margin-top: 18px; }
.grw-dot { width: 8px; height: 8px; border-radius: 50%; background: #c4c7c9; border: 0; padding: 0; cursor: pointer; }
.grw-dot.is-active { background: #5f6368; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .grw-title { font-size: 24px; }
    .grw-header { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px; }
    .grw-cta { width: 100%; } /* header stackuje do sloupce → full-width pill */
    .grw-card { flex-basis: 82%; width: 82%; }
    .grw-nav { display: inline-flex; } /* šipky i na mobilu (jako na desktopu) */
    .grw-dots { display: none; }        /* tečky na mobilu skrýt */
}
