/* ==========================================================================
   PixoNext — Mobile "app" layer (v15.1). Active at ≤ 860px.
   Desktop is untouched: every element added here is hidden above 860px.
   ========================================================================== */
.mapp-head,.mapp-tabs,.mapp-drawer,.mapp-cats,.mapp-quick{display:none}

@media (max-width:860px){
  :root{--mapp-navy:#0b1220;--mapp-brand:#ef4a23;--mapp-indigo:#3449cc;--mapp-bg:#f4f5f8;--mapp-line:#e9ebf0;--mapp-tab-h:64px}
  html.mapp-lock,html.mapp-lock body{overflow:hidden}
  body{background:var(--mapp-bg)!important;padding-bottom:calc(var(--mapp-tab-h) + env(safe-area-inset-bottom,0px) + 8px)!important;-webkit-tap-highlight-color:transparent}
  /* hide desktop chrome */
  body>.top,.top,header.header,.header .headrow,.header .menu,.pixo-category-menu,.mobile-bottom,.floating-commerce-dock{display:none!important}
  .container{width:calc(100% - 24px)!important;max-width:none!important}

  /* ---------- header ---------- */
  .mapp-head{display:block;position:sticky;top:0;z-index:300;background:var(--mapp-navy);padding:8px 12px 10px;padding-top:calc(8px + env(safe-area-inset-top,0px));transition:transform .22s ease,box-shadow .2s}
  .mapp-head.scrolled{box-shadow:0 6px 18px rgba(11,18,32,.18)}
  .mapp-head.hide{transform:translateY(-58px)}
  .mapp-head-row{display:flex;align-items:center;gap:8px;height:44px}
  .mapp-logo{flex:1;display:flex;align-items:center;min-width:0}
  .mapp-logo img{height:24px;width:auto;max-width:150px;object-fit:contain}
  .mapp-head-actions{display:flex;gap:6px}
  .mapp-ibtn{position:relative;width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:rgba(255,255,255,.08);color:#fff;border:0;font-size:21px;cursor:pointer;text-decoration:none}
  .mapp-ibtn:active{transform:scale(.94)}
  .mapp-badge{position:absolute;top:-3px;right:-3px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--mapp-brand);color:#fff;font:800 10.5px/18px Inter,system-ui,sans-serif;text-align:center;border:2px solid var(--mapp-navy)}
  .mapp-badge[hidden]{display:none}
  .mapp-search{position:relative;margin-top:6px}
  .mapp-search i{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#98a2b3;font-size:18px;pointer-events:none}
  .mapp-search input{width:100%;height:44px;border:0;border-radius:14px;background:#fff;padding:0 42px 0 42px;font-size:15px;color:#101828;outline:none;-webkit-appearance:none;box-shadow:0 2px 8px rgba(0,0,0,.08)}
  .mapp-search input::-webkit-search-cancel-button{display:none}
  .mapp-search-clear{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:30px;height:30px;border-radius:50%;display:grid;place-items:center;color:#667085;background:#f2f4f7}
  .mapp-search-clear i{position:static;transform:none;font-size:15px}

  /* ---------- home category strip ---------- */
  .mapp-cats{display:flex;gap:4px;overflow-x:auto;padding:14px 12px 6px;scroll-snap-type:x mandatory;scrollbar-width:none;background:#fff;border-bottom:1px solid var(--mapp-line)}
  .mapp-cats::-webkit-scrollbar{display:none}
  .mapp-cats a{flex:0 0 72px;display:flex;flex-direction:column;align-items:center;gap:6px;text-decoration:none;scroll-snap-align:start}
  .mapp-cats span{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;font-size:24px;color:var(--c);background:color-mix(in srgb,var(--c) 12%,#fff);border:1px solid color-mix(in srgb,var(--c) 20%,#fff)}
  .mapp-cats b{font-size:11px;font-weight:600;color:#344054;text-align:center;line-height:1.2;max-width:70px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .mapp-quick{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:10px 12px 12px;background:#fff;margin-bottom:10px}
  .mapp-quick a{display:flex;flex-direction:column;align-items:center;gap:5px;padding:10px 4px;border-radius:14px;background:color-mix(in srgb,var(--c) 8%,#fff);text-decoration:none}
  .mapp-quick i{font-size:22px;color:var(--c)}
  .mapp-quick span{font-size:11px;font-weight:700;color:#1f2937;white-space:nowrap}

  /* ---------- bottom tab bar ---------- */
  .mapp-tabs{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;z-index:400;height:calc(var(--mapp-tab-h) + env(safe-area-inset-bottom,0px));padding-bottom:env(safe-area-inset-bottom,0px);background:rgba(255,255,255,.96);backdrop-filter:saturate(1.5) blur(12px);border-top:1px solid var(--mapp-line);box-shadow:0 -6px 20px rgba(16,24,40,.06)}
  .mapp-tabs a,.mapp-tabs button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#667085;text-decoration:none;background:none;border:0;font:inherit;cursor:pointer}
  .mapp-tabs i{font-size:23px;transition:transform .15s}
  .mapp-tabs span{font-size:10.5px;font-weight:700}
  .mapp-tabs .on{color:var(--mapp-brand)}
  .mapp-tabs .on::before{content:"";position:absolute;top:0;left:30%;right:30%;height:3px;border-radius:0 0 4px 4px;background:var(--mapp-brand)}
  .mapp-tabs .on i{transform:translateY(-1px)}
  .mapp-tabs em{position:absolute;top:7px;left:calc(50% + 6px);min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:var(--mapp-brand);color:#fff;font:800 10px/17px Inter,sans-serif;font-style:normal;text-align:center}

  /* ---------- drawer ---------- */
  .mapp-drawer{display:block;position:fixed;inset:0;z-index:500;pointer-events:none}
  .mapp-drawer-bg{position:absolute;inset:0;background:rgba(11,18,32,.45);opacity:0;transition:opacity .2s}
  .mapp-drawer-panel{position:absolute;left:0;top:0;bottom:0;width:min(88vw,360px);background:#fff;transform:translateX(-102%);transition:transform .25s cubic-bezier(.22,1,.36,1);display:flex;flex-direction:column;overflow:hidden;border-radius:0 22px 22px 0}
  .mapp-drawer.open{pointer-events:auto}
  .mapp-drawer.open .mapp-drawer-bg{opacity:1}
  .mapp-drawer.open .mapp-drawer-panel{transform:none}
  .mapp-drawer-top{display:flex;align-items:center;justify-content:space-between;padding:14px 14px 12px;padding-top:calc(14px + env(safe-area-inset-top,0px));background:var(--mapp-navy)}
  .mapp-drawer-top img{height:24px;width:auto}
  .mapp-drawer-user a{display:flex;align-items:center;gap:10px;margin:12px 14px 4px;padding:12px;border-radius:14px;background:#f8f9fb;text-decoration:none;color:#101828}
  .mapp-drawer-user b{display:block;font-size:14px}.mapp-drawer-user small{color:#667085;font-size:12px}
  .mapp-drawer-user div{flex:1}
  .mapp-avatar{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,var(--mapp-brand),#ff7a45);color:#fff;font-weight:800;font-size:16px}
  .mapp-drawer-quick{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px 14px}
  .mapp-drawer-quick a{display:flex;align-items:center;gap:8px;padding:10px;border-radius:12px;border:1px solid var(--mapp-line);font-size:13px;font-weight:700;color:#1f2937;text-decoration:none}
  .mapp-drawer-quick i{font-size:19px}
  .mapp-drawer-title{display:flex;justify-content:space-between;align-items:center;padding:12px 16px 6px;font-size:11.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#98a2b3}
  .mapp-drawer-title a{text-transform:none;letter-spacing:0;color:var(--mapp-brand);font-size:12.5px;font-weight:700;text-decoration:none}
  .mapp-drawer-list{flex:1;overflow-y:auto;padding:0 10px 10px;-webkit-overflow-scrolling:touch}
  .mapp-acc{border-radius:14px}
  .mapp-acc summary{display:flex;align-items:center;gap:12px;padding:9px 8px;list-style:none;cursor:pointer;border-radius:12px}
  .mapp-acc summary::-webkit-details-marker{display:none}
  .mapp-acc[open] summary{background:#f8f9fb}
  .mapp-acc summary b{flex:1;font-size:14.5px;font-weight:700;color:#101828}
  .mapp-cat-ico{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;font-size:19px;color:var(--c);background:color-mix(in srgb,var(--c) 12%,#fff);flex:0 0 38px}
  .mapp-caret{color:#98a2b3;font-size:16px;transition:transform .2s}
  .mapp-acc[open] .mapp-caret{transform:rotate(180deg)}
  .mapp-acc-body{display:flex;flex-wrap:wrap;gap:6px;padding:8px 8px 12px 58px}
  .mapp-sub{padding:7px 11px;border-radius:999px;background:#f2f4f7;color:#344054;font-size:12.5px;font-weight:600;text-decoration:none}
  .mapp-sub.all{background:#fff1ec;color:var(--mapp-brand)}
  .mapp-drawer-foot{border-top:1px solid var(--mapp-line);padding:12px 14px;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
  .mapp-drawer-foot a{display:flex;align-items:center;gap:10px;text-decoration:none;color:#101828}
  .mapp-drawer-foot i{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:#ecfdf3;color:#16a34a;font-size:20px}
  .mapp-drawer-foot b{display:block;font-size:15px}.mapp-drawer-foot small{color:#667085;font-size:12px}

  /* ---------- universal page polish ---------- */
  main{min-height:60vh}
  h1{font-size:22px!important;line-height:1.25!important;letter-spacing:-.02em}
  .breadcrumb{font-size:12px!important;margin:12px 0 8px!important;white-space:nowrap;overflow-x:auto;scrollbar-width:none}
  .breadcrumb::-webkit-scrollbar{display:none}
  .btn,button.btn,a.btn{min-height:42px;border-radius:12px!important}
  input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px!important;border-radius:12px!important}  /* 16px stops iOS zoom */
  .content-card,.card{border-radius:16px!important}

  /* ---------- product cards: 2-column app grid ---------- */
  .products,.category-product-list.is-grid,.deals-page .category-product-list.is-grid,.category-product-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .category-product-list.is-list{grid-template-columns:1fr!important}
  .pcard,.px-category-card{display:flex!important;flex-direction:column!important;border-radius:16px!important;border:1px solid var(--mapp-line)!important;background:#fff!important;box-shadow:none!important;overflow:hidden;min-height:0!important;height:auto!important;padding:0!important}
  .pcard .pimg,.px-category-card .px-category-image{height:auto!important;aspect-ratio:1/1;padding:10px!important;background:#fff!important;display:block;position:relative}
  .pcard .pimg img,.px-category-card .px-category-image img{width:100%!important;height:100%!important;object-fit:contain!important}
  .pcard .pbody,.px-category-card .px-category-info{padding:8px 10px 0!important;flex:1}
  .pcard .pbody small,.px-category-card .px-category-info small{font-size:11px!important}
  .pcard h3,.px-category-card h3{font-size:13px!important;line-height:1.35!important;margin:3px 0 6px!important;font-weight:600!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:35px}
  .pcard .mini-spec,.px-category-card .px-category-info ul{display:none!important}
  .pcard .price,.px-category-price{font-size:16px!important}
  .pcard .old,.px-category-old-price{font-size:11.5px!important}
  .pcard .actions2,.px-category-card .px-category-actions{padding:8px 10px 10px!important;display:grid!important;grid-template-columns:1fr!important;gap:6px!important;margin:0!important}
  .px-category-card .px-category-actions{padding-top:0!important}
  .px-category-price-row{padding:0 0 8px!important;margin:0!important;justify-content:flex-start!important}
  .pcard .actions2 form:last-child,.px-category-card .px-category-actions form:last-child{display:none!important}
  .pcard .actions2 .btn,.px-category-card .px-category-actions .btn{min-height:38px!important;height:38px!important;font-size:13px!important;padding:0 8px!important;width:100%}
  .product-image-labels{left:8px!important;top:8px!important;gap:4px!important}
  .product-label{font-size:10.5px!important;padding:3px 7px!important;border-radius:6px!important}
  .best-selling-track{gap:10px!important}
  .best-selling-card{flex:0 0 46%!important;max-width:46%!important}

  /* ---------- catalog page ---------- */
  .category-intro{padding:4px 0 0!important}
  .category-intro p{font-size:13px!important}
  .category-chip-wrap{flex-wrap:nowrap!important;overflow-x:auto;padding-bottom:4px;scrollbar-width:none;margin-left:-12px!important;margin-right:-12px!important;padding-left:12px;padding-right:12px}
  .category-chip-wrap::-webkit-scrollbar{display:none}
  .category-chip{flex:0 0 auto;white-space:nowrap;border-radius:999px!important;font-size:12.5px!important;padding:8px 13px!important}
  .category-catalog-area{display:block!important}
  .category-sortbar{position:sticky;top:108px;z-index:20;border-radius:14px!important;padding:8px 10px!important;display:flex!important;flex-wrap:wrap;gap:8px;align-items:center}
  .category-view-toggle{display:none!important}
  .category-pagination-wrap{margin-bottom:12px}

  /* ---------- deals / offers ---------- */
  .deals-hero{border-radius:18px!important;padding:18px!important;margin:10px 0 16px!important}
  .deals-hero h1{font-size:22px!important}
  .deals-hero-stat{min-width:0!important;flex:1}

  /* ---------- product page ---------- */
  .pdsafe-mobile-buybar{bottom:0!important;border-radius:18px 18px 0 0;box-shadow:0 -8px 24px rgba(16,24,40,.1)!important;padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))!important}
  .pdsafe-hero{border-radius:18px!important}

  /* ---------- footer: compact on phones ---------- */
  .pixo-footer{padding-bottom:10px!important}
  .pixo-footer-link-grid{grid-template-columns:1fr 1fr!important;gap:6px 14px!important}
  .pixo-footer-app-row{flex-wrap:wrap}
}

/* Very small phones */
@media (max-width:360px){
  .mapp-cats a{flex-basis:64px}.mapp-cats span{width:46px;height:46px;font-size:21px}
  .mapp-quick span{font-size:10px}
}
@media (max-width:860px){
  .mapp-search input{background-image:none!important}
  .px-category-card .px-category-info{flex:0 0 auto!important}
  .px-category-card .px-category-actions{margin-top:auto!important}
}

/* ---------- account area: app-style tabs ---------- */
@media (max-width:860px){
  .account-layout{display:flex!important;flex-direction:column!important;gap:12px!important}
  .account-sidebar{position:static!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;order:-1}
  .account-sidebar .account-user,.account-sidebar .menu-section,.account-sidebar .account-support-card,.account-sidebar .account-signout-form{display:none!important}
  .account-sidebar .account-menu{display:flex!important;gap:6px;overflow-x:auto;scrollbar-width:none;margin:0 -12px;padding:2px 12px 4px}
  .account-sidebar .account-menu::-webkit-scrollbar{display:none}
  .account-sidebar .account-menu a{flex:0 0 auto;display:flex!important;padding:8px 12px!important;border-radius:999px!important;background:#fff!important;border:1px solid #e9ebf0!important;color:#344054!important;font-size:13px!important;min-height:0!important}
  .account-sidebar .account-menu a>span:last-child{display:none!important}
  .account-sidebar .account-menu a.active{background:#0b1220!important;color:#fff!important;border-color:#0b1220!important}
  .account-sidebar .account-menu-label{gap:6px!important}
  /* Overview: full menu list like an app "Me" tab, below the summary */
  .account-layout:has(.account-menu a.active[href$="/account"]) .account-sidebar{order:2;background:#fff!important;border:1px solid #e9ebf0!important;border-radius:18px!important;padding:8px!important}
  .account-layout:has(.account-menu a.active[href$="/account"]) .account-sidebar .account-menu{display:grid!important;margin:0;padding:0;gap:2px}
  .account-layout:has(.account-menu a.active[href$="/account"]) .account-sidebar .account-menu a{border:0!important;border-radius:12px!important;background:transparent!important;color:#101828!important;padding:12px!important;justify-content:space-between}
  .account-layout:has(.account-menu a.active[href$="/account"]) .account-sidebar .account-menu a.active{background:#f4f5f8!important}
  .account-layout:has(.account-menu a.active[href$="/account"]) .account-sidebar .account-menu a>span:last-child{display:inline!important;color:#98a2b3}
  .account-layout:has(.account-menu a.active[href$="/account"]) .account-sidebar .account-signout-form,
  .account-layout:has(.account-menu a.active[href$="/account"]) .account-sidebar .account-support-card{display:block!important;margin-top:8px}
  .account-main{min-width:0}
}

/* ---------- auth pages: form first ---------- */
@media (max-width:860px){
  .auth-shell,.login-shell,.auth-layout{display:flex!important;flex-direction:column!important}
}
@media (max-width:860px){
  .auth-otp-intro{padding:16px 18px!important;border-radius:18px!important}
  .auth-otp-intro .auth-otp-points,.auth-otp-intro p{display:none!important}
  .auth-otp-intro h1,.auth-otp-intro h2{font-size:20px!important;margin:4px 0 0!important}
  .auth-otp-card{border-radius:18px!important}
  .auth-otp-page{padding-top:10px!important}
}
@media (min-width:600px) and (max-width:860px){
  .products,.category-product-list.is-grid,.deals-page .category-product-list.is-grid,.category-product-list{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .mapp-tabs{max-width:none}
  .mapp-quick{grid-template-columns:repeat(4,minmax(0,160px));justify-content:center}
}
@media (max-width:860px){
  .px-category-card .px-category-image img,.pcard .pimg img{max-width:100%!important;max-height:100%!important}
  .px-category-price-row{border-top:0!important}
}

/* Promo banners (Banners plugin) */
.px-strip-banners{display:grid;gap:10px;margin:12px 0}
.px-strip-banners a,.px-cat-banner,.px-offer-banner{display:block;border-radius:14px;overflow:hidden}
.px-strip-banners img,.px-cat-banner img,.px-offer-banner img{display:block;width:100%;height:auto}
.px-cat-banner{margin:6px 0 14px}.px-offer-banner{margin:14px 0}
