/* GH Reviews — minimalistyczny styl pod sekcje "Opinie klientow".
   Bazowe .ghr-* = karta produktu (nadpisywane przez catalog.css);
   scope .ghr-page = podstrona opinie.php (ciemny premium + light).
   (2026-08: usunięto osierocone style legacy — summary/paginator/search/wrap.) */

.ghr-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2em;
    color: #2a8a3e;
    font-weight: 600;
    font-size: 0.95em;
}
.ghr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.2em;
}

.ghr-card {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 1em 1.1em;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    transition: box-shadow 0.15s ease;
}
.ghr-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.ghr-head {
    font-size: 0.92em;
    color: #444;
    line-height: 1.4;
}
.ghr-head .ghr-sku {
    display: block;
    font-weight: 600;
}
.ghr-head .ghr-desc {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-top: 0.15em;
}
.ghr-sku-type { color: #222; font-weight: 700; }
.ghr-sku-code {
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    color: #0073aa;
    text-decoration: none;
    border-bottom: 1px dotted transparent;
    transition: border-color 0.1s ease;
}
.ghr-sku-code:hover {
    color: #005a87;
    border-bottom-color: currentColor;
}
.ghr-sku-qty  { color: #888; font-weight: 500; font-size: 0.92em; }
.ghr-sku-plus { color: #aaa; font-weight: 400; margin: 0 0.15em; }

.ghr-rating {
    color: #f5a623;
    font-size: 1.1em;
    letter-spacing: 1px;
}

.ghr-text {
    margin: 0;
    padding: 0.4em 0;
    border-left: 3px solid #f5a623;
    padding-left: 0.8em;
    color: #222;
    font-style: italic;
    line-height: 1.4;
}

.ghr-orig {
    font-size: 0.78em;
    color: #999;
    cursor: help;
}

.ghr-pics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
}
.ghr-thumb {
    display: block;
    width: 70px;
    height: 70px;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #ddd;
}
.ghr-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}
.ghr-thumb:hover img { transform: scale(1.08); }

.ghr-foot {
    margin-top: auto;
    padding-top: 0.4em;
    border-top: 1px dashed #eee;
    font-size: 0.8em;
    color: #777;
}
.ghr-foot .ghr-author { font-weight: 600; }
.ghr-foot .ghr-author[data-full] {
    cursor: pointer;
    border-bottom: 1px dotted #aaa;
    transition: color 0.12s ease, border-color 0.12s ease;
}
.ghr-foot .ghr-author[data-full]:hover,
.ghr-foot .ghr-author[data-full]:focus {
    color: #0064d2;
    border-bottom-color: #0064d2;
    outline: none;
}
.ghr-foot .ghr-author-revealed { color: #444; }

.ghr-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2em;
    color: #999;
    font-style: italic;
}

@media (max-width: 480px) {
    .ghr-grid { grid-template-columns: 1fr; }
    .ghr-thumb { width: 60px; height: 60px; }
}

/* ============================================================
   LIGHTBOX MODAL — pelno-ekranowy podglad zdjec opinii
   ============================================================ */
.ghr-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    padding: 2vh 2vw;
    user-select: none;
}
.ghr-lightbox.ghr-lb-open { display: flex; }

.ghr-lb-img {
    max-width: 96vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    transition: opacity 0.18s ease;
    cursor: zoom-out;
}

.ghr-lb-close, .ghr-lb-prev, .ghr-lb-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 0;
    cursor: pointer;
    font-size: 1.6em;
    line-height: 1;
    padding: 0;
    border-radius: 50%;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ghr-lb-close:hover, .ghr-lb-prev:hover, .ghr-lb-next:hover {
    background: rgba(255, 255, 255, 0.28);
}
.ghr-lb-close {
    top: 1.5vh; right: 2vw;
    width: 44px; height: 44px;
    font-size: 1.8em;
}
.ghr-lb-prev, .ghr-lb-next {
    top: 50%;
    transform: translateY(-50%);
    width: 56px; height: 56px;
    font-size: 2.4em;
}
.ghr-lb-prev { left: 2vw; }
.ghr-lb-next { right: 2vw; }

.ghr-lb-counter {
    position: absolute;
    bottom: 2vh;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.35em 0.8em;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 500;
}

.ghr-lb-spinner {
    display: none;
    position: absolute;
    width: 48px; height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ghr-lb-spin 0.8s linear infinite;
}
.ghr-lightbox.ghr-lb-loading .ghr-lb-spinner { display: block; }
@keyframes ghr-lb-spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
    .ghr-lb-prev, .ghr-lb-next { width: 44px; height: 44px; font-size: 1.8em; }
    .ghr-lb-close { width: 38px; height: 38px; font-size: 1.5em; }
}

/* ============================================================
   OPINIE.PHP — ciemny motyw premium (scope .ghr-page)
   Wspólny markup kart; tu tylko wygląd: wyciszone gwiazdki
   (każda karta = 5*), cytat bohaterem z pomarańczową linią,
   hover = wyłącznie rozjaśnienie borderu (bez lift/glow).
   ============================================================ */
