/* ==========================================================
   CHOCO BONTÉ – HERO GALLERY v8
   Desktop: Apple-like carousel ovládaný pouze šipkami.
   Mobil: nativní swipe zachovaný.
========================================================== */

:root{
    --cbhg-bg:#f5f5f7;
    --cbhg-radius:24px;
    --cbhg-gap:20px;
    --cbhg-primary:#c70342;
    --cbhg-card:360px;
    --cbhg-start-pad:clamp(72px, 8vw, 150px);
}

.cb-hero-gallery{
    position:relative;
    width:100%;
    margin:0 0 44px;
    padding:60px 0 34px;
    overflow:hidden;
    background:#fff;
}

.cb-hero-gallery__inner{
    position:relative;
    width:100%;
    margin:0 auto;
}

.cb-hero-gallery__viewport{
    position:relative;
    width:100%;
    overflow:hidden;
    padding:8px 0 30px;
}

.cb-hero-gallery__track{
    display:flex;
    gap:var(--cbhg-gap);
    margin:0;
    padding:0 var(--cbhg-start-pad);
    overflow-x:auto;
    overflow-y:hidden;
    list-style:none;
    scroll-snap-type:none;
    scroll-behavior:smooth;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
    touch-action:auto;
}

.cb-hero-gallery__track::-webkit-scrollbar{
    display:none;
}

.cb-hero-gallery__card{
    position:relative;
    flex:0 0 var(--cbhg-card);
    aspect-ratio:3 / 4;
    overflow:hidden;
    border-radius:var(--cbhg-radius);
    background:#eee;
    box-shadow:0 8px 24px rgba(0,0,0,.10);
    transform:translateZ(0);
    transition:
        transform .35s cubic-bezier(.22,.61,.36,1),
        box-shadow .35s cubic-bezier(.22,.61,.36,1);
}

.cb-hero-gallery__card:hover{
    transform:translateY(-5px);
    box-shadow:0 16px 36px rgba(0,0,0,.15);
}

.cb-hero-gallery__link{
    position:relative;
    z-index:2;
    display:block;
    width:100%;
    height:100%;
    text-decoration:none!important;
    cursor:pointer;
}

.cb-hero-gallery__image{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center;
    pointer-events:none;
    user-select:none;
    -webkit-user-drag:none;
    transition:transform .65s cubic-bezier(.22,.61,.36,1);
}

.cb-hero-gallery__card:hover .cb-hero-gallery__image{
    transform:scale(1.02);
}

/* Apple-like floating arrows – desktop only */
.cb-hero-gallery__nav{
    position:absolute;
    inset:0;
    z-index:6;
    pointer-events:none;
}

.cb-hero-gallery__button{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:52px;
    height:52px;
    padding:0;
    border:0;
    border-radius:50%;
    background:rgba(232,232,237,.94);
    color:#56565b;
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
    cursor:pointer;
    pointer-events:auto;
    transition:background .2s ease,color .2s ease,opacity .2s ease,transform .2s ease;
}

.cb-hero-gallery__button--prev{ left:28px; }
.cb-hero-gallery__button--next{ right:28px; }

.cb-hero-gallery__button:hover:not(:disabled){
    background:#dedee3;
    color:#222;
    transform:translateY(-50%) scale(1.04);
}

.cb-hero-gallery__button:disabled{
    opacity:0;
    pointer-events:none;
}

.cb-hero-gallery__button svg{
    width:24px;
    height:24px;
    fill:none;
    stroke:currentColor;
    stroke-width:2.2;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.cb-hero-gallery__progress{
    position:relative;
    width:110px;
    height:4px;
    margin:0 auto;
    overflow:hidden;
    border-radius:999px;
    background:rgba(86,38,49,.10);
}

.cb-hero-gallery__progress-bar{
    position:absolute;
    top:0;
    left:0;
    width:35%;
    height:100%;
    border-radius:inherit;
    background:var(--cbhg-primary);
    transform:translateX(0);
    transition:transform .2s ease;
}

.cb-hero-gallery__link:focus-visible,
.cb-hero-gallery__button:focus-visible{
    outline:3px solid rgba(199,3,66,.28);
    outline-offset:3px;
}

@media(max-width:1399px){
    :root{
        --cbhg-card:330px;
        --cbhg-start-pad:72px;
    }
}

@media(max-width:1099px){
    :root{
        --cbhg-card:290px;
        --cbhg-start-pad:42px;
    }

    .cb-hero-gallery{
        padding-top:42px;
    }
}

@media(max-width:799px){
    .cb-hero-gallery{
        margin-bottom:34px;
        padding:28px 0 16px;
        background:#faf7f5;
    }

    .cb-hero-gallery__track{
        gap:14px;
        padding:0 16px;
        scroll-padding-left:16px;
        scroll-snap-type:x mandatory;
    }

    .cb-hero-gallery__card{
        flex:0 0 calc((100% - 46px) / 2);
        min-width:250px;
        border-radius:23px;
        scroll-snap-align:start;
    }

    .cb-hero-gallery__nav{
        display:none;
    }
}

/* Mobil – zachovaný swipe */
@media(max-width:599px){
    .cb-hero-gallery{
        margin-bottom:26px;
        padding:16px 0 10px;
    }

    .cb-hero-gallery__viewport{
        padding:6px 0 20px;
    }

    .cb-hero-gallery__track{
        gap:14px;
        padding:0 16px;
        scroll-padding-left:16px;
        scroll-snap-type:x mandatory;
    }

    .cb-hero-gallery__card{
        flex:0 0 82%;
        min-width:0;
        border-radius:22px;
        box-shadow:0 10px 24px rgba(63,25,37,.13);
        scroll-snap-align:start;
    }

    .cb-hero-gallery__card:hover{
        transform:none;
    }

    .cb-hero-gallery__progress{
        width:86px;
    }
}

@media(prefers-reduced-motion:reduce){
    .cb-hero-gallery__track{ scroll-behavior:auto; }
    .cb-hero-gallery__card,
    .cb-hero-gallery__image,
    .cb-hero-gallery__progress-bar,
    .cb-hero-gallery__button{ transition:none; }
}
