/* Product gallery dark theme fix.
   Resolves white gallery wrapper backgrounds and scoped Colorbox background.
   Does not remove white pixels baked into the source PNG asset. */

.p-thumbnails-wrapper,
.p-thumbnails,
.p-thumbnail {
    background-color: #1D1D1B;
}

.p-main-image {
    background-color: transparent;
}

/* Outer image wrapper + thumbnails strip — transparent, no dark bleed */
.p-image,
.p-image-wrapper,
.detail-img,
.p-thumbnails-wrapper,
.p-thumbnails,
.p-thumbnails-vertical {
    background-color: transparent;
}

/* Potlačení platformového ::after s rgb(231,231,231) — vidí se v rozích border-radius */
.p-image::before,
.p-image::after {
    display: none !important;
    content: none !important;
    background: transparent !important;
}

.p-thumbnails-inner {
    background-color: transparent;
    border-radius: 10px;
    padding: 4px;
}

.p-main-image img {
    width: 75% !important;
    height: auto !important;
    display: block;
    border-radius: 0;
}

.p-main-image {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 0;
}

/* Wrapper a image container — bez border-radius, zaoblení zajišťuje .p-main-image */
.p-image-wrapper {
    border-radius: 0;
}

.p-image {
    border-radius: 0;
    overflow: hidden;
}

.p-thumbnails-vertical {
    border-radius: 12px;
    overflow: hidden;
}

/* Aktivní tečka galerie – přebarvení z modré na brand červenou */
.p-thumbnail.highlighted,
.p-thumbnail.highlighted:focus,
.p-thumbnail.highlighted:active,
.p-thumbnail:hover {
    border-color: #D61118 !important;
    outline-color: #D61118 !important;
}

.p-thumbnail.highlighted::before,
.p-thumbnail:hover::before {
    background-color: #D61118 !important;
}

body.product-gallery-lightbox-open #cboxContent {
    background-color: #1D1D1B !important;
}

body.product-gallery-lightbox-open #cboxLoadedContent {
    background-color: transparent !important;
}

body.product-gallery-lightbox-open #cboxClose {
    background: transparent !important;
    color: #fff !important;
}

body.product-gallery-lightbox-open #cboxCurrent,
body.product-gallery-lightbox-open #cboxTitle {
    color: #fff;
}

/* ============================================================
   CRITICAL EARLY STATE — layout without JS class dependency
   Uses :has() to establish grid before product-gallery-fix.js runs.
   JS still adds pgf-* classes; these rules fire on the same elements
   and are intentionally identical in effect (no layout shift on class add).
   ============================================================ */

