/* Shared buyer typography and page chrome. Catalogue geometry stays in catalogue.css. */
body.buyer-page{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;font-size:14px!important;line-height:1.5;letter-spacing:0;color:#243137;background:#f6f8fa}
.buyer-page *{box-sizing:border-box}
.buyer-page :is(main,section,article,fieldset,.panel,.card,.item,.box,.grid,.row,.bar,.buyer-header-actions){min-width:0}
.buyer-page :is(p,a,label,h1,h2,h3,.msg,.item,.box){overflow-wrap:anywhere}
.buyer-page :is(img,video,canvas){max-width:100%}
.buyer-page textarea{resize:vertical}
.buyer-page [hidden]{display:none!important}
.buyer-page :is(button,input,select,textarea){font-family:inherit!important;letter-spacing:0;max-width:100%;min-width:0}
body.buyer-page :is(button,.soft,.outline){font-size:13px!important;font-weight:700!important;line-height:1.4;min-height:40px;border-radius:6px;cursor:pointer;white-space:normal}
.buyer-page :is(input,select,textarea){font-size:14px!important;border:1px solid #cbd5dc;border-radius:6px;background:#fff;color:#243137;padding:10px 12px}
.buyer-page :is(input,select):not([type=checkbox]):not([type=radio]):not([type=hidden]){min-height:42px}
.buyer-page :is(input[type=checkbox],input[type=radio]){width:18px;height:18px;min-height:0;flex:none;accent-color:#168574;padding:0}
.buyer-page label{font-size:14px;font-weight:700;line-height:1.5}
.buyer-page main h1,.buyer-page main h2{font-size:22px!important;line-height:1.3!important;font-weight:700;margin:0 0 16px;overflow-wrap:anywhere}
.buyer-page main h3{font-size:16px!important;line-height:1.4!important;font-weight:700}
.buyer-page .muted{font-size:13px;line-height:1.5;color:#617078}
.buyer-page :is(a,button,input,select,textarea):focus-visible{outline:2px solid #168574;outline-offset:3px}
.buyer-page header{background:#fff!important;color:#243137!important;border-bottom:1px solid #dce3e8;box-shadow:none!important}
.buyer-page:not(.buyer-home) header .bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;max-width:1100px;margin:auto;padding:16px 24px}
.buyer-page header .brand{display:flex;align-items:center;gap:10px;min-width:0;max-width:100%}
.buyer-page header .brand>div:last-child{min-width:0}
.buyer-page header .brand :is(h1,h2){font-size:22px!important;line-height:1.2!important;font-weight:700;margin:0 0 4px}
.buyer-page header .brand :is(span,.label,.version),.buyer-page header .brand>div>div{font-size:12px!important;line-height:1.4;color:#617078;font-weight:400}
.buyer-page header .logo,.buyer-page header #homeLogo{display:block;width:56px!important;height:56px!important;min-width:56px!important;flex:none;padding:0!important;background:none!important;box-shadow:none!important;border:0!important;border-radius:0!important}
.buyer-page header .logo img{display:block;width:100%;height:100%;object-fit:contain}
.buyer-page header :is(.soft,.outline,.cart,.buyer-lang-toggle){border:1px solid #dce3e8;background:#fff;color:#176b61;box-shadow:none;border-radius:6px;padding:8px 12px}
.buyer-header-actions,.buyer-header-actions>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.buyer-header-actions .buyer-back{background:transparent;border:1px solid #dce3e8;color:#52656e;padding:8px 12px}
.buyer-page:not(.buyer-home) main{width:100%;max-width:1100px;margin:0 auto;padding:28px 24px 40px;min-height:55vh}
.buyer-page:not(.buyer-home) main>.panel{margin:0 0 24px;padding:0 0 24px;background:transparent;border:0;border-bottom:1px solid #e1e7eb;border-radius:0;box-shadow:none}
.buyer-page:not(.buyer-home) main>.panel:last-child{border-bottom:0}
.buyer-page:not(.buyer-home) .row{gap:12px;min-width:0}
.buyer-page:not(.buyer-home) .row>*{min-width:0}
.buyer-page:not(.buyer-home) :is(.primary,.buy){background:#168574;color:#fff;font-weight:600;box-shadow:none}
.buyer-page:not(.buyer-home) :is(.card,.item,.voucher,.msg){border-radius:8px;box-shadow:none}
.buyer-page:not(.buyer-home) :is(.price,.total){font-size:18px!important;font-weight:700}
.buyer-page:not(.buyer-home) .pm-mobile-links{display:flex!important;flex-wrap:wrap;gap:12px;max-width:1052px;margin:0 auto;padding:16px 0;border-top:1px solid #dce3e8}
.buyer-page:not(.buyer-home) .pm-mobile-links :is(.pm-seller-switch,.pm-policy-link){position:static!important;inset:auto!important;min-height:40px;width:auto!important;box-shadow:none!important;border-radius:6px;background:#fff;color:#176b61;border:1px solid #dce3e8;padding:8px 14px}
.buyer-page:not(.buyer-home) .pm-notify-enable{position:static!important;display:block;margin:12px auto 24px;box-shadow:none!important;border-radius:6px!important;background:#fce8ef!important;color:#a71750!important}
.buyer-page.buyer-auth{background:#fff}
.buyer-page.buyer-auth main{display:block;max-width:560px;min-height:0;padding-top:28px}
.buyer-page.buyer-auth main>.card,.buyer-page.buyer-auth main>.panel{padding:0;margin:0;background:transparent;border:0;box-shadow:none}
.buyer-page.buyer-auth .mode{margin:20px 0;border:0;border-bottom:1px solid #dce3e8;border-radius:0}
.buyer-page.buyer-auth .mode a{font-size:14px;font-weight:600;min-height:42px;border-bottom:2px solid transparent;background:transparent}
.buyer-page.buyer-auth .mode a.active{border-bottom-color:#168574;background:transparent}
.buyer-page.buyer-auth label{display:block;margin:14px 0 6px;font-weight:600}
.buyer-page.buyer-auth .field{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.buyer-page.buyer-auth .field button{min-width:82px;margin:0}
.buyer-page.buyer-auth .terms{display:flex;font-size:12px;font-weight:400;gap:10px;align-items:flex-start;margin:18px 0}
.buyer-page.buyer-auth .terms input{margin-top:2px}
.buyer-page.buyer-auth .terms a{font-weight:500;text-decoration:underline}
.buyer-page.buyer-auth .primary{min-height:44px;margin-top:8px}
.buyer-page.buyer-auth .status:empty{display:none}
.buyer-page.buyer-auth .pm-mobile-links{max-width:512px;margin-top:24px}
@media(max-width:760px){
 .buyer-page:not(.buyer-home) header{position:static}
 .buyer-page .buyer-header-actions>div{max-width:100%}
 .buyer-page main>.panel{margin-left:0!important;margin-right:0!important}
 .buyer-page .qty{flex-wrap:wrap}
 .buyer-page:not(.buyer-home) header .bar{padding:12px 16px;gap:12px}
 .buyer-header-actions{width:100%;justify-content:flex-start}
 .buyer-page:not(.buyer-home) main{padding:24px 16px 32px}
 .buyer-page:not(.buyer-home) .row{grid-template-columns:1fr}
 .buyer-page :is(input,select,textarea){font-size:16px!important}
 .buyer-page button{min-height:44px}
 .buyer-page:not(.buyer-home) .pm-mobile-links{margin:0 16px;padding:16px 0}
 .buyer-page.buyer-auth main{max-width:560px}
 .buyer-page.buyer-auth .pm-mobile-links{max-width:528px;margin:16px auto;padding:16px}
}
/* Product detail is not a catalogue grid. Keep buying controls below the image on phones. */
.buyer-product .product-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;padding:0}
.buyer-product .product-layout>.panel{min-width:0;margin:0!important;padding:0;border:0;background:transparent}
.buyer-product .product-layout .photo{aspect-ratio:1;background:#fff;max-height:520px}
.buyer-product #detail .row{grid-template-columns:minmax(0,1fr) minmax(80px,120px)}
.buyer-product #detail .row :is(input,select){width:100%}
.buyer-product #detail>button{display:block;width:100%;min-height:44px;margin:10px 0;padding:10px 14px}
.buyer-product .trust{grid-template-columns:minmax(0,1fr);gap:0}
.buyer-product .trust>div{border:0;border-bottom:1px solid #e1e7eb;border-radius:0;padding:10px 0;background:transparent}
.buyer-product main>section{margin-top:28px!important}
@media(max-width:760px){
 .buyer-product .product-layout{grid-template-columns:minmax(0,1fr);gap:20px}
 .buyer-product .product-layout .photo{width:100%;max-height:none}
 .buyer-product #detail .row{grid-template-columns:minmax(0,1fr)}
}
.buyer-navigation{display:flex;justify-content:center;gap:4px;background:#fff;border-bottom:1px solid #dce3e8;padding:0 16px}
.buyer-navigation a{color:#52636b;text-decoration:none;padding:12px 20px;font-size:13px;font-weight:600;border-bottom:3px solid transparent;text-align:center}
.buyer-navigation a[aria-current]{color:#087f72;border-bottom-color:#087f72;background:#eef8f5}
.buyer-cart-link,.buyer-seller-link{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 12px;text-decoration:none;border:1px solid #cbd5dc;border-radius:6px;color:#087f72;font-size:13px;font-weight:600}
.buyer-seller-link{background:#087f72;color:#fff;border-color:#087f72;margin-left:8px}
.buyer-home header .brand{display:grid;grid-template-columns:56px minmax(0,1fr);gap:8px;align-items:center}
.buyer-home header .brand h1{font-size:20px!important;white-space:nowrap}
.buyer-home header .buyer-seller-link{grid-column:1/-1;margin:0;max-width:none;min-height:36px}
.buyer-page .filter-toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:end;padding:16px 0;border-bottom:1px solid #dce3e8;margin-bottom:20px}
.filter-toolbar label{flex:1 1 140px;min-width:0;display:grid;gap:6px}
.filter-toolbar input,.filter-toolbar select{width:100%}
.buyer-page .status-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0}
.status-tabs button{background:#fff;border:1px solid #cbd5dc;color:#33494e;padding:8px 12px}
.status-tabs button[aria-pressed=true]{background:#087f72;border-color:#087f72;color:#fff}
.buyer-page .empty-state{padding:32px 0;grid-column:1/-1;color:#52636b}
.buyer-page .empty-state a{display:inline-block;margin-top:12px;color:#087f72;font-weight:600}
.buyer-page .cart-product{display:grid;grid-template-columns:72px minmax(0,1fr);gap:12px;align-items:start}
.cart-product img{width:72px;height:72px;object-fit:contain;background:#fff;border:1px solid #e1e7eb;border-radius:6px}
.cart-product a{color:inherit;text-decoration:none;font-weight:600}
.buyer-page .checkout-choice{display:flex;gap:10px;align-items:start}
.buyer-page .cart-summary{border-top:2px solid #dce3e8;margin-top:20px;padding-top:16px}
.buyer-page .result-link{display:block;color:inherit;text-decoration:none}
.product-thumbnails{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.product-thumbnails button{width:56px;height:56px;padding:3px;background:#fff;border:1px solid #cbd5dc}
.product-thumbnails button[aria-pressed=true]{border:2px solid #087f72}
.product-thumbnails img{width:100%;height:100%;object-fit:contain}
.buyer-page .result-link .photo{display:block;aspect-ratio:1;position:relative}
@media(max-width:760px){
 body.buyer-page{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))}
 .buyer-navigation{position:fixed;bottom:0;left:0;right:0;z-index:60;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;padding:0 4px env(safe-area-inset-bottom,0px);border-top:1px solid #dce3e8;border-bottom:0;min-height:56px}
 .buyer-navigation a{padding:16px 2px;font-size:11px;border-bottom:0;border-top:3px solid transparent;display:flex;align-items:center;justify-content:center}
 .buyer-navigation a[aria-current]{border-top-color:#087f72}
 .buyer-seller-link{font-size:12px}
 .buyer-page .filter-toolbar{gap:10px}.filter-toolbar label{flex-basis:120px}
}
/* Keep the scroll viewport above navigation, including in the iOS WebView. */
@media(max-width:760px){
 body.buyer-page:is(.buyer-home,.buyer-product){height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden!important;padding-bottom:0}
 .buyer-page:is(.buyer-home,.buyer-product)>header{flex:none;position:static!important}
 .buyer-page:is(.buyer-home,.buyer-product)>main{flex:1 1 auto;width:100%!important;min-height:0;min-width:0;overflow:auto!important;overscroll-behavior-y:contain;scroll-padding-block:16px;padding-bottom:24px!important}
 .buyer-page:is(.buyer-home,.buyer-product)>.buyer-navigation{position:static;order:10;flex:none;min-height:56px}
 .buyer-home header .bar{gap:8px!important;padding:8px 12px!important}
 .buyer-home header .brand{grid-template-columns:40px minmax(0,1fr) auto;gap:8px}
 .buyer-home header #homeLogo{width:40px!important;height:40px!important;min-width:40px!important}
 .buyer-home header .brand h1{font-size:18px!important;white-space:normal;overflow-wrap:anywhere}
 .buyer-home header .brand .label,.buyer-home header .brand .version{display:none}
 .buyer-home header .buyer-seller-link{grid-column:auto;max-width:112px;min-height:44px;padding:6px 8px;text-align:center;line-height:1.3}
 .buyer-home header .bar>div:last-child{grid-template-columns:minmax(0,1.35fr) repeat(2,minmax(0,1fr))!important}
 .buyer-home header .bar>div:last-child button{min-height:44px!important;line-height:1.25;white-space:normal}
 .buyer-home header .search input{min-height:44px!important}
 .buyer-product .product-layout .photo{aspect-ratio:1;max-height:320px}
 .buyer-product .product-layout .photo img{object-fit:contain!important}
 .buyer-product #detail label{display:grid;gap:6px;font-weight:600}
 .buyer-product #detail a{color:#176b61;overflow-wrap:anywhere}
}
.buyer-page .buyer-account-bar{display:flex;align-items:center;justify-content:flex-end;gap:16px;max-width:1100px;margin:auto;padding:0 24px;min-height:44px;border-bottom:1px solid #e1e7eb}
.buyer-page .buyer-account-bar a,.buyer-page .buyer-account-bar button{display:inline-flex;align-items:center;min-height:44px;font-size:13px!important;font-weight:600;color:#176b61;text-decoration:none;background:transparent;border:0;padding:0;white-space:nowrap}
.buyer-page .buyer-account-bar .account-home{margin-right:auto;color:#243137}
.buyer-home main .hero{max-width:900px;margin:12px auto!important}
.buyer-home header .brand .label,.buyer-home header .brand .version{display:none}
@media(max-width:760px){
 .buyer-page .buyer-account-bar{padding:0 12px;gap:14px}
 .buyer-home header .bar{gap:4px!important;padding:2px 12px!important}
 .buyer-home .market-banner{max-height:180px!important;object-fit:contain}
}
@media print{.buyer-account-bar,.buyer-navigation,.buyer-header-actions,.buyer-page .pm-mobile-links,.buyer-page .pm-notify-enable{display:none!important}}

/* Stronger hierarchy without making descriptions or entered values heavy. */
.buyer-page :is(.muted,.shop){color:#52616b;font-weight:500}
.buyer-page :is(.buyer-navigation a,.buyer-account-bar a,.buyer-account-bar button,label){font-weight:700}
.buyer-page :is(input,select,textarea){border-color:#a9bac4}
.buyer-page :is(input,textarea)::placeholder{color:#61717b;opacity:1}
.buyer-page :is(header,.buyer-account-bar,.buyer-navigation,.cats,.cart-summary,.filter-toolbar){border-color:#b9c7cf}
.buyer-page:not(.buyer-home) main>.panel,.buyer-product .trust>div{border-bottom-color:#b9c7cf}
.buyer-page :is(.soft,.outline,.cart,.buyer-cart-link,.buyer-back),.buyer-home .grid>.card{border-color:#b9c7cf}
.buyer-page :is(.card,.item,.voucher,.msg,th,td){border-color:#c4cfd6}
.buyer-page.buyer-auth label{font-weight:700}
