/* Dentora V3 / productModal — scoped stylesheet */
#productOverlay .product-dialog{width:min(1220px,100%);max-height:94vh;overflow:auto;background:white;border-radius:22px}
#productOverlay .product-dialog>header{display:flex;justify-content:space-between;align-items:center;padding:22px 30px;border-bottom:1px solid var(--line);font-size:10px;letter-spacing:.13em;font-weight:800}
#productOverlay .product-dialog>header button{border:0;background:#edf2f8;border-radius:999px;padding:8px 16px;font-size:12px}
#productOverlay .modal-product-layout{display:grid;grid-template-columns:1.05fr .95fr;gap:44px;padding:36px}
#productOverlay .modal-main-image{height:min(60vh,550px);background:#ecf1f8;display:grid;place-items:center;border-radius:17px;overflow:hidden}
#productOverlay .modal-main-image img{height:100%;max-width:100%;object-fit:contain}
#productOverlay .modal-thumbs{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
#productOverlay .modal-thumbs button{width:72px;height:72px;border:1px solid #d9e1ed;border-radius:9px;background:#f8fafc;padding:5px;overflow:hidden}
#productOverlay .modal-thumbs button.active{border:2px solid var(--pink)}
#productOverlay .modal-thumbs img{width:100%;height:100%;object-fit:contain}
#productOverlay .modal-product-copy h2{font-size:clamp(30px,3vw,50px);margin:15px 0 20px}
#productOverlay .modal-product-copy>div:not(.spec-grid):not(.modal-product-nav){color:#68788d}
#productOverlay .spec-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:30px 0}
#productOverlay .spec-grid>div{background:#f3f6fb;border-radius:12px;padding:15px}
#productOverlay .spec-grid small{display:block;color:#718199;font-size:10px}
#productOverlay .spec-grid strong{color:var(--navy)}
#productOverlay .modal-product-copy details{border-block:1px solid #e4e9f0;padding:15px 0}
#productOverlay .modal-product-copy summary{cursor:pointer;font-weight:800}
#productOverlay .modal-product-nav{display:flex;justify-content:space-between;margin-top:40px;gap:12px}
#productOverlay .modal-product-nav button{border:1px solid var(--line);border-radius:999px;background:white;padding:11px 16px;font-weight:800;font-size:12px}
@media (max-width:650px){#productOverlay .modal-product-layout{grid-template-columns:1fr;gap:18px;padding:20px}}
@media (max-width:650px){#productOverlay .modal-main-image{height:330px}}
@media (max-width:650px){#productOverlay .product-dialog{max-height:100dvh}}

/* 02.3 gallery: native link fallback with focused, restrained lightbox */
#productOverlay .modal-gallery{min-width:0;position:relative}
#productOverlay #modalMainImage{position:relative;isolation:isolate;width:100%;height:min(60vh,550px);overflow:hidden;display:flex;align-items:center;justify-content:center;background:#f1f5fb;cursor:zoom-in;border-radius:17px}
#productOverlay .dn-gallery-open{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-decoration:none;color:inherit;cursor:zoom-in;touch-action:manipulation}
#productOverlay .dn-gallery-open>img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center;transform:none!important;filter:none!important}
#productOverlay .dn-gallery-caption{position:absolute;right:14px;bottom:14px;display:inline-flex;align-items:center;gap:7px;padding:9px 13px;border-radius:999px;background:#ffffffeb;color:#172d55;box-shadow:0 4px 16px #172d5520;font:700 12px/1.3 Arial,sans-serif;pointer-events:none;opacity:0;transform:translateY(3px);transition:opacity .2s,transform .2s}
#productOverlay .dn-gallery-open:hover .dn-gallery-caption,#productOverlay .dn-gallery-open:focus-visible .dn-gallery-caption{opacity:1;transform:none}
#productOverlay .dn-gallery-open:focus-visible{outline:3px solid #f2188d;outline-offset:-4px}
#productOverlay .modal-photo-preview{display:none!important}
body>#dnFullImageViewer{position:fixed;inset:0;z-index:2147483640;display:grid;place-items:center;background:rgba(12,24,45,.91);padding:18px;box-sizing:border-box;overscroll-behavior:contain;backdrop-filter:blur(5px)}
body>#dnFullImageViewer .modal-photo-frame{position:relative;display:flex;align-items:center;justify-content:center;max-width:100%;max-height:100%}
body>#dnFullImageViewer .modal-photo-frame>img{display:block;width:auto;height:auto;max-width:calc(100vw - 36px);max-height:calc(100dvh - 50px);object-fit:contain;border-radius:8px}
body>#dnFullImageViewer .modal-photo-close{position:absolute;top:8px;right:8px;display:grid;place-items:center;width:42px;height:42px;z-index:3;background:#fff;color:#172d55;border:0;border-radius:50%;font:600 27px/1 Arial,sans-serif;cursor:pointer;box-shadow:0 2px 14px #0003}
body>#dnFullImageViewer .modal-photo-status{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font:600 13px Arial,sans-serif;pointer-events:none;white-space:nowrap}
@media(max-width:650px){#productOverlay #modalMainImage{height:min(65vh,430px)}#productOverlay .dn-gallery-caption{opacity:1;bottom:10px;right:10px;padding:8px 10px;font-size:11px}body>#dnFullImageViewer{padding:12px}body>#dnFullImageViewer .modal-photo-frame>img{max-width:calc(100vw - 24px);max-height:calc(100dvh - 36px)}body>#dnFullImageViewer .modal-photo-close{width:38px;height:38px}}
@media(prefers-reduced-motion:reduce){#productOverlay .dn-gallery-caption{transition:none}}

/* V3 1.1.6: Product tag chips use the same source as the product cards. */
#productOverlay .modal-product-tags{margin:-12px 0 24px;color:var(--navy,#172d55)}
#productOverlay .modal-product-tags[hidden]{display:none!important}
#productOverlay .modal-tags-label{font-size:10px;font-weight:800;letter-spacing:.1em;color:#718199;margin-bottom:10px}
#productOverlay .modal-tags-list{display:flex;flex-wrap:wrap;gap:8px}
#productOverlay .modal-tag{display:inline-flex;align-items:center;padding:8px 12px;border:1px solid #d7e0ed;border-radius:999px;background:#f8fafc;color:#244c7b;font-size:12px;line-height:1.25;font-weight:700;max-width:100%;overflow-wrap:anywhere}
@media(max-width:650px){#productOverlay .modal-product-tags{margin:-8px 0 20px}#productOverlay .modal-tags-list{gap:6px}#productOverlay .modal-tag{font-size:11px;padding:7px 10px}}
