
/* FENK Marketplace unified mobile UI — additive overrides only */
.mp-header{height:52px;background:#032c25;color:#fff;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;padding:0 10px;position:sticky;top:0;z-index:1000;box-shadow:0 2px 12px rgba(0,0,0,.12)}
.mp-header .mp-brand{justify-self:center;min-width:0;max-width:46vw;color:#fff;text-decoration:none;font-size:17px;font-weight:1000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}
.mp-header .mp-brand span{color:#19d394}
.mp-header .mp-back,.mp-header .mp-cart{justify-self:start;border:1px solid rgba(255,255,255,.25);background:transparent;color:#fff;border-radius:9px;padding:7px 9px;min-height:36px;display:flex;align-items:center;justify-content:center;white-space:nowrap;text-decoration:none;font-size:11px;font-weight:900}
.mp-header .mp-cart{justify-self:end;position:relative;gap:3px;font-size:17px;min-width:44px}
.mp-header .mp-cart-count{font-size:10px;line-height:16px;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:#e83250;color:#fff;text-align:center;font-weight:1000}
.mp-header .mp-cart-label{font-size:10px;margin-inline-start:2px}
@media(max-width:390px){.mp-header{padding:0 7px}.mp-header .mp-brand{font-size:15px;max-width:42vw}.mp-header .mp-back{font-size:10px;padding:6px 7px}.mp-header .mp-cart{padding:6px 7px}}
@media(min-width:768px){.mp-header{height:58px;padding:0 18px}.mp-header .mp-brand{font-size:19px}.mp-header .mp-back,.mp-header .mp-cart{font-size:12px;padding:8px 11px}}

.mp-compact-hero{background:linear-gradient(135deg,#063d33,#087c5b);color:#fff;border-radius:15px;padding:14px 16px;margin:12px 0;box-shadow:0 8px 22px rgba(6,61,51,.08)}
.mp-compact-hero h1{margin:0 0 4px;font-size:22px;line-height:1.25}
.mp-compact-hero p{margin:0;color:#d8f4eb;font-size:11px;line-height:1.65}
@media(max-width:600px){.mp-compact-hero{padding:12px 13px;margin:9px 0}.mp-compact-hero h1{font-size:20px}.mp-compact-hero p{font-size:10px}.hero{min-height:0!important;height:auto!important}.hero h1{line-height:1.25}}

@media(max-width:767px){
 .products-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;padding:0!important}
 .pcard{min-width:0!important;border-radius:12px!important}
 .pcard img{width:100%!important;height:auto!important;aspect-ratio:1/1!important;max-height:none!important;object-fit:cover!important}
 .pcard-body{padding:8px!important}
 .pcard-title{font-size:12px!important;line-height:1.4!important;height:auto!important;min-height:34px!important;max-height:34px!important;-webkit-line-clamp:2!important}
 .price{font-size:14px!important;margin-top:4px!important}
 .old{font-size:9px!important}
 .discount{font-size:8px!important;padding:2px 5px!important;margin-top:4px!important}
 .rating{font-size:9px!important;margin-top:4px!important;line-height:16px!important;min-height:16px!important}
 .choose{min-height:38px!important;padding:8px 6px!important;font-size:11px!important;margin-top:7px!important}
 .empty{padding:22px 14px!important;border-radius:13px!important}
 .wrap{padding:9px 10px 24px!important}
 .toolbar{margin:4px 1px 7px!important}
 .toolbar h2{font-size:17px!important}
}
@media(max-width:360px){
 .products-grid{gap:7px!important}
 .pcard-body{padding:7px!important}
 .pcard-title{font-size:11px!important}
 .price{font-size:13px!important}
 .choose{font-size:10px!important}
}

.parts-nav{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:7px!important;scrollbar-width:none!important;padding:4px 1px 8px!important}
.parts-nav::-webkit-scrollbar{display:none}
.parts-nav a{flex:0 0 auto!important}
.parts-more-toggle{display:none}
.parts-extra{display:none}
.parts-extra.is-open{display:contents}
@media(max-width:767px){
 .spare-hero{padding:13px!important;border-radius:15px!important;margin-bottom:8px!important}
 .spare-hero h1{font-size:20px!important;margin:0 0 4px!important}
 .spare-hero p{font-size:10px!important;line-height:1.6!important}
 .spare-more{display:block!important}
 .products-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

.category-ad-card{display:flex!important;flex-direction:column!important;height:100%!important}
.category-ad-card img{width:100%!important;aspect-ratio:4/3!important;height:auto!important;object-fit:cover!important;display:block!important}
.category-ad-card .body{display:flex!important;flex-direction:column!important;flex:1!important;padding:9px!important}
.category-ad-card .body h3{font-size:13px!important;line-height:1.4!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;min-height:36px!important}
.category-ad-card .ad-meta{display:grid;gap:3px;margin-top:3px;font-size:10px;color:#536c65}
.category-ad-card .detail-btn{margin-top:auto;width:100%;background:#08a875;color:#fff;border:0;border-radius:9px;padding:8px;font-size:10px;font-weight:900;text-align:center}
@media(max-width:767px){
 .grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 .category-ad-card .body{padding:8px!important}
 .category-ad-card .body h3{font-size:11px!important;min-height:31px!important}
 .category-ad-card .ad-meta{font-size:9px!important}
 .category-ad-card .detail-btn{font-size:9px!important;padding:8px 5px!important}
}
@media(max-width:380px){.grid{gap:7px!important}.category-ad-card .body h3{font-size:10.5px!important}}

.mp-empty{background:#fff;border:1px dashed #cfe0da;border-radius:13px;padding:18px 12px;text-align:center;color:#64766f;font-size:11px}
.mp-empty a{display:inline-block;margin-top:8px;background:#08a875;color:#fff;border-radius:9px;padding:8px 11px;font-weight:900;text-decoration:none}
@media(max-width:767px){.promo-wrap{margin:8px 0 10px!important}.publish-card{margin:9px 0!important;padding:11px!important}.categories{margin:10px 0!important;gap:8px!important}.parts-strip{margin:10px 0!important}.head{margin:11px 0 7px!important}}

@media(max-width:767px){.parts-nav a:nth-of-type(n+9){display:none}.parts-nav.is-expanded a:nth-of-type(n+9){display:block}.spare-more{display:block;border:1px solid #d7e3df;background:#fff;color:#078a59;border-radius:999px;padding:7px 12px;font-size:11px;font-weight:900;white-space:nowrap;cursor:pointer;margin:0 0 7px}.parts-nav.is-expanded{flex-wrap:wrap;overflow-x:visible}.parts-nav.is-expanded + .spare-more{display:block}}


/* FENK Mobile stabilization patch — additive, preserves desktop and existing functionality */
html,body{max-width:100%;overflow-x:hidden}
img,video,svg,canvas{max-width:100%}
button,a,input,select,textarea{touch-action:manipulation}
.mp-header{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);height:52px;padding:0 9px;gap:7px}
.mp-header .mp-back{justify-self:start;min-width:44px;max-width:34vw;overflow:hidden;text-overflow:ellipsis}
.mp-header .mp-brand{max-width:46vw;font-size:16px;line-height:1.2}
.mp-header .mp-cart{justify-self:end;min-width:44px}
.mp-header .mp-cart-count:empty{display:none}
.topbar,.p-top{height:52px;background:#032c25;color:#fff;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:7px;padding:0 9px;position:sticky;top:0;z-index:1000;box-shadow:0 2px 12px rgba(0,0,0,.12)}
.topbar .brand,.p-top .brand{justify-self:center;min-width:0;max-width:46vw;color:#fff;font-size:16px;font-weight:1000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}
.topbar .back,.p-top>a:first-child{justify-self:start;max-width:34vw;overflow:hidden;text-overflow:ellipsis;border:1px solid #ffffff33;border-radius:9px;padding:7px 9px;color:#fff;font-size:11px;white-space:nowrap}
.p-top .cart-btn{justify-self:end;min-width:44px;border:1px solid rgba(255,255,255,.25);background:transparent;color:#fff;border-radius:9px;padding:7px 9px;min-height:36px;display:flex;align-items:center;justify-content:center;gap:3px;font-size:17px}
@media(max-width:390px){.mp-header,.topbar,.p-top{padding:0 7px}.mp-header .mp-brand,.topbar .brand,.p-top .brand{font-size:15px;max-width:44vw}.mp-header .mp-back,.topbar .back,.p-top>a:first-child{font-size:10px;padding:6px 7px}}
@media(max-width:767px){
 body{padding-bottom:env(safe-area-inset-bottom)}
 .wrap{width:calc(100% - 16px)!important;max-width:none!important}
 .hero{margin:9px 0 10px!important;padding:13px 13px!important;border-radius:15px!important;min-height:0!important}
 .hero h1{font-size:20px!important;line-height:1.25!important;margin-bottom:4px!important}
 .hero p{font-size:10px!important;line-height:1.6!important}
 .hero-actions{margin-top:9px!important;gap:6px!important}
 .hero-actions a{padding:8px 10px!important;font-size:10px!important}
 .categories{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin:9px 0 12px!important}
 .categories .cat{height:auto!important;min-height:0!important;border-radius:14px!important}
 .categories .cat img{height:112px!important;aspect-ratio:16/10!important;object-fit:cover!important}
 .categories .cat span{font-size:11px!important;padding:7px 4px 9px!important}
 .publish-card{margin:9px 0!important;padding:11px!important;border-radius:14px!important;gap:8px!important}
 .publish-card h2{font-size:14px!important}.publish-card p{font-size:10px!important}.publish-btn{padding:9px 10px!important;font-size:10px!important}
 .head{margin:11px 0 7px!important}.head h2{font-size:18px!important}
 .grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 .marketplace-card{min-width:0!important;border-radius:13px!important}
 .marketplace-card img,.marketplace-card .no-image{aspect-ratio:4/3!important;height:auto!important;object-fit:cover!important}
 .marketplace-card .body{padding:8px!important}.marketplace-card .body h3{font-size:11px!important;line-height:1.4!important;margin:0 0 4px!important}
 .marketplace-card .delete-own-ad{margin:0 8px 8px!important;padding:7px!important;font-size:9px!important}
 .empty,.mp-empty{padding:20px 12px!important;min-height:0!important}
 .promo-wrap{margin:8px 0 10px!important;padding:7px!important;border-radius:15px!important}.promo-slider{aspect-ratio:16/9!important}.promo-arrow{width:29px!important;height:29px!important;font-size:16px!important}
 .parts-strip{margin:8px 0!important}.parts-nav{gap:6px!important}
 .details-panel{gap:7px!important;padding:9px!important}.details-panel label{font-size:10px!important}
 .card{padding:11px!important;margin:8px 0!important;border-radius:14px!important}
 .section-title{margin-bottom:7px!important}.section-title h2{font-size:15px!important}.hint{font-size:9px!important}
 .form{gap:8px!important}.field input,.field textarea,.field select{padding:10px!important}.field textarea{min-height:90px!important}
 .gallery{gap:6px!important}.photo{min-height:0!important}.photo img{height:auto!important;aspect-ratio:1/1!important}
 .nav-actions{position:sticky;bottom:calc(6px + env(safe-area-inset-bottom))!important;padding:6px!important}
}
@media(max-width:360px){.grid{gap:7px!important}.categories{gap:7px!important}.categories .cat img{height:100px!important}.mp-header .mp-brand{font-size:14px!important}}
/* Publish payment state: never flash payment UI before admin setting resolves */
#step-5.payment-loading{display:block!important;opacity:.75}
#step-5.payment-loading .payment{position:relative;min-height:76px}
#step-5.payment-loading .payment>*{visibility:hidden}
#step-5.payment-loading .payment:after{content:'جارٍ التحقق من إعدادات النشر…';visibility:visible;position:absolute;inset:0;display:grid;place-items:center;color:#64766f;font-size:11px}
#freePostingBanner{scroll-margin-top:64px}

.mp-loading{display:grid!important;gap:8px!important;min-height:100px!important;place-items:center!important}
.skeleton-line{display:block;width:min(70%,260px);height:10px;border-radius:999px;background:linear-gradient(90deg,#e7efec,#f7fbf9,#e7efec);background-size:200% 100%;animation:fenkSkeleton 1.2s infinite}
.skeleton-line.short{width:min(45%,170px)}
@keyframes fenkSkeleton{0%{background-position:200% 0}100%{background-position:-200% 0}}
.publish-link{display:inline-flex;margin-top:9px;background:#08a875;color:#fff;border-radius:9px;padding:8px 11px;font-weight:900;text-decoration:none}
