/* Short, visible-only JavaScript effects; content remains visible without JavaScript. */
html.nile-text-motion{overflow-x:clip}
html body #main [data-nile-motion]:not([data-nile-animating]),html body #site-dialog [data-nile-motion]:not([data-nile-animating]){opacity:1!important;translate:none!important}
html body #main [data-nile-motion][data-nile-pending],html body #site-dialog [data-nile-motion][data-nile-pending]{opacity:0!important}
html body [data-nile-animating]{will-change:translate,opacity}
[data-nile-clickable],html body .gallery-tile,html body .gallery-tile img{cursor:pointer!important}
@media(hover:hover) and (pointer:fine){
 html body #main .product-card,html body #main .resource-card,html body #main .tool-preview-card,html body #main .branch-preview-card{transition:box-shadow .22s ease,border-color .22s ease!important}
 html body #main [data-nile-clickable]:hover,html body #main .branch-preview-card:hover{box-shadow:0 14px 32px #003f5a1c;border-color:#91aab8}
}
.gallery-tile:focus-visible,[data-nile-clickable]:focus-within{outline:2px solid #d86337;outline-offset:4px}
.site-dialog.gallery-dialog{width:min(900px,calc(100% - 24px))}
.site-dialog .gallery-full-image{width:100%;max-height:65vh;max-height:65dvh;height:auto;object-fit:contain;display:block;border-radius:12px}
.site-dialog .dialog-photo:has(.gallery-full-image){aspect-ratio:auto;max-height:none;margin:0;background:#edf2f4}
.gallery-photo-caption{font-size:13px;line-height:1.8;margin-block:16px;text-align:center;color:#325365}
.gallery-photo-controls{display:flex;justify-content:space-between;align-items:center;gap:12px}
.gallery-photo-controls .button{min-height:44px;padding:10px 18px}
@media(max-width:900px){
 .nav-panel.mobile-drawer{transition:transform .24s ease,visibility .24s!important}
 .menu-backdrop{transition:opacity .24s ease,visibility .24s!important}
 .maker-table-wrap,.planner-table-wrap{max-width:100%;touch-action:pan-x pan-y}
 .planner-table-wrap:focus-visible,.maker-table-wrap:focus-visible{outline:2px solid #d86337;outline-offset:3px}
}
@media(max-width:600px){
 html{scroll-padding-top:100px;text-size-adjust:100%;-webkit-text-size-adjust:100%}
 .container{width:calc(100% - 32px)}
 .page-inner #main > .page-context + section,.page-inner #main > #branches{min-height:0}
 .page-inner .page-intro{min-height:238px;padding-block:calc(var(--header-offset,110px) + 8px) 18px}
 .page-inner .page-context-inner{gap:6px;min-height:44px}
 .page-inner #main > .page-context + section h2{font-size:clamp(25px,7vw,30px)}
 .section-heading,.gallery-heading{flex-wrap:wrap;gap:18px}
 .product-grid,.resource-grid,.branch-preview-grid,.tools-preview-grid{gap:20px;grid-auto-rows:auto}
 .product-card,.resource-card,.tool-preview-card,.branch-preview-card,.planner-shell,.quote-form,.maker-panel{min-width:0;max-width:100%}
 .product-card .product-content p,.resource-card p,.tool-preview-card p,.branch-preview-card p{font-size:13px;line-height:1.9}
 .tool-preview-card,.branch-preview-card{display:flex;flex-direction:column}
 .tool-photo-frame,.branch-preview-photo{height:190px;min-height:190px;flex:0 0 190px}
 .branch-preview-copy,.tool-preview-card>div:not(.tool-photo-frame){padding:22px}
 .home-preview .about-photo-frame{height:260px}
 .filter-button,.maker-tab,.branch-tab,.planner-text-button,.resource-answer-button,.card-link,.site-footer .footer-shortcuts .footer-nav a{min-height:44px}
 .filters{flex-wrap:wrap;gap:6px}
 .filter-button{padding:10px 12px}
 .planner-fields input,.planner-fields select,.quote-form input,.quote-form select,.quote-form textarea,.maker-filter select{font-size:16px!important;min-height:48px}
 .planner-unit-results,.planner-live-total,.planner-schedule-heading,.planner-sum,.planner-actions{min-width:0;flex-wrap:wrap;gap:12px}
 .quote-grid,.planner-grid,.services-grid,.about-grid,.faq-grid{gap:28px}
 .contact-heading{padding-inline-end:0}
 .contact-heading-arrow{display:none}
 .contact-block>a,.contact-block>a.email-contact{font-size:clamp(18px,5.8vw,23px);overflow-wrap:anywhere}
 .floating-wa{bottom:calc(16px + env(safe-area-inset-bottom,0px));inset-inline-end:16px}
 .site-dialog{width:calc(100% - 20px);max-height:calc(100dvh - 20px)}
 .site-dialog .dialog-body{padding:20px 16px 24px}
 .site-dialog .gallery-full-image{max-height:58dvh}
 .dialog-actions{display:flex;flex-direction:column;align-items:stretch}
 .dialog-actions .button{white-space:normal;line-height:1.7;min-height:48px}
 .gallery-photo-controls .button{font-size:12px;padding-inline:14px}
}
@media(max-width:360px){
 .container{width:calc(100% - 28px)}
 .site-header.header-smart .main-nav{gap:5px}
 .nav-actions{gap:5px}
 .header-quote{padding-inline:10px}
 .product-content,.resource-card{padding-inline:18px}
 .page-inner .page-intro h1{font-size:24px}
}
@media(prefers-reduced-motion:reduce){
 html body #main [data-nile-motion],html body #site-dialog [data-nile-motion],html body #main [data-nile-motion][data-nile-pending],html body #site-dialog [data-nile-motion][data-nile-pending],html body [data-nile-press]{opacity:1!important;transform:none!important;translate:none!important;scale:none!important;clip-path:none!important;transition:none!important}
 .nav-panel.mobile-drawer,.menu-backdrop{transition:none!important}
}
@media print{html body #main [data-nile-motion][data-nile-pending],html body #site-dialog [data-nile-motion][data-nile-pending],html body [data-nile-motion]{opacity:1!important;transform:none!important;translate:none!important;clip-path:none!important}}

@media(max-width:700px) and (max-resolution:1.49dppx){
body[data-page='about'] .page-intro{--intro-photo:url('../images/mainbanner-mobile.webp?v=hd2')}
body[data-page='products'] .page-intro{--intro-photo:url('../images/rebar-hero-mobile.webp?v=hd2')}
body[data-page='services'] .page-intro{--intro-photo:url('../images/warehouse-egyptian-handling-mobile.webp?v=hd2')}
body[data-page='gallery'] .page-intro{--intro-photo:url('../images/steel-warehouse-mobile.webp?v=hd2')}
body[data-page='steel-guide'] .page-intro{--intro-photo:url('../images/reinforcing-bundles-new-mobile.webp?v=hd2')}
body[data-page='calculator'] .page-intro{--intro-photo:url('../images/product-rebar.webp?v=hd1')}
body[data-page='resources'] .page-intro{--intro-photo:url('../images/warehouse-egyptian-bundles-mobile.webp?v=hd2')}
body[data-page='faq'] .page-intro{--intro-photo:url('../images/warehouse-beni-suef-mobile.webp?v=hd2')}
body[data-page='contact'] .page-intro{--intro-photo:url('../images/cairo-headquarters-mobile.jpeg?v=hd1')}
body[data-page='quote'] .page-intro{--intro-photo:url('../images/out-mobile.webp?v=hd2')}
}

/* Essential controls stay independent of animation support and optional effects. */
a[href],button,input,select,textarea,summary{touch-action:manipulation;-webkit-tap-highlight-color:rgba(225,101,56,.18)}
button>svg,a>svg,summary>svg{pointer-events:none}
#menu-backdrop[hidden]{display:none!important;pointer-events:none!important}
#nav-panel.mobile-drawer.is-open{pointer-events:auto;z-index:120}
dialog:not([open]){display:none!important}
.site-dialog.dialog-fallback[open]{display:block!important;position:fixed;top:50%;left:50%;right:auto;bottom:auto;margin:0;transform:translate(-50%,-50%)!important;z-index:1000;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);box-shadow:0 0 0 100vmax #00121dcc,0 24px 70px #0005}

/* Phone cards share the available width with a small, consistent edge gutter. */
@media(max-width:700px){
 #main .container{width:calc(100% - 20px);max-width:none;margin-inline:auto}
 #main .product-grid,#main .resource-grid,#main .branch-preview-grid,#main .tools-preview-grid,#main .rebar-photo-grid,#main .gallery-grid,#main .contact-grid{grid-template-columns:minmax(0,1fr);gap:22px}
 #main .product-card,#main .resource-card,#main .branch-preview-card,#main .tool-preview-card,#main .rebar-photo-card,#main .gallery-tile,#main .contact-block{width:100%;min-width:0;max-width:none;grid-column:auto;margin-inline:0}
 #main .gallery-tile,#main .gallery-wide,#main .rebar-photo-card:first-child{grid-column:auto;aspect-ratio:3/2}
 #main .product-image{height:auto;aspect-ratio:1.55}
 #main .tool-photo-frame,#main .branch-preview-photo{height:220px;min-height:220px;flex:0 0 220px}
 #main .product-content,#main .resource-card,#main .branch-preview-copy{padding-inline:22px}
}
