/* SORFPANEL Mobile UI V2.2 — real-device bugfix pass / 1.3.0
   Loaded from footer so it wins over page-local CSS such as account-v23.css.
   Mobile-only; desktop remains untouched. */
@media (max-width:768px){
  :root{--mv22-orange:#f56600;--mv22-navy:#10253e;--mv22-text:#1f2937;--mv22-muted:#74808d;--mv22-line:#e3e7ec;--mv22-bg:#f5f6f8}

  /* Shared account sub-page header */
  .account-mobile-page,.notif-page,.sp-orders-page{max-width:100%!important;overflow-x:hidden!important}
  .amp-head,.notif-head,.sp-orders-head{min-height:58px!important;margin:0 0 10px!important;padding:0 16px!important;background:#fff!important;border-bottom:1px solid var(--mv22-line)!important;display:grid!important;grid-template-columns:34px minmax(0,1fr) 34px!important;align-items:center!important;gap:6px!important}
  .amp-head>a,.notif-back,.sp-orders-back{display:grid!important;width:34px!important;height:34px!important;place-items:center!important;color:var(--mv22-text)!important;text-decoration:none!important;font-size:27px!important;line-height:1!important}
  .amp-head h1,.notif-head h1,.sp-orders-head h1{margin:0!important;text-align:center!important;font-size:18px!important;line-height:1.2!important;letter-spacing:-.2px!important;color:var(--mv22-text)!important;text-transform:none!important}
  .amp-head>span,.sp-orders-head>span{width:34px!important}.amp-head form{justify-self:end!important}.amp-head .right{font-size:9px!important;color:var(--mv22-orange)!important;font-weight:800!important;white-space:nowrap!important}

  /* Bottom nav: account subpages must highlight only Hesabım. */
  body[class*="page-"] .mobile-nav a{color:#666!important}
  body.page-cart .mobile-nav a[href*="cart"]{color:var(--mv22-orange)!important}
  body.page-mobile-categories .mobile-nav a[href*="categor"]{color:var(--mv22-orange)!important}
  body.page-favorites .mobile-nav a[href*="favorites"]{color:var(--mv22-orange)!important}
  body.page-wallet .mobile-nav a[href*="account"],body.page-coupons .mobile-nav a[href*="account"],body.page-notifications .mobile-nav a[href*="account"],body.page-orders .mobile-nav a[href*="account"],body.page-messages .mobile-nav a[href*="account"],body.page-catalog-center .mobile-nav a[href*="account"],body.page-recently-viewed .mobile-nav a[href*="account"]{color:var(--mv22-orange)!important}
  body.page-wallet .mobile-nav a[href*="favorites"],body.page-coupons .mobile-nav a[href*="favorites"],body.page-notifications .mobile-nav a[href*="favorites"],body.page-orders .mobile-nav a[href*="favorites"],body.page-messages .mobile-nav a[href*="favorites"],body.page-catalog-center .mobile-nav a[href*="favorites"],body.page-recently-viewed .mobile-nav a[href*="favorites"]{color:#666!important}

  /* Product discovery center — eliminate horizontal overflow. */
  body.page-catalog-center,.catalog-sync-page{overflow-x:hidden!important}
  body.page-catalog-center .account-mobile-page{padding-left:10px!important;padding-right:10px!important}
  body.page-catalog-center .wallet-main{width:100%!important;max-width:100%!important;margin:0!important;padding:0 0 calc(88px + env(safe-area-inset-bottom))!important;gap:9px!important;overflow:hidden!important}
  body.page-catalog-center .action-sync-hero{width:100%!important;max-width:100%!important;min-width:0!important;min-height:0!important;margin:0!important;padding:18px!important;border-radius:15px!important;display:grid!important;grid-template-columns:1fr!important;gap:12px!important;overflow:hidden!important;background:linear-gradient(135deg,#10253e,#164f7e)!important}
  body.page-catalog-center .action-sync-hero>div{min-width:0!important;max-width:100%!important}
  body.page-catalog-center .action-sync-hero span{font-size:8px!important;letter-spacing:.12em!important}
  body.page-catalog-center .action-sync-hero h2{margin:4px 0 5px!important;font-size:22px!important;line-height:1.12!important;overflow-wrap:anywhere!important}
  body.page-catalog-center .action-sync-hero p{margin:0!important;max-width:100%!important;font-size:10px!important;line-height:1.45!important;white-space:normal!important;overflow-wrap:anywhere!important}
  body.page-catalog-center .action-sync-hero>a{justify-self:start!important;min-height:38px!important;padding:0 13px!important;border-radius:10px!important;font-size:10px!important}
  body.page-catalog-center .finance-sync-stats{width:100%!important;max-width:100%!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;overflow:hidden!important}
  body.page-catalog-center .finance-sync-stats article{min-width:0!important;min-height:78px!important;padding:11px!important;border-radius:12px!important}
  body.page-catalog-center .finance-sync-stats small{font-size:9px!important}
  body.page-catalog-center .finance-sync-stats b{margin-top:8px!important;font-size:20px!important}
  body.page-catalog-center .finance-sync-links{width:100%!important;max-width:100%!important;padding:0!important;border-radius:13px!important;overflow:hidden!important}
  body.page-catalog-center .finance-sync-links>a{min-width:0!important;padding:12px!important;gap:2px!important}
  body.page-catalog-center .finance-sync-links b{font-size:11px!important}body.page-catalog-center .finance-sync-links small{font-size:8.5px!important;white-space:normal!important}
  body.page-catalog-center .catalog-sync-products{display:grid!important;grid-template-columns:1fr!important;gap:7px!important}
  body.page-catalog-center .catalog-sync-product{min-width:0!important;grid-template-columns:52px minmax(0,1fr)!important;padding:8px!important}

  /* Seller messages — controlled horizontal tabs, no clipped pseudo-layout. */
  body.page-messages .account-mobile-page{padding-left:10px!important;padding-right:10px!important}
  body.page-messages .msg-tabs{display:flex!important;width:100%!important;max-width:100%!important;gap:6px!important;margin:0 0 10px!important;padding:4px!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x proximity!important;scrollbar-width:none!important;background:#eef1f5!important;border-radius:12px!important}
  body.page-messages .msg-tabs::-webkit-scrollbar{display:none!important}
  body.page-messages .msg-tabs a{flex:0 0 auto!important;min-width:max-content!important;max-width:none!important;padding:9px 10px!important;border-radius:10px!important;font-size:9px!important;line-height:1.15!important;scroll-snap-align:start!important;white-space:nowrap!important}
  body.page-messages .msg-tabs a small{display:inline!important;margin-left:3px!important;font-size:7px!important}
  body.page-messages .seller-message{padding:11px!important;border-radius:13px!important;grid-template-columns:42px minmax(0,1fr) 16px!important}

  /* Wallet — remove giant navy voids caused by conflicting desktop styles. */
  body.page-wallet .account-mobile-page{padding-left:10px!important;padding-right:10px!important}
  body.page-wallet .wallet-main{width:100%!important;max-width:100%!important;margin:0!important;padding:0 0 calc(88px + env(safe-area-inset-bottom))!important;display:grid!important;gap:9px!important;background:transparent!important}
  body.page-wallet .wallet-balance-card{min-height:0!important;height:auto!important;padding:16px!important;border-radius:14px!important;background:linear-gradient(135deg,#10253e,#18517f)!important;color:#fff!important;box-shadow:none!important}
  body.page-wallet .wallet-balance-card small{color:#c6d8e6!important;opacity:1!important;font-size:9px!important}
  body.page-wallet .wallet-balance-card h2{margin:5px 0!important;color:#fff!important;font-size:27px!important;line-height:1!important}
  body.page-wallet .wallet-balance-card p{margin:3px 0 0!important;color:#d8e5ef!important;opacity:1!important;font-size:9px!important;line-height:1.45!important}
  body.page-wallet .wallet-redeem-form{margin:0!important;padding:10px!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:7px!important;border-radius:13px!important;background:#fff!important}
  body.page-wallet .wallet-redeem-form input{width:100%!important;height:42px!important;padding:0 12px!important;font-size:10px!important;border-radius:10px!important}
  body.page-wallet .wallet-redeem-form button{width:100%!important;height:40px!important;min-width:0!important;padding:0 12px!important;font-size:10px!important;border-radius:10px!important}
  body.page-wallet .wallet-transactions{margin:0!important;padding:12px!important;border-radius:13px!important;background:#fff!important}
  body.page-wallet .wallet-transactions h2{margin:0 0 7px!important;font-size:14px!important}

  /* Coupons — each coupon is a compact horizontal card. */
  body.page-coupons .account-mobile-page{padding-left:10px!important;padding-right:10px!important}
  body.page-coupons .coupon-tabs{margin:0 0 8px!important;padding:3px!important;border-radius:11px!important;background:#eceff3!important}
  body.page-coupons .coupon-tabs a{height:38px!important;padding:0 8px!important;display:grid!important;place-items:center!important;font-size:9px!important;border-radius:9px!important}
  body.page-coupons .coupon-code{margin:0 0 9px!important;padding:0!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:7px!important;background:transparent!important;box-shadow:none!important;border:0!important}
  body.page-coupons .coupon-code input{height:40px!important;padding:0 11px!important;font-size:10px!important;border-radius:10px!important}
  body.page-coupons .coupon-code .amp-btn{height:40px!important;padding:0 11px!important;font-size:9px!important;border-radius:10px!important}
  body.page-coupons .coupon-list{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;padding:0 0 calc(88px + env(safe-area-inset-bottom))!important}
  body.page-coupons .coupon-card{min-height:0!important;height:auto!important;margin:0!important;padding:10px!important;display:grid!important;grid-template-columns:72px minmax(0,1fr)!important;align-items:center!important;gap:10px!important;border-radius:13px!important;overflow:hidden!important}
  body.page-coupons .coupon-value{width:72px!important;height:64px!important;min-height:64px!important;border-radius:11px!important;font-size:15px!important;align-self:center!important}
  body.page-coupons .coupon-card>div:nth-child(2){min-width:0!important;display:grid!important;align-content:center!important}
  body.page-coupons .coupon-card h3{margin:0 0 3px!important;font-size:12px!important}
  body.page-coupons .coupon-card p{margin:1px 0!important;font-size:8.5px!important;line-height:1.35!important}
  body.page-coupons .coupon-card footer{margin-top:6px!important;padding:0!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:6px!important;background:transparent!important;min-height:30px!important}
  body.page-coupons .coupon-card footer span{font-size:8px!important;line-height:1.25!important}
  body.page-coupons .coupon-card footer .amp-btn{height:30px!important;padding:0 9px!important;font-size:8px!important;border-radius:8px!important}
  body.page-coupons .amp-empty{min-height:0!important;padding:24px 12px!important;border-radius:13px!important}

  /* Notifications — smaller native-like switches and balanced summary row. */
  body.page-notifications .notif-page{padding:0 10px calc(88px + env(safe-area-inset-bottom))!important}
  body.page-notifications .notif-tabs{gap:5px!important;margin:0 0 9px!important;padding:0 0 2px!important;overflow-x:auto!important;scrollbar-width:none!important}
  body.page-notifications .notif-tabs::-webkit-scrollbar{display:none!important}
  body.page-notifications .notif-tabs a{flex:0 0 auto!important;padding:7px 10px!important;font-size:8.5px!important;border-radius:999px!important;white-space:nowrap!important}
  body.page-notifications .notif-pref{padding:10px!important;margin:0 0 8px!important;border-radius:13px!important;box-shadow:none!important}
  body.page-notifications .notif-pref-grid{display:grid!important;grid-template-columns:1fr!important;gap:0!important}
  body.page-notifications .notif-pref-grid label{min-height:41px!important;padding:7px 1px!important;border-top:1px solid #edf0f3!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;font-size:9px!important;line-height:1.25!important}
  body.page-notifications .notif-pref-grid label:first-child{border-top:0!important}
  body.page-notifications .notif-pref-grid input[type="checkbox"]{appearance:none!important;width:34px!important;height:20px!important;min-width:34px!important;margin:0!important;border:0!important;border-radius:999px!important;background:#d6dbe1!important;position:relative!important;order:2!important}
  body.page-notifications .notif-pref-grid input[type="checkbox"]:before{content:""!important;position:absolute!important;width:16px!important;height:16px!important;left:2px!important;top:2px!important;border-radius:50%!important;background:#fff!important;box-shadow:0 1px 3px rgba(0,0,0,.18)!important;transition:.18s!important}
  body.page-notifications .notif-pref-grid input[type="checkbox"]:checked{background:var(--mv22-orange)!important}
  body.page-notifications .notif-pref-grid input[type="checkbox"]:checked:before{transform:translateX(14px)!important}
  body.page-notifications .notif-pref-grid input[type="datetime-local"]{width:150px!important;max-width:150px!important;height:34px!important;padding:0 7px!important;font-size:8.5px!important;border-radius:8px!important}
  body.page-notifications .notif-pref>.sp23-btn{width:100%!important;min-height:38px!important;margin-top:8px!important;font-size:9px!important;border-radius:9px!important}
  body.page-notifications .notif-summary{min-height:48px!important;margin:0 0 8px!important;padding:8px 10px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:8px!important;font-size:9px!important;border-radius:12px!important}
  body.page-notifications .notif-summary button{float:none!important;grid-column:2!important;grid-row:1!important;margin:0!important;height:32px!important;padding:0 9px!important;font-size:8px!important;border-radius:8px!important}
  body.page-notifications .notif-empty{padding:26px 12px!important;font-size:10px!important;border-radius:13px!important}

  /* Orders — compact horizontal state filter, consistent header and empty state. */
  body.page-orders .sp-orders-page{padding:0 10px calc(88px + env(safe-area-inset-bottom))!important}
  body.page-orders .sp-orders-shell{max-width:100%!important;margin:0!important}
  body.page-orders .sp-orders-head>div small{display:none!important}
  body.page-orders .sp-orders-head>div{display:block!important}
  body.page-orders .sp-orders-status-tabs{display:flex!important;width:100%!important;gap:5px!important;margin:0 0 8px!important;padding:0 0 2px!important;overflow-x:auto!important;scrollbar-width:none!important;background:transparent!important}
  body.page-orders .sp-orders-status-tabs::-webkit-scrollbar{display:none!important}
  body.page-orders .sp-orders-status-tabs a{flex:0 0 auto!important;height:32px!important;min-width:max-content!important;padding:0 10px!important;border-radius:999px!important;font-size:8.5px!important;display:grid!important;place-items:center!important}
  body.page-orders .sp-orders-status-tabs a.active{background:#17202b!important;color:#fff!important;border-color:#17202b!important;box-shadow:none!important}
  body.page-orders .sp-orders-search{display:grid!important;grid-template-columns:minmax(0,1fr) 76px!important;gap:7px!important;margin:0 0 9px!important}
  body.page-orders .sp-orders-search label{height:40px!important;border-radius:10px!important}
  body.page-orders .sp-orders-search input{font-size:9px!important}
  body.page-orders .sp-orders-search button{height:40px!important;border-radius:10px!important;font-size:9px!important}
  body.page-orders .sp23-empty{min-height:0!important;padding:30px 14px!important;border-radius:14px!important}
  body.page-orders .sp23-empty strong{font-size:16px!important}body.page-orders .sp23-empty p{font-size:9.5px!important;margin:6px 0 12px!important}

  /* Recently viewed — replace the empty control slab with clear settings/chips. */
  body.page-recently-viewed .account-mobile-page{padding-left:10px!important;padding-right:10px!important}
  body.page-recently-viewed .recent-controls{margin:0 0 9px!important;padding:10px!important;border:1px solid var(--mv22-line)!important;border-radius:13px!important;background:#fff!important}
  body.page-recently-viewed .recent-toggle{margin:0!important;padding:0!important;background:transparent!important;border:0!important}
  body.page-recently-viewed .recent-toggle-button{width:100%!important;min-height:42px!important;padding:0!important;border:0!important;background:transparent!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;color:var(--mv22-text)!important;text-align:left!important}
  body.page-recently-viewed .recent-toggle-copy{display:grid!important;gap:2px!important;min-width:0!important}
  body.page-recently-viewed .recent-toggle-copy b{font-size:10px!important}body.page-recently-viewed .recent-toggle-copy small{font-size:8px!important;color:var(--mv22-muted)!important}
  body.page-recently-viewed .recent-toggle .switch{flex:0 0 34px!important;width:34px!important;height:20px!important;border-radius:999px!important;background:#d6dbe1!important;position:relative!important}
  body.page-recently-viewed .recent-toggle .switch:after{content:""!important;position:absolute!important;width:16px!important;height:16px!important;left:2px!important;top:2px!important;border-radius:50%!important;background:#fff!important;box-shadow:0 1px 3px rgba(0,0,0,.15)!important}
  body.page-recently-viewed .recent-toggle .switch.active{background:var(--mv22-orange)!important}body.page-recently-viewed .recent-toggle .switch.active:after{transform:translateX(14px)!important}
  body.page-recently-viewed .recent-filters{display:flex!important;gap:6px!important;margin-top:8px!important;padding-top:8px!important;border-top:1px solid #eef1f4!important;overflow-x:auto!important;scrollbar-width:none!important}
  body.page-recently-viewed .recent-filters::-webkit-scrollbar{display:none!important}
  body.page-recently-viewed .recent-filters a{flex:0 0 auto!important;min-height:31px!important;padding:0 10px!important;border:1px solid var(--mv22-line)!important;border-radius:999px!important;display:grid!important;place-items:center!important;background:#fff!important;color:#59616c!important;font-size:8.5px!important;font-weight:750!important;text-decoration:none!important;white-space:nowrap!important}
  body.page-recently-viewed .recent-filters a.active{background:#17202b!important;color:#fff!important;border-color:#17202b!important}
  body.page-recently-viewed .recent-list{padding:0 0 calc(88px + env(safe-area-inset-bottom))!important;display:grid!important;gap:8px!important}
  body.page-recently-viewed .amp-empty{min-height:0!important;padding:28px 12px!important;border-radius:13px!important}

  /* Home — only final density tune, no header/nav redesign. */
  body.home-mobile-ready .mh-quick-rail{padding-bottom:4px!important;margin-bottom:2px!important}
  body.home-mobile-ready .mh-banner{aspect-ratio:2.72/1!important}
  body.home-mobile-ready .mh-section{padding-top:6px!important}
  body.home-mobile-ready .mh-product-card{flex-basis:138px!important;min-width:138px!important;max-width:138px!important}
  body.home-mobile-ready .mh-product-image{height:132px!important}
  body.home-mobile-ready .mh-product-info{min-height:88px!important}
}

/* V2.3 — requested mobile-only polish: home product rail + product detail */
@media (max-width:560px){
  /* HOME: preserve approved header/banner/nav; refine only product cards */
  body.home-mobile-ready .mh-section{padding-left:14px!important;padding-right:14px!important}
  body.home-mobile-ready .mh-product-rail{gap:8px!important;padding-right:18px!important;scroll-padding-left:0!important}
  body.home-mobile-ready .mh-product-card{flex:0 0 132px!important;min-width:132px!important;max-width:132px!important;border-radius:10px!important}
  body.home-mobile-ready .mh-product-image{height:124px!important}
  body.home-mobile-ready .mh-product-image>img{padding:9px!important}
  body.home-mobile-ready .mh-product-info{min-height:105px!important;padding:7px 8px 8px!important}
  body.home-mobile-ready .mh-product-info strong{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important;text-overflow:ellipsis!important;height:31px!important;min-height:31px!important;max-height:31px!important;font-size:10.2px!important;line-height:1.5!important;word-break:normal!important}
  body.home-mobile-ready .mh-stars{margin-top:4px!important;font-size:9px!important;white-space:nowrap!important}
  body.home-mobile-ready .mh-product-info>b{margin-top:5px!important;font-size:13.5px!important;line-height:1.15!important;padding-right:35px!important;white-space:nowrap!important}
  body.home-mobile-ready .mh-product-info .mh-stock{margin-top:4px!important;font-size:8.2px!important;line-height:1.15!important;padding-right:34px!important;white-space:nowrap!important}
  body.home-mobile-ready .mh-cart-form{right:7px!important;bottom:8px!important}
  body.home-mobile-ready .mh-cart-form button{width:31px!important;height:31px!important;border-radius:9px!important}
  body.home-mobile-ready .mh-cart-form svg{width:17px!important;height:17px!important}

  /* PRODUCT DETAIL: keep desktop untouched */
  body.page-product .mp-v1-page{padding-bottom:118px!important;overflow-x:hidden!important}
  body.page-product .mp-v1-info h1{font-size:15px!important;line-height:1.38!important;color:#1f2937!important;margin-bottom:12px!important;overflow-wrap:anywhere!important}
  body.page-product .mp-v1-info h1 a{color:#2f91d4!important}
  body.page-product .mp-v1-seller{padding:14px!important}
  body.page-product .mp-v1-seller-head{align-items:flex-start!important;gap:8px!important}
  body.page-product .seller-identity{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:5px!important;min-width:0!important;line-height:1.25!important}
  body.page-product .seller-identity small{flex:0 0 auto!important}
  body.page-product .seller-score-pill{margin-left:2px!important}
  body.page-product .seller-about-trigger{width:28px!important;height:28px!important;min-width:28px!important;padding:0!important;border-radius:50%!important;display:grid!important;place-items:center!important;line-height:1!important}
  body.page-product .seller-follow-form{flex:0 0 auto!important;display:grid!important;justify-items:end!important;gap:3px!important}
  body.page-product .seller-follow-form>button{height:34px!important;padding:0 11px!important;white-space:nowrap!important}
  body.page-product .seller-follow-count{font-size:9px!important;color:#777!important;padding-right:2px!important}
  body.page-product .mp-v1-questions{margin-top:10px!important;padding:9px 10px!important;min-height:42px!important;display:flex!important;align-items:center!important;justify-content:center!important}
  body.page-product .mp-v1-delivery>div{padding:11px 12px!important}
  body.page-product .mp-v1-delivery>div b{font-size:11.5px!important;line-height:1.35!important}
  body.page-product .mp-v1-delivery>div span{display:none!important}
  body.page-product .mp-v1-features{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;overflow:visible!important}
  body.page-product .mp-v1-features span{min-width:0!important;flex:none!important;min-height:68px!important;padding:10px 11px!important;border:1px solid #e7e9ed!important;border-radius:9px!important;background:#f8f9fa!important;overflow:hidden!important}
  body.page-product .mp-v1-features b{font-size:9.5px!important;line-height:1.35!important;overflow-wrap:anywhere!important}
  body.page-product .mp-v1-section:last-of-type{margin-bottom:16px!important}
  body.page-product .mobile-product-buybar{min-height:64px!important;padding:7px 8px calc(7px + env(safe-area-inset-bottom))!important}
}
