/* Demangkarta V4.19.9.14 — unified public product media */
:root{
    --dmk-product-media-ratio:4 / 3;
    --dmk-product-media-bg:#edf4f1;
    --dmk-product-media-border:rgba(18,61,50,.08);
}

/* Product cards on Home, Catalog, Lapak, Search, and member browse. */
body a.ui-card[href^="/katalog/"],
body a.ui-card[href*="/katalog/"]{
    min-width:0;
    overflow:hidden;
}

body a.ui-card[href^="/katalog/"] .card-media,
body a.ui-card[href*="/katalog/"] .card-media{
    position:relative;
    isolation:isolate;
    display:grid;
    place-items:center;
    width:100%;
    aspect-ratio:var(--dmk-product-media-ratio)!important;
    min-height:0!important;
    overflow:hidden;
    background:
        radial-gradient(circle at 24% 20%,rgba(255,255,255,.95),transparent 38%),
        linear-gradient(145deg,#eef6f2,#e3ece8);
    border-bottom:1px solid var(--dmk-product-media-border);
}

body a.ui-card[href^="/katalog/"] .card-media::before,
body a.ui-card[href*="/katalog/"] .card-media::before{
    content:"";
    position:absolute;
    inset:-8%;
    z-index:0;
    background-image:var(--dmk-product-media-image,none);
    background-position:center;
    background-repeat:no-repeat;
    background-size:cover;
    filter:blur(22px) saturate(.9);
    opacity:.20;
    transform:scale(1.08);
    pointer-events:none;
}

body a.ui-card[href^="/katalog/"] .card-media::after,
body a.ui-card[href*="/katalog/"] .card-media::after{
    content:"";
    position:absolute;
    inset:0;
    z-index:1;
    height:auto;
    background:linear-gradient(180deg,rgba(255,255,255,.10),rgba(10,43,35,.035));
    pointer-events:none;
}

body a.ui-card[href^="/katalog/"] .card-media > img,
body a.ui-card[href*="/katalog/"] .card-media > img,
body a.ui-card[href^="/katalog/"] .card-media picture > img,
body a.ui-card[href*="/katalog/"] .card-media picture > img{
    position:relative;
    z-index:2;
    display:block;
    width:100%!important;
    height:100%!important;
    padding:clamp(8px,1vw,14px);
    object-fit:contain!important;
    object-position:center!important;
    image-rendering:auto;
    transform:none!important;
    filter:drop-shadow(0 10px 18px rgba(13,45,37,.09));
}

body a.ui-card[href^="/katalog/"]:hover .card-media > img,
body a.ui-card[href*="/katalog/"]:hover .card-media > img{
    transform:scale(1.018)!important;
    filter:drop-shadow(0 12px 20px rgba(13,45,37,.12)) saturate(1.02)!important;
}

body a.ui-card[href^="/katalog/"] .card-media > .media-placeholder,
body a.ui-card[href*="/katalog/"] .card-media > .media-placeholder{
    position:relative;
    z-index:2;
    width:100%!important;
    height:100%!important;
    display:grid;
    place-items:center;
    background:transparent;
}

/* Product detail gallery: one stable canvas for portrait, landscape, square, and video. */
body[data-current-path^="/katalog/"] .detail-hero__media{
    position:relative;
    isolation:isolate;
    width:100%;
    min-width:0;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:var(--dmk-product-media-ratio)!important;
    overflow:hidden;
    background:linear-gradient(145deg,#eef6f2,#e3ece8);
}

body[data-current-path^="/katalog/"] .detail-hero__media > img,
body[data-current-path^="/katalog/"] .detail-hero__media > .media-placeholder,
body[data-current-path^="/katalog/"] .detail-hero__media > .media-slider,
body[data-current-path^="/katalog/"] .public-product-media-slider{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
}

body[data-current-path^="/katalog/"] .media-slider__viewport,
body[data-current-path^="/katalog/"] .media-slider__track,
body[data-current-path^="/katalog/"] .media-slider__slide{
    width:100%;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
}

body[data-current-path^="/katalog/"] .media-slider__track{
    align-items:stretch;
}

body[data-current-path^="/katalog/"] .media-slider__slide{
    position:relative;
    isolation:isolate;
    display:grid;
    place-items:center;
    overflow:hidden;
    background:
        radial-gradient(circle at 24% 20%,rgba(255,255,255,.96),transparent 40%),
        linear-gradient(145deg,#edf5f1,#e4ece8);
}

body[data-current-path^="/katalog/"] .media-slider__slide::before{
    content:"";
    position:absolute;
    inset:-8%;
    z-index:0;
    background-image:var(--dmk-product-media-image,none);
    background-position:center;
    background-repeat:no-repeat;
    background-size:cover;
    filter:blur(28px) saturate(.92);
    opacity:.22;
    transform:scale(1.08);
    pointer-events:none;
}

body[data-current-path^="/katalog/"] .media-slider__slide::after{
    content:"";
    position:absolute;
    inset:0;
    z-index:1;
    background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(9,40,32,.025));
    pointer-events:none;
}

body[data-current-path^="/katalog/"] .media-slider__slide > img,
body[data-current-path^="/katalog/"] .media-slider__slide > picture,
body[data-current-path^="/katalog/"] .media-slider__slide > picture > img,
body[data-current-path^="/katalog/"] .media-slider__slide > .media-frame,
body[data-current-path^="/katalog/"] .media-slider__slide > .dmk-tv-player,
body[data-current-path^="/katalog/"] .media-slider__slide > .media-placeholder{
    position:relative;
    z-index:2;
    display:block;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    border-radius:inherit;
}

body[data-current-path^="/katalog/"] .media-slider__slide > img,
body[data-current-path^="/katalog/"] .media-slider__slide > picture > img{
    padding:clamp(10px,1.4vw,20px);
    object-fit:contain!important;
    object-position:center!important;
    image-rendering:auto;
    filter:drop-shadow(0 14px 28px rgba(13,45,37,.10));
}

body[data-current-path^="/katalog/"] .media-slider__slide.is-video > .dmk-tv-player,
body[data-current-path^="/katalog/"] .media-slider__slide.is-video > .media-frame{
    padding:0;
    overflow:hidden;
    background:#020807;
}

body[data-current-path^="/katalog/"] .dmk-tv-player,
body[data-current-path^="/katalog/"] .dmk-tv-player__screen,
body[data-current-path^="/katalog/"] .dmk-tv-player iframe,
body[data-current-path^="/katalog/"] .dmk-tv-player video{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:auto!important;
}

body[data-current-path^="/katalog/"] .media-slider__arrow,
body[data-current-path^="/katalog/"] .media-slider__counter{
    z-index:5;
}

@media (max-width:760px){
    :root{--dmk-product-media-ratio:4 / 3}
    body a.ui-card[href^="/katalog/"] .card-media > img,
    body a.ui-card[href*="/katalog/"] .card-media > img{
        padding:8px;
    }
    body[data-current-path^="/katalog/"] .detail-hero__media,
    body[data-current-path^="/katalog/"] .media-slider__viewport,
    body[data-current-path^="/katalog/"] .media-slider__track,
    body[data-current-path^="/katalog/"] .media-slider__slide{
        min-height:0!important;
    }
    body[data-current-path^="/katalog/"] .media-slider__slide > img,
    body[data-current-path^="/katalog/"] .media-slider__slide > picture > img{
        padding:10px;
    }
}

@media (prefers-reduced-motion:reduce){
    body a.ui-card[href^="/katalog/"] .card-media > img,
    body a.ui-card[href*="/katalog/"] .card-media > img{
        transition:none!important;
    }
}
