/* GH Catalog - styl publicznego katalogu produktow GH na gh-parts.eu
   Iteracja 1: bazowa stylistyka, dopasowanie do gh-parts.eu w iteracji 4. */

.ghc-wrap, .ghc-detail, .ghc-not-found {
    max-width: 1400px;
    margin: 2em auto;
    font-family: inherit;
}

/* Theme gh-parts.eu domyslnie owija content w col-lg-9 mx-auto = 75% Bootstrap container.
   Dla katalogu (gdzie chcemy wiecej szerokosci na grid + tabele OE) wymuszamy full-width.
   Class .ghc-catalog-fullwidth dodaje filter body_class w PHP. */
body.ghc-catalog-fullwidth .col-lg-9.mx-auto,
body.ghc-catalog-fullwidth .col-12.col-lg-9 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0.5em !important;
    padding-right: 0.5em !important;
}
body.ghc-catalog-fullwidth .container,
body.ghc-catalog-fullwidth .container-lg,
body.ghc-catalog-fullwidth .container-xl {
    max-width: 1400px !important;
}
body.ghc-catalog-fullwidth .gh-post-content {
    max-width: none !important;
}

/* ============================================================
   LISTING (3 zakladki: kod / pojazd / grupa)
   ============================================================ */
.ghc-tabs {
    display: flex;
    gap: 0.4em;
    border-bottom: 2px solid #ddd;
    margin-bottom: 1.2em;
}
.ghc-tab {
    background: transparent;
    border: 0;
    padding: 0.7em 1.2em;
    font-size: 1em;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.ghc-tab:hover { color: #0d6efd; }
.ghc-tab.is-active {
    color: #EE7202;
    border-bottom-color: #EE7202;
}

.ghc-tab-content[hidden] { display: none; }

.ghc-search-form {
    display: flex;
    gap: 0.6em;
    margin-bottom: 1.2em;
    flex-wrap: wrap;
}
.ghc-search-type {
    padding: 0.8em 1em;
    font-size: 0.95em;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    min-width: 180px;
}
.ghc-search-type:focus {
    border-color: #EE7202;
    outline: 0;
}
.ghc-search-input {
    flex: 1;
    min-width: 220px;
    padding: 0.8em 1em;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
}
.ghc-search-input:focus {
    border-color: #EE7202;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(238, 114, 2, 0.15);
}
.ghc-search-btn {
    padding: 0.8em 1.6em;
    background: #EE7202;
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}
.ghc-search-btn:hover { background: #c25d01; }

.ghc-search-results {
    /* Wrapper na .ghc-results-info + .ghc-results-grid + .ghc-load-more-wrap */
}
.ghc-results-info {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 0.8em;
}
.ghc-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1em;
}

/* ============================================================
   BOGATA KARTA WYNIKU - lista (numer + obrazek + opis)
   ============================================================ */
.ghc-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
}
.ghc-rc {
    display: grid;
    grid-template-columns: 160px 140px 1fr;
    gap: 1em;
    padding: 0.9em 1em;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
    align-items: start;
}
.ghc-rc:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-color: #f0d4b3;
}

