/* Shared device layout: preserve content and let only explicit rails/tables scroll. */
html{scroll-padding-top:140px;-webkit-text-size-adjust:100%}body{min-width:0}main{min-width:0}main :where(.grid,.flex)>:where(div,section,article,aside,form){min-width:0}main :where(img,video,canvas,iframe){max-width:100%}main :where(input,select,textarea){max-width:100%;min-width:0}main :where(h1,h2,h3,p,label){overflow-wrap:anywhere}.dg-table-scroll{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}.dg-table-scroll table{min-width:100%}.dg-table-scroll:focus-visible{outline:2px solid #006a4e;outline-offset:3px}.dg-recovery-layout{display:flex;gap:14px;align-items:flex-start}.dg-recovery-sidebar{width:320px;flex-shrink:0}main .dkc-foot,main .dkc-rate{flex-wrap:wrap}main .dkc-foot{row-gap:6px}main .dkc-count{overflow-wrap:anywhere}.dgp-showcase>div{min-width:0}
@media(max-width:1279px) and (min-width:1024px){.dgp-page .dgp-showcase{grid-template-columns:repeat(2,minmax(0,1fr))}.dgp-showcase>div:nth-child(1),.dgp-showcase>div:nth-child(2){grid-column:span 1}.dgp-showcase>div:nth-child(3){grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.dgp-showcase>div:nth-child(3)>div{margin-top:0}.dgp-page #product-zoom-card{height:430px}.dgp-page .product-thumb-btn{width:68px;height:68px}}
@media(max-width:1023px){.dg-recovery-layout{flex-direction:column}.dg-recovery-layout>div,.dg-recovery-sidebar{width:100%;max-width:100%}main [data-product-grid]{grid-template-columns:repeat(3,minmax(0,1fr))}main [data-section-key="home.trust"]{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}}
@media(max-width:767px){main :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=submit]):not([type=button]),select,textarea){font-size:16px}main :where(input[type=checkbox],input[type=radio]){flex-shrink:0}main [data-product-grid]{grid-template-columns:repeat(2,minmax(0,1fr))}main .dkc{padding:9px;border-radius:16px}main .dkc-title{font-size:14px;line-height:1.4;text-wrap:wrap}main .dkc-price b{font-size:20px}main .dkc-price{gap:5px}main .dkc-save{right:9px;top:9px}main .dkc-star{font-size:11px;padding:3px 6px}main .dkc-count{font-size:11px}main .dkc-cart{width:42px;height:42px;min-height:42px}main .dkc-meta,main .dkc-desc{font-size:11px}main .dkc-img{border-radius:11px}.dgp-page .dgp-showcase{gap:18px}.dgs-cover{min-height:230px}.dk-cart-page .grid.grid-cols-3.divide-x{grid-template-columns:1fr;gap:10px}.dk-cart-page .grid.grid-cols-3.divide-x>span{border:0}.dk-cart-page [aria-label="চেকআউট ধাপ"]{gap:8px}.dk-cart-page [aria-label="চেকআউট ধাপ"] span{white-space:normal}.dg-table-scroll{border-radius:8px}main [type=file]{width:100%;font-size:13px!important}main textarea{resize:vertical}}
@media(max-width:390px){.dkh.lg\:hidden>div:nth-child(2){gap:5px!important;padding-left:9px!important;padding-right:9px!important}.dkh.lg\:hidden>div:nth-child(2)>a:first-child{gap:5px!important}.dkh.lg\:hidden>div:nth-child(2)>a:first-child>b{font-size:21px!important;white-space:nowrap}.dkh.lg\:hidden>div:nth-child(2)>a:first-child>span{width:32px!important;height:34px!important;border-radius:10px!important}.dkh .mh-pill{width:38px;height:40px;border-radius:12px;flex-shrink:0}.dkh .mh-pill svg{width:21px;height:21px}.dkh.lg\:hidden [data-area-open]{max-width:52%;padding-left:8px!important;padding-right:8px!important}.dkh.lg\:hidden form[role=search] button{width:34px!important;height:36px!important;margin-right:3px!important}.dkh.lg\:hidden form[role=search] input{padding-left:6px!important;padding-right:6px!important}.dgp-page #main-buy-form>div{grid-template-columns:1fr}.dgp-page #product-zoom-card{height:300px}.dgp-page #product-thumbnails .product-thumb-btn{width:60px;height:60px}.dgs-cover{min-height:255px}.dgs-identity{gap:8px}.dgs-avatar{width:48px;height:48px}.dgs-title-row h1{font-size:16px}main .dkc{padding:7px;gap:5px}main .dkc-price b{font-size:18px}main .dkc-off{font-size:10px;padding:3px 6px}main .dkc-title{font-size:13px}main .dkc-shop{font-size:11px}main .dkc-chip{font-size:9px;padding:3px 6px;max-width:calc(100% - 12px);white-space:normal}main .dkc-foot{gap:5px}main .dkc-rate{gap:4px}}
@media(hover:none){main .dkc:hover{transform:none}main .dkc:hover::after{opacity:0}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
@supports(padding:max(0px)){@media(max-width:767px){main{padding-bottom:max(6rem,calc(env(safe-area-inset-bottom) + 5rem))!important}}}
@media print{.dg-table-scroll{overflow:visible}.dg-table-scroll table{min-width:0}}
@media(max-width:767px){.dk-footer-main .dk-footer-benefits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.dk-footer-main .dk-footer-benefit{min-width:0;border-left:0}.dk-footer-main .dk-footer-methods{min-width:0;flex-wrap:wrap}.dk-footer-main .dk-footer-method-group{min-width:0;max-width:100%}.dk-footer-main .dk-footer-app-banner>div{min-width:0}.dk-footer-main .dk-footer-newsletter-form{max-width:100%}}
@media(pointer:coarse){main button[type=submit],main input[type=submit],main select{min-height:44px}}

/* ===== Universal device pass (phone / tablet / desktop, iOS + Android) ===== */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
@supports(overflow:clip){html,body{overflow-x:clip}}
body{max-width:100%;overflow-wrap:break-word}
img,svg,video,canvas,iframe,embed,object{max-width:100%}
img,video{height:auto}
.grid>*,.flex>*{min-width:0}
/* iPhone notch / landscape + Android gesture bar */
@supports(padding:max(0px)){
body{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
nav[aria-label="মোবাইল নেভিগেশন"]{padding-left:max(4px,env(safe-area-inset-left));padding-right:max(4px,env(safe-area-inset-right))}
}
/* real viewport height on mobile browsers (address bar shows/hides) */
@supports(height:100dvh){.min-h-screen{min-height:100dvh}.h-screen{height:100dvh}.max-h-screen{max-height:100dvh}}
/* stop iOS auto-zoom on focus (header search + every form, including outside <main>) */
@media(pointer:coarse){
input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=submit]):not([type=button]):not([type=file]):not([type=color]),select,textarea{font-size:16px!important}
}
/* comfortable thumb targets */
@media(pointer:coarse){
button:not([class*="w-"]):not([class*="h-"]),[role=button],summary{min-height:40px}
a.mh-pill,.mh-pill{min-width:44px;min-height:44px}
}
/* small phones (iPhone SE / 320-360px Androids) */
@media(max-width:360px){
main{padding-left:12px!important;padding-right:12px!important}
main :where(h1){font-size:1.35rem;line-height:1.3}
main :where(.grid-cols-4,.grid-cols-5,.grid-cols-6,.grid-cols-7){gap:2px}
}
/* tablets portrait/landscape (768-1023): use the width instead of stretching phone layout */
@media(min-width:768px) and (max-width:1023px){
main{padding-left:24px;padding-right:24px}
main [data-product-grid]{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(min-width:1024px) and (max-width:1279px){main [data-product-grid]{grid-template-columns:repeat(4,minmax(0,1fr))}}
/* dialogs on short landscape phones must scroll, not get cut off */
@media(max-height:520px) and (orientation:landscape){
[role=dialog],[aria-modal=true]{max-height:100dvh;overflow-y:auto;overscroll-behavior:contain}
}
/* hover-only effects must not stick on touch */
@media(hover:none){[class*="hover:-translate-y"]:hover{transform:none}}
/* phone top bar: keep track/help + language switch visible (about/contact live in footer & menu) */
@media(max-width:639px){
.dk-mobile-topbar>a:nth-of-type(n+3){display:none!important}
.dk-mobile-topbar{overflow-x:visible!important}
.dk-mobile-topbar .dk-language-switch select{min-width:0!important;max-width:84px}
}
/* iPad landscape / small laptops (1024-1199): desktop header must fit */
@media(min-width:1024px) and (max-width:1199px){
.dkh>header>div{gap:10px!important;padding-left:14px!important;padding-right:14px!important}
.dkh>header a[aria-label="দোকানগো হোম"]>span:last-child>span{display:none!important}
.dkh>header form[data-search-form]{flex:1 1 200px!important;min-width:180px!important}
.dkh>header>div>span[style*="gap:14px"]{gap:8px!important}
.dkh>header .lift{min-width:0!important;padding-left:10px!important;padding-right:10px!important}
.dkh>header a[href*="account"].lift,.dkh>header>div>span>a:last-child{padding-right:14px!important}
}

/* ===== design/a11y pass 2: readable small text, touch targets ===== */
main .dkc-desc{font-size:12px}
main .dkc-meta,main .dkc-shop{font-size:12px}
main .dkc-off{font-size:11px}
main .dkc-chip{font-size:11px}
@media(pointer:coarse){
main .text-\[9px\],main .text-\[10px\]{font-size:11px!important}
main .text-\[11px\]{font-size:12px!important}
.dk-footer-link{min-height:36px;display:inline-flex;align-items:center}
button.dot{position:relative}
button.dot::after{content:"";position:absolute;inset:-14px -8px}
}

/* tap targets: top bar, breadcrumbs, footer legal links */
@media(pointer:coarse){
.dk-mobile-topbar>a{display:inline-flex;align-items:center;min-height:32px;padding-inline:4px}
nav[aria-label] ol a,nav[aria-label] a.hover\:text-\[\#15803d\]{display:inline-flex;align-items:center;min-height:32px}
footer a{min-height:32px;display:inline-flex;align-items:center}
}

.dgd-demo-tag{font-size:11px!important}

main .text-\[9\.5px\],main .text-\[10\.5px\]{font-size:11px!important}

main .text-\[8px\]{font-size:11px!important}

/* mobile top bar + footer app banner: no text under 11px */
.dk-mobile-topbar a,.dk-mobile-topbar button,.dk-mobile-topbar button span,.dk-mobile-topbar .dk-language-switch span{font-size:11px!important}
.dk-footer-phone span{font-size:11px!important}
