/* ============================================================
   SokoHub — Main Stylesheet (Mobile-First Responsive)
   ============================================================ */
:root {
  --orange: #F97316;
  --orange-dark: #EA580C;
  --orange-light: #FED7AA;
  --orange-pale: #FFF7ED;
  --white: #fff;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --green: #16A34A;
  --red: #DC2626;
  --yellow: #FBBF24;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
  --radius: 8px;
  --radius-lg: 12px;
}
*  { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Nunito',sans-serif; background:var(--gray-50); color:var(--gray-800); font-size:15px; overflow-x:hidden; }
a  { text-decoration:none; color:inherit; }
img { max-width:100%; display:block; }
button,input,select,textarea { font-family:'Nunito',sans-serif; }
.container { max-width:1280px; margin:0 auto; padding:0 12px; width:100%; }

/* ===== TOPBAR ===== */
.topbar { background:var(--gray-800); color:var(--gray-300); font-size:12px; padding:5px 0; }
.topbar-inner { display:flex; justify-content:space-between; align-items:center; gap:4px; flex-wrap:wrap; }
.topbar-links { display:flex; gap:0; flex-wrap:wrap; }
.topbar-links a { color:var(--gray-300); padding:2px 6px; font-size:12px; }
.topbar-links a:hover { color:white; }

/* ===== HEADER ===== */
.main-header { background:var(--orange); box-shadow:var(--shadow-md); position:sticky; top:0; z-index:200; }
.header-inner { display:flex; align-items:center; gap:10px; padding:10px 12px; flex-wrap:wrap; }
.logo { display:flex; align-items:center; gap:8px; color:white; font-size:20px; font-weight:800; white-space:nowrap; flex-shrink:0; }
.logo-icon { width:34px; height:34px; background:white; border-radius:8px; display:flex; align-items:center; justify-content:center; color:var(--orange); font-weight:900; font-size:15px; flex-shrink:0; }
.logo img { height:38px; max-width:140px; object-fit:contain; }
.search-bar { flex:1; display:flex; min-width:0; order:3; width:100%; max-width:100%; margin-top:4px; }
.cat-select { padding:9px 6px; border:none; border-right:1px solid var(--gray-200); font-size:12px; outline:none; background:white; border-radius:var(--radius) 0 0 var(--radius); max-width:110px; flex-shrink:0; }
.search-input { flex:1; padding:9px 12px; border:none; font-size:14px; outline:none; min-width:0; }
.search-btn { padding:9px 16px; background:var(--orange-dark); color:white; border:none; border-radius:0 var(--radius) var(--radius) 0; font-weight:700; font-size:13px; cursor:pointer; white-space:nowrap; flex-shrink:0; }
.header-actions { display:flex; gap:6px; align-items:center; flex-shrink:0; margin-left:auto; }
.icon-btn { background:rgba(255,255,255,.15); border:none; color:white; padding:7px 10px; border-radius:var(--radius); font-size:12px; font-weight:600; display:flex; align-items:center; gap:5px; cursor:pointer; white-space:nowrap; }
.icon-btn:hover { background:rgba(255,255,255,.25); }
.cart-btn { background:white !important; color:var(--orange) !important; font-weight:700 !important; }
.badge { background:var(--red); color:white; font-size:10px; font-weight:800; border-radius:10px; padding:1px 5px; margin-left:2px; }

/* ===== NAV ===== */
.main-nav { background:white; border-bottom:1px solid var(--gray-200); overflow-x:auto; -webkit-overflow-scrolling:touch; }
.main-nav::-webkit-scrollbar { display:none; }
.nav-inner { display:flex; align-items:center; min-width:max-content; }
.nav-link { padding:11px 13px; font-size:13px; font-weight:600; color:var(--gray-700); white-space:nowrap; border-bottom:3px solid transparent; display:block; flex-shrink:0; }
.nav-link:hover,.nav-link.active { color:var(--orange); border-bottom-color:var(--orange); }
.nav-link.deals { color:var(--red); }

/* ===== HERO ===== */
.hero { display:grid; grid-template-columns:1fr 280px; gap:14px; margin:16px 0; }
.main-banner { background:linear-gradient(135deg,#1a1a2e 0%,#16213e 50%,#0f3460 100%); border-radius:var(--radius-lg); padding:32px 28px; color:white; min-height:240px; display:flex; align-items:center; position:relative; overflow:hidden; }
.main-banner::after { content:''; position:absolute; right:-40px; top:-40px; width:280px; height:280px; background:rgba(249,115,22,.15); border-radius:50%; }
.banner-content { position:relative; z-index:1; max-width:100%; }
.banner-tag { background:var(--orange); color:white; font-size:11px; font-weight:700; padding:4px 10px; border-radius:20px; display:inline-block; margin-bottom:12px; }
.banner-content h1 { font-size:clamp(22px,3vw,30px); font-weight:800; line-height:1.2; margin-bottom:8px; }
.banner-content p { color:rgba(255,255,255,.75); font-size:14px; margin-bottom:18px; }
.banner-btn { background:var(--orange); color:white; border:none; padding:10px 24px; border-radius:var(--radius); font-weight:700; font-size:14px; cursor:pointer; display:inline-block; }
.side-banners { display:flex; flex-direction:column; gap:12px; }
.side-banner { border-radius:var(--radius-lg); padding:18px; color:white; flex:1; }
.side-banner.sb1 { background:linear-gradient(135deg,#059669,#047857); }
.side-banner.sb2 { background:linear-gradient(135deg,#7C3AED,#5B21B6); }
.side-banner h3 { font-size:15px; font-weight:700; margin-bottom:4px; }
.side-banner p  { font-size:12px; opacity:.8; margin-bottom:8px; }
.side-banner a  { font-size:12px; font-weight:700; color:rgba(255,255,255,.9); text-decoration:underline; }

/* ===== SECTIONS ===== */
.section { margin:0 0 24px; }
.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; padding-bottom:10px; border-bottom:2px solid var(--orange); }
.section-header h2 { font-size:17px; font-weight:800; }
.see-all { font-size:13px; font-weight:600; color:var(--orange); white-space:nowrap; }

/* ===== FLASH SALE ===== */
.flash-bar { background:var(--orange); color:white; border-radius:var(--radius-lg) var(--radius-lg) 0 0; padding:12px 16px; display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.flash-title { font-weight:800; font-size:15px; }
.flash-timer { display:flex; gap:4px; align-items:center; font-size:12px; }
.timer-box { background:rgba(0,0,0,.3); border-radius:4px; padding:3px 7px; font-weight:700; font-size:15px; font-family:monospace; min-width:30px; text-align:center; }
.flash-link { margin-left:auto; font-size:12px; font-weight:600; color:rgba(255,255,255,.85); white-space:nowrap; }
.flash-products { background:white; border-radius:0 0 var(--radius-lg) var(--radius-lg); padding:14px; box-shadow:var(--shadow-sm); margin-bottom:24px; overflow-x:auto; }

/* ===== CATEGORIES ===== */
.categories-grid { display:grid; grid-template-columns:repeat(8,1fr); gap:10px; }
.category-card { background:white; border-radius:var(--radius-lg); padding:12px 6px; text-align:center; box-shadow:var(--shadow-sm); cursor:pointer; transition:all .2s; border:2px solid transparent; display:block; }
.category-card:hover { border-color:var(--orange); transform:translateY(-2px); }
.cat-icon { font-size:26px; margin-bottom:6px; }
.category-card p { font-size:11px; font-weight:600; color:var(--gray-700); line-height:1.2; }

/* ===== PRODUCT GRID ===== */
.product-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:14px; }
.product-grid.cols4 { grid-template-columns:repeat(4,1fr); }
.product-grid.cols3 { grid-template-columns:repeat(3,1fr); }
.product-card { background:white; border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); overflow:hidden; cursor:pointer; transition:all .2s; position:relative; display:flex; flex-direction:column; }
.product-card:hover { box-shadow:var(--shadow-lg); transform:translateY(-2px); }
.product-img-wrap { width:100%; height:160px; background:var(--gray-100); display:flex; align-items:center; justify-content:center; font-size:56px; overflow:hidden; flex-shrink:0; }
.product-img-wrap img { width:100%; height:100%; object-fit:cover; }
.product-badge { position:absolute; top:6px; left:6px; background:var(--red); color:white; font-size:10px; font-weight:700; padding:2px 7px; border-radius:4px; }
.product-badge.new { background:var(--green); }
.product-wishlist { position:absolute; top:6px; right:6px; background:white; border:none; border-radius:50%; width:32px; height:32px; font-size:14px; cursor:pointer; box-shadow:var(--shadow-sm); display:flex; align-items:center; justify-content:center; z-index:10; pointer-events:all; transition:transform .2s; }
.product-info { padding:10px; display:flex; flex-direction:column; flex:1; }
.product-vendor { font-size:10px; color:var(--orange); font-weight:600; margin-bottom:3px; }
.product-name { font-size:12px; font-weight:600; color:var(--gray-800); margin-bottom:5px; line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; flex:1; }
.product-price { display:flex; align-items:center; gap:6px; margin-bottom:6px; flex-wrap:wrap; }
.price-current { font-size:14px; font-weight:800; color:var(--orange-dark); }
.price-old { font-size:11px; color:var(--gray-400); text-decoration:line-through; }
.product-stars { display:flex; align-items:center; gap:3px; font-size:11px; color:var(--gray-500); margin-bottom:8px; }
.stars { color:var(--yellow); }
.add-to-cart-btn { width:100%; padding:7px; background:var(--orange); color:white; border:none; border-radius:var(--radius); font-weight:700; font-size:12px; cursor:pointer; margin-top:auto; }
.add-to-cart-btn:hover { background:var(--orange-dark); }

/* ===== VENDORS ===== */
.vendors-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.vendor-card { background:white; border-radius:var(--radius-lg); padding:18px; box-shadow:var(--shadow-sm); text-align:center; cursor:pointer; transition:all .2s; border:2px solid transparent; display:block; }
.vendor-card:hover { border-color:var(--orange); }
.vendor-logo { width:60px; height:60px; border-radius:12px; background:var(--orange-pale); margin:0 auto 10px; display:flex; align-items:center; justify-content:center; font-size:22px; font-weight:800; color:var(--orange); overflow:hidden; }
.vendor-logo img { width:100%; height:100%; object-fit:cover; }
.vendor-name { font-weight:700; font-size:14px; margin-bottom:3px; }
.vendor-meta { font-size:12px; color:var(--gray-500); margin-bottom:7px; }
.vendor-verified { display:inline-flex; align-items:center; gap:4px; background:var(--orange-pale); color:var(--orange-dark); font-size:11px; font-weight:600; padding:3px 8px; border-radius:20px; }

/* ===== LISTING ===== */
.listing-layout { display:grid; grid-template-columns:220px 1fr; gap:18px; margin:16px 0; }
.sidebar { background:white; border-radius:var(--radius-lg); padding:18px; box-shadow:var(--shadow-sm); height:fit-content; position:sticky; top:80px; }
.filter-section { margin-bottom:20px; }
.filter-title { font-weight:700; font-size:14px; margin-bottom:10px; padding-bottom:8px; border-bottom:1px solid var(--gray-200); }
.filter-option { display:flex; align-items:center; gap:8px; margin-bottom:8px; cursor:pointer; }
.filter-option input { accent-color:var(--orange); cursor:pointer; }
.filter-option label { font-size:13px; cursor:pointer; }
.price-inputs { display:flex; gap:8px; align-items:center; margin-bottom:10px; }
.price-input { flex:1; padding:7px 10px; border:1px solid var(--gray-300); border-radius:var(--radius); font-size:13px; }
.filter-btn,.apply-btn { width:100%; padding:9px; background:var(--orange); color:white; border:none; border-radius:var(--radius); font-weight:700; font-size:13px; cursor:pointer; }
.listing-toolbar { background:white; border-radius:var(--radius-lg); padding:10px 14px; margin-bottom:14px; display:flex; align-items:center; justify-content:space-between; box-shadow:var(--shadow-sm); flex-wrap:wrap; gap:8px; }
.results-count { font-size:13px; color:var(--gray-500); }
.sort-select { padding:7px 12px; border:1px solid var(--gray-300); border-radius:var(--radius); font-size:13px; }
.breadcrumb { font-size:13px; color:var(--gray-500); margin-bottom:10px; }
.breadcrumb a { color:var(--orange); }
.pagination { display:flex; justify-content:center; gap:6px; margin-top:20px; flex-wrap:wrap; }
.page-btn { padding:7px 13px; border:1px solid var(--gray-300); border-radius:var(--radius); background:white; font-size:13px; font-weight:600; cursor:pointer; }
.page-btn.active,.page-btn:hover { background:var(--orange); color:white; border-color:var(--orange); }

/* ===== PRODUCT DETAIL ===== */
.detail-card { background:white; border-radius:var(--radius-lg); padding:24px; box-shadow:var(--shadow-sm); margin-bottom:16px; }
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:28px; }
.product-gallery { display:flex; flex-direction:column; gap:10px; }
.gallery-main {
  width:100%; height:380px;
  background:var(--gray-100);
  border-radius:var(--radius-lg);
  overflow:hidden;
  position:relative;
  cursor:zoom-in;
  display:flex; align-items:center; justify-content:center;
}
.gallery-main img { width:100%; height:100%; object-fit:cover; transition:transform .3s ease; display:block; }
.gallery-main:hover img { transform:scale(1.03); }
.gallery-zoom-hint {
  position:absolute; bottom:10px; right:10px;
  background:rgba(0,0,0,.45); color:white;
  font-size:11px; padding:3px 8px; border-radius:20px;
  pointer-events:none; opacity:0; transition:opacity .2s;
}
.gallery-main:hover .gallery-zoom-hint { opacity:1; }
.gallery-nav {
  position:absolute; top:50%; transform:translateY(-50%);
  background:rgba(255,255,255,.85); border:none;
  width:36px; height:36px; border-radius:50%;
  font-size:22px; cursor:pointer; display:flex;
  align-items:center; justify-content:center;
  box-shadow:0 2px 8px rgba(0,0,0,.15);
  transition:all .2s; color:#374151;
}
.gallery-nav:hover { background:white; box-shadow:0 4px 16px rgba(0,0,0,.2); }
.gallery-prev { left:10px; }
.gallery-next { right:10px; }
.gallery-thumbs {
  display:flex; gap:8px; flex-wrap:nowrap;
  overflow-x:auto; padding-bottom:4px;
}
.gallery-thumbs::-webkit-scrollbar { height:4px; }
.gallery-thumbs::-webkit-scrollbar-track { background:var(--gray-100); border-radius:2px; }
.gallery-thumbs::-webkit-scrollbar-thumb { background:var(--gray-300); border-radius:2px; }
.gallery-thumb {
  width:72px; height:72px; flex-shrink:0;
  border-radius:var(--radius);
  overflow:hidden;
  cursor:pointer;
  border:2px solid transparent;
  transition:border-color .15s;
  background:var(--gray-100);
}
.gallery-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.gallery-thumb.active, .gallery-thumb:hover { border-color:var(--orange); }
.detail-info h1 { font-size:20px; font-weight:800; margin-bottom:8px; line-height:1.3; }
.detail-price { font-size:28px; font-weight:800; color:var(--orange-dark); }
.detail-price-old { font-size:15px; color:var(--gray-400); text-decoration:line-through; margin-bottom:10px; }
.discount-badge { background:var(--red); color:white; font-size:12px; font-weight:700; padding:3px 8px; border-radius:4px; display:inline-block; margin-bottom:14px; }
.option-label { font-size:13px; font-weight:700; margin-bottom:8px; }
.option-pills { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px; }
.pill { padding:6px 14px; border:1.5px solid var(--gray-300); border-radius:20px; font-size:13px; cursor:pointer; font-weight:600; background:white; }
.pill.selected,.pill:hover { border-color:var(--orange); background:var(--orange-pale); color:var(--orange-dark); }
.qty-row { display:flex; align-items:center; gap:10px; margin-bottom:18px; flex-wrap:wrap; }
.qty-ctrl { display:flex; align-items:center; border:1px solid var(--gray-300); border-radius:var(--radius); overflow:hidden; }
.qty-ctrl button { width:34px; height:34px; background:var(--gray-100); border:none; font-size:16px; cursor:pointer; font-weight:700; }
.qty-ctrl span { width:44px; text-align:center; font-weight:700; font-size:14px; }
.btn-add-cart { width:100%; padding:12px; background:var(--orange); color:white; border:none; border-radius:var(--radius); font-weight:800; font-size:15px; cursor:pointer; margin-bottom:8px; }
.btn-buy-now { width:100%; padding:12px; background:var(--gray-800); color:white; border:none; border-radius:var(--radius); font-weight:800; font-size:15px; cursor:pointer; }
.delivery-box { background:var(--gray-50); border-radius:var(--radius); padding:14px; margin-top:14px; font-size:13px; }
.delivery-row { display:flex; align-items:center; gap:8px; margin-bottom:8px; color:var(--gray-700); }

/* ===== TABS ===== */
.tabs { display:flex; gap:0; border-bottom:2px solid var(--gray-200); margin-bottom:16px; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.tabs::-webkit-scrollbar { display:none; }
.tab-btn { padding:10px 18px; border:none; background:none; font-weight:700; font-size:14px; color:var(--gray-500); cursor:pointer; border-bottom:3px solid transparent; margin-bottom:-2px; white-space:nowrap; flex-shrink:0; }
.tab-btn.active { color:var(--orange); border-bottom-color:var(--orange); }
.tab-pane { display:none; }
.tab-pane.active { display:block; }

/* ===== CART ===== */
.cart-layout { display:grid; grid-template-columns:1fr 320px; gap:18px; margin:16px 0; }
.cart-table { background:white; border-radius:var(--radius-lg); padding:18px; box-shadow:var(--shadow-sm); }
.cart-table h2 { font-size:17px; font-weight:800; margin-bottom:14px; padding-bottom:10px; border-bottom:2px solid var(--orange); }
.cart-item { display:grid; grid-template-columns:72px 1fr auto; gap:14px; align-items:center; padding:12px 0; border-bottom:1px solid var(--gray-100); }
.cart-item-img { width:72px; height:72px; background:var(--gray-100); border-radius:var(--radius); overflow:hidden; display:flex; align-items:center; justify-content:center; font-size:28px; flex-shrink:0; }
.cart-item-img img { width:100%; height:100%; object-fit:cover; }
.cart-item-name { font-weight:600; font-size:13px; margin-bottom:4px; }
.cart-item-vendor { font-size:12px; color:var(--orange); margin-bottom:6px; }
.cart-item-price { font-size:15px; font-weight:800; color:var(--orange-dark); }
.remove-btn { background:none; border:none; color:var(--gray-400); font-size:18px; cursor:pointer; padding:4px; }
.remove-btn:hover { color:var(--red); }
.order-summary { background:white; border-radius:var(--radius-lg); padding:18px; box-shadow:var(--shadow-sm); height:fit-content; position:sticky; top:80px; }
.order-summary h3 { font-size:15px; font-weight:800; margin-bottom:14px; padding-bottom:10px; border-bottom:1px solid var(--gray-200); }
.summary-row { display:flex; justify-content:space-between; font-size:14px; margin-bottom:10px; }
.summary-total { display:flex; justify-content:space-between; font-size:17px; font-weight:800; padding-top:10px; border-top:2px solid var(--gray-200); margin-top:6px; }
.checkout-btn,.place-order-btn { width:100%; padding:12px; background:var(--orange); color:white; border:none; border-radius:var(--radius); font-weight:800; font-size:15px; cursor:pointer; margin-top:14px; display:block; text-align:center; }
.coupon-row { display:flex; gap:8px; margin-bottom:14px; }
.coupon-input { flex:1; padding:9px 12px; border:1px solid var(--gray-300); border-radius:var(--radius); font-size:13px; min-width:0; }
.coupon-apply { padding:9px 14px; background:var(--gray-800); color:white; border:none; border-radius:var(--radius); font-weight:700; font-size:13px; cursor:pointer; white-space:nowrap; }

/* ===== FORMS ===== */
.form-card { background:white; border-radius:var(--radius-lg); padding:24px; box-shadow:var(--shadow-sm); }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.form-group { margin-bottom:14px; }
.form-group label { display:block; font-size:13px; font-weight:700; color:var(--gray-700); margin-bottom:5px; }
.form-input,.form-select,.form-textarea { width:100%; padding:10px 13px; border:1.5px solid var(--gray-300); border-radius:var(--radius); font-size:14px; outline:none; transition:border-color .2s; background:white; }
.form-input:focus,.form-select:focus,.form-textarea:focus { border-color:var(--orange); }
.form-textarea { min-height:90px; resize:vertical; }
.submit-btn { padding:11px 26px; background:var(--orange); color:white; border:none; border-radius:var(--radius); font-weight:700; font-size:14px; cursor:pointer; }
.submit-btn:hover { background:var(--orange-dark); }
.alert { padding:12px 16px; border-radius:var(--radius); margin-bottom:14px; font-size:14px; }
.alert-success { background:#DCFCE7; color:#15803D; border:1px solid #86EFAC; }
.alert-error   { background:#FEE2E2; color:#DC2626; border:1px solid #FCA5A5; }
.alert-warning { background:#FEF9C3; color:#854D0E; border:1px solid #FDE047; }

/* ===== PAYMENT ===== */
.payment-options { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:14px; }
.payment-opt { border:2px solid var(--gray-200); border-radius:var(--radius); padding:12px; cursor:pointer; text-align:center; font-size:13px; font-weight:600; transition:all .2s; }
.payment-opt:hover,.payment-opt.selected { border-color:var(--orange); background:var(--orange-pale); color:var(--orange-dark); }
.mpesa-info { background:var(--orange-pale); border:1.5px solid var(--orange-light); border-radius:var(--radius); padding:14px; margin-bottom:14px; font-size:13px; line-height:1.6; }

/* ===== BLOG ===== */
.blog-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.blog-card { background:white; border-radius:var(--radius-lg); overflow:hidden; box-shadow:var(--shadow-sm); transition:all .2s; display:block; }
.blog-card:hover { box-shadow:var(--shadow-lg); transform:translateY(-2px); }
.blog-img { height:180px; background:var(--gray-200); overflow:hidden; display:flex; align-items:center; justify-content:center; font-size:44px; }
.blog-img img { width:100%; height:100%; object-fit:cover; }
.blog-content { padding:14px; }
.blog-tag { display:inline-block; background:var(--orange-pale); color:var(--orange-dark); font-size:11px; font-weight:700; padding:3px 8px; border-radius:20px; margin-bottom:7px; }
.blog-content h3 { font-size:14px; font-weight:700; margin-bottom:7px; line-height:1.4; }
.blog-excerpt { font-size:12px; color:var(--gray-500); line-height:1.6; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.blog-meta { display:flex; align-items:center; gap:6px; margin-top:10px; font-size:11px; color:var(--gray-400); flex-wrap:wrap; }

/* ===== VENDOR STORE ===== */
.vendor-cover { height:180px; background:linear-gradient(135deg,var(--orange),var(--orange-dark)); border-radius:var(--radius-lg) var(--radius-lg) 0 0; position:relative; overflow:hidden; }
.vendor-cover img { width:100%; height:100%; object-fit:cover; }
.vendor-profile-bar { background:white; border-radius:0 0 var(--radius-lg) var(--radius-lg); padding:0 24px 20px; box-shadow:var(--shadow-sm); }
.vendor-profile-inner { display:flex; align-items:flex-end; gap:16px; margin-top:-40px; flex-wrap:wrap; }
.vendor-avatar-lg { width:80px; height:80px; border-radius:14px; border:4px solid white; background:var(--orange-pale); box-shadow:var(--shadow-md); overflow:hidden; display:flex; align-items:center; justify-content:center; font-size:28px; font-weight:800; color:var(--orange); flex-shrink:0; }
.vendor-stats { display:flex; gap:20px; margin-top:10px; flex-wrap:wrap; }
.v-stat-num { font-size:17px; font-weight:800; color:var(--orange); }
.v-stat-label { font-size:12px; color:var(--gray-500); }
.follow-btn { margin-left:auto; padding:9px 20px; background:var(--orange); color:white; border:none; border-radius:var(--radius); font-weight:700; cursor:pointer; white-space:nowrap; transition:all .2s; }
.follow-btn.following { background:var(--gray-100); color:var(--gray-600); border:1.5px solid var(--gray-200); }
.follow-btn.following:hover { background:#fef2f2; color:#dc2626; border-color:#fca5a5; }
.follow-btn:hover { opacity:.9; }

/* ===== TOAST ===== */
.toast { position:fixed; bottom:16px; right:16px; left:16px; max-width:400px; margin:0 auto; background:var(--gray-900); color:white; padding:12px 18px; border-radius:var(--radius-lg); font-weight:600; font-size:14px; z-index:9999; display:flex; align-items:center; gap:10px; box-shadow:var(--shadow-lg); animation:slideUp .3s ease; }
@keyframes slideUp { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }

/* ===== FOOTER ===== */
.main-footer { background:var(--gray-900); color:var(--gray-300); margin-top:36px; }
.footer-top { padding:36px 0; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:28px; }
.footer-brand h3 { color:white; font-size:18px; font-weight:800; margin-bottom:8px; }
.footer-brand p { font-size:13px; line-height:1.7; margin-bottom:14px; }
.footer-col h4 { color:white; font-weight:700; margin-bottom:10px; font-size:13px; }
.footer-col ul { list-style:none; }
.footer-col ul li { margin-bottom:7px; }
.footer-col ul li a { font-size:13px; color:var(--gray-400); }
.footer-col ul li a:hover { color:var(--orange); }
.social-links { display:flex; gap:8px; flex-wrap:wrap; }
.social-btn { width:34px; height:34px; background:var(--gray-800); border-radius:var(--radius); display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; }
.social-btn:hover { background:var(--orange); color:white; }
.footer-bottom { border-top:1px solid var(--gray-800); padding:14px 0; text-align:center; font-size:12px; color:var(--gray-500); }

/* ===== MISC ===== */
.text-orange{color:var(--orange)}.text-green{color:var(--green)}.text-red{color:var(--red)}.text-muted{color:var(--gray-500)}
.fw-bold{font-weight:700}.fw-800{font-weight:800}
.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}
.empty-state{text-align:center;padding:40px 20px}
.empty-icon{font-size:52px;margin-bottom:14px}
.empty-state h3{font-size:17px;font-weight:700;margin-bottom:8px}
.empty-state p{font-size:14px;color:var(--gray-500);margin-bottom:18px}
.rating-bar-row{display:flex;align-items:center;gap:8px;margin-bottom:4px}
.rating-bar{flex:1;height:8px;background:var(--gray-200);border-radius:4px;overflow:hidden}
.rating-bar-fill{height:100%;background:var(--yellow);border-radius:4px}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ── Tablet 1024px ── */
@media(max-width:1024px){
  .categories-grid      { grid-template-columns:repeat(4,1fr); }
  .product-grid         { grid-template-columns:repeat(3,1fr); }
  .product-grid.cols4   { grid-template-columns:repeat(3,1fr); }
  .footer-grid          { grid-template-columns:1fr 1fr; gap:20px; }
  .hero                 { grid-template-columns:1fr 240px; }
}

/* ── Mobile 768px ── */
@media(max-width:768px){
  body { overflow-x:hidden; }

  /* Header */
  .header-inner   { padding:8px 12px; gap:8px; }
  .search-bar     { order:3; width:100%; max-width:none; margin-top:2px; }
  .cat-select     { display:none; } /* hide category dropdown on mobile - too small */
  .search-input   { border-radius:var(--radius) 0 0 var(--radius); }
  .icon-btn span  { display:none; } /* hide text labels, keep icons only */
  .icon-btn       { padding:7px 9px; }

  /* Topbar - hide on mobile to save space */
  .topbar { display:none; }

  /* Nav */
  .main-nav       { scrollbar-width:none; }
  .nav-link       { padding:10px 11px; font-size:12px; }

  /* Hero */
  .hero           { grid-template-columns:1fr; gap:10px; }
  .side-banners   { flex-direction:row; gap:10px; }
  .side-banner    { padding:14px; }
  .main-banner    { min-height:180px; padding:24px 20px; }
  .banner-content h1 { font-size:22px; }

  /* Categories */
  .categories-grid { grid-template-columns:repeat(4,1fr); gap:8px; }
  .category-card  { padding:10px 4px; }
  .cat-icon       { font-size:22px; margin-bottom:4px; }
  .category-card p { font-size:10px; }

  /* Products */
  .product-grid,.product-grid.cols4,.product-grid.cols3 { grid-template-columns:repeat(2,1fr); gap:10px; }
  .product-img-wrap { height:140px; }
  .product-info   { padding:8px; }
  .price-current  { font-size:13px; }

  /* Vendors */
  .vendors-grid   { grid-template-columns:repeat(2,1fr); gap:10px; }

  /* Listing */
  .listing-layout { grid-template-columns:1fr; }
  .sidebar        { display:none; }

  /* Product detail */
  .detail-grid    { grid-template-columns:1fr; gap:0; }
  .gallery-main       { height:280px; }
  .detail-card    { padding:16px; }

  /* Cart */
  .cart-layout    { grid-template-columns:1fr; }
  .order-summary  { position:static; }
  .cart-item      { grid-template-columns:64px 1fr auto; gap:10px; }
  .cart-item-img  { width:64px; height:64px; }

  /* Forms */
  .form-row       { grid-template-columns:1fr; }
  .form-card      { padding:18px; }

  /* Blog */
  .blog-grid      { grid-template-columns:1fr 1fr; gap:12px; }
  .blog-img       { height:150px; }

  /* Footer */
  .footer-grid    { grid-template-columns:1fr 1fr; gap:20px; }
  .footer-top     { padding:24px 0; }

  /* Flash sale */
  .flash-bar      { padding:10px 14px; gap:8px; }
  .flash-title    { font-size:14px; }
}

/* ── Small Mobile 480px ── */
@media(max-width:480px){
  .container      { padding:0 10px; }

  /* Header compact */
  .logo           { font-size:17px; }
  .logo-icon      { width:30px; height:30px; font-size:13px; }
  .logo img       { height:32px; }
  .search-input   { font-size:13px; padding:8px 10px; }
  .search-btn     { padding:8px 12px; font-size:12px; }
  .header-actions { gap:4px; }

  /* Nav */
  .nav-link       { padding:9px 10px; font-size:11px; }

  /* Hero */
  .main-banner    { min-height:160px; padding:20px 16px; }
  .banner-content h1 { font-size:19px; }
  .banner-content p  { font-size:13px; margin-bottom:14px; }
  .banner-btn     { padding:9px 18px; font-size:13px; }
  .side-banners   { flex-direction:column; }
  .side-banner h3 { font-size:14px; }

  /* Categories - 4 cols still but tighter */
  .categories-grid { grid-template-columns:repeat(4,1fr); gap:6px; }
  .cat-icon       { font-size:20px; }
  .category-card p { font-size:9px; }

  /* Products - 2 cols */
  .product-img-wrap { height:120px; font-size:40px; }
  .product-name   { font-size:11px; }
  .price-current  { font-size:12px; }
  .add-to-cart-btn { font-size:11px; padding:6px; }

  /* Blog - 1 col */
  .blog-grid      { grid-template-columns:1fr; }

  /* Footer - 1 col */
  .footer-grid    { grid-template-columns:1fr; gap:16px; }

  /* Cart */
  .cart-item      { grid-template-columns:56px 1fr auto; gap:8px; }
  .cart-item-img  { width:56px; height:56px; font-size:24px; }
  .cart-item-name { font-size:12px; }

  /* Flash sale timer compact */
  .flash-timer    { display:none; }
  .flash-bar      { justify-content:space-between; }

  /* Toast full width bottom */
  .toast          { left:10px; right:10px; bottom:10px; font-size:13px; padding:10px 14px; }

  /* Vendor store */
  .vendor-profile-inner { flex-direction:column; align-items:flex-start; }
  .follow-btn     { margin-left:0; margin-top:10px; width:100%; }
  .vendor-stats   { gap:14px; }
}

/* ── Very small 360px ── */
@media(max-width:360px){
  .categories-grid { grid-template-columns:repeat(4,1fr); gap:4px; }
  .cat-icon        { font-size:18px; }
  .category-card p { display:none; } /* hide labels, show only icons */
  .category-card   { padding:10px 2px; }
  .product-img-wrap { height:110px; }
  .nav-link        { padding:8px 8px; font-size:11px; }
}