/* Customer catalog image zoom + touch gallery */
.catalog-detail-image-frame{
    position:relative;
    cursor:zoom-in;
}
.catalog-detail-image-frame[data-gallery-count]:after{
    content:'View';
    position:absolute;
    right:9px;
    bottom:8px;
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:52px;
    width:auto;
    height:28px;
    padding:0 11px;
    border-radius:999px;
    background:rgba(15,23,42,.78);
    color:#fff;
    font-size:10px;
    font-weight:1000;
    letter-spacing:.06em;
    text-transform:uppercase;
    box-shadow:0 5px 16px rgba(15,23,42,.22);
    pointer-events:none;
}
.catalog-detail-image-frame[data-gallery-count]:before{
    content:attr(data-gallery-count) ' photo' attr(data-gallery-plural);
    position:absolute;
    left:9px;
    bottom:8px;
    z-index:2;
    padding:5px 8px;
    border-radius:999px;
    background:rgba(15,23,42,.76);
    color:#fff;
    font-size:10px;
    line-height:1;
    font-weight:900;
    letter-spacing:.02em;
    pointer-events:none;
}

.catalog-hover-preview{
    position:fixed;
    z-index:2147483001;
    display:none;
    width:min(430px,42vw);
    height:min(430px,72vh);
    padding:10px;
    border:1px solid rgba(226,232,240,.95);
    border-radius:22px;
    background:#fff;
    box-shadow:0 26px 80px rgba(15,23,42,.35);
    pointer-events:none;
    overflow:hidden;
}
.catalog-hover-preview.open{display:block}
.catalog-hover-preview img{
    width:100%;
    height:calc(100% - 34px);
    object-fit:contain;
    object-position:center;
    display:block;
    border-radius:15px;
    background:#fff;
}
.catalog-hover-preview-caption{
    height:34px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:5px 8px 0;
    color:#334155;
    font-size:12px;
    font-weight:900;
    text-align:center;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
}

.catalog-gallery-backdrop{
    position:fixed;
    inset:0;
    z-index:2147483100;
    display:none;
    align-items:center;
    justify-content:center;
    background:rgba(2,6,23,.94);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    touch-action:pan-y;
}
.catalog-gallery-backdrop.open{display:flex}
body.catalog-gallery-open{overflow:hidden!important}
.catalog-gallery-shell{
    position:relative;
    width:100%;
    height:100%;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    justify-content:space-between;
    padding:max(14px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom));
    box-sizing:border-box;
}
.catalog-gallery-top{
    flex:0 0 auto;
    min-height:44px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    color:#fff;
}
.catalog-gallery-title{
    min-width:0;
    font-size:15px;
    font-weight:900;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.catalog-gallery-counter{
    flex:0 0 auto;
    padding:6px 9px;
    border-radius:999px;
    background:rgba(255,255,255,.14);
    font-size:12px;
    font-weight:900;
}
.catalog-gallery-close{
    flex:0 0 auto;
    width:42px;
    height:42px;
    border:0;
    border-radius:50%;
    background:#fee2e2;
    color:#991b1b;
    font-size:24px;
    line-height:1;
    font-weight:1000;
    cursor:pointer;
}
.catalog-gallery-stage{
    position:relative;
    flex:1 1 auto;
    min-height:0;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
}
.catalog-gallery-image{
    display:block;
    width:100%;
    height:100%;
    max-width:100%;
    max-height:100%;
    object-fit:contain;
    object-position:center;
    user-select:none;
    -webkit-user-drag:none;
    transform:translateX(0);
    opacity:1;
    transition:transform .2s ease, opacity .2s ease;
}
.catalog-gallery-image.slide-left{transform:translateX(-9%);opacity:.35}
.catalog-gallery-image.slide-right{transform:translateX(9%);opacity:.35}
.catalog-gallery-nav{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:44px;
    height:54px;
    border:0;
    border-radius:16px;
    background:rgba(255,255,255,.16);
    color:#fff;
    font-size:30px;
    font-weight:900;
    cursor:pointer;
}
.catalog-gallery-prev{left:4px}
.catalog-gallery-next{right:4px}
.catalog-gallery-nav:disabled{display:none}
.catalog-gallery-bottom{
    flex:0 0 auto;
    padding-top:8px;
}
.catalog-gallery-caption{
    min-height:22px;
    color:#fff;
    font-size:13px;
    font-weight:900;
    text-align:center;
    padding:0 8px 8px;
}
.catalog-gallery-thumbs{
    display:flex;
    gap:8px;
    overflow-x:auto;
    padding:3px 4px 2px;
    scrollbar-width:none;
    scroll-snap-type:x proximity;
    justify-content:flex-start;
}
.catalog-gallery-thumbs::-webkit-scrollbar{display:none}
.catalog-gallery-thumb{
    flex:0 0 62px;
    width:62px;
    height:62px;
    padding:3px;
    border:2px solid transparent;
    border-radius:13px;
    background:rgba(255,255,255,.12);
    cursor:pointer;
    scroll-snap-align:center;
}
.catalog-gallery-thumb.active{
    border-color:#fff;
    background:#fff;
}
.catalog-gallery-thumb img{
    width:100%;
    height:100%;
    display:block;
    object-fit:contain;
    border-radius:9px;
    background:#fff;
}
.catalog-gallery-hint{
    color:rgba(255,255,255,.72);
    text-align:center;
    font-size:11px;
    font-weight:800;
    margin-top:7px;
}

@media (hover:hover) and (pointer:fine) and (min-width:769px){
    .catalog-detail-image-frame:hover{
        border-color:#93c5fd;
        box-shadow:0 10px 28px rgba(37,99,235,.12);
    }
}

@media(max-width:768px), (hover:none), (pointer:coarse){
    .catalog-hover-preview{display:none!important}
    .catalog-detail-image-frame[data-gallery-count]:after{
        content:'View';
        min-width:50px;
        width:auto;
        height:27px;
        padding:0 10px;
        font-size:9px;
    }
    .catalog-detail-image-frame[data-gallery-count]{cursor:pointer}
    .catalog-gallery-nav{
        width:40px;
        height:48px;
        font-size:27px;
        background:rgba(255,255,255,.12);
    }
    .catalog-gallery-stage{margin:4px 0}
    .catalog-gallery-thumb{flex-basis:58px;width:58px;height:58px}
}

/* v14 stacking fix: preview/gallery must sit above the product/service floating detail card and its dim backdrop. */
.catalog-hover-preview{z-index:2147483001!important;isolation:isolate}
.catalog-gallery-backdrop{z-index:2147483100!important;isolation:isolate}


/* v20: one consistent View action and click gallery on desktop + mobile. */
.catalog-hover-preview{display:none!important}
.catalog-detail-image-frame[data-gallery-count]{cursor:pointer!important}
@media (min-width:769px) and (hover:hover) and (pointer:fine){
  .catalog-gallery-backdrop.open{display:flex!important;padding:24px}
  .catalog-gallery-shell{width:min(920px,92vw);height:min(760px,88vh);padding:16px 16px 14px;border:1px solid rgba(255,255,255,.15);border-radius:24px;background:rgba(15,23,42,.98);box-shadow:0 34px 100px rgba(2,6,23,.55);overflow:hidden}
  .catalog-gallery-stage{margin:4px 0}
  .catalog-gallery-nav{background:rgba(255,255,255,.14)}
}
