/* SeafoodMeNow V346 — Pakistan storefront phone/tablet hardening.
   Loaded last. Does not alter V342 product image geometry or V344 hero glow. */
@media (max-width:980px){
  html,body{max-width:100%;overflow-x:hidden!important}
  body *{box-sizing:border-box}
  .site-header{max-width:100vw!important}
  .header-actions button,.menu-toggle,.search-toggle,.cart-toggle{min-width:46px!important;min-height:46px!important}
  .header-search{max-width:100vw!important;padding-inline:max(10px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-right))!important}
  .header-search label{width:min(100%,680px)!important;max-width:100%!important}
  .header-search input{min-height:48px!important;font-size:16px!important}
  .search-close{min-width:44px!important;min-height:44px!important}
  .mobile-nav{max-width:100vw!important;overflow-x:hidden!important;overscroll-behavior:contain!important}
  .mobile-nav a,.mobile-nav button{min-height:46px!important;display:flex!important;align-items:center!important}

  .shop-section{padding-left:clamp(10px,2vw,18px)!important;padding-right:clamp(10px,2vw,18px)!important;overflow:visible!important}
  .shop-toolbar{position:relative!important;top:auto!important;display:grid!important;grid-template-columns:1fr!important;gap:10px!important;width:100%!important;max-width:100%!important;margin:0 0 14px!important;padding:0!important;background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;overflow:visible!important}
  .filters{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:7px!important;width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;overflow:visible!important}
  .filters button{width:100%!important;min-width:0!important;min-height:46px!important;padding:8px 7px!important;white-space:normal!important;font-size:clamp(.68rem,1.25vw,.78rem)!important;line-height:1.18!important;text-align:center!important;border-radius:11px!important}
  .shop-tools{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(170px,.7fr)!important;gap:8px!important;width:100%!important;max-width:100%!important;align-items:stretch!important;justify-self:stretch!important}
  .smn-smart-tools{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;gap:8px!important;min-width:0!important}
  #smnMealPlanner,#smnCompareOpen{width:100%!important;min-width:0!important;min-height:46px!important;padding:8px 10px!important;white-space:normal!important;line-height:1.15!important;font-size:.78rem!important}
  .sort-control{width:100%!important;min-width:0!important;min-height:46px!important;display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;align-items:center!important;gap:8px!important;padding:7px 10px!important}
  .sort-control select{width:100%!important;min-width:0!important;min-height:32px!important;font-size:16px!important}
  .shop-carousel-nav{display:none!important}

  .department-switch button,.department-card button,.department-card a{min-height:48px!important}
  .department-switch{max-width:100%!important}
  .product-card{min-width:0!important;max-width:100%!important;overflow:hidden!important}
  .product-image{overflow:hidden!important}
  .product-image img{width:100%!important;height:100%!important;max-width:none!important;object-fit:cover!important;transform:none!important}
  .product-card:hover .product-image img{transform:none!important}
  .product-copy{min-width:0!important}
  .product-copy h3,.product-copy p{overflow-wrap:anywhere!important}
  .product-actions{align-items:stretch!important}
  .product-actions button{min-height:46px!important;padding:9px 10px!important;font-size:.78rem!important}
  .product-actions .quick-add{flex:0 0 48px!important;min-width:48px!important}
  .product-detail-link{min-height:40px!important;display:inline-flex!important;align-items:center!important;padding:6px 0!important;font-size:.72rem!important;line-height:1.25!important}
  .compare-toggle{min-height:40px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:8px 12px!important;font-size:.72rem!important}
  .product-badge,.stock-dot{font-size:.64rem!important;line-height:1.2!important}
  .product-category{font-size:.68rem!important;line-height:1.35!important}
  .product-weight-note,.product-weight,.weight-note{font-size:.68rem!important;line-height:1.35!important}

  .cart-drawer{width:min(430px,100vw)!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;overflow:hidden!important;padding-bottom:env(safe-area-inset-bottom)!important}
  .cart-head button,.cart-drawer button{min-height:44px!important}
  .cart-items{overflow-y:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important}

  .product-modal[open]{width:min(760px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;margin:auto!important;overflow:auto!important;overscroll-behavior:contain!important;border-radius:18px!important}
  .product-modal .modal-close{min-width:46px!important;min-height:46px!important;z-index:5!important}
  .product-modal button,.product-modal select,.product-modal input{min-height:44px!important}
  .product-modal select,.product-modal input{font-size:16px!important}
  .smn-smart-dialog,.smn-compare-dialog{width:min(720px,calc(100vw - 20px))!important;max-width:calc(100vw - 20px)!important;max-height:calc(100dvh - 20px)!important;overflow:auto!important;overscroll-behavior:contain!important;padding-bottom:max(16px,env(safe-area-inset-bottom))!important}
  .smn-smart-dialog button,.smn-smart-dialog input,.smn-smart-dialog select,.smn-compare-dialog button{min-height:44px!important}
  .smn-smart-dialog input,.smn-smart-dialog select{font-size:16px!important}

  .facebook-showcase,.fb-showcase-grid,.fb-public-review-grid{max-width:100%!important;min-width:0!important}
  .facebook-showcase iframe,.fb-showcase-grid iframe,.fb-public-review-grid iframe{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important}
  footer a,footer button{min-height:40px!important;display:inline-flex;align-items:center}
}