/* Desktop: 3-column grid */
@media (min-width: 1200px) {
    .p-detail-inner > .row:has(> .p-image-wrapper) {
        display: grid !important;
        grid-template-columns: 33% 1fr 360px;
        gap: 0 28px;
        margin: 0 !important;
        margin-top: 16px !important;
        align-items: start;
    }

    .p-detail-inner > .row:has(> .p-image-wrapper)::before,
    .p-detail-inner > .row:has(> .p-image-wrapper)::after {
        display: none !important;
    }

    .p-detail-inner > .row:has(> .p-image-wrapper) > [class*="col-"] {
        width: 100% !important;
        float: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Gallery: column 1 */
    .p-detail-inner > .row:has(> .p-image-wrapper) > .p-image-wrapper {
        grid-column: 1;
        grid-row: 1;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Info col: column 2 */
    .p-detail-inner > .row:has(> .p-image-wrapper) > *:has(> h1) {
        grid-column: 2;
        grid-row: 1;
        padding-top: 8px;
        padding-right: 8px;
    }

    /* Buy col: column 3 */
    .p-detail-inner > .row:has(> .p-image-wrapper) > .col-md-4.pull-left {
        grid-column: 3;
        grid-row: 1;
    }

    /* Gallery internal layout */
    .p-detail-inner > .row:has(> .p-image-wrapper) > .p-image-wrapper > .row {
        margin: 0 !important;
        width: 100% !important;
    }

    .p-detail-inner > .row:has(> .p-image-wrapper) .p-image {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        padding: 0 !important;
    }

    .p-detail-inner > .row:has(> .p-image-wrapper) .p-main-image {
        padding: 0 !important;
    }

    .p-detail-inner > .row:has(> .p-image-wrapper) .p-main-image img {
        width: 100% !important;
        border-radius: 6px !important;
    }

    .p-detail-inner > .row:has(> .p-image-wrapper) .p-thumbnails-wrapper {
        width: 100% !important;
        float: none !important;
        padding: 0 !important;
        margin-top: 8px !important;
        position: static !important;
    }

    .p-detail-inner > .row:has(> .p-image-wrapper) .p-thumbnails {
        position: static !important;
        overflow: visible !important;
        height: auto !important;
    }

    .p-detail-inner > .row:has(> .p-image-wrapper) .p-thumbnails-vertical {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        transform: none !important;
        overflow: visible !important;
    }

    .p-detail-inner > .row:has(> .p-image-wrapper) .p-thumbnails-inner {
        position: static !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        width: auto !important;
        height: auto !important;
    }

    .p-detail-inner > .row:has(> .p-image-wrapper) .p-thumbnails-inner > div {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        width: 100% !important;
        height: auto !important;
        position: static !important;
    }
}

/* Tablet: 2-column grid */
@media (min-width: 768px) and (max-width: 1199px) {
    .p-detail-inner > .row:has(> .p-image-wrapper) {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin: 0 !important;
        align-items: start;
    }

    .p-detail-inner > .row:has(> .p-image-wrapper)::before,
    .p-detail-inner > .row:has(> .p-image-wrapper)::after {
        display: none !important;
    }

    .p-detail-inner > .row:has(> .p-image-wrapper) > [class*="col-"] {
        width: 100% !important;
        float: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .p-detail-inner > .row:has(> .p-image-wrapper) > .p-image-wrapper { grid-column: 1; grid-row: 1; }
    .p-detail-inner > .row:has(> .p-image-wrapper) > *:has(> h1)      { grid-column: 2; grid-row: 1; }
    .p-detail-inner > .row:has(> .p-image-wrapper) > .col-md-4.pull-left { grid-column: 2; grid-row: 2; }
}

/* Mobile: fix buy box float before pgf-hero-buy class is added */
@media (max-width: 767px) {
    .p-detail-inner > .row:has(> .p-image-wrapper) > .col-md-4.pull-left {
        float: none !important;
        clear: both !important;
        width: 100% !important;
        position: static !important;
        box-sizing: border-box;
    }
}

/* Buy box card — light card appearance before pgf-hero-buy class is set */
.p-detail-inner > .row:has(> .p-image-wrapper) > .col-md-4.pull-left {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 18px 16px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #1d1d1b;
    box-sizing: border-box;
}

/* ============================================================
   GALLERY INTERNAL LAYOUT — all breakpoints (:has() early state)
   Root cause fix: Shoptet JS injects position:absolute + height:~150000px on
   .p-thumbnails-vertical and position:absolute + width:~120000px on
   .p-thumbnails-inner. Without these resets, the thumbnail strip escapes the
   gallery column at tablet/mobile and overlaps the product H1 / breadcrumbs.
   Kept outside any media query so they apply at every viewport width.
   ============================================================ */
.p-detail-inner > .row:has(> .p-image-wrapper) > .p-image-wrapper {
    display: flex !important;
    flex-direction: column !important;
}

.p-detail-inner > .row:has(> .p-image-wrapper) > .p-image-wrapper > .row {
    margin: 0 !important;
    width: 100% !important;
}

.p-detail-inner > .row:has(> .p-image-wrapper) .p-thumbnails-wrapper {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin-top: 8px !important;
    position: static !important;
}

.p-detail-inner > .row:has(> .p-image-wrapper) .p-thumbnails {
    position: static !important;
    overflow: visible !important;
    height: auto !important;
    width: 100% !important;
}

.p-detail-inner > .row:has(> .p-image-wrapper) .p-thumbnails-vertical {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    overflow: visible !important;
}

.p-detail-inner > .row:has(> .p-image-wrapper) .p-thumbnails-inner {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: auto !important;
    height: auto !important;
}

.p-detail-inner > .row:has(> .p-image-wrapper) .p-thumbnails-inner > div {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
    height: auto !important;
    position: static !important;
}

/* Main image: fill gallery column at all viewports (overrides global 75% / 18px) */
.p-detail-inner > .row:has(> .p-image-wrapper) .p-main-image img {
    width: 100% !important;
    border-radius: 6px !important;
}

/* ============================================================
   PRODUCT HERO — 3-column layout
   Helper classes assigned by product-gallery-fix.js
   ============================================================ */

/* Buy box card — base styles applied at ALL viewports.
   Desktop (@min-width:1200px) overrides padding + adds sticky below.
   Mobile (@max-width:767px) overrides padding + fixes float/width below. */
.pgf-hero-buy {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 18px 16px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #1d1d1b;
    box-sizing: border-box;
}

/* ============================================================
   GALLERY INTERNAL LAYOUT — all breakpoints (.pgf-hero-gallery)
   Same fix as the :has() early-state block above, but scoped to
   the JS-assigned .pgf-hero-gallery class. Both blocks must exist:
   the :has() version fires before JS; this version reinforces after.
   ============================================================ */

/* Always a vertical flex column so thumbnails stay below the main image */
.pgf-hero-gallery {
    display: flex !important;
    flex-direction: column !important;
    float: none !important;
    width: 100% !important;
}

/* Kill Bootstrap inner-row negative margins at all widths */
.pgf-hero-gallery > .row {
    margin: 0 !important;
    width: 100% !important;
}

/* Main image fills gallery column */
.pgf-hero-gallery .p-image {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 0 !important;
}

.pgf-hero-gallery .p-main-image {
    padding: 0 !important;
}

/* Main image: fill gallery column at all viewports (overrides global 75% / 18px) */
.pgf-hero-gallery .p-main-image img {
    width: 100% !important;
    border-radius: 6px !important;
}

/* Thumbnails wrapper: always in flow, below main image */
.pgf-hero-gallery .p-thumbnails-wrapper {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin-top: 8px !important;
    position: static !important;
}

/* Reset Shoptet's overflow:hidden + height:0 */
.pgf-hero-gallery .p-thumbnails {
    position: static !important;
    overflow: visible !important;
    height: auto !important;
    width: 100% !important;
}

/* Reset Shoptet's position:absolute + huge height */
.pgf-hero-gallery .p-thumbnails-vertical {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    overflow: visible !important;
}

/* Reset Shoptet's position:absolute + width:~120000px */
.pgf-hero-gallery .p-thumbnails-inner {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: auto !important;
    height: auto !important;
}

/* Anonymous wrapper div inside .p-thumbnails-inner */
.pgf-hero-gallery .p-thumbnails-inner > div {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
    height: auto !important;
    position: static !important;
}

/* Consistent thumbnail size at all breakpoints */
.pgf-hero-gallery .p-thumbnail {
    display: block !important;
    width: 64px !important;
    height: 48px !important;
    border-radius: 5px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.pgf-hero-gallery .p-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Hide nav arrows — all thumbs visible as horizontal flex row */
.pgf-hero-gallery .thumbnail-prev,
.pgf-hero-gallery .thumbnail-next {
    display: none !important;
}

/* Desktop 3-column grid (≥ 1200px) */
@media (min-width: 1200px) {
    .pgf-hero-row {
        display: grid !important;
        grid-template-columns: 33% 1fr 360px;
        gap: 0 28px;
        margin: 0 !important;
        margin-top: 16px !important;
        align-items: start;
    }

    /* Kill Bootstrap clearfix pseudo-elements so they don't become grid items */
    .pgf-hero-row::before,
    .pgf-hero-row::after {
        display: none !important;
    }

    .pgf-hero-row > [class*="col-"] {
        width: 100% !important;
        float: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Explicit grid-row: 1 on all columns — prevents auto-placement from pushing
       gallery (DOM-second, grid-column: 1) to row 2 after info (DOM-first, grid-column: 2) */
    .pgf-hero-gallery { grid-column: 1; grid-row: 1; }
    .pgf-hero-info    { grid-column: 2; grid-row: 1; padding-top: 8px; padding-right: 8px; }
    .pgf-hero-buy     { grid-column: 3; grid-row: 1; }

    /* ---- Gallery internal layout ---- */

    /* Make gallery a vertical flex column: main image on top, thumbnails below */
    .pgf-hero-gallery {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Inner Bootstrap row for main image: kill negative margins */
    .pgf-hero-gallery > .row {
        margin: 0 !important;
        width: 100% !important;
    }

    /* Main image fills gallery column width */
    .pgf-hero-gallery .p-image {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        padding: 0 !important;
    }

    .pgf-hero-gallery .p-main-image {
        padding: 0 !important;
    }

    .pgf-hero-gallery .p-main-image img {
        width: 100% !important;
        border-radius: 6px !important;
    }

    /* Thumbnails wrapper: below main image, full width */
    .pgf-hero-gallery .p-thumbnails-wrapper {
        width: 100% !important;
        float: none !important;
        padding: 0 !important;
        margin-top: 8px !important;
        position: static !important;
    }

    /* Critical: override Shoptet's absolute positioning of the thumbnail strip.
       Without this, .p-thumbnails-vertical floats far outside its column. */
    .pgf-hero-gallery .p-thumbnails {
        position: static !important;
        overflow: visible !important;
        height: auto !important;
    }

    .pgf-hero-gallery .p-thumbnails-vertical {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        transform: none !important;
        overflow: visible !important;
    }

    /* Horizontal thumbnail grid.
       Shoptet sets position:absolute, width:100px, height:~150000px on this element
       for the scrollable vertical strip. Reset all three so thumbnails lay out
       as a normal horizontal flex row inside the gallery column. */
    .pgf-hero-gallery .p-thumbnails-inner {
        position: static !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        width: auto !important;
        height: auto !important;
    }

    /* Shoptet wraps ALL thumbnails in a single anonymous div inside .p-thumbnails-inner.
       Make that wrapper a horizontal flex row so thumbnails sit side by side. */
    .pgf-hero-gallery .p-thumbnails-inner > div {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        width: 100% !important;
        height: auto !important;
        position: static !important;
    }

    .pgf-hero-gallery .p-thumbnail {
        display: block !important;
        width: 64px !important;
        height: 48px !important;
        border-radius: 5px !important;
        overflow: hidden !important;
        flex-shrink: 0 !important;
    }

    .pgf-hero-gallery .p-thumbnail img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Hide nav arrows — all thumbs visible in horizontal grid */
    .pgf-hero-gallery .thumbnail-prev,
    .pgf-hero-gallery .thumbnail-next {
        display: none !important;
    }

    /* Buy box: desktop — sticky, larger padding, content-axis offset */
    .pgf-hero-buy {
        --buybox-content-start: 30px;
        padding: 24px 20px !important;
        position: sticky;
        top: 80px;
    }

    .pgf-hero-buy.pgf-no-sticky {
        position: static;
    }
}

/* Tablet: 2-column layout (768px–1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .pgf-hero-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin: 0 !important;
        align-items: start;
    }

    .pgf-hero-row::before,
    .pgf-hero-row::after {
        display: none !important;
    }

    .pgf-hero-row > [class*="col-"] {
        width: 100% !important;
        float: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .pgf-hero-gallery { grid-column: 1; grid-row: 1; }
    .pgf-hero-info    { grid-column: 2; grid-row: 1; }
    .pgf-hero-buy     { grid-column: 2; grid-row: 2; }
}

/* Mobile (≤ 767px) */
@media (max-width: 767px) {
    .pgf-hero-row {
        margin-top: 16px !important;
    }

    /* ── Mobile thumbnail consistency fix ──────────────────────────────────────
       Fix: všechny thumbnaily na mobilu dostanou pevný rozměr a flex layout.
       Primární příčina: první thumbnail (JS-přepsaná fotka produktu) s jiným
       poměrem stran nebo transparentními okraji v PNG se zobrazoval vizuálně
       menší, protože img neměl object-fit ani pevné rozměry v kontejneru.
       Fix cílí na VŠECHNY thumbnaily na mobilu jedním pravidlem — konzistentní
       a bez rizika regrese pouze na :first-of-type.
       ────────────────────────────────────────────────────────────────────────── */
    .p-thumbnails-inner a.p-thumbnail {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 64px !important;
        height: 48px !important;
        overflow: hidden !important;
        flex-shrink: 0 !important;
        box-sizing: border-box !important;
    }

    .p-thumbnails-inner a.p-thumbnail img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
        max-width: none !important;
        padding: 0 !important;
    }

    /* ── Centrování celé galerie na mobilu ─────────────────────────────────────
       Shoptet nastavuje .p-thumbnails na width:0/overflow:hidden a
       .p-thumbnails-inner na position:absolute/width:~120000px.
       Wrapper je navíc posunutý mimo viewport (float nebo abs. pozice).
       Stejný reset jako na desktopu, ale v mobilním breakpointu.
       ────────────────────────────────────────────────────────────────────────── */

    /* Wrapper — přivést zpět do toku */
    .p-thumbnails-wrapper {
        width: 100% !important;
        float: none !important;
        padding: 0 !important;
        margin-top: 8px !important;
        position: static !important;
        display: block !important;
    }

    /* Zrušit Shoptet overflow:hidden + width:0 na kontejneru */
    .p-thumbnails {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* Zrušit position:absolute + width:119988px na vnitřním pásu */
    .p-thumbnails-inner {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 6px !important;
    }

    /* Anonymní wrapper div uvnitř .p-thumbnails-inner (Shoptet struktura) */
    .p-thumbnails-inner > div {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 6px !important;
        width: 100% !important;
        height: auto !important;
        position: static !important;
    }

    /* Skrýt nav šipky — všechny thumby viditelné v řadě */
    .thumbnail-prev,
    .thumbnail-next {
        display: none !important;
    }

    /* ── Buy box na mobilu: karta plné šířky, kompaktní ─────────────────────
       Shoptet přidává pull-left (float:left) na .col-md-4, což způsobuje
       shrink-wrap na 206px místo 100% šířky. Reset floatu + kompaktní hodnoty.
       ───────────────────────────────────────────────────────────────────────── */
    .pgf-hero-buy {
        float: none !important;
        clear: both !important;
        width: 100% !important;
        position: static !important;
        padding: 14px !important;
        margin-top: 12px;
        --buybox-content-start: 0px;
    }

    .pgf-hero-buy .price-final {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .pgf-hero-buy .quantity {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .pgf-hero-buy .btn-conversion.add-to-cart-button {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        font-size: 15px;
        padding: 12px 10px;
    }
}

/* ---- Info column ---- */

.pgf-hero-info h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #1d1d1b;
    line-height: 1.25;
    margin: 0 0 16px;
}

.pgf-features {
    margin: 18px 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

@media (max-width: 767px) {
    .pgf-features {
        display: none;
    }
}

.pgf-features-intro {
    margin: 0 0 14px;
    color: rgba(0, 0, 0, 0.65);
    font-size: 14px;
    line-height: 1.6;
}

.pgf-features-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pgf-features-list li {
    position: relative;
    margin: 0 0 8px;
    padding-left: 18px;
    color: #1d1d1b;
    font-size: 14px;
    line-height: 1.65;
}

.pgf-features-list li:last-child {
    margin-bottom: 0;
}

.pgf-features-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%);
}

/* Original block in description is hidden only after JS successfully clones it */
.descr-text .pgf-source-features--consumed {
    display: none !important;
}

/* ---- Buy box ---- */

/* Fix Bootstrap .price.row negative margins — main cause of buy box overflow */
.pgf-hero-buy .price.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

/* Reset Bootstrap column padding inside buy box.
   padding-left has no !important so specific per-element overrides below can win. */
.pgf-hero-buy .price.row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0 !important;
}

/* Price block — left edge = --buybox-content-start axis */
.pgf-hero-buy .p-final-price-wrapper {
    padding-left: var(--buybox-content-start) !important;
    padding-bottom: 0 !important;
    margin-left: 0 !important;
    margin-bottom: 0 !important;
    border-bottom: none !important;
}

.pgf-hero-buy .price-final {
    font-size: 30px;
    font-weight: bold;
    color: #1d1d1b;
    display: block;
    margin-bottom: 10px;
    line-height: 1.15;
}

.pgf-hero-buy .price-additional {
    font-size: 14px;
    color: #888888;
    display: block;
    margin-bottom: 15px;
}

/* Availability — left edge = --buybox-content-start axis */
.pgf-hero-buy .order-availability {
    padding-left: var(--buybox-content-start) !important;
    margin-left: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

/* Hide Shoptet's native availability icon — replaced by ::before */
.pgf-hero-buy .availability > i,
.pgf-hero-buy .availability .availability-icon {
    display: none !important;
}

.pgf-hero-buy .availability {
    display: flex !important;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: #1d1d1b !important;
}

.pgf-hero-buy .availability::before {
    content: '\2713';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    min-width: 16px;
    border-radius: 50%;
    background: #27ae60;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Delivery badge — left edge = --buybox-content-start axis */
.pgf-delivery-note {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #1d1d1b;
    margin-left: 0;
    padding-left: var(--buybox-content-start);
    margin-bottom: 15px;
}

.pgf-delivery-note::before {
    content: '\2713';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    min-width: 16px;
    border-radius: 50%;
    background: #27ae60;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    margin-right: 8px;
    flex-shrink: 0;
}

/* External availability row */
.pgf-external-availability {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #1d1d1b;
    margin-left: 0;
    padding-left: var(--buybox-content-start);
    margin-bottom: 15px;
}

.pgf-external-availability::before {
    content: '\2197';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    min-width: 16px;
    border-radius: 50%;
    background: #5b8dee;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    margin-right: 8px;
    flex-shrink: 0;
}

.pgf-external-availability__label {
    opacity: 0.75;
    margin-right: 4px;
}

.pgf-external-availability__value {
    font-weight: 600;
}

/* Hide empty Bootstrap spacer */
.pgf-hero-buy .spaced-small {
    display: none !important;
}

/* Quantity + CTA container — no internal separator, pure spacing */
.pgf-hero-buy .add-to-cart {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
    border-top: none !important;
}

/* Quantity - single clean implementation */
/* order:0 overrides Shoptet's mobile reorder (Shoptet sets quantity order:1, CTA order:0 at mobile) */
.pgf-hero-buy .quantity {
    order: 0 !important;
    --qty-h: 44px;
    --qty-side: 48px;

    display: grid !important;
    grid-template-columns: var(--qty-side) minmax(88px, 1fr) var(--qty-side) !important;
    grid-template-rows: var(--qty-h) !important;
    align-items: stretch !important;

    width: 100% !important;
    max-width: 316px !important;
    margin: 0 auto 16px !important;
    padding: 0 !important;

    background: rgba(0,0,0,0.03) !important;
    border: 1px solid rgba(0,0,0,0.15) !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    box-shadow: inset 0 1px 0 rgba(0,0,0,0.04) !important;
    position: relative !important;
}

/* Tooltipy pryč */
.pgf-hero-buy .quantity > .increase-tooltip,
.pgf-hero-buy .quantity > .decrease-tooltip {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* Tlačítka minus / plus */
.pgf-hero-buy .quantity > .decrease,
.pgf-hero-buy .quantity > .increase {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: var(--qty-h) !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    transform: none !important;

    border: 0 !important;
    border-radius: 0 !important;
    background: rgba(0,0,0,0.04) !important;
    background-image: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    cursor: pointer !important;

    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
    text-indent: -9999px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.pgf-hero-buy .quantity > .decrease {
    grid-column: 1 !important;
    grid-row: 1 !important;
    border-right: 1px solid rgba(0,0,0,0.12) !important;
}

.pgf-hero-buy .quantity > .increase {
    grid-column: 3 !important;
    grid-row: 1 !important;
    border-left: 1px solid rgba(0,0,0,0.12) !important;
}

.pgf-hero-buy .quantity > .decrease:hover,
.pgf-hero-buy .quantity > .increase:hover {
    background: rgba(0,0,0,0.07) !important;
}

/* Shoptet vnitřky úplně schovat, ať nic nepřekresluje */
.pgf-hero-buy .quantity > .decrease *,
.pgf-hero-buy .quantity > .increase * {
    display: none !important;
}

/* Vlastní symboly jen přes button pseudo */
.pgf-hero-buy .quantity > .decrease::before,
.pgf-hero-buy .quantity > .increase::before {
    display: block !important;
    position: static !important;
    transform: none !important;
    text-indent: 0 !important;
    text-align: center !important;
    width: 100% !important;
    height: var(--qty-h) !important;
    line-height: var(--qty-h) !important;

    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 30px !important;
    font-weight: 400 !important;
    color: rgba(0,0,0,0.6) !important;
}

.pgf-hero-buy .quantity > .decrease::before {
    content: "−" !important;
}

.pgf-hero-buy .quantity > .increase::before {
    content: "+" !important;
}

/* Střed */
.pgf-hero-buy .quantity > label {
    grid-column: 2 !important;
    grid-row: 1 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    height: var(--qty-h) !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    transform: none !important;

    background: rgba(0,0,0,0.02) !important;
    border: 0 !important;
    overflow: hidden !important;
}

/* Cokoli kromě inputu ve středu schovat */
.pgf-hero-buy .quantity > label > :not(.amount) {
    display: none !important;
}

.pgf-hero-buy .quantity > label::before,
.pgf-hero-buy .quantity > label::after {
    content: none !important;
    display: none !important;
}

.pgf-hero-buy .quantity .amount {
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 8px !important;

    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;

    color: #1d1d1b !important;
    text-align: center !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    line-height: var(--qty-h) !important;
    font-family: inherit !important;

    appearance: textfield !important;
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
}

.pgf-hero-buy .quantity .amount:focus {
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.pgf-hero-buy .quantity .amount::-webkit-outer-spin-button,
.pgf-hero-buy .quantity .amount::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Shoptet renders a compact basket-icon button (.btn-cart.hidden-md) as the mobile fallback.
   We show the full text CTA instead, so suppress the icon duplicate unconditionally. */
.pgf-hero-buy .btn-cart.hidden-md {
    display: none !important;
}

/* Add to cart button — 1:1 per reference, red kept per brand */
/* order:1 ensures CTA renders after quantity, overriding Shoptet's mobile order:0 */
.pgf-hero-buy .btn-conversion.add-to-cart-button {
    order: 1 !important;
    display: block !important;
    width: 100%;
    padding: 14px 12px;
    font-size: 17px;
    font-weight: bold;
    text-transform: uppercase;
    background: #D61118;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: background-color 0.3s;
    text-align: center;
    letter-spacing: 0.04em;
}

.pgf-hero-buy .btn-conversion.add-to-cart-button:hover {
    background: #b50e14;
}

/* .pgf-hero-buy .shipping-availability — element is permanently hidden via
   display: none !important below; layout rules removed as dead code. */

.pgf-hero-buy .shipping-options {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.4);
    text-decoration: none;
}

.pgf-hero-buy .shipping-options:hover {
    color: rgba(255, 255, 255, 0.6);
}

/* Trust strip — deterministic 3-column grid, first column left edge = reference axis */
.pgf-trust-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    font-size: 13px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: #BDC3C7;
}

.pgf-trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pgf-trust-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bdc3c7;
    margin-bottom: 5px;
}

.pgf-trust-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.pgf-trust-item > span:not(.pgf-trust-icon) {
    color: #BDC3C7;
    word-break: break-word;
    line-height: 1.35;
}

/* ---- Tabs separator ---- */

.shp-tabs-wrapper.p-detail-tabs-wrapper {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* CTA button width = visual span of trust strip content
   left edge = start of "Bezpečná platba" text (= --buybox-content-start ≈ 30px)
   right edge = end of "Záruka 2 roky" text (≈ 37px from content right)
   Parent .add-to-cart is flex column with align-items: center — so the margin-box
   (margin-left + width + margin-right) must equal the container width (336px)
   so that the centering offset collapses to zero and margins land exactly on axis. */
@media (min-width: 1200px) {
    .pgf-hero-buy .btn-conversion.add-to-cart-button {
        width: calc(100% - var(--buybox-content-start) - 37px);
        margin-left: var(--buybox-content-start);
        margin-right: 37px;
    }

    .pgf-hero-buy .quantity {
        max-width: calc(100% - var(--buybox-content-start) - 37px) !important;
        margin-left: var(--buybox-content-start) !important;
        margin-right: 37px !important;
        margin-bottom: 16px !important;
    }
}

.pgf-hero-buy .shipping-availability {
    display: none !important;
}

/* ── Mobile buy box: 15 % visual reduction + alignment fix ─────────────────
   MUST come after all base styles so media-query overrides win the cascade.

   Root cause: base .pgf-hero-buy .quantity (max-width:316px !important, margin:0
   auto 16px !important) and .price-final (font-size:30px) were declared AFTER the
   earlier @media (max-width:767px) block, so the base values overrode mobile
   overrides even on small viewports.  This block corrects that.

   Alignment root cause: quantity width was capped at 316px and centred with
   auto margins, while price / button / trust-strip all started at the same
   content-left edge (box padding = 14 px → 12 px after this fix).  Removing
   the 316 px cap and auto-centering makes every element share one left edge.
   ─────────────────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {

    /* ── Box shell ──────────────────────────────────────────────────────── */
    .pgf-hero-buy {
        /* padding: 14px → 12px  (-14 %) */
        padding: 12px !important;
        /* border: 2px → 1px  (thinner outline, proportional to smaller box) */
        border-width: 1px !important;
        /* radius: 12px → 10px */
        border-radius: 10px !important;
        margin-top: 10px;
        /* keep content-start axis at 0 so all children share the same left edge */
        --buybox-content-start: 0px;
    }

    /* ── Prices ─────────────────────────────────────────────────────────── */
    /* Main price (s DPH): 30px → 20px */
    .pgf-hero-buy .price-final {
        font-size: 20px !important;
        margin-bottom: 6px !important;
    }

    /* Secondary price (bez DPH): 14px → 12px */
    .pgf-hero-buy .price-additional {
        font-size: 12px !important;
        margin-bottom: 10px !important;
    }

    /* ── Availability & delivery note ───────────────────────────────────── */
    .pgf-hero-buy .availability {
        font-size: 12px !important;
        margin-bottom: 10px !important;
    }
    .pgf-hero-buy .availability::before {
        width: 14px !important;
        height: 14px !important;
        min-width: 14px !important;
        font-size: 9px !important;
    }

    .pgf-delivery-note {
        font-size: 12px !important;
        margin-bottom: 10px !important;
    }
    .pgf-delivery-note::before {
        width: 14px !important;
        height: 14px !important;
        min-width: 14px !important;
        font-size: 9px !important;
    }

    /* ── Quantity ────────────────────────────────────────────────────────
       FIX: remove 316 px cap and auto-centering so the row starts at
       the same left edge as price / button / trust strip.
       CSS vars are re-declared here; children that use var(--qty-h) and
       var(--qty-side) automatically pick up the new values.              */
    .pgf-hero-buy .quantity {
        /* height: 44px → 38px, side buttons: 48px → 40px */
        --qty-h: 38px;
        --qty-side: 40px;
        max-width: 100% !important;  /* was 316px !important in base */
        margin: 0 0 12px !important; /* was 0 auto 16px — removes centering */
        border-radius: 5px !important;
    }

    /* ── CTA button ─────────────────────────────────────────────────────── */
    .pgf-hero-buy .btn-conversion.add-to-cart-button {
        font-size: 14px !important;
        padding: 10px 8px !important;
        border-radius: 7px !important;
        margin-bottom: 6px !important;
    }

    /* ── Trust strip ─────────────────────────────────────────────────────
       Scoped under .pgf-hero-buy to avoid affecting any other strip.     */
    .pgf-hero-buy .pgf-trust-strip {
        font-size: 11px !important;
        padding-top: 10px !important;
    }
    .pgf-hero-buy .pgf-trust-icon {
        margin-bottom: 4px !important;
    }
    .pgf-hero-buy .pgf-trust-icon svg {
        width: 19px !important;
        height: 19px !important;
    }
}

@media (max-width: 767px) {
    .pgf-hero-buy {
        --buybox-mobile-inset: 12px;
        --qty-h: 38px;
        --qty-side: 40px;

        float: none !important;
        clear: both !important;
        width: 100% !important;
        position: static !important;

        padding: 12px !important;
        margin-top: 10px !important;

        border-width: 1px !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
    }

    /* společná obsahová osa jako na desktopu */
    .pgf-hero-buy .price.row,
    .pgf-hero-buy .order-availability,
    .pgf-hero-buy .pgf-delivery-note,
    .pgf-hero-buy .pgf-external-availability,
    .pgf-hero-buy .add-to-cart,
    .pgf-hero-buy .pgf-trust-strip {
        padding-left: var(--buybox-mobile-inset) !important;
        padding-right: var(--buybox-mobile-inset) !important;
        box-sizing: border-box !important;
    }

    .pgf-hero-buy .p-final-price-wrapper {
        padding-left: var(--buybox-mobile-inset) !important;
        margin-bottom: 0 !important;
    }

    .pgf-hero-buy .order-availability {
        padding-left: var(--buybox-mobile-inset) !important;
    }

    .pgf-hero-buy .pgf-delivery-note,
    .pgf-hero-buy .pgf-external-availability {
        padding-left: var(--buybox-mobile-inset) !important;
        margin-bottom: 10px !important;
        font-size: 12px !important;
    }

    .pgf-hero-buy .availability {
        margin-bottom: 10px !important;
        font-size: 12px !important;
    }

    .pgf-hero-buy .availability::before,
    .pgf-hero-buy .pgf-delivery-note::before,
    .pgf-hero-buy .pgf-external-availability::before {
        width: 14px !important;
        height: 14px !important;
        min-width: 14px !important;
        font-size: 9px !important;
    }

    .pgf-hero-buy .price-final {
        font-size: 20px !important;
        line-height: 1.15 !important;
        margin-bottom: 6px !important;
    }

    .pgf-hero-buy .price-additional {
        font-size: 12px !important;
        margin-bottom: 10px !important;
    }

    /* zachování desktop posloupnosti */
    .pgf-hero-buy .add-to-cart {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* pokud má být jako desktop: nejdřív CTA, pak quantity */
    .pgf-hero-buy .btn-conversion.add-to-cart-button {
        order: 0 !important;
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 10px 8px !important;
        font-size: 14px !important;
        border-radius: 7px !important;
        text-align: center !important;
    }

    .pgf-hero-buy .quantity {
        order: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 5px !important;
    }

    .pgf-hero-buy .quantity > .decrease,
    .pgf-hero-buy .quantity > .increase,
    .pgf-hero-buy .quantity > label {
        height: var(--qty-h) !important;
    }

    .pgf-hero-buy .quantity > .decrease::before,
    .pgf-hero-buy .quantity > .increase::before {
        height: var(--qty-h) !important;
        line-height: var(--qty-h) !important;
        font-size: 26px !important;
    }

    .pgf-hero-buy .quantity .amount {
        font-size: 16px !important;
        line-height: var(--qty-h) !important;
    }

    .pgf-hero-buy .pgf-trust-strip {
        grid-template-columns: repeat(3, 1fr) !important;
        font-size: 11px !important;
        padding-top: 10px !important;
        margin-top: 2px !important;
    }

    .pgf-hero-buy .pgf-trust-icon {
        margin-bottom: 4px !important;
    }

    .pgf-hero-buy .pgf-trust-icon svg {
        width: 19px !important;
        height: 19px !important;
    }
}

/* Mobile buy box — consolidated from formerly separate @media blocks (dedup refactor) */
@media (max-width: 767px) {
    .pgf-hero-buy {
        width: 85% !important;
        max-width: 85% !important;
        margin: 10px auto 0 !important;
        padding: 12px !important;
        border-width: 1px !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
        transform: translateY(25px);
    }

    .pgf-hero-buy .price.row,
    .pgf-hero-buy .order-availability,
    .pgf-hero-buy .pgf-delivery-note,
    .pgf-hero-buy .pgf-external-availability,
    .pgf-hero-buy .add-to-cart,
    .pgf-hero-buy .pgf-trust-strip {
        padding-left: 12px !important;
        padding-right: 12px !important;
        box-sizing: border-box !important;
    }

    .pgf-hero-buy .price.row {
        align-items: stretch !important;
    }

    .pgf-hero-buy .btn-conversion.add-to-cart-button,
    .pgf-hero-buy .quantity {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .pgf-hero-buy .p-final-price-wrapper {
        width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        margin: 0 0 10px 0 !important;
        text-align: left !important;
        box-sizing: border-box !important;
    }

    .pgf-hero-buy .price-final,
    .pgf-hero-buy .price-additional {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
    }

    .pgf-hero-buy .price-final {
        font-size: 23px !important; /* cca +15 % proti 20px */
        line-height: 1.15 !important;
        margin-bottom: 6px !important;
    }

    .pgf-hero-buy .price-additional {
        font-size: 14px !important; /* cca +15 % proti 12px */
        line-height: 1.25 !important;
        margin-bottom: 10px !important;
    }
}

.pgf-hero-buy .p-final-price-wrapper,
.pgf-hero-buy .p-final-price-wrapper * {
    font-weight: 700 !important;
}

/* pgf-features – černá barva textu, bold zachovat */
.pgf-features,
.pgf-features-intro,
.pgf-features-list li {
    color: #1D1D1B !important;
}
.pgf-features-list li::before {
    background: #1D1D1B !important;
}

/* shp-tabs navigace – šedá výchozí, hover červená, aktivní bold červená */
.col-sm-3.shp-tabs-row.responsive-nav .shp-tab-link {
    color: #AEAEAE !important;
    font-weight: normal;
    transition: color 0.2s ease;
}
.col-sm-3.shp-tabs-row.responsive-nav .shp-tab-link:hover {
    color: #D61118 !important;
}
.col-sm-3.shp-tabs-row.responsive-nav .shp-tab.active .shp-tab-link {
    color: #D61118 !important;
    font-weight: bold;
}