/* ==========================================================================
   Proizvodac Carousel – Elementor Widget
   carousel.css  (frontend + editor preview)
   ========================================================================== */

/* ---- Custom properties (overridable by Elementor selectors) ---------- */
.pce-carousel {
    --pce-visible : 4;
    --pce-gap     : 20px;
    --pce-accent  : #e94560;
    --pce-radius  : 12px;
    --pce-shadow  : 0 4px 24px rgba(0,0,0,.10);
    --pce-easing  : cubic-bezier(.4,0,.2,1);

    position   : relative;
    width      : 100%;
    overflow   : hidden;
    padding-bottom: 3rem;
    box-sizing : border-box;
}

/* ---- Track ----------------------------------------------------------- */
.pce-track-wrap {
    overflow      : hidden;
    border-radius : var(--pce-radius);
}

.pce-track {
    display    : flex;
    gap        : var(--pce-gap);
    transition : transform .45s var(--pce-easing);
    will-change: transform;
}

/* ---- Slide ----------------------------------------------------------- */
.pce-slide {
    flex    : 0 0 calc(
                (100% - (var(--pce-visible) - 1) * var(--pce-gap))
                / var(--pce-visible)
              );
    min-width: 0;
}

.pce-slide__link {
    display        : block;
    text-decoration: none;
    color          : inherit;
    border-radius  : var(--pce-radius);
    overflow       : hidden;
    background     : #fff;
    box-shadow     : var(--pce-shadow);
    transition     : transform .25s ease, box-shadow .25s ease;
}

.pce-slide__link:hover,
.pce-slide__link:focus-visible {
}

/* ---- Thumbnail ------------------------------------------------------- */
.pce-slide__img-wrap {
    position   : relative;
    width      : 100%;
    padding: 30px !important;
    height: 170px;
    background: #ffffff;
    border: 1px solid #ebebeb;
    border-radius: var(--pce-radius) !important;
    overflow   : hidden;
    display: flex;
    align-items: center;      /* vertical center */
    justify-content: center;  /* horizontal center */
}

.pce-slide__img {
    inset    : 0;
    object-fit     : contain;
    object-position: center;
    box-sizing: border-box;
    transition: transform .4s ease;
}

.pce-slide__link:hover .pce-slide__img {
}

/* ---- Name ------------------------------------------------------------ */
.pce-slide__name {
    display    : block;
    padding    : .6rem 1rem .75rem;
    font-size  : .875rem;
    font-weight: 600;
    text-align : center;
    white-space: nowrap;
    overflow   : hidden;
    text-overflow: ellipsis;
    letter-spacing: .02em;
    transition : color .2s;
}

/* ---- Arrows ---------------------------------------------------------- */
.pce-btn {
    position : absolute;
    top      : calc(50% - 3rem);
    z-index  : 10;
    display  : flex;
    align-items    : center;
    justify-content: center;
    width    : 2.6rem;
    height   : 2.6rem;
    border   : none;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.18);
    cursor   : pointer;
    transition: background .2s, color .2s, transform .15s;
    color    : #222;
}

.pce-btn:hover,
.pce-btn:focus-visible {

}

.pce-btn svg {
    width   : 1.1rem;
    height  : 1.1rem;
    pointer-events: none;
}

.pce-btn--prev { left : .6rem; }
.pce-btn--next { right: .6rem; }

/* ---- Dots ------------------------------------------------------------ */
.pce-dots {
    position  : absolute;
    bottom    : .6rem;
    left      : 50%;
    transform : translateX(-50%);
    display   : flex;
    gap       : .45rem;
    flex-wrap : wrap;
    justify-content: center;
    max-width : 90%;
}

.pce-dot {
    width    : 8px;
    height   : 8px;
    border   : none;
    border-radius: 50%;
    background: #ccc;
    cursor   : pointer;
    padding  : 0;
    transition: background .2s, transform .2s;
    flex-shrink: 0;
}

.pce-dot.is-active {
    background: var(--pce-accent);
    transform : scale(1.4);
}

.pce-dot:focus-visible {
    outline: 2px solid var(--pce-accent);
    outline-offset: 2px;
}

/* ---- Empty / error --------------------------------------------------- */
.pce-empty {
    padding   : 1rem;
    color     : #888;
    font-style: italic;
}

/* ========================================================================
   Responsive
   ======================================================================== */
@media (max-width: 1024px) {
    .pce-carousel { --pce-visible: 3; }
}
@media (max-width: 767px) {
    .pce-carousel { --pce-visible: 2; }
    .pce-btn { width: 2.1rem; height: 2.1rem; }
}
@media (max-width: 479px) {
    .pce-carousel { --pce-visible: 1; }
}