.ghr-page .ghr-grid { gap: 1rem; }
.ghr-page .ghr-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    padding: 1.1rem 1.25rem;
    gap: 0.6rem;
    transition: border-color 0.3s ease;
}
.ghr-page .ghr-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: none;
}
.ghr-page .ghr-head { color: rgba(255, 255, 255, 0.62); font-size: 11px; }
.ghr-page .ghr-sku-type { color: rgba(255, 255, 255, 0.72); font-weight: 600; }
.ghr-page .ghr-sku-code { color: rgba(255, 102, 0, 0.85); }
.ghr-page .ghr-sku-code:hover { color: var(--primary-color, #ff6600); border-bottom-color: currentColor; }
.ghr-page .ghr-sku-qty { color: rgba(255, 255, 255, 0.45); }
.ghr-page .ghr-sku-plus { color: rgba(255, 255, 255, 0.3); }
.ghr-page .ghr-desc {
    color: rgba(255, 255, 255, 0.38);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ghr-page .ghr-rating {
    color: rgba(255, 255, 255, 0.45);
    font-size: 10px;
    letter-spacing: 0.2em;
}
.ghr-page .ghr-text {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9375rem;
    line-height: 1.55;
    border-left-color: var(--primary-color, #ff6600);
    padding-left: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ghr-page .ghr-orig {
    color: rgba(255, 255, 255, 0.35);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}
.ghr-page .ghr-thumb { border-color: rgba(255, 255, 255, 0.08); border-radius: 2px; }
.ghr-page .ghr-foot {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    padding-top: 0.6rem;
}
.ghr-page .ghr-author[data-full] { border-bottom-color: rgba(255, 255, 255, 0.3); }
.ghr-page .ghr-author[data-full]:hover,
.ghr-page .ghr-author[data-full]:focus {
    color: #fff;
    border-bottom-color: #fff;
}
.ghr-page .ghr-author-revealed { color: rgba(255, 255, 255, 0.82); }
.ghr-page .ghr-verified-badge {
    color: #7dcf8a;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.ghr-page .ghr-empty { color: rgba(255, 255, 255, 0.45); font-style: normal; }

/* Tier "Wyróżnione": 2 karty full-width, na lg układ split zdjęcia|treść
   (CSS reorder wspólnego markupu; pierwsze zdjęcie duże, reszta jako pasek). */
.ghr-page .ghr-featured { display: grid; gap: 1rem; }
.ghr-page .ghr-featured .ghr-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    padding: 1.75rem;
}
.ghr-page .ghr-featured .ghr-text {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    font-size: 1.125rem;
    line-height: 1.6;
}
@media (min-width: 1024px) {
    .ghr-page .ghr-featured .ghr-card {
        display: grid;
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        grid-template-rows: auto auto 1fr auto auto;
        grid-template-areas:
            "pics head"
            "pics rating"
            "pics text"
            "pics orig"
            "pics foot";
        column-gap: 2rem;
        row-gap: 0.6rem;
        padding: 2rem;
    }
    .ghr-page .ghr-featured .ghr-head { grid-area: head; }
    .ghr-page .ghr-featured .ghr-rating { grid-area: rating; }
    .ghr-page .ghr-featured .ghr-text { grid-area: text; }
    .ghr-page .ghr-featured .ghr-orig { grid-area: orig; }
    .ghr-page .ghr-featured .ghr-foot { grid-area: foot; align-self: end; }
    .ghr-page .ghr-featured .ghr-pics {
        grid-area: pics;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
        align-content: start;
    }
    .ghr-page .ghr-featured .ghr-pics .ghr-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
    .ghr-page .ghr-featured .ghr-pics .ghr-thumb:first-child {
        grid-column: 1 / -1;
        aspect-ratio: 4 / 3;
    }
}

/* Statystyki — liczby w proof-point; chip źródła */
#opinie-stats .ghr-stat-num {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    text-transform: none;
    line-height: 1.15;
    margin-bottom: 0.4rem;
}
@media (min-width: 768px) {
    #opinie-stats .ghr-stat-num {
        font-size: 2rem;
    }
}

#opinie-source .ghr-source-check {
    color: #ff6600;
    border: none;
    background: transparent;
}
#opinie-source .ghr-source-quote {
    color: rgba(156, 163, 175, 1);
}

/* Light: kolory jak w dark (#manifest) — nadpisanie remapów .ghr-page */
html[data-theme="light"] #opinie-source,
html[data-theme="light"] #opinie-source .ghr-source-eyebrow,
html[data-theme="light"] #opinie-source .ghr-source-title,
html[data-theme="light"] #opinie-source .ghr-source-title > span:last-child,
html[data-theme="light"] #opinie-source .text-white,
html[data-theme="light"] #opinie-source .text-gray-500,
html[data-theme="light"] #opinie-source .text-gray-400,
html[data-theme="light"] #opinie-source .text-white\/70,
html[data-theme="light"] #opinie-source [class*="text-white/70"],
html[data-theme="light"] #opinie-source p {
    color: #ffffff !important;
}
html[data-theme="light"] #opinie-source .ghr-source-eyebrow,
html[data-theme="light"] #opinie-source .text-gray-500 {
    color: #9ca3af !important;
}
html[data-theme="light"] #opinie-source .ghr-source-quote,
html[data-theme="light"] #opinie-source .text-gray-400 {
    color: rgba(255, 255, 255, 0.82) !important;
}
html[data-theme="light"] #opinie-source .ghr-source-check {
    color: #ff6600 !important;
    border: none !important;
    background: transparent !important;
}
html[data-theme="light"] #opinie-source [class*="text-white/70"] {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Toolbar: szukajka + „Pokaż kolejne” (oba motywy) */
.ghr-page .ghr-more-btn {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    background: transparent;
}
.ghr-page .ghr-more-btn:hover,
.ghr-page .ghr-more-btn:focus-visible {
    background: #fff;
    color: #0a0a0a;
    border-color: #fff;
    outline: none;
}
.ghr-page .ghr-search-input:focus {
    border-color: var(--primary-color, #ff6600);
}

/* ============================================================
   OPINIE.PHP — motyw jasny (html[data-theme="light"])
   Jak aktualności / o-nas: białe karty, atrament, outline CTA.
   ============================================================ */
html[data-theme="light"] .ghr-page .ghr-card {
    background: #fff;
    border-color: rgba(18, 18, 18, 0.08);
}
html[data-theme="light"] .ghr-page .ghr-card:hover {
    border-color: rgba(18, 18, 18, 0.18);
    box-shadow: none;
}
html[data-theme="light"] .ghr-page .ghr-head { color: #868e96; }
html[data-theme="light"] .ghr-page .ghr-sku-type { color: #495057; }
html[data-theme="light"] .ghr-page .ghr-sku-code { color: var(--primary-color, #ff6600); }
html[data-theme="light"] .ghr-page .ghr-sku-code:hover {
    color: #121212;
    border-bottom-color: #121212;
}
html[data-theme="light"] .ghr-page .ghr-sku-qty { color: #868e96; }
html[data-theme="light"] .ghr-page .ghr-sku-plus { color: #adb5bd; }
html[data-theme="light"] .ghr-page .ghr-desc { color: #868e96; }
html[data-theme="light"] .ghr-page .ghr-rating { color: #adb5bd; }
html[data-theme="light"] .ghr-page .ghr-text { color: #121212; }
html[data-theme="light"] .ghr-page .ghr-orig { color: #868e96; }
html[data-theme="light"] .ghr-page .ghr-thumb { border-color: rgba(18, 18, 18, 0.1); }
html[data-theme="light"] .ghr-page .ghr-foot {
    border-top-color: rgba(18, 18, 18, 0.08);
    color: #868e96;
}
html[data-theme="light"] .ghr-page .ghr-author[data-full] { border-bottom-color: rgba(18, 18, 18, 0.35); }
html[data-theme="light"] .ghr-page .ghr-author[data-full]:hover,
html[data-theme="light"] .ghr-page .ghr-author[data-full]:focus {
    color: #121212;
    border-bottom-color: #121212;
}
html[data-theme="light"] .ghr-page .ghr-author-revealed { color: #121212; }
html[data-theme="light"] .ghr-page .ghr-verified-badge { color: #2f9e44; }
html[data-theme="light"] .ghr-page .ghr-empty { color: #868e96; }

html[data-theme="light"] .ghr-page .ghr-featured .ghr-card {
    background: #fff;
    border-color: rgba(18, 18, 18, 0.12);
}

/* Toolbar / chrome Tailwind w light */
html[data-theme="light"] .ghr-page .border-white\/5,
html[data-theme="light"] .ghr-page .border-white\/10,
html[data-theme="light"] .ghr-page .border-white\/15,
html[data-theme="light"] .ghr-page .border-white\/20 {
    border-color: rgba(18, 18, 18, 0.1) !important;
}
html[data-theme="light"] .ghr-page .text-white\/40,
html[data-theme="light"] .ghr-page .text-white\/55 {
    color: #868e96 !important;
}
html[data-theme="light"] .ghr-page .ghr-search-input {
    background: #fff !important;
    border-color: rgba(18, 18, 18, 0.15) !important;
    color: #121212 !important;
}
html[data-theme="light"] .ghr-page .ghr-search-input::placeholder {
    color: #adb5bd;
}
html[data-theme="light"] .ghr-page .ghr-search-input:focus {
    border-color: var(--primary-color, #ff6600) !important;
}
html[data-theme="light"] .ghr-page .ghr-more-btn {
    color: #121212 !important;
    border-color: rgba(18, 18, 18, 0.22) !important;
    background: transparent !important;
}
html[data-theme="light"] .ghr-page .ghr-more-btn:hover,
html[data-theme="light"] .ghr-page .ghr-more-btn:focus-visible {
    background: #121212 !important;
    color: #fff !important;
    border-color: #121212 !important;
}
