/* ==========================================
   MODA ZUZANA – FOTORECENZE SATISFLOW
   verze 7 – zjednodušená a stabilní
   ========================================== */

#sf-reviews-widget {
    max-width: 1040px;
    margin: 30px auto 50px;
    font-family: inherit;
    position: relative;
}

/* základní pojistka proti výšce 14px při načtení */
#sf-reviews-widget .flickity-viewport {
    min-height: 420px;
}

/* výchozí karta */
#sf-reviews-widget .sf-review {
    box-sizing: border-box !important;
    background: #fff !important;
    border: 1px solid #e7ddd3 !important;
    border-radius: 18px !important;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.03);
}

/* obrázek */
#sf-reviews-widget .sf-review-img {
    margin: 0 !important;
    display: block;
    overflow: hidden;
    background: #f5f2ef;
}

#sf-reviews-widget .sf-review-img img,
#sf-reviews-widget img.satisflow-review-image {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: 420px !important;
    object-fit: cover !important;
    object-position: center center !important;
    cursor: zoom-in !important;
}

/* textová část */
#sf-reviews-widget .sf-review-name {
    background: #fff !important;
    color: #2f2a27 !important;
    margin-top: 0 !important;
    padding: 16px 18px 8px !important;
}

#sf-reviews-widget .sf-review-name > span:first-child {
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.25;
    letter-spacing: -0.2px;
}

#sf-reviews-widget .sf-review-name svg[aria-label="Ověřený nákup"] {
    color: #b8a897 !important;
    margin-left: 4px;
    vertical-align: middle;
}

#sf-reviews-widget .sf-review-name span[aria-label="Datum vytvoření fotorecenze"] {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px !important;
    color: #8d837b !important;
    opacity: 1 !important;
}

/* hvězdy */
#sf-reviews-widget #rating-wrapper {
    display: inline-flex !important;
    gap: 2px;
    margin: 10px 0 10px;
}

#sf-reviews-widget .rating {
    font-size: 22px !important;
    color: #c8a06e !important;
    line-height: 1;
}

/* tlačítko */
#sf-reviews-widget .satisflow-reviewed-product-link {
    margin: 8px 0 0;
}

#sf-reviews-widget .satisflow-reviewed-product-link a {
    display: inline-block;
    padding: 10px 16px !important;
    border-radius: 12px !important;
    border: 1px solid #ddd1c4 !important;
    background: #f6f1eb;
    color: #3b332d !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 600;
    opacity: 1 !important;
    transition: .2s ease;
}

#sf-reviews-widget .satisflow-reviewed-product-link a:hover {
    background: #3b332d;
    color: #fff !important;
    border-color: #3b332d !important;
}

#sf-reviews-widget .sf-review-text {
    background: #fff !important;
    color: #47413d !important;
    padding: 10px 18px 8px !important;
}

#sf-reviews-widget .sf-review-text-p {
    margin: 0 !important;
    font-size: 14px;
    line-height: 1.55;
}

/* like */
#sf-reviews-widget .sf-upvote-btn-wrapper,
#sf-reviews-widget .sf-upvote-active-btn-wrapper {
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 4px 18px 16px !important;
    min-height: 0 !important;
    background: #fff !important;
}

#sf-reviews-widget .sf-upvote-btn-wrapper > span,
#sf-reviews-widget .sf-upvote-active-btn-wrapper > span {
    float: none !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
}

#sf-reviews-widget .sf-upvote-btn-wrapper svg,
#sf-reviews-widget .sf-upvote-active-btn-wrapper svg {
    width: 21px;
    height: 21px;
}

/* šipky */
#sf-reviews-widget .flickity-prev-next-button {
    width: 42px;
    height: 42px;
    background: #fff;
    border: 1px solid #e6ddd4;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

#sf-reviews-widget .flickity-button:hover {
    background: #f7f3ef;
}

#sf-reviews-widget .flickity-button-icon {
    fill: #4a403a;
}

/* ===== DESKTOP ===== */
/* při 1–2 recenzích z toho uděláme stabilní grid */
@media (min-width: 768px) {
    #sf-reviews-widget.sf-static-desktop .flickity-viewport {
        height: auto !important;
        overflow: visible !important;
    }

    #sf-reviews-widget.sf-static-desktop .flickity-slider {
        position: relative !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center;
        align-items: stretch;
        gap: 32px;
    }

    #sf-reviews-widget.sf-static-desktop .sf-review {
        position: relative !important;
        left: auto !important;
        transform: none !important;
        margin: 0 !important;
        width: calc(50% - 16px) !important;
        max-width: 500px !important;
        flex: 0 0 calc(50% - 16px);
    }

    #sf-reviews-widget.sf-static-desktop .flickity-prev-next-button {
        display: none !important;
    }
}

/* ===== MOBIL ===== */
@media (max-width: 767px) {
    #sf-reviews-widget {
        max-width: 100%;
        margin: 20px auto 28px;
        padding: 0 10px;
    }

    #sf-reviews-widget .flickity-viewport {
        min-height: 0;
    }

    #sf-reviews-widget .sf-review {
        width: calc(100vw - 40px) !important;
        max-width: 330px !important;
        margin: 0 6px !important;
        border-radius: 16px !important;
    }

    /* fotka přes celou šířku boxu */
    #sf-reviews-widget .sf-review-img img,
    #sf-reviews-widget img.satisflow-review-image {
        width: 100% !important;
        max-width: none !important;
        height: 240px !important;
        object-fit: cover !important;
        object-position: center center !important;
    }

    #sf-reviews-widget .sf-review-name {
        padding: 14px 14px 8px !important;
    }

    #sf-reviews-widget .sf-review-name > span:first-child {
        font-size: 17px !important;
    }

    #sf-reviews-widget .sf-review-text {
        padding: 8px 14px 6px !important;
    }

    #sf-reviews-widget .sf-review-text-p {
        font-size: 13px;
        line-height: 1.45;
    }

    #sf-reviews-widget .sf-upvote-btn-wrapper,
    #sf-reviews-widget .sf-upvote-active-btn-wrapper {
        padding: 2px 14px 14px !important;
    }

    #sf-reviews-widget .flickity-prev-next-button {
        width: 34px;
        height: 34px;
    }
}

/* ===== vlastní lightbox ===== */
.sf-custom-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(17,17,17,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.sf-custom-lightbox[hidden] {
    display: none !important;
}

.sf-custom-lightbox-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sf-custom-lightbox-img {
    display: block;
    max-width: min(92vw, 1400px);
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.35);
    background: #fff;
}

.sf-custom-lightbox-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.sf-custom-lightbox-close:hover {
    background: rgba(255,255,255,.22);
}

@media (max-width: 767px) {
    .sf-custom-lightbox {
        padding: 14px;
    }

    .sf-custom-lightbox-img {
        max-width: 94vw;
        max-height: 84vh;
        border-radius: 10px;
    }

    .sf-custom-lightbox-close {
        top: 0;
        right: 0;
        width: 44px;
        height: 44px;
        font-size: 30px;
    }
}