/* Product preview: compact header, balanced media and aligned actions. */
#homeGalleryModal .modal-dialog{width:calc(100% - 32px)!important;max-width:1120px!important;height:auto!important;margin:16px auto!important}
#homeGalleryModal .modal-content{height:calc(100dvh - 32px)!important;max-height:820px;grid-template-rows:44px minmax(0,1fr) auto;border-radius:16px!important;overflow:hidden!important;color:#172033!important;background:#fff!important}
#homeGalleryModal .modal-header{display:flex!important;align-items:center;gap:12px;padding:0 14px!important;background:#fff!important;color:#172033!important;border-bottom:1px solid #e5e7eb!important;backdrop-filter:none}
#homeGalleryModal .home-gallery-title-wrap{display:flex;align-items:center;gap:10px;flex:1;min-width:0}
#homeGalleryModal .modal-title{font-size:15px!important;line-height:1.3;margin:0!important;min-width:0;font-weight:650}
#homeGalleryCount{display:inline-flex;flex:none;padding:3px 8px;border-radius:20px;background:#f1f5f9;color:#64748b;font-size:11px;line-height:1.4;font-variant-numeric:tabular-nums}
#homeGalleryModal .btn-close{filter:none!important;flex:none;width:20px;height:20px;padding:10px;margin:0!important;box-sizing:content-box;opacity:.7}
#homeGalleryModal .modal-body{padding:12px!important;overflow:hidden;background:#fff}
#homeGalleryModal .home-gallery-shell{gap:8px;min-width:0}
#homeGalleryModal .home-gallery-stage,#homeGalleryMedia{background:#f6f7f9!important;border-radius:10px}
#homeGalleryModal .home-gallery-stage{padding:12px 58px}
#homeGalleryMedia>img,#homeGalleryMedia>video{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;padding:0!important;background:transparent!important;border-radius:6px}
#homeGalleryModal .home-gallery-nav{width:40px;height:40px;background:#fff!important;color:#172033!important;border:1px solid #e2e8f0!important;box-shadow:0 2px 8px #1720330c}
#homeGalleryModal .home-gallery-nav i{font-size:20px!important}
#homeGalleryModal .home-gallery-nav:disabled{visibility:hidden}
#homeGalleryModal .home-gallery-thumbs{display:flex;gap:6px;max-height:56px;overflow-x:auto;padding:2px;justify-content:center}
#homeGalleryModal .home-gallery-thumb{width:48px;height:48px;flex:0 0 48px;border-radius:8px;background:#f8fafc}
#homeGalleryModal .modal-footer{display:flex!important;flex-direction:row;align-items:center!important;gap:12px;padding:10px 14px!important;border-top:1px solid #e5e7eb!important;background:#fff!important;color:#172033!important;backdrop-filter:none}
#homeGalleryModal .modal-footer>div{margin:0}
#homeGalleryPrice{font-size:16px;color:#a70020}
#homeGalleryType{font-size:11px;color:#64748b;line-height:1.4}
#homeGalleryModal .home-gallery-actions{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
#homeGalleryModal .home-gallery-actions .btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:40px;padding:8px 11px;font-size:12px;line-height:1.3;font-weight:600;border-radius:9px}
#homeGalleryModal .home-gallery-chat{background:#effaf4!important;border-color:#ccebd8!important;color:#166534!important}
#homeGalleryModal .home-gallery-call{background:#f1f5f9!important;border-color:#e2e8f0!important;color:#334155!important}
#homeGalleryModal :focus-visible{outline:3px solid #eaa622;outline-offset:2px}
@media(max-width:600px){#homeGalleryModal .modal-dialog{width:calc(100% - 16px)!important;max-width:none!important;margin:8px auto!important}#homeGalleryModal .modal-content{height:calc(100dvh - 16px)!important;border-radius:12px!important}#homeGalleryModal .modal-body{padding:8px!important}#homeGalleryModal .home-gallery-stage{padding:8px 42px!important}#homeGalleryModal .home-gallery-prev{left:4px}#homeGalleryModal .home-gallery-next{right:4px}#homeGalleryModal .home-gallery-nav{width:36px;height:36px}#homeGalleryModal .modal-footer{flex-direction:column;align-items:stretch!important;gap:8px;padding:10px!important}#homeGalleryModal .modal-footer>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:8px}#homeGalleryModal .home-gallery-actions{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%}#homeGalleryModal .home-gallery-actions .btn{min-height:44px;width:100%!important}}

#homeGalleryModal .modal-content{grid-template-columns:minmax(0,1fr)}#homeGalleryModal .modal-header,#homeGalleryModal .modal-body,#homeGalleryModal .modal-footer{min-width:0;max-width:100%;box-sizing:border-box}#homeGalleryModal .home-gallery-title-wrap{width:0}

/* Picture backdrop toggle and floating thumbnail rail. Video controls stay clear. */
#homeGalleryModal:not(:has(#homeGalleryMedia>video)){--picture-backdrop:#000}
#homeGalleryModal.is-white-backdrop:not(:has(#homeGalleryMedia>video)){--picture-backdrop:#fff}
#homeGalleryModal:not(:has(#homeGalleryMedia>video)) .home-gallery-shell{position:relative;grid-template-rows:minmax(0,1fr);gap:0}
#homeGalleryModal:not(:has(#homeGalleryMedia>video)) .home-gallery-stage,
#homeGalleryModal:not(:has(#homeGalleryMedia>video)) #homeGalleryMedia{background:var(--picture-backdrop)!important}
#homeGalleryModal #homeGalleryMedia>img{cursor:pointer}
#homeGalleryModal:not(:has(#homeGalleryMedia>video)) .home-gallery-thumbs{position:absolute;z-index:4;bottom:10px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 24px);max-height:58px;padding:5px;gap:6px;border:1px solid #ffffff40;border-radius:12px;background:#17203399;backdrop-filter:blur(8px);justify-content:flex-start}
#homeGalleryModal .home-gallery-thumbs:empty{display:none}
#homeGalleryModal .home-gallery-backdrop{position:absolute;z-index:5;top:10px;right:10px;display:grid;place-items:center;width:36px;height:36px;border:1px solid #d5dbe1;border-radius:50%;background:#fff;color:#172033;font-size:22px;line-height:1;box-shadow:0 2px 8px #0002}
#homeGalleryModal:has(#homeGalleryMedia>video) .home-gallery-backdrop{display:none}

@layer mv-responsive-foundation {
#homeGalleryModal .home-gallery-chat{background:#168747!important;border-color:#fff!important;color:#fff!important}
#homeGalleryModal .home-gallery-chat i{color:#fff!important}
#homeGalleryModal .home-gallery-prev{left:3px!important}#homeGalleryModal .home-gallery-next{right:3px!important}
#homeGalleryModal .modal-content:fullscreen{width:100vw!important;height:100dvh!important;max-height:none!important;border-radius:0!important}
#homeGalleryModal.gallery-expanded .modal-dialog{width:100%!important;max-width:none!important;margin:0!important;height:100dvh!important}
#homeGalleryModal.gallery-expanded .modal-content{height:100dvh!important;max-height:none!important;border-radius:0!important}
@media(max-width:600px){
#homeGalleryModal .home-gallery-stage{padding:4px 0!important}
#homeGalleryModal .home-gallery-actions{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:5px!important;width:100%!important}
#homeGalleryModal .home-gallery-actions .btn{flex:0 0 38px!important;width:38px!important;height:42px!important;min-height:42px!important;padding:5px!important;font-size:16px!important;gap:4px!important;border-radius:9px!important}
#homeGalleryModal .home-gallery-actions .home-gallery-chat{flex:1 1 auto!important;width:auto!important;min-width:0!important;font-size:12px!important;white-space:nowrap!important}
#homeGalleryModal .home-gallery-actions .gallery-action-label{display:none!important}
#homeGalleryModal .home-gallery-nav{width:32px!important;height:36px!important}
#homeGalleryModal .modal-footer{padding:8px!important;gap:7px!important}
}
}
