/* Mega Sewa Global responsive polish v3
   Purpose: keep the desktop composition clean while making 320px+ phones
   render the same visual language without clipping, overlap or horizontal scroll. */
html,body{max-width:100%;overflow-x:hidden}
img{max-width:100%}
.desktop-site,.mobile-app,.app-shell,.page-pad,.desktop-wrap{min-width:0}

/* Tablet uses the app/mobile composition, desktop starts at 1200px. */
@media (max-width:1199.98px){
  body{padding-bottom:72px!important;background:#fff!important}
  .desktop-site{display:none!important}
  .mobile-app{display:block!important}
  .mega-footer{display:none!important}
  .app-shell{width:100%;max-width:820px;margin:0 auto;min-height:100vh;background:#fff;overflow:hidden}
  .app-header{position:relative;z-index:50;background:linear-gradient(135deg,#ef0505 0%,#d30008 55%,#a80000 100%);border-radius:0 0 28px 28px;padding:14px 18px 16px;box-shadow:0 4px 14px rgba(169,0,0,.16)}
  .app-top{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
  .brand-wrap{display:flex;align-items:center;gap:8px;min-width:0;flex:1;overflow:hidden}
  .brand-wrap img{width:76px;height:54px;flex:0 0 76px;object-fit:contain;object-position:left center}
  .brand-name{font-size:25px;line-height:1;color:#fff;font-weight:900;letter-spacing:-.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .brand-name small{font-size:.58em;font-weight:800}
  .top-icons{display:flex;gap:8px;flex:0 0 auto}
  .round-icon{width:40px;height:40px;border:1.3px solid rgba(255,255,255,.8);font-size:19px;flex:0 0 40px}
  .app-search{height:56px;margin-top:10px;padding:0 14px;gap:11px;border-radius:15px;box-shadow:0 5px 16px rgba(0,0,0,.13)}
  .app-search input{font-size:16px;min-width:0;width:100%;white-space:nowrap;text-overflow:ellipsis}
  .app-search i,.app-search .filter{font-size:20px;flex:0 0 auto}
  .mobile-search-results{left:18px;right:18px;top:128px;max-height:330px;overflow:auto}
  .page-pad{width:100%;padding:10px 14px 8px}
  .hero-ref{width:100%;height:auto;aspect-ratio:2.25/1;object-fit:cover;border-radius:16px;margin:0 0 12px;box-shadow:0 5px 15px rgba(15,23,42,.12)}
  .chip-strip{width:100%;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin:7px 0 18px;overflow:visible}
  .chip{min-width:0;width:100%;height:98px;padding:6px 2px;border-radius:14px;font-size:12px;line-height:1.05;overflow:hidden;word-break:normal}
  .chip i{font-size:27px;margin-bottom:6px}
  .section-head{gap:10px;margin:7px 1px 9px;align-items:flex-end}
  .section-head h1,.section-head h2{font-size:27px;line-height:1.05;letter-spacing:-.7px;min-width:0}
  .section-head a{font-size:15px;line-height:1.1;white-space:nowrap;flex:0 0 auto}
  .subhead{font-size:14px;line-height:1.3;margin:-3px 1px 12px}
  .product-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;width:100%}
  .m-card{min-width:0;width:100%;border-radius:14px;box-shadow:0 3px 12px rgba(15,23,42,.10)}
  .m-card .pic{height:auto;aspect-ratio:1.12/1;background:linear-gradient(180deg,#fafafa,#f1f2f3)}
  .m-card .pic img{display:block;width:100%;height:100%;object-fit:contain;padding:2px}
  .heart{width:34px;height:34px;right:7px;top:7px;font-size:16px}
  .m-info{padding:7px 8px 8px;min-width:0}
  .m-title{font-size:14px;line-height:1.08;min-height:31px;max-height:46px;overflow:hidden;overflow-wrap:anywhere}
  .m-desc{font-size:11.5px;line-height:1.18;height:28px;margin:3px 0 7px;overflow:hidden}
  .m-actions{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);gap:5px;width:100%}
  .save-btn,.wa-btn{min-width:0;width:100%;height:35px;border-radius:8px;font-size:10.5px;line-height:1;gap:4px;padding:0 4px;white-space:nowrap;overflow:hidden}
  .save-btn i,.wa-btn i{font-size:14px;flex:0 0 auto}
  .category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .cat-card{min-width:0;border-radius:13px}
  .cat-card img{height:auto;aspect-ratio:1.35/1;object-fit:contain}
  .cat-meta{height:56px;grid-template-columns:26px minmax(0,1fr) 10px;padding:5px 7px;gap:4px}
  .cat-meta i{font-size:20px}.cat-meta strong{font-size:12.5px;line-height:1.08;overflow-wrap:anywhere}
  .bottom-nav{height:68px;grid-template-columns:repeat(5,minmax(0,1fr));padding:6px 8px max(6px,env(safe-area-inset-bottom));border-radius:22px 22px 0 0}
  .bottom-nav a{font-size:11px;gap:2px;min-width:0}.bottom-nav i{font-size:21px}.bottom-nav a.active:after{width:42px;height:3px;bottom:1px}
  .detail-breadcrumb{font-size:13px;gap:6px;white-space:nowrap;overflow:hidden}.detail-breadcrumb strong{overflow:hidden;text-overflow:ellipsis}
  .detail-main{height:auto;aspect-ratio:1.72/1;border-radius:15px}.detail-main img{object-fit:contain}
  .thumbs{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:9px 0 13px}.thumb{height:auto;aspect-ratio:1.1/1;border-radius:9px;padding:0}
  .detail-title{font-size:25px;line-height:1.04;margin:7px 2px;overflow-wrap:anywhere}.detail-lead{font-size:14px;line-height:1.35;margin:0 2px 12px}
  .feature-row{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.feature-box{min-width:0;min-height:82px;padding:10px 3px;border-radius:12px}.feature-box i{font-size:23px;margin-bottom:6px}.feature-box span{font-size:11px}
  .spec-card{margin:12px 0;padding:10px 11px;border-radius:13px}.spec-card h3{font-size:17px}.product-description{font-size:13px;line-height:1.55;max-width:100%;overflow:hidden}.product-description *{max-width:100%!important}.product-description table{display:block;max-width:100%;overflow-x:auto}
  .detail-actions{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:7px;margin:12px 0}.detail-actions a{height:44px!important;font-size:12px!important}
  .about-card,.contact-card,.faq-row,.story-card{border-radius:14px;padding:13px;margin:10px 0}.story-card h2,.about-card h2{font-size:22px;line-height:1.08}.about-duo{gap:8px}.about-icon{width:48px;height:48px;font-size:23px}.values{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.value{font-size:12px}.value i{font-size:23px}
  .contact-card{gap:9px;align-items:center}.contact-card .bubble{width:44px;height:44px;font-size:20px}.contact-card h3{font-size:15px;line-height:1.1}.contact-card p{font-size:12px;line-height:1.25}.contact-card .action{padding:9px 8px;border-radius:9px;font-size:11px;white-space:nowrap}
  .faq-row{grid-template-columns:30px minmax(0,1fr) 12px;padding:10px}.faq-row i:first-child{font-size:20px}.faq-row h4{font-size:14px}.faq-row p{font-size:11px;line-height:1.2}
}

/* Phones: exact density tuned for 320–430 CSS px screens. */
@media (max-width:480px){
  body{padding-bottom:64px!important}
  .app-shell{max-width:none}
  .app-header{padding:10px 10px 12px;border-radius:0 0 24px 24px}
  .brand-wrap{gap:5px}.brand-wrap img{width:58px;height:43px;flex-basis:58px}.brand-name{font-size:20px;letter-spacing:-.6px}.brand-name small{font-size:.52em}
  .top-icons{gap:6px}.round-icon{width:34px;height:34px;flex-basis:34px;font-size:16px}
  .app-search{height:50px;margin-top:8px;padding:0 11px;border-radius:13px;gap:8px}.app-search input{font-size:14px}.app-search i,.app-search .filter{font-size:18px}.mobile-search-results{left:10px;right:10px;top:107px}
  .page-pad{padding:9px 10px 7px}.hero-ref{border-radius:14px;margin-bottom:10px}
  .chip-strip{gap:5px;margin:6px 0 15px}.chip{height:87px;border-radius:12px;font-size:10px;line-height:1.02;padding:4px 1px}.chip i{font-size:22px;margin-bottom:5px}
  .section-head h1,.section-head h2{font-size:23px;letter-spacing:-.55px}.section-head a{font-size:13px}.subhead{font-size:12.5px}
  .product-grid{gap:8px}.m-card{border-radius:12px}.m-title{font-size:13px;min-height:29px}.m-desc{font-size:10.8px;height:26px}.m-info{padding:6px 7px 7px}
  .m-actions{gap:4px}.save-btn,.wa-btn{height:33px;font-size:9.5px;border-radius:7px;padding:0 3px}.save-btn i,.wa-btn i{font-size:13px}
  .heart{width:31px;height:31px;font-size:15px;right:6px;top:6px}
  .category-grid{gap:8px}.cat-meta strong{font-size:11.5px}
  .bottom-nav{height:61px;border-radius:20px 20px 0 0;padding:4px 5px max(4px,env(safe-area-inset-bottom))}.bottom-nav a{font-size:9.5px}.bottom-nav i{font-size:19px}.bottom-nav a.active:after{width:36px}
  .detail-title{font-size:23px}.detail-lead{font-size:13px}.feature-box{min-height:75px}.feature-box i{font-size:21px}.feature-box span{font-size:10px}.spec-card .section-head h2{font-size:17px!important}
  .about-duo{grid-template-columns:1fr 1fr}.story-card p{font-size:13px!important}.contact-card .action{font-size:10px;padding:8px 6px}
}

/* Very narrow phones: preserve two-column cards but simplify action labels/density. */
@media (max-width:350px){
  .brand-wrap img{width:52px;flex-basis:52px}.brand-name{font-size:18px}.round-icon{width:32px;height:32px;flex-basis:32px}.top-icons{gap:4px}
  .page-pad{padding-left:8px;padding-right:8px}.chip-strip{gap:4px}.chip{font-size:9px;height:82px}.chip i{font-size:20px}
  .section-head h1,.section-head h2{font-size:22px}.section-head a{font-size:12px}
  .product-grid{gap:7px}.m-title{font-size:12.2px}.m-desc{font-size:10px}.save-btn,.wa-btn{font-size:8.8px;gap:2px}.save-btn i,.wa-btn i{font-size:12px}
  .contact-card{display:grid;grid-template-columns:42px minmax(0,1fr)}.contact-card .action{grid-column:1/-1;text-align:center;justify-self:stretch}
}

/* Desktop/laptop composition. */
@media (min-width:1200px){
  body{background:#fff;overflow-x:hidden}
  .desktop-site{display:block!important}.mobile-app{display:none!important}
  .desktop-header{height:66px}
  .desktop-header .inner{max-width:1640px;padding:0 34px;grid-template-columns:300px minmax(330px,1fr) auto;gap:22px}
  .desk-brand{font-size:24px;gap:8px;min-width:0}.desk-brand img{width:82px;height:50px}.desk-search{min-width:0}.desk-nav{gap:18px}.desk-nav a{font-size:13px}
  .hero-desktop{height:292px;position:relative;overflow:hidden;background-position:center right!important}
  .hero-desktop:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,rgba(255,255,255,.08),transparent 62%)}
  .hero-desktop .copy{position:relative;z-index:1;max-width:610px}.hero-desktop h1{font-size:46px;line-height:1.01;margin:10px 0}.hero-desktop p{font-size:17px;line-height:1.35;margin-bottom:10px}.hero-points{gap:22px;margin-top:16px;flex-wrap:nowrap}.hero-point{min-width:0}
  .desktop-wrap{max-width:1640px;padding:0 34px}.section{padding:16px 0}.desk-category-strip,.desk-product-grid,.catalog-grid,.cat-grid-desktop{min-width:0}.desk-cat-chip,.desk-card,.catalog-main,.cat-large,.pd-grid>*{min-width:0}
  .desk-card h3{overflow-wrap:anywhere}.desk-actions a{white-space:nowrap;overflow:hidden;padding:0 5px}
  .trustbar{overflow:hidden}.trust{min-width:0}.trust div{min-width:0}.trust strong,.trust span{overflow-wrap:anywhere}
}

@media (min-width:1200px) and (max-width:1399.98px){
  .desktop-header .inner{padding:0 20px;grid-template-columns:250px minmax(290px,1fr) auto;gap:14px}.desk-brand{font-size:21px}.desk-brand img{width:70px}.desk-nav{gap:12px}.desk-nav a{font-size:12px}.desk-search button{width:92px}
  .desktop-wrap{padding:0 22px}.hero-desktop .copy{margin-left:32px;max-width:560px}.hero-desktop h1{font-size:42px}.hero-desktop p{font-size:16px}.hero-points{gap:14px}.hero-point{font-size:11px}
  .desk-category-strip{grid-template-columns:repeat(6,minmax(0,1fr))}.desk-product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.catalog-layout{grid-template-columns:240px minmax(0,1fr)}.catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.cat-grid-desktop{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media (min-width:1400px){
  .desk-category-strip{grid-template-columns:repeat(8,minmax(0,1fr))}.desk-product-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.catalog-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.cat-grid-desktop{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* Admin dashboard remains stable on laptop sizes. */
@media (min-width:992px) and (max-width:1350px){
  .dashboard-shell{grid-template-columns:250px minmax(0,1fr)!important}.dash-main{padding:22px!important}.dash-top .search{width:min(430px,48vw)!important}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.dash-grid{grid-template-columns:1fr!important}.recent-products{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width:991.98px){
  .dashboard-shell{display:block!important}.dash-sidebar{position:relative!important;height:auto!important;padding:12px!important}.dash-brand{padding:0 8px 10px!important}.dash-menu{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}.dash-menu a{padding:10px!important;font-size:12px!important}.dash-help{display:none!important}.dash-main{padding:14px!important}.dash-top{gap:10px;align-items:flex-start}.dash-top .search{width:100%!important}.dash-user{display:none!important}.dash-head{gap:10px}.dash-head h1{font-size:28px!important}.dash-date{padding:8px!important;font-size:12px}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.stat-card{padding:12px!important;grid-template-columns:42px minmax(0,1fr)!important;min-height:90px!important}.stat-icon{width:42px!important;height:42px!important}.stat-card b{font-size:22px!important}.dash-grid{grid-template-columns:1fr!important}.quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.panel{padding:12px!important;overflow:auto}.dash-table{min-width:620px}.recent-products{grid-template-columns:1fr!important}
}