.ghc-rc-num {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4em;
    text-decoration: none;
    color: inherit;
}
.ghc-rc-code {
    color: #0d6efd;
    font-weight: 700;
    font-size: 0.98em;
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    word-break: break-all;
}
.ghc-rc-num:hover .ghc-rc-code { text-decoration: underline; }
.ghc-rc-status {
    font-size: 0.75em;
    font-weight: 600;
    padding: 0.15em 0.55em;
    border-radius: 10px;
    background: #e9ecef;
    color: #495057;
}
.ghc-rc-st-warn { background: #fff3cd; color: #856404; }
.ghc-rc-st-bad  { background: #f8d7da; color: #721c24; }

.ghc-rc-img {
    aspect-ratio: 1 / 1;
    width: 100%;
    background: #f7f7f9;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}
.ghc-rc-img:hover { transform: scale(1.02); }
.ghc-rc-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.ghc-rc-img-broken { background: #f1f3f5; }
.ghc-rc-noimg {
    color: #adb5bd;
    font-size: 0.78em;
    font-style: italic;
    text-align: center;
}

.ghc-rc-info {
    display: flex;
    flex-direction: column;
    gap: 0.45em;
    min-width: 0;
}
.ghc-rc-title {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5em;
}
.ghc-rc-title:hover .ghc-rc-type { color: #0d6efd; text-decoration: underline; }
.ghc-rc-brand {
    color: #EE7202;
    font-weight: 700;
    font-size: 1em;
}
.ghc-rc-type {
    color: #2c3037;
    font-size: 0.95em;
    font-weight: 500;
}
.ghc-rc-desc-extra {
    color: #6c757d;
    font-style: italic;
    font-weight: 400;
    font-size: 0.88em;
}
.ghc-rc-found-via {
    font-size: 0.85em;
    color: #6c757d;
    line-height: 1.4;
}
.ghc-rc-found-via b { color: #495057; font-weight: 600; }
.ghc-rc-numbers {
    color: #0d6efd;
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    word-break: break-all;
}
.ghc-rc-criteria {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3em 0.9em;
    margin-top: 0.1em;
}
.ghc-rc-crit {
    font-size: 0.85em;
    color: #495057;
    line-height: 1.4;
}
.ghc-rc-crit b { color: #2c3037; font-weight: 600; }
.ghc-rc-crit-val { color: #495057; }
/* Kryteria typu boolean (V) bez wartosci - sama nazwa jako badge */
.ghc-rc-crit-flag .ghc-rc-crit-val {
    background: #f3f3f7;
    color: #495057;
    padding: 0.1em 0.55em;
    border-radius: 10px;
    font-size: 0.95em;
}
.ghc-rc-pack {
    font-size: 0.82em;
    color: #6c757d;
}
.ghc-rc-pack b { color: #495057; font-weight: 600; }

@media (max-width: 720px) {
    .ghc-rc {
        grid-template-columns: 1fr;
        gap: 0.6em;
    }
    .ghc-rc-num { flex-direction: row; align-items: center; }
    .ghc-rc-img {
        max-width: 200px;
        margin: 0 auto;
    }
}
.ghc-load-more-wrap {
    text-align: center;
    margin-top: 1.5em;
}
.ghc-load-more {
    padding: 0.7em 1.6em;
    background: #f3f3f7;
    color: #444;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.ghc-load-more:hover {
    background: #EE7202;
    color: #fff;
    border-color: #EE7202;
}
.ghc-result-card {
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 1em 1.2em;
    background: #fff;
    transition: box-shadow 0.15s ease;
}
.ghc-result-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.ghc-result-card a {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 600;
}
.ghc-result-card a:hover { text-decoration: underline; }
.ghc-result-card .ghc-rc-type {
    display: block;
    color: #444;
    font-size: 0.9em;
    margin-top: 0.3em;
}
.ghc-result-empty, .ghc-result-loading {
    text-align: center;
    padding: 2em;
    color: #999;
    font-style: italic;
}

.ghc-coming-soon {
    text-align: center;
    padding: 3em 1em;
    color: #888;
    background: #f7f7f9;
    border-radius: 6px;
}

/* ============================================================
   VEHICLE PICKER (kaskadowy: Producent -> Model -> Typ -> Kategoria)
   ============================================================ */
.ghc-vehicle-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.6em;
    margin-bottom: 1.5em;
}
.ghc-vp-select {
    padding: 0.7em 0.9em;
    font-size: 0.95em;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    width: 100%;
}
.ghc-vp-select:focus {
    border-color: #EE7202;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(238, 114, 2, 0.15);
}
.ghc-vp-select:disabled {
    background: #f7f7f9;
    color: #999;
    cursor: not-allowed;
}

/* ============================================================
   GROUP PICKER (autocomplete)
   ============================================================ */
.ghc-autocomplete {
    position: relative;
    margin-bottom: 1.5em;
}
.ghc-group-filter {
    width: 100%;
    padding: 0.8em 2.4em 0.8em 1em;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
}
.ghc-group-filter:focus {
    border-color: #EE7202;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(238, 114, 2, 0.15);
}
.ghc-ac-clear {
    position: absolute;
    right: 0.5em;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    color: #888;
    font-size: 1.4em;
    line-height: 1;
    cursor: pointer;
    padding: 0.2em 0.4em;
    border-radius: 50%;
}
.ghc-ac-clear:hover { background: #f3f3f7; color: #c25d01; }

.ghc-ac-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 380px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 50;
}
.ghc-ac-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8em;
    padding: 0.6em 0.9em;
    cursor: pointer;
    border-bottom: 1px solid #f3f3f3;
}
.ghc-ac-item:last-child { border-bottom: 0; }
.ghc-ac-item:hover, .ghc-ac-item.is-active {
    background: #fff5ec;
    color: #c25d01;
}
.ghc-ac-name { color: #2c3037; }
.ghc-ac-item:hover .ghc-ac-name, .ghc-ac-item.is-active .ghc-ac-name { color: #c25d01; }
.ghc-ac-count {
    background: #f3f3f7;
    color: #6c757d;
    font-size: 0.8em;
    padding: 0.15em 0.55em;
    border-radius: 10px;
    flex-shrink: 0;
}
.ghc-ac-item:hover .ghc-ac-count, .ghc-ac-item.is-active .ghc-ac-count {
    background: #EE7202;
    color: #fff;
}
.ghc-ac-hint {
    padding: 1em 0.9em;
    color: #999;
    font-style: italic;
    text-align: center;
}

/* ============================================================
   DETAIL VIEW
   ============================================================ */
.ghc-detail-back { margin-bottom: 0.6em; }
.ghc-detail-back a {
    color: #0d6efd;
    text-decoration: none;
    font-size: 0.88em;
}
.ghc-detail-back a:hover { text-decoration: underline; }

.ghc-detail-header {
    background: linear-gradient(135deg, #f7f7f9 0%, #fde8d3 100%);
    border-left: 4px solid #EE7202;
    padding: 0.9em 1.2em;
    border-radius: 8px;
    margin-bottom: 1em;
}
.ghc-detail-title {
    margin: 0 0 0.3em 0;
    font-size: 1.35em;
    line-height: 1.3;
}
.ghc-detail-type {
    color: #EE7202;
    font-weight: 700;
}
.ghc-detail-code {
    color: #444;
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 0.92em;
    margin-left: 0.4em;
}
.ghc-detail-mfr { font-size: 0.92em; color: #444; }
.ghc-detail-meta { margin-top: 0.3em; color: #888; font-size: 0.82em; }
.ghc-detail-st {
    margin-left: 0.6em;
    font-size: 0.78em;
    padding: 0.2em 0.6em;
    vertical-align: middle;
}

/* ============================================================
   VIDEO (YouTube embed)
   ============================================================ */
.ghc-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1em;
}
.ghc-video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
}
.ghc-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Pakowanie - kompaktowy box z labelka */
.ghc-packaging { color: #555; font-size: 0.95em; }
.ghc-packaging b { color: #2c3037; }

.ghc-section {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 1em 1.2em;
    margin-bottom: 0.8em;
}
.ghc-section h2 {
    margin: 0 0 0.6em 0;
    font-size: 1.05em;
    color: #EE7202;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eee;
}

/* Kryteria jako definition list w 2-kolumnowym gridzie. Linia siatki widoczna
   miedzy par <dt><dd>; ostatnia para bez bordera. */
dl.ghc-criteria {
    display: grid;
    grid-template-columns: minmax(160px, 32%) 1fr;
    column-gap: 1em;
    row-gap: 0;
    margin: 0;
}
.ghc-cr-name {
    color: #555;
    font-weight: 500;
    padding: 0.45em 0;
    border-bottom: 1px solid #f3f3f3;
    margin: 0;
}
.ghc-cr-val {
    color: #222;
    font-weight: 600;
    padding: 0.45em 0;
    border-bottom: 1px solid #f3f3f3;
    margin: 0;
}
dl.ghc-criteria > .ghc-cr-name:nth-last-of-type(1),
dl.ghc-criteria > .ghc-cr-val:nth-last-of-type(1) { border-bottom: 0; }

/* Boolean V flag chip */
.ghc-cr-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    margin-top: 0.7em;
    padding-top: 0.7em;
    border-top: 1px dashed #e3e3e3;
}
.ghc-cr-flag {
    background: #fff5ec;
    color: #c25d01;
    padding: 0.18em 0.7em;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    border: 1px solid #fde0c2;
}

/* Numery OE/comparable - kompaktowy accordion grid */
.ghc-num-total {
    color: #888;
    font-weight: normal;
    font-size: 0.7em;
    margin-left: 0.4em;
}
.ghc-numbers-section .ghc-number-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.4em;
}
.ghc-number-group {
    background: #fafbfc;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
}
.ghc-number-group summary {
    cursor: pointer;
    padding: 0.5em 0.7em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    user-select: none;
    font-size: 0.92em;
}
.ghc-number-group summary::-webkit-details-marker { display: none; }
.ghc-number-group summary::before {
    content: "▸";
    color: #aaa;
    margin-right: 0.5em;
    transition: transform 0.15s ease;
    display: inline-block;
}
.ghc-number-group[open] summary::before { transform: rotate(90deg); color: #EE7202; }
.ghc-number-group summary:hover { background: #fff5ec; color: #c25d01; }
.ghc-number-group summary > b { flex: 1; }
.ghc-grp-count {
    background: #e9ecef;
    color: #495057;
    padding: 0.05em 0.55em;
    border-radius: 10px;
    font-size: 0.82em;
    font-weight: 600;
    flex-shrink: 0;
}
.ghc-number-group[open] .ghc-grp-count { background: #EE7202; color: #fff; }

.ghc-number-list {
    list-style: none;
    margin: 0;
    padding: 0.4em 0.7em 0.7em 1.8em;
    columns: 2;          /* 2-kolumnowo zeby skrocic dlugie listy */
    column-gap: 1em;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}
.ghc-number-list li {
    padding: 0.15em 0;
    color: #333;
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 0.82em;
    break-inside: avoid;
}

.ghc-parts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ghc-parts-list li {
    padding: 0.5em 0;
    border-bottom: 1px solid #f3f3f3;
    display: flex;
    align-items: center;
    gap: 0.8em;
}
.ghc-parts-list li:last-child { border-bottom: 0; }
.ghc-part-code {
    font-family: ui-monospace, monospace;
    font-weight: 600;
    color: #0d6efd;
}
.ghc-part-desc { color: #555; flex: 1; }
.ghc-part-qty { color: #888; font-weight: 500; }

.ghc-gtin {
    color: #555;
    font-size: 0.95em;
}

/* Not found */
.ghc-not-found {
    text-align: center;
    padding: 3em 1em;
}
.ghc-not-found h1 {
    color: #c62828;
    margin-bottom: 0.6em;
}
.ghc-not-found p { color: #666; }

@media (max-width: 600px) {
    .ghc-wrap, .ghc-detail, .ghc-not-found { margin: 1em auto; padding: 0 0.5em; }
    .ghc-detail-title { font-size: 1.15em; }
    .ghc-detail-code { display: block; margin-left: 0; margin-top: 0.2em; font-size: 0.88em; }
    .ghc-section { padding: 0.8em 0.9em; }
    .ghc-section h2 { font-size: 1em; }
    /* Criteria stack: name w jednej linii nad value */
    dl.ghc-criteria {
        grid-template-columns: 1fr;
        row-gap: 0;
    }
    .ghc-cr-name { padding-bottom: 0; border-bottom: 0; font-size: 0.85em; color: #666; }
    .ghc-cr-val  { padding-top: 0.1em; padding-left: 0.2em; }
    /* Number groups full width */
    .ghc-numbers-section .ghc-number-groups { grid-template-columns: 1fr; }
    .ghc-number-list { columns: 1; }
}

/* ============================================================
   DETAIL GRID - lewa kolumna media, prawa info
   ============================================================ */
.ghc-detail-grid {
    display: grid;
    grid-template-columns: minmax(280px, 460px) 1fr;
    gap: 1.2em;
    margin-bottom: 0.8em;
    align-items: start;
}
.ghc-detail-media {
    /* Sticky na desktop - galeria zostaje widoczna podczas przewijania info column */
    position: sticky;
    top: 1em;
    align-self: start;
}
.ghc-section-compact { padding: 0.7em 1em; }
.ghc-section-compact h2 { font-size: 0.95em; margin-bottom: 0.4em; }

@media (max-width: 860px) {
    .ghc-detail-grid {
        grid-template-columns: 1fr;
        gap: 0.8em;
    }
    .ghc-detail-media {
        position: static;
        max-width: 460px;
        margin: 0 auto;
    }
}

/* ============================================================
   GALLERY - main + thumbnails
   ============================================================ */
.ghc-gallery {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 1em;
}
.ghc-gallery-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f7f7f9;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    margin-bottom: 0.8em;
}
.ghc-gallery-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
}
.ghc-gallery-main:hover .ghc-gallery-main-img:not(.ghc-img-broken) {
    transform: scale(1.03);
}
.ghc-img-broken {
    opacity: 0.3;
    filter: grayscale(1);
}
.ghc-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.4em;
}
.ghc-gallery-thumb {
    aspect-ratio: 1 / 1;
    background: #f7f7f9;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease;
}
.ghc-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ghc-gallery-thumb.is-active { border-color: #EE7202; }
.ghc-gallery-thumb:hover { border-color: #0d6efd; }
.ghc-thumb-broken { opacity: 0.3; cursor: not-allowed; }
.ghc-gallery-empty {
    background: #fff;
    border: 1px dashed #ddd;
    border-radius: 8px;
    padding: 4em 1em;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* 360 button */
.ghc-360-wrap {
    margin-top: 0.6em;
    text-align: center;
}
.ghc-360-btn {
    background: #fff;
    border: 1px solid #EE7202;
    color: #EE7202;
    padding: 0.7em 1.4em;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.ghc-360-btn:hover { background: #EE7202; color: #fff; }
.ghc-360-btn::before {
    content: "↻ ";
    font-weight: 400;
}

/* ============================================================
   LIGHTBOX MODAL
   ============================================================ */
.ghc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2vh 2vw;
    user-select: none;
}
.ghc-lightbox[hidden] { display: none; }
.ghc-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);
}
.ghc-lb-close, .ghc-lb-prev, .ghc-lb-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 0;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    border-radius: 50%;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ghc-lb-close:hover, .ghc-lb-prev:hover, .ghc-lb-next:hover {
    background: rgba(255, 255, 255, 0.28);
}
.ghc-lb-close {
    top: 1.5vh; right: 2vw;
    width: 44px; height: 44px;
    font-size: 1.8em;
}
.ghc-lb-prev, .ghc-lb-next {
    top: 50%;
    transform: translateY(-50%);
    width: 56px; height: 56px;
    font-size: 2.4em;
}
.ghc-lb-prev { left: 2vw; }
.ghc-lb-next { right: 2vw; }
.ghc-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;
}

/* ============================================================
   360 VIEWER MODAL
   ============================================================ */
.ghc-360-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(20, 20, 20, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2vh 2vw;
}
.ghc-360-modal[hidden] { display: none; }
.ghc-360-stage {
    width: min(90vw, 800px);
    height: min(80vh, 800px);
    background: #1a1a1a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    position: relative;
    overflow: hidden;
}
.ghc-360-stage:active { cursor: grabbing; }
.ghc-360-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-drag: none;
    -webkit-user-drag: none;
    pointer-events: none;
}
.ghc-360-spinner {
    position: absolute;
    width: 48px; height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ghc-spin 0.8s linear infinite;
}
@keyframes ghc-spin { to { transform: rotate(360deg); } }
.ghc-360-hint {
    color: #ccc;
    margin-top: 1em;
    font-size: 0.9em;
}

/* ============================================================
   VEHICLE APPLICATIONS - lazy load + grouping
   ============================================================ */
.ghc-vehicle-apps h2 .ghc-va-count {
    color: #888;
    font-weight: normal;
    font-size: 0.85em;
    margin-left: 0.4em;
}
.ghc-va-toolbar {
    margin-bottom: 1em;
}
.ghc-va-filter {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7em 1em;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95em;
}
.ghc-va-filter:focus {
    border-color: #EE7202;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(238, 114, 2, 0.15);
}
.ghc-va-loading {
    color: #999;
    font-style: italic;
    padding: 1em 0;
}
.ghc-va-groups {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
}
.ghc-va-manu {
    background: #fafbfc;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 0.6em 0.9em;
}
.ghc-va-manu > summary {
    cursor: pointer;
    padding: 0.3em 0;
    font-size: 1.05em;
    color: #EE7202;
}
.ghc-va-models {
    margin-top: 0.6em;
    padding-left: 0.5em;
    display: flex;
    flex-direction: column;
    gap: 0.3em;
}
.ghc-va-model > summary {
    cursor: pointer;
    padding: 0.3em 0;
    color: #444;
}
.ghc-va-cnt {
    color: #888;
    font-weight: normal;
    font-size: 0.9em;
}
.ghc-va-types {
    list-style: none;
    margin: 0.4em 0 0 0;
    padding: 0 0 0 1em;
}
.ghc-va-vehicle {
    padding: 0.4em 0;
    font-size: 0.9em;
    color: #555;
    border-top: 1px solid #f3f3f3;
}
.ghc-va-vehicle:first-child { border-top: 0; }
.ghc-va-vh { color: #2c3037; }
.ghc-va-crits {
    margin-top: 0.25em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25em 0.7em;
    color: #666;
    font-size: 0.85em;
    padding-left: 1em;
}
.ghc-va-crit b { color: #495057; font-weight: 600; }
.ghc-va-crit-flag {
    background: #fff5ec;
    color: #c25d01;
    padding: 0.05em 0.55em;
    border-radius: 10px;
    font-size: 0.92em;
    font-weight: 500;
    border: 1px solid #fde0c2;
}

/* Reference info ikonka "?" przy numerze OE - tooltip pokazuje pelny opis.
   Bez tego lista 100+ numerow byla zaszumiona powtorzonym tekstem. */
.ghc-num-note-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: #e9ecef;
    color: #6c757d;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    font-family: inherit;
    margin-left: 0.3em;
    cursor: help;
    line-height: 1;
    vertical-align: middle;
}
.ghc-num-note-ico:hover { background: #EE7202; color: #fff; }

/* ============================================================
   REVIEWS (lazy-loaded z gh-reviews REST API)
   ============================================================ */
.ghc-reviews-section h2 .ghc-reviews-count {
    color: #888;
    font-weight: normal;
    font-size: 0.78em;
    margin-left: 0.4em;
}
.ghc-reviews-loading {
    color: #999;
    font-style: italic;
    padding: 1em 0;
    text-align: center;
}
.ghc-reviews-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.8em;
}
.ghc-reviews-empty {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 1em 0;
}
.ghc-reviews-loadmore {
    text-align: center;
    margin-top: 1em;
}
/* Stylowanie kart z gh-reviews API - dziedziczy klasy ghr-* z tego pluginu */
.ghc-reviews-list .ghr-card {
    background: #fafbfc;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 0.9em 1em;
    font-size: 0.92em;
}
.ghc-reviews-list .ghr-head { margin-bottom: 0.4em; }
.ghc-reviews-list .ghr-sku { font-size: 0.85em; color: #6c757d; }
.ghc-reviews-list .ghr-sku-type { color: #2c3037; font-weight: 600; }
.ghc-reviews-list .ghr-sku-code { color: #0d6efd; text-decoration: none; }
.ghc-reviews-list .ghr-sku-qty { color: #888; font-style: italic; }
.ghc-reviews-list .ghr-desc { color: #888; font-size: 0.85em; margin-top: 0.2em; }
.ghc-reviews-list .ghr-rating { color: #f59e0b; font-size: 1.1em; margin: 0.3em 0 0.5em; letter-spacing: 0.05em; }
.ghc-reviews-list .ghr-text {
    margin: 0.3em 0;
    color: #2c3037;
    font-style: italic;
    line-height: 1.5;
    border-left: 2px solid #f0d4b3;
    padding-left: 0.7em;
}
.ghc-reviews-list .ghr-orig {
    display: block;
    color: #adb5bd;
    font-size: 0.78em;
    margin-top: 0.3em;
    cursor: help;
}
.ghc-reviews-list .ghr-foot {
    margin-top: 0.6em;
    font-size: 0.8em;
    color: #6c757d;
}
.ghc-reviews-list .ghr-author { font-weight: 500; cursor: pointer; }
.ghc-reviews-list .ghr-author:hover { color: #2c3037; }
.ghc-reviews-list .ghr-date { color: #adb5bd; }
.ghc-reviews-list .ghr-verified-badge {
    color: #0a8a0a;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.2em;
}

/* Galeria zdjec do recenzji (gh-reviews API zwraca .ghr-pics gdy klient zalaczyl zdj.) */
.ghc-reviews-list .ghr-pics {
    margin-top: 0.6em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
}
.ghc-reviews-list .ghr-thumb {
    display: block;
    width: 80px;
    height: 80px;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    overflow: hidden;
    cursor: zoom-in;
    background: #f7f7f9;
    transition: border-color 0.15s ease, transform 0.1s ease;
    flex-shrink: 0;
}
.ghc-reviews-list .ghr-thumb:hover {
    border-color: #EE7202;
    transform: scale(1.04);
}
.ghc-reviews-list .ghr-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ghc-va-loadmore { text-align: center; margin-top: 1em; }

/* ============================================================
   WHERE TO BUY widget
   ============================================================ */
.ghc-where-to-buy {
    background: linear-gradient(135deg, #fff5ec 0%, #fde8d3 100%);
    border-left: 4px solid #EE7202;
}
.ghc-wtb-heading {
    margin-top: 0 !important;
    color: #EE7202 !important;
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
}
.ghc-wtb-intro {
    color: #444;
    margin: 0.4em 0 0.8em 0;
    font-size: 0.92em;
}
.ghc-wtb-list {
    list-style: none;
    margin: 0 0 0.6em 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
}
.ghc-wtb-link {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35em;
    background: #fff;
    border: 1px solid #f0d4b3;
    border-radius: 14px;
    padding: 0.35em 0.8em;
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.1s ease;
    font-size: 0.85em;
}
.ghc-wtb-link:hover {
    border-color: #EE7202;
    transform: translateY(-1px);
    text-decoration: none;
}
.ghc-wtb-label {
    color: #EE7202;
    font-weight: 700;
    font-size: 0.92em;
}
.ghc-wtb-host {
    color: #888;
    font-size: 0.78em;
}
.ghc-wtb-note {
    color: #777;
    font-size: 0.78em;
    margin: 0;
    padding-top: 0.6em;
    border-top: 1px solid #f0d4b3;
    line-height: 1.4;
}
.ghc-wtb-subheading {
    margin: 0.5em 0 0.6em 0;
    font-size: 0.95em;
    color: #444;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ghc-wtb-subheading.ghc-wtb-mp {
    margin-top: 1.2em;
    padding-top: 0.8em;
    border-top: 1px solid #f0d4b3;
}

/* ============================================================
   AUTHORIZED DISTRIBUTORS - lista z stanem magazynowym
   ============================================================ */
.ghc-distributors-list {
    list-style: none;
    margin: 0 0 0.6em 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35em;
}
.ghc-distributor {
    background: #fff;
    border: 1px solid #f0d4b3;
    border-radius: 6px;
    padding: 0.55em 0.8em;
    transition: border-color 0.15s ease;
}
.ghc-distributor:hover { border-color: #EE7202; }

.ghc-d-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6em;
    margin-bottom: 0.2em;
}
.ghc-d-name {
    font-weight: 700;
    color: #EE7202;
    font-size: 0.93em;
    line-height: 1.2;
}
.ghc-d-stock {
    font-size: 0.85em;
    font-weight: 600;
    padding: 0.2em 0.6em;
    border-radius: 12px;
}
.ghc-d-stock-loading { color: #888; font-weight: normal; }
.ghc-d-stock-yes {
    background: #d4edda;
    color: #155724;
    padding: 0.2em 0.6em;
    border-radius: 12px;
}
.ghc-d-stock-no {
    background: #f8d7da;
    color: #721c24;
    padding: 0.2em 0.6em;
    border-radius: 12px;
}
.ghc-d-stock-onorder {
    background: #fde8d3;
    color: #c25d01;
    padding: 0.2em 0.6em;
    border-radius: 12px;
    font-weight: 600;
    cursor: help;
}
.ghc-d-stock-na { color: #adb5bd; font-weight: normal; }

.ghc-d-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em 1em;
    align-items: center;
    font-size: 0.85em;
}
.ghc-d-city { color: #6c757d; }
.ghc-d-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3em 1em;
    flex: 1;
    justify-content: flex-end;
}
.ghc-d-phone, .ghc-d-email, .ghc-d-www {
    color: #0d6efd;
    text-decoration: none;
    white-space: nowrap;
}
.ghc-d-phone:hover, .ghc-d-email:hover, .ghc-d-www:hover {
    text-decoration: underline;
}
