/* Manal Store | Professional responsive product image gallery */
.product-gallery-view{position:relative;min-width:0;align-self:start;background:#f8f7f4}
.product-gallery-view .gallery-view-stage{position:relative;width:100%;height:min(640px,78vh);min-height:360px;overflow:hidden;background:#f7f5f1;touch-action:pan-y;outline-offset:-4px}
/* Show the ENTIRE uploaded photograph at its natural aspect ratio, without cropping. */
.product-gallery-view .gallery-view-stage>img{display:block;width:100%;height:100%;object-fit:contain;object-position:center center;user-select:none;-webkit-user-drag:none}
.product-gallery-view .gallery-view-stage:focus-visible{outline:3px solid #c4a16f}
.product-gallery-view .gallery-view-counter{position:absolute;bottom:13px;left:14px;border:1px solid #ffffff6b;background:#28241ed1;color:#fff;border-radius:30px;padding:5px 12px;font-size:11px;font-variant-numeric:tabular-nums;direction:ltr;z-index:1}
.product-gallery-view .gallery-view-arrow{position:absolute;top:50%;transform:translateY(-50%);width:40px;height:47px;display:grid;place-items:center;padding:0;border:1px solid #f4efe580;background:#ffffffdc;color:#332c23;font-size:33px;font-family:Arial,sans-serif;line-height:1;border-radius:10px;cursor:pointer;z-index:1;box-shadow:0 3px 14px #0000001a;transition:background .17s}
.product-gallery-view .gallery-view-arrow:hover{background:#fff}
.product-gallery-view .gallery-view-arrow:focus-visible{outline:3px solid #bc9f76}
.product-gallery-view .gallery-prev{left:12px}
.product-gallery-view .gallery-next{right:12px}
.product-gallery-view .gallery-view-thumbs{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin;scroll-snap-type:x proximity;padding:12px;background:#fff}
.product-gallery-view .gallery-view-thumbs button{position:relative;flex:0 0 68px;height:80px;overflow:hidden;padding:0;border:2px solid transparent;border-radius:7px;background:#f7f5f1;cursor:pointer;scroll-snap-align:start}
.product-gallery-view .gallery-view-thumbs button.active{border-color:#ae8e5e;box-shadow:0 0 0 1px #ae8e5e}
.product-gallery-view .gallery-view-thumbs img{display:block;width:100%;height:100%;object-fit:contain}
.product-gallery-view .gallery-view-thumbs button:focus-visible{outline:2px solid #94794f;outline-offset:2px}
.admin-page .product-gallery-admin{background:#fdfbf7;border:1px solid #e8dfd0}
.admin-page .product-gallery-admin .editor-section-head{align-items:center;gap:10px;flex-wrap:wrap}
.admin-page .product-gallery-admin .gallery-counter{border-radius:7px;background:#f4ecdf;color:#83643d;padding:5px 10px;font-size:11px;font-weight:700}
.admin-page .gallery-help{font-size:11px;line-height:1.9;color:#888074;margin:0 0 14px}
.admin-page .gallery-upload-label{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:105px;padding:14px;border:2px dashed #d9c7a8;border-radius:11px;background:#fbf7ef;color:#574533;cursor:pointer;text-align:center}
.admin-page .gallery-upload-label>span{font-size:26px;line-height:1}
.admin-page .gallery-upload-label strong{font-size:12px}
.admin-page .gallery-upload-label small{font-size:10px;color:#8c8171}
.admin-page .gallery-upload-label:hover{border-color:#ae8957;background:#fbf3e4}
.admin-page #galleryFiles{display:block;margin:8px 0 0;max-width:100%;font-size:10px;color:#8d7b60}
.admin-page .gallery-url-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:13px 0 16px}
.admin-page .gallery-url-entry input{min-width:0;width:100%;height:42px;padding:8px 10px;border:1px solid #dfd9ce;border-radius:8px;background:#fff;color:#332e28;font-size:11px}
.admin-page .gallery-url-entry button{border:1px solid #c8ad82;border-radius:8px;padding:9px 12px;background:#f3e8d5;color:#72502a;font:700 11px 'Cairo',Tahoma,sans-serif;cursor:pointer}
.admin-page .gallery-admin-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.admin-page .gallery-admin-item{display:flex;align-items:center;gap:9px;min-width:0;min-height:110px;padding:9px;border:1px solid #ece6da;border-radius:10px;background:#fff}
.admin-page .gallery-admin-thumbnail{position:relative;flex:none;width:75px;height:88px;overflow:hidden;border-radius:7px;background:#f0eeeb}
.admin-page .gallery-admin-thumbnail img{width:100%;height:100%;object-fit:cover}
.admin-page .gallery-admin-thumbnail b{position:absolute;top:4px;right:4px;background:#231f1dcc;color:white;border-radius:6px;font:700 10px/1 Arial,sans-serif;padding:5px}
.admin-page .gallery-admin-actions{min-width:0;display:grid;gap:9px;align-content:center}
.admin-page .gallery-admin-actions small{font-size:10px;color:#988976}
.admin-page .gallery-admin-actions>div{display:flex;align-items:center;flex-wrap:wrap;gap:5px}
.admin-page .gallery-admin-actions button{min-width:30px;min-height:30px;border:1px solid #e8e0d4;border-radius:7px;background:#fff;color:#6d5b44;padding:5px 7px;cursor:pointer;font:600 10px 'Cairo',Tahoma,sans-serif}
.admin-page .gallery-admin-actions button:hover:not(:disabled){border-color:#bf9a68;background:#faf5ec}
.admin-page .gallery-admin-actions .gallery-delete{color:#a65a50;border-color:#ebd4cc}
.admin-page .gallery-admin-actions button:disabled{opacity:.4;cursor:not-allowed}
.admin-page .gallery-admin-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}
.admin-page .gallery-admin-footer small,.admin-page .gallery-admin-footer span{font-size:10px;line-height:1.8;color:#8d8070}
.admin-page .product-gallery-admin [role=alert]:not(:empty){color:#a24b3a}
@media(max-width:820px){
 .product-gallery-view .gallery-view-stage{height:min(66dvh,620px);min-height:min(320px,55dvh);max-height:620px}
 .product-gallery-view .gallery-view-thumbs button{flex-basis:58px;height:69px}
 .admin-page .gallery-admin-list{grid-template-columns:1fr}
}
@media(max-width:600px){
 /* More viewing room for long dresses/portrait photos while keeping the entire image visible. */
 .product-gallery-view .gallery-view-stage{height:min(68dvh,620px);min-height:min(340px,58dvh);max-height:620px}
 .product-gallery-view .gallery-view-arrow{width:36px;height:42px;font-size:29px}
 .product-gallery-view .gallery-view-thumbs{gap:6px;padding:9px 12px}
 .product-gallery-view .gallery-view-thumbs button{flex-basis:57px;height:68px}
 .admin-page .gallery-url-entry{grid-template-columns:1fr}
 .admin-page .gallery-url-entry button{min-height:43px}
 .admin-page .gallery-admin-thumbnail{height:80px}
}
@media(prefers-reduced-motion:reduce){
 .product-gallery-view .gallery-view-arrow{transition:none}
 .product-gallery-view .gallery-view-thumbs{scroll-behavior:auto}
}
