/*
Theme Name: MarketHub
Theme URI: https://example.com/markethub
Author: MarketHub
Description: Amazon-style multi-vendor marketplace theme for WooCommerce. Works with Dokan (free) for vendor dashboards, commissions and withdrawals. Includes search with categories, mega homepage, deal rows, vendor strip, sticky buy box and responsive layout.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: markethub
Tags: e-commerce, woocommerce, two-columns, custom-menu, custom-logo
*/

:root{
  --mh-navy:#131921; --mh-nav2:#232f3e; --mh-orange:#febd69; --mh-orange-d:#f3a847;
  --mh-yellow:#ffd814; --mh-buy:#ffa41c; --mh-link:#007185; --mh-link-h:#c7511f;
  --mh-bg:#eaeded; --mh-card:#fff; --mh-text:#0f1111; --mh-muted:#565959;
  --mh-border:#d5d9d9; --mh-price:#b12704; --mh-star:#ffa41c; --mh-radius:8px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--mh-bg);color:var(--mh-text);font:14px/1.5 "Segoe UI",Roboto,Helvetica,Arial,sans-serif}
a{color:var(--mh-link);text-decoration:none}
a:hover{color:var(--mh-link-h);text-decoration:underline}
img{max-width:100%;height:auto;display:block}
h1,h2,h3,h4{margin:0 0 .5em;line-height:1.25;font-weight:700}
.mh-container{max-width:1500px;margin:0 auto;padding:0 16px}
.screen-reader-text{position:absolute;left:-9999px}
:focus-visible{outline:2px solid var(--mh-orange-d);outline-offset:2px}

/* Header */
.mh-header{background:var(--mh-navy);color:#fff;position:sticky;top:0;z-index:50}
.mh-header a{color:#fff}
.mh-header__row{display:flex;align-items:center;gap:12px;padding:8px 16px;max-width:1500px;margin:0 auto}
.mh-logo{font-size:24px;font-weight:800;letter-spacing:-.5px;padding:4px 8px;border:1px solid transparent;border-radius:3px}
.mh-logo span{color:var(--mh-orange)}
.mh-logo:hover{border-color:#fff;text-decoration:none}
.mh-deliver{font-size:12px;line-height:1.2;padding:4px 8px;border:1px solid transparent;border-radius:3px;white-space:nowrap}
.mh-deliver b{display:block;font-size:14px}
.mh-deliver:hover{border-color:#fff}
.mh-search{flex:1;display:flex;border-radius:6px;overflow:hidden;min-width:0}
.mh-search select{background:#e6e6e6;border:0;padding:0 8px;color:#333;max-width:140px;font-size:12px}
.mh-search input[type=search]{flex:1;border:0;padding:10px 12px;font-size:15px;min-width:0}
.mh-search button{background:var(--mh-orange);border:0;padding:0 18px;cursor:pointer;font-size:18px}
.mh-search button:hover{background:var(--mh-orange-d)}
.mh-hlink{font-size:12px;line-height:1.2;padding:4px 8px;border:1px solid transparent;border-radius:3px;white-space:nowrap}
.mh-hlink b{display:block;font-size:14px}
.mh-hlink:hover{border-color:#fff;text-decoration:none}
.mh-cart{display:flex;align-items:flex-end;gap:4px;font-weight:700;padding:4px 8px;border:1px solid transparent;border-radius:3px}
.mh-cart:hover{border-color:#fff;text-decoration:none}
.mh-cart__count{color:var(--mh-orange);font-size:18px;line-height:1}
.mh-nav{background:var(--mh-nav2)}
.mh-nav__inner{display:flex;align-items:center;gap:4px;max-width:1500px;margin:0 auto;padding:0 12px;overflow-x:auto;white-space:nowrap}
.mh-nav ul{display:flex;list-style:none;margin:0;padding:0;gap:2px}
.mh-nav a{display:block;color:#fff;padding:8px 10px;font-size:14px;border:1px solid transparent;border-radius:3px}
.mh-nav a:hover{border-color:#fff;text-decoration:none}
.mh-nav .mh-sell{margin-left:auto;color:var(--mh-orange);font-weight:700}
.mh-burger{display:none;background:none;border:0;color:#fff;font-size:22px;cursor:pointer}

/* Hero */
.mh-hero{position:relative;overflow:hidden;background:linear-gradient(180deg,#1f3a52,#eaeded 90%)}
.mh-slides{display:flex;transition:transform .6s ease}
.mh-slide{background-size:cover;background-position:center;min-width:100%;padding:56px 16px 140px;color:#fff;text-align:center}
.mh-slide h2{font-size:clamp(26px,4.5vw,52px);margin-bottom:8px}
.mh-slide p{font-size:clamp(14px,2vw,20px);margin:0 auto 18px;max-width:640px}
.mh-btn,.button,button.single_add_to_cart_button,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button{display:inline-block;background:var(--mh-yellow);color:var(--mh-text)!important;border:1px solid #fcd200;border-radius:20px;padding:8px 18px;font-weight:600;cursor:pointer;text-align:center}
.mh-btn:hover,.button:hover{background:#f7ca00;text-decoration:none}
.woocommerce a.button.alt,.woocommerce button.button.alt,.single_add_to_cart_button{background:var(--mh-yellow)!important;color:var(--mh-text)!important}
.woocommerce .checkout-button,.woocommerce #place_order{background:var(--mh-buy)!important;border-color:#ff8f00!important}
.mh-hero__nav{position:absolute;top:35%;width:100%;display:flex;justify-content:space-between;padding:0 8px;pointer-events:none}
.mh-hero__nav button{pointer-events:auto;background:rgba(255,255,255,.2);border:0;color:#fff;font-size:28px;height:90px;width:44px;cursor:pointer;border-radius:4px}

/* Home blocks */
.mh-pull{margin-top:-120px;position:relative;z-index:2}
.mh-grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.mh-card{background:var(--mh-card);padding:16px;border-radius:2px}
.mh-card h3{font-size:20px}
.mh-cat-tiles{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.mh-cat-tiles a{color:var(--mh-text);font-size:12px;display:block}
.mh-cat-tiles .mh-tile{aspect-ratio:1;background:#f0f2f2;display:grid;place-items:center;font-size:42px;border-radius:2px;margin-bottom:4px;overflow:hidden}
.mh-cat-tiles .mh-tile img{width:100%;height:100%;object-fit:cover}
.mh-card .mh-more{display:block;margin-top:12px}
.mh-section{margin-top:16px}
.mh-section>.mh-card{padding:16px 16px 20px}
.mh-row{display:flex;gap:14px;overflow-x:auto;padding-bottom:6px;scroll-snap-type:x proximity}
.mh-row>*{flex:0 0 190px;scroll-snap-align:start}
.mh-vendors{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px}
.mh-vendor{border:1px solid var(--mh-border);border-radius:var(--mh-radius);padding:12px;display:flex;gap:10px;align-items:center;color:var(--mh-text)}
.mh-vendor:hover{box-shadow:0 2px 8px rgba(0,0,0,.15);text-decoration:none}
.mh-avatar{width:44px;height:44px;border-radius:50%;background:var(--mh-nav2);color:var(--mh-orange);display:grid;place-items:center;font-weight:800;flex:none}
.mh-vendor small{color:var(--mh-muted);display:block}
.mh-sell-band{background:var(--mh-nav2);color:#fff;padding:28px 16px;text-align:center;margin-top:16px}
.mh-sell-band h2{font-size:26px}

/* Product cards (WooCommerce loop) */
.woocommerce ul.products{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;list-style:none;margin:0;padding:0}
.woocommerce ul.products::before,.woocommerce ul.products::after{display:none}
.woocommerce ul.products li.product,.mh-product{background:var(--mh-card);padding:12px;border-radius:2px;display:flex;flex-direction:column;width:auto!important;margin:0!important;float:none!important;position:relative}
.woocommerce ul.products li.product a img{aspect-ratio:1;object-fit:contain;margin:0 0 8px;background:#fff}
.woocommerce-loop-product__title{font-size:14px!important;font-weight:500;margin:0 0 4px!important;padding:0!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.mh-sold{font-size:12px;color:var(--mh-muted);margin-bottom:4px}
.star-rating{color:var(--mh-star);font-size:13px;margin:0 0 4px!important}
.price{color:var(--mh-text);font-size:18px;font-weight:500}
.price del{color:var(--mh-muted);font-size:13px}
.price ins{text-decoration:none}
.woocommerce span.onsale{background:#cc0c39;color:#fff;border-radius:2px;position:absolute;top:8px;left:8px;min-height:0;min-width:0;line-height:1.4;padding:2px 8px;font-size:12px}
.woocommerce ul.products li.product .button{margin-top:auto;font-size:13px}
.mh-prime{color:#00a8e1;font-weight:700;font-size:12px}

/* Shop layout */
.mh-shop{display:grid;grid-template-columns:240px 1fr;gap:16px;padding-top:16px;padding-bottom:24px}
.mh-shop.mh-single{grid-template-columns:1fr}
.mh-sidebar .widget{background:#fff;padding:14px;margin-bottom:12px;border-radius:2px}
.mh-sidebar .widget-title{font-size:16px}
.mh-sidebar ul{list-style:none;margin:0;padding:0}
.mh-sidebar li{padding:2px 0}
.woocommerce-ordering select,.woocommerce-result-count{margin-bottom:12px}

/* Single product */
.woocommerce div.product{background:#fff;padding:20px;border-radius:2px;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1.2fr) 280px;gap:24px;align-items:start}
.woocommerce div.product div.images,.woocommerce div.product div.summary{float:none!important;width:auto!important;margin:0!important}
.woocommerce div.product .product_title{font-size:24px;font-weight:500}
.woocommerce div.product p.price{color:var(--mh-price);font-size:26px}
.woocommerce div.product form.cart{border:1px solid var(--mh-border);border-radius:var(--mh-radius);padding:14px;margin:12px 0;position:sticky;top:130px}
.woocommerce div.product .woocommerce-tabs,.woocommerce div.product .related,.woocommerce div.product .upsells{grid-column:1/-1}
.woocommerce div.product form.cart .button{width:100%;border-radius:20px;margin-top:8px}
.woocommerce-tabs ul.tabs{padding:0!important;margin:0 0 12px!important;display:flex;gap:6px;list-style:none;border-bottom:1px solid var(--mh-border)}
.woocommerce-tabs ul.tabs::before{display:none}
.woocommerce-tabs ul.tabs li{border:0!important;background:none!important;margin:0!important;padding:8px 12px!important}
.woocommerce-tabs ul.tabs li.active{border-bottom:3px solid var(--mh-orange-d)!important}
.mh-vendorbox{border:1px solid var(--mh-border);border-radius:var(--mh-radius);padding:10px;margin:10px 0;font-size:13px}

/* Cart / checkout */
.woocommerce-cart-form,.cart_totals,.woocommerce-checkout #customer_details,#order_review{background:#fff;padding:16px;border-radius:2px}
.woocommerce table.shop_table{border-radius:0;border-collapse:collapse}
.woocommerce-checkout #order_review_heading{margin-top:16px}
.page-content{background:#fff;padding:24px;margin:16px 0;border-radius:2px}

/* Footer */
.mh-backtop{display:block;background:#37475a;color:#fff;text-align:center;padding:14px;font-size:13px}
.mh-backtop:hover{background:#485769;text-decoration:none;color:#fff}
.mh-footer{background:var(--mh-nav2);color:#ddd;padding:36px 16px 20px;margin-top:24px}
.mh-footer a{color:#ddd}
.mh-footer__cols{display:grid;grid-template-columns:repeat(4,1fr);gap:24px;max-width:1100px;margin:0 auto}
.mh-footer h4{color:#fff}
.mh-footer ul{list-style:none;margin:0;padding:0}
.mh-footer li{padding:3px 0}
.mh-copy{text-align:center;margin-top:28px;font-size:12px;color:#aaa}

/* Dokan light touch */
.dokan-dashboard .dokan-dash-sidebar{background:#fff}
.dokan-store-wrap,.dokan-store-products-filter-area{background:#fff;padding:12px;border-radius:2px}

/* Responsive */
@media (max-width:1100px){
  .mh-grid4{grid-template-columns:repeat(2,1fr)}
  .woocommerce ul.products{grid-template-columns:repeat(3,1fr)}
  .woocommerce div.product{grid-template-columns:1fr 1fr}
  .woocommerce div.product form.cart{position:static}
}
@media (max-width:800px){
  .mh-burger{display:block}
  .mh-nav[hidden]{display:none}
  .mh-nav__inner{display:block;white-space:normal}
  .mh-nav ul{flex-direction:column}
  .mh-nav .mh-sell{margin-left:0}
  .mh-deliver,.mh-hlink.mh-orders{display:none}
  .mh-header__row{flex-wrap:wrap}
  .mh-search{order:5;flex-basis:100%}
  .mh-shop{grid-template-columns:1fr}
  .woocommerce ul.products{grid-template-columns:repeat(2,1fr)}
  .woocommerce div.product{grid-template-columns:1fr}
  .mh-footer__cols{grid-template-columns:repeat(2,1fr)}
  .mh-slide{padding:36px 16px 110px}
}
@media (max-width:520px){.mh-grid4{grid-template-columns:1fr}.mh-pull{margin-top:-90px}}
@media (prefers-reduced-motion:reduce){.mh-slides{transition:none}html{scroll-behavior:auto}}
