
/* Phase 16 - NovaCart Marketplace Theme
   Inspired by proven large-marketplace UX patterns, with original branding. */
:root{
 --mk-navy:#0d1b2a;
 --mk-navy-2:#14263b;
 --mk-navy-3:#1e344c;
 --mk-orange:#ffb703;
 --mk-orange-2:#fb8500;
 --mk-yellow:#ffd166;
 --mk-link:#007185;
 --mk-bg:#eaeded;
 --mk-line:#d5d9d9;
 --mk-text:#0f1111;
 --mk-muted:#565959;
 --mk-success:#067d62;
 --mk-card:#fff;
}
html{scroll-behavior:smooth}
body.marketplace-theme{background:var(--mk-bg);color:var(--mk-text);font-size:14px}
.market-content-width,.market-container{max-width:1500px;margin-inline:auto}
.market-header{z-index:1040}
.market-top{background:var(--mk-navy);color:#fff;padding:7px 0}
.market-container{display:flex;align-items:center;gap:12px;padding:0 18px}
.market-logo{display:inline-flex;align-items:end;color:#fff;text-decoration:none;font-size:1.42rem;line-height:1;font-weight:800;letter-spacing:-.055em;padding:8px 7px;border:1px solid transparent;border-radius:4px;white-space:nowrap}
.market-logo:hover{border-color:#fff;color:#fff;text-decoration:none}
.market-logo b{color:var(--mk-orange);font-weight:900}
.delivery-block{display:flex;gap:6px;align-items:center;color:#fff;text-decoration:none;border:1px solid transparent;padding:6px 8px;border-radius:4px;line-height:1.1;white-space:nowrap}
.delivery-block:hover{border-color:#fff;color:#fff}
.delivery-block small,.market-account small,.market-orders small{display:block;color:#d8dde3;font-size:.72rem}
.delivery-block strong,.market-account strong,.market-orders strong{display:block;font-size:.83rem;color:#fff}
.delivery-icon{font-size:1.2rem}
.market-search{flex:1;height:42px;display:grid;grid-template-columns:auto 1fr 42px 48px;border-radius:8px;overflow:hidden;background:#fff;box-shadow:0 0 0 3px transparent;transition:.18s}
.market-search:focus-within{box-shadow:0 0 0 3px rgba(255,183,3,.55)}
.market-search select{width:68px;border:0;border-right:1px solid #d7d7d7;background:#f3f3f3;padding:0 8px;color:#555;font-size:.76rem}
.market-search input{border:0;outline:0;padding:0 13px;font-size:.94rem;min-width:0}
.market-search button{border:0}
.voice-search{background:#fff;font-size:1rem}
.search-submit{background:var(--mk-orange);font-size:1.55rem;color:#1b2637}
.search-submit:hover{background:#f3a900}
.market-actions{display:flex;align-items:center;gap:5px}
.language-switch,.market-account,.market-orders,.market-cart{min-height:44px;border:1px solid transparent;border-radius:4px;color:#fff;text-decoration:none;padding:5px 7px;display:flex;justify-content:center;flex-direction:column;line-height:1.05;background:none}
.language-switch{flex-direction:row;align-items:center;gap:4px;font-weight:700}
.market-account:hover,.market-orders:hover,.market-cart:hover,.language-switch:hover{border-color:#fff;color:#fff}
.market-cart{position:relative;flex-direction:row;align-items:end;gap:3px}
.cart-icon{font-size:1.65rem;line-height:1}.cart-count{position:absolute;top:1px;left:24px;color:var(--mk-orange);font-weight:900;font-size:.85rem}
.market-cart strong{font-size:.83rem}
.market-subnav{background:var(--mk-navy-2);color:#fff;min-height:40px}
.subnav-inner{overflow:auto;white-space:nowrap;gap:2px;padding-block:2px}
.market-subnav a,.all-menu{color:#fff!important;text-decoration:none;border:1px solid transparent;background:transparent;padding:8px 9px;border-radius:3px;font-size:.84rem;display:inline-flex;align-items:center}
.market-subnav a:hover,.all-menu:hover{border-color:#fff}
.all-menu{white-space:nowrap}
.market-offcanvas{width:min(365px,90vw)}
.market-offcanvas .offcanvas-header{background:var(--mk-navy-2);color:#fff;padding:20px}
.market-offcanvas .offcanvas-header .btn-close{filter:invert(1)}
.market-offcanvas h6{font-weight:800;margin:18px 0 8px}
.offcanvas-account{background:#f3f4f5;padding:12px;border-radius:8px}.offcanvas-account a{font-weight:700;color:#111;text-decoration:none}
.department-link{display:flex;justify-content:space-between;padding:11px 6px;color:#222;text-decoration:none;border-bottom:1px solid #f0f0f0}
.department-link:hover{background:#f7f7f7;color:#111}

.marketplace-theme .commerce-breadcrumbs{margin:14px 0;font-size:.78rem}
.marketplace-theme .commerce-breadcrumbs a{color:var(--mk-link)}
.marketplace-theme .commerce-page-shell{max-width:1500px}
.marketplace-theme .page-visual-hero,.marketplace-theme .commerce-page-hero{background:#fff!important;color:var(--mk-text);box-shadow:none;border:1px solid var(--mk-line);border-radius:8px!important;min-height:auto;padding:24px!important}
.marketplace-theme .page-visual-hero h1,.marketplace-theme .commerce-page-hero h1{color:var(--mk-text)!important;font-size:clamp(1.9rem,3vw,2.7rem)!important;letter-spacing:-.035em}
.marketplace-theme .page-visual-hero p,.marketplace-theme .commerce-page-hero p{color:var(--mk-muted)!important}
.marketplace-theme .eyebrow-light,.marketplace-theme .eyebrow{color:var(--mk-orange-2)!important;font-size:.72rem;letter-spacing:.1em}
.marketplace-theme .surface-card,.marketplace-theme .section-shell{border:1px solid var(--mk-line)!important;border-radius:8px!important;box-shadow:none!important}
.marketplace-theme .btn{border-radius:999px;font-size:.87rem}
.marketplace-theme .btn-dark{background:#ffd814!important;border-color:#fcd200!important;color:#111!important}
.marketplace-theme .btn-dark:hover{background:#f7ca00!important;border-color:#f2c200!important}
.marketplace-theme .btn-warning{background:#ffa41c;border-color:#ff8f00;color:#111}
.marketplace-theme .btn-outline-dark{border-color:#888;color:#222}
.marketplace-theme .form-control,.marketplace-theme .form-select{border-radius:7px;min-height:42px}
.marketplace-theme a{color:var(--mk-link)}
.marketplace-theme a:hover{color:#c7511f}

.marketplace-theme .commerce-product-card,.marketplace-theme .product-card{border:1px solid var(--mk-line)!important;border-radius:6px!important;box-shadow:none!important;transform:none!important;background:#fff}
.marketplace-theme .commerce-product-card:hover,.marketplace-theme .product-card:hover{box-shadow:0 2px 8px rgba(15,17,17,.12)!important;border-color:#b8bbbb!important}
.marketplace-theme .product-media,.marketplace-theme .product-image-wrap{background:#f7f7f7}
.marketplace-theme .product-label,.marketplace-theme .product-badge{background:#e7f4f5!important;color:#006b75!important;border-radius:3px!important;top:10px;left:10px}
.marketplace-theme .sale-label{background:#cc0c39}
.marketplace-theme .product-body h3,.marketplace-theme .product-card h5{font-weight:500;letter-spacing:0}
.marketplace-theme .product-price strong,.marketplace-theme .product-card strong{font-size:1.18rem}
.marketplace-theme .product-price del{font-size:.75rem}
.marketplace-theme .product-actions{grid-template-columns:1fr 42px}

.marketplace-theme .commerce-trust-strip{max-width:1500px;border-radius:6px;box-shadow:none;margin-top:34px}
.marketplace-theme .trust-item>span{background:#fff3d6;color:#9c6500;border-radius:50%}
.marketplace-theme .trust-item b{font-size:.86rem}
.back-to-top{display:block;background:#37475a;color:#fff!important;text-align:center;padding:14px;text-decoration:none;margin-top:42px}
.back-to-top:hover{background:#485769}
.market-footer{background:#232f3e;color:#ddd}
.market-footer h6{color:#fff;font-weight:800;margin-bottom:12px}
.market-footer a{display:block;color:#ddd!important;text-decoration:none;margin:7px 0;font-size:.82rem}
.market-footer a:hover{text-decoration:underline}
.market-footer-brand{border-top:1px solid #3a4553;display:flex;justify-content:center;align-items:center;gap:10px;padding:25px}
.footer-logo{font-size:1.2rem}.footer-pill{border:1px solid #708090;border-radius:4px;padding:7px 12px;font-size:.78rem}
.market-footer-bottom{background:#131a22;padding:22px;text-align:center;color:#aaa;font-size:.75rem;display:flex;justify-content:center;gap:28px;flex-wrap:wrap}

.marketplace-theme .cart-drawer{border-radius:0!important;max-width:470px}
.marketplace-theme .cart-drawer-head{background:#fff;border-bottom:1px solid var(--mk-line)}
.marketplace-theme .assistant-head{background:var(--mk-navy-2)!important}
.marketplace-theme .assistant-panel{border-radius:8px!important}
.market-mobile-nav{background:#fff!important;border-top:1px solid #ccc!important}
.market-mobile-nav a{color:#333!important}
.market-mobile-nav a.is-active{color:#c45500!important}

.market-home{background:var(--mk-bg)}
.market-home .hero-premium{max-width:1500px;margin:0 auto;position:relative}
.market-home .hero-slide{min-height:430px}
.market-home .hero-content{max-width:640px}
.market-home .hero-content h1{font-size:clamp(2.6rem,5vw,4.5rem)}
.market-home .hero-content .btn-light{background:#ffd814;border-color:#fcd200;color:#111}
.market-home .commerce-section,.market-home section.container{background:#fff;margin-top:18px;margin-bottom:18px;padding:24px!important;max-width:1500px;border-radius:4px}
.market-home .smart-lab{border-radius:4px!important}
.market-home .smart-section{background:transparent!important}
.market-home .recent-card{border:1px solid var(--mk-line);border-radius:4px;background:#fff}
.market-category-grid{max-width:1500px;margin:-80px auto 18px;position:relative;z-index:5;display:grid;grid-template-columns:repeat(4,1fr);gap:18px;padding:0 18px}
.market-category-box{background:#fff;padding:18px;min-height:300px}
.market-category-box h3{font-size:1.25rem;margin-bottom:15px}
.market-category-box .category-tiles{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.market-category-box a{color:#111;text-decoration:none;font-size:.78rem}
.category-tile{background:#f5f5f5;min-height:90px;display:flex;align-items:center;justify-content:center;padding:10px;text-align:center;font-weight:600}
.market-category-box>a{display:inline-block;margin-top:15px;color:var(--mk-link)}

.market-product-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr) 330px;gap:28px;align-items:start}
.market-product-gallery{background:#fff;border-radius:6px;padding:18px;border:1px solid #eee}
.market-product-gallery img{width:100%;max-height:620px;object-fit:contain}
.market-product-info h1{font-size:1.65rem;line-height:1.28;font-weight:500;letter-spacing:0}
.market-rating{color:#c45500;font-size:.86rem;padding-bottom:12px;border-bottom:1px solid #ddd}
.market-price{padding:14px 0}.market-price .current{font-size:2rem}.market-price .old{color:#777;margin-left:8px}
.market-buybox{background:#fff;border:1px solid #d5d9d9;border-radius:8px;padding:18px;position:sticky;top:132px}
.market-buybox .buy-price{font-size:1.55rem;margin-bottom:12px}
.market-buybox .stock-ok{color:var(--mk-success);font-size:1.1rem;margin:12px 0}
.market-buybox .delivery-line{font-size:.8rem;margin:12px 0}
.market-buybox .btn{width:100%;margin:5px 0;min-height:42px}
.buybox-meta{font-size:.75rem;display:grid;grid-template-columns:90px 1fr;gap:5px;margin-top:12px;color:#555}

.market-cart-layout{display:grid;grid-template-columns:1fr 320px;gap:18px;align-items:start}
.market-cart-list,.market-cart-summary{background:#fff;border:1px solid #ddd;padding:20px}
.market-cart-row{display:grid;grid-template-columns:150px 1fr auto;gap:18px;padding:18px 0;border-bottom:1px solid #ddd}
.market-cart-row img{width:150px;height:150px;object-fit:contain;background:#f7f7f7}
.market-cart-summary{position:sticky;top:132px}
.market-cart-summary .subtotal{font-size:1.2rem}

.market-checkout-shell{display:grid;grid-template-columns:1fr 360px;gap:24px;align-items:start}
.checkout-panel{background:#fff;border:1px solid #ddd;border-radius:6px;padding:22px;margin-bottom:14px}
.checkout-panel h3{font-size:1.15rem;border-bottom:1px solid #eee;padding-bottom:12px;margin-bottom:16px}
.checkout-summary{background:#fff;border:1px solid #ddd;border-radius:8px;padding:20px;position:sticky;top:132px}

.market-account-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.account-tile{background:#fff;border:1px solid #ddd;border-radius:8px;padding:18px;display:flex;gap:14px;min-height:105px;color:#111!important;text-decoration:none}
.account-tile:hover{background:#f7fafa;color:#111}
.account-tile .tile-icon{font-size:1.8rem}
.account-tile h4{font-size:1rem;margin:0 0 4px}.account-tile p{font-size:.78rem;margin:0}

@media(max-width:1199px){
 .market-account strong,.market-orders strong{font-size:.75rem}
 .market-category-grid{grid-template-columns:repeat(2,1fr);margin-top:-40px}
 .market-product-layout{grid-template-columns:1fr 1fr}.market-buybox{grid-column:1/-1;position:static}
}
@media(max-width:991px){
 .market-top{padding:5px 0}.market-container{flex-wrap:wrap;gap:5px;padding:0 10px}
 .market-logo{order:1}.market-actions{order:2;margin-left:auto}.market-search{order:3;flex-basis:100%;height:44px}
 .market-account{display:none}.market-cart strong{display:none}
 .market-subnav{min-height:38px}
 .market-category-grid{margin-top:12px}
 .market-product-layout{grid-template-columns:1fr}.market-buybox{grid-column:auto}
 .market-cart-layout,.market-checkout-shell{grid-template-columns:1fr}
 .market-cart-summary,.checkout-summary{position:static}
 .market-account-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:575px){
 body.marketplace-theme{font-size:13px}
 .market-logo{font-size:1.1rem}.market-actions{gap:0}.market-cart{min-width:50px}
 .market-search{grid-template-columns:55px 1fr 38px 44px}.market-search select{width:55px}
 .market-category-grid{grid-template-columns:1fr;padding:0 10px}.market-category-box{min-height:auto}
 .market-home .hero-slide{min-height:310px}.market-home .hero-content{padding-bottom:45px}
 .market-home section.container,.market-home .commerce-section{margin:10px;padding:15px!important}
 .market-product-gallery{padding:8px}.market-product-info h1{font-size:1.35rem}
 .market-cart-row{grid-template-columns:90px 1fr}.market-cart-row img{width:90px;height:90px}.market-cart-row>div:last-child{grid-column:2}
 .market-account-grid{grid-template-columns:1fr}
 .market-footer-brand{flex-wrap:wrap}
}

/* Generic marketplace normalization for every customer-facing inner page */
.marketplace-theme .inner-page-main>.container,
.marketplace-theme main>.container{max-width:1500px}
.marketplace-theme .bg-white.rounded-4,
.marketplace-theme .border.rounded-4,
.marketplace-theme .p-4.border,
.marketplace-theme .p-4.bg-light{border-radius:6px!important;box-shadow:none!important;border:1px solid var(--mk-line)!important;background:#fff!important}
.marketplace-theme .shadow-sm{box-shadow:none!important}
.marketplace-theme h1{font-weight:500;letter-spacing:-.025em}
.marketplace-theme h2,.marketplace-theme h3,.marketplace-theme h4{letter-spacing:-.015em}
.marketplace-theme .table{font-size:.86rem;background:#fff}
.marketplace-theme .table thead th{background:#f3f3f3;border-bottom:1px solid #bbb;color:#333}
.marketplace-theme .table td{border-color:#e7e7e7}
.marketplace-theme .alert{border-radius:5px}
.marketplace-theme .badge{border-radius:3px}
.marketplace-theme .image-search-drop{background:#fff;border:2px dashed #aeb4b8;border-radius:6px;padding:44px}
.marketplace-theme .ai-chip{border-radius:4px;background:#f7f7f7}
.marketplace-theme .smart-card{border-radius:6px}
.marketplace-theme .prefooter-cta{display:none}
.marketplace-theme .footer-premium{display:none}
.marketplace-theme .login-card,.marketplace-theme .auth-shell>div{border-radius:6px!important}
.marketplace-theme textarea.form-control{min-height:100px}
.marketplace-theme .list-group-item{border-color:#ddd}
.marketplace-theme .recent-card{border-radius:4px!important}
.marketplace-theme .smart-lab{background:var(--mk-navy-2)!important;border-radius:4px!important}
.marketplace-theme .smart-grid>a,.marketplace-theme .smart-grid>div{border-radius:4px!important}
.marketplace-theme .section-heading{margin-bottom:18px}
.marketplace-theme .section-heading h2{font-size:1.55rem}
.marketplace-theme .footer-pills{display:none}
.marketplace-theme .compare-table img{object-fit:contain}

/* Login / registration should feel like marketplace account flows */
.marketplace-theme .auth-shell{max-width:430px}
.marketplace-theme .auth-shell .surface-card,
.marketplace-theme .auth-shell .bg-white{padding:28px!important}
.marketplace-theme .auth-shell h1{font-size:1.75rem}
.marketplace-theme .auth-shell .btn-dark{border-radius:8px}

/* Product lists and filters */
.marketplace-theme aside .surface-card{padding:18px!important}
.marketplace-theme aside .surface-card h5{font-size:1rem}
.marketplace-theme aside label{font-size:.78rem}
.marketplace-theme .row.g-4>[class*="col-"]{scroll-margin-top:130px}

/* Order tracking/support blocks */
.marketplace-theme .timeline,
.marketplace-theme .tracking-card{background:#fff;border:1px solid var(--mk-line);border-radius:6px}

/* Vendor store gets department-store character */
.marketplace-theme .vendor-hero{background:#fff;border:1px solid var(--mk-line);border-radius:5px}

/* Preserve accessible focus */
.marketplace-theme a:focus-visible,
.marketplace-theme button:focus-visible,
.marketplace-theme input:focus-visible,
.marketplace-theme select:focus-visible{outline:3px solid rgba(255,183,3,.75);outline-offset:2px}