@media (min-width:601px) and (max-width:980px){
  .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
  .product-copy{padding:14px!important}
  .product-copy h3{font-size:.94rem!important}
  .product-copy p{font-size:.76rem!important}
  .category-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .product-modal[open]{grid-template-columns:minmax(250px,.85fr) minmax(0,1.15fr)!important}
  .product-modal .modal-image{min-height:0!important;aspect-ratio:1/1!important}
}

@media (max-width:600px){
  .site-header{padding-left:10px!important;padding-right:10px!important}
  .header-actions{gap:7px!important}
  .filters{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .filters button:last-child:nth-child(odd){grid-column:1/-1!important}
  .shop-tools{grid-template-columns:1fr!important}
  .smn-smart-tools{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .sort-control{grid-template-columns:auto minmax(0,1fr)!important}
  .product-grid{grid-template-columns:1fr!important;gap:12px!important}
  .product-card{border-radius:17px!important}
  .product-copy{padding:13px!important}
  .product-copy h3{font-size:.96rem!important;line-height:1.28!important}
  .product-copy p{font-size:.76rem!important;line-height:1.48!important;margin-bottom:10px!important}
  .product-meta strong{font-size:1.06rem!important}
  .product-actions button{font-size:.8rem!important}
  .category-grid{grid-template-columns:1fr!important}
  .product-modal[open]{display:block!important;width:calc(100vw - 14px)!important;max-width:calc(100vw - 14px)!important;max-height:calc(100dvh - 14px)!important;border-radius:16px!important}
  .product-modal .modal-image{min-height:0!important;height:auto!important;aspect-ratio:1/1!important}
  .product-modal .modal-copy{padding:18px 14px max(18px,env(safe-area-inset-bottom))!important}
  .product-modal .modal-copy h2{font-size:1.35rem!important;line-height:1.15!important}
  .cart-drawer{width:100vw!important}
  .cart-inner,.cart-body{max-width:100%!important}
  .smn-smart-dialog,.smn-compare-dialog{width:calc(100vw - 12px)!important;max-width:calc(100vw - 12px)!important;max-height:calc(100dvh - 12px)!important;border-radius:16px!important}
  .smn-smart-tools button{font-size:.73rem!important;padding-inline:7px!important}
}

@media (max-width:360px){
  .filters{grid-template-columns:1fr!important}.filters button:last-child:nth-child(odd){grid-column:auto!important}
  .smn-smart-tools{grid-template-columns:1fr!important}
  .header-actions{gap:4px!important}.header-actions button,.menu-toggle,.search-toggle,.cart-toggle{min-width:44px!important;width:44px!important}
}

/* V346 final tap-target pass for controls injected by Growth/Advanced Filter/FB showcase. */
@media (max-width:980px){
  #advancedProductFilter{min-height:44px!important;height:44px!important;font-size:16px!important}
  .smn-compare-toggle{min-height:42px!important;height:auto!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:8px 12px!important;font-size:.72rem!important}
  .fb-showcase-card a,.fb-review-post-card a,.facebook-showcase a[href*="facebook.com"]{min-height:40px!important;display:inline-flex!important;align-items:center!important;padding:7px 0!important;font-size:.72rem!important}
}
@media (max-width:600px){
  .pk-entry-hero .reference-order,.pk-entry-hero .reference-story{min-height:46px!important;height:46px!important}
}

/* Cart must sit above the sticky 16k header so Close/checkout controls are never intercepted. */
@media(max-width:980px){
  body.cart-open #backdrop{z-index:18000!important}
  body.cart-open #cartDrawer{z-index:18010!important}
}

/* Search panel: old centered translate conflicted with later left/right mobile rules. */
@media(max-width:980px){
  .header-search{left:max(10px,env(safe-area-inset-left))!important;right:max(10px,env(safe-area-inset-right))!important;width:auto!important;max-width:none!important;transform:translateY(-10px)!important}
  .header-search.open{transform:translateY(0)!important}
}

/* V346 QA follow-up: final mobile touch targets and social-card actions. */
@media(max-width:980px){
  .smn-skip-link{min-height:44px!important;display:flex!important;align-items:center!important}
  .fb-public-post-card>header>a{min-height:44px!important;display:inline-flex!important;align-items:center!important;padding:8px 4px!important;font-size:11px!important;line-height:1.2!important}
}
@media(max-width:600px){
  html body .pk-entry-hero .reference-order,
  html body .pk-entry-hero .reference-story{min-height:46px!important;height:46px!important;display:flex!important;align-items:center!important;justify-content:center!important}
}
