@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

:root {
  --bg:          #0a0b0d;
  --surface:     #111318;
  --surface2:    #181c24;
  --surface3:    #1f2433;
  --border:      rgba(255,255,255,.07);
  --border2:     rgba(255,255,255,.12);
  --accent:      #f97316;
  --accent-h:    #fb923c;
  --accent-glow: rgba(249,115,22,.18);
  --blue:        #3b82f6;
  --green:       #22c55e;
  --red:         #ef4444;
  --yellow:      #eab308;
  --purple:      #a855f7;
  --text:        #f0f1f3;
  --text-2:      #9aa0ad;
  --text-3:      #5c6370;
  --font-head:   'Syne', sans-serif;
  --font-body:   'DM Sans', sans-serif;
  --radius-sm:   6px;
  --radius:      12px;
  --radius-lg:   18px;
  --radius-xl:   24px;
  --shadow:      0 4px 20px rgba(0,0,0,.5);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.65);
  --nav-h:       64px;
  --tr:          .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; outline: none; }
ul { list-style: none; }

h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem,5vw,3.5rem); }
h2 { font-size: clamp(1.5rem,3vw,2.25rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p  { color: var(--text-2); }
.lead { font-size: 1.15rem; }
.muted { color: var(--text-3); font-size: .875rem; }

.container    { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 860px;  margin: 0 auto; padding: 0 1.5rem; }

.page-wrap  { padding-top: var(--nav-h); }
.page-main  { min-height: calc(100vh - var(--nav-h) - 200px); padding: 2.5rem 0 4rem; }

.grid   { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }
.grid-5 { grid-template-columns: repeat(5,1fr); }

.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap     { display: flex; gap: 1rem; align-items: center; }
.flex-col     { flex-direction: column; }
.gap-sm { gap: .5rem; } .gap { gap: 1rem; } .gap-lg { gap: 1.5rem; }

/* Navbar */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav-h); background: rgba(10,11,13,.92); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.navbar .container { display: flex; align-items: center; gap: 2rem; width: 100%; }
.nav-brand { font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; color: var(--accent); letter-spacing: -.02em; white-space: nowrap; }
.nav-brand span { color: var(--text); }
.nav-search { flex: 1; max-width: 520px; position: relative; display: flex; align-items: center; }
.nav-search input { width: 100%; padding: .55rem 1rem .55rem 2.75rem; background: var(--surface2); border: 1px solid var(--border2); border-radius: 999px; color: var(--text); font-size: .9rem; transition: var(--tr); }
.nav-search input::placeholder { color: var(--text-3); }
.nav-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.nav-search .search-icon { position: absolute; left: .85rem; color: var(--text-3); pointer-events: none; }
.nav-search .btn-search { position: absolute; right: .3rem; background: var(--accent); color: #fff; border: none; border-radius: 999px; padding: .3rem .9rem; font-size: .8rem; font-weight: 600; cursor: pointer; transition: var(--tr); }
.nav-search .btn-search:hover { background: var(--accent-h); }
.nav-links { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.nav-link { display: flex; align-items: center; gap: .4rem; padding: .5rem .75rem; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 500; color: var(--text-2); transition: var(--tr); white-space: nowrap; }
.nav-link:hover { color: var(--text); background: var(--surface2); }
.nav-link.active { color: var(--accent); }
.nav-badge { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-size: .65rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px; padding: 0 4px; }
.nav-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface3); border: 2px solid var(--border2); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; color: var(--accent); cursor: pointer; overflow: hidden; }

/* Sidebar layout */
.layout-sidebar { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: start; }
.sidebar { position: sticky; top: calc(var(--nav-h) + 1.5rem); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.sidebar-title { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: .75rem; }
.sidebar-link { display: flex; align-items: center; gap: .65rem; padding: .6rem .75rem; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 500; color: var(--text-2); transition: var(--tr); cursor: pointer; }
.sidebar-link:hover { background: var(--surface2); color: var(--text); }
.sidebar-link.active { background: var(--accent-glow); color: var(--accent); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.card-hover { transition: var(--tr); }
.card-hover:hover { border-color: var(--border2); box-shadow: var(--shadow); transform: translateY(-2px); }
.card-product { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: var(--tr); display: flex; flex-direction: column; }
.card-product:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 30px var(--accent-glow); transform: translateY(-3px); }
.card-product .prod-img { aspect-ratio: 3/2; overflow: hidden; background: var(--surface2); position: relative; min-height: 220px; }
.card-product .prod-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card-product:hover .prod-img img { transform: scale(1.06); }
.card-product .prod-badge { position: absolute; top: .6rem; left: .6rem; background: var(--accent); color: #fff; font-size: .65rem; font-weight: 700; padding: .2rem .5rem; border-radius: 999px; text-transform: uppercase; }
.card-product .prod-body { padding: 1.1rem; flex: 1; display: flex; flex-direction: column; gap: .5rem; }
.card-product .prod-shop { font-size: .75rem; color: var(--accent); font-weight: 600; }
.card-product .prod-name { font-family: var(--font-head); font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-product .prod-price { font-size: 1.2rem; font-weight: 800; color: var(--accent); margin-top: auto; font-family: var(--font-head); }
.card-product .prod-stars { display: flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--yellow); }
.card-product .prod-actions { display: flex; gap: .5rem; padding: 0 1rem 1rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .65rem 1.4rem; font-family: var(--font-body); font-size: .9rem; font-weight: 600; border: none; border-radius: var(--radius); cursor: pointer; transition: var(--tr); white-space: nowrap; text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm  { padding: .4rem .9rem; font-size: .8rem; border-radius: var(--radius-sm); }
.btn-lg  { padding: .9rem 2rem; font-size: 1rem; }
.btn-xl  { padding: 1.1rem 2.5rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-primary   { background: var(--accent); color: #fff; box-shadow: 0 0 20px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border2); }
.btn-secondary:hover { background: var(--surface3); border-color: var(--accent); }
.btn-outline  { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-outline:hover { background: var(--accent-glow); }
.btn-ghost    { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface2); color: var(--text); }
.btn-danger   { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success  { background: var(--green); color: #fff; }
.btn-success:hover { background: #16a34a; }
.btn-info     { background: rgba(59,130,246,.15); color: var(--blue); border: 1px solid var(--blue); }

/* Forms */
.form-group { display: flex; flex-direction: column; gap: .45rem; }
.form-label { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.form-control { padding: .7rem 1rem; background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius); color: var(--text); font-size: .9rem; transition: var(--tr); width: 100%; }
.form-control::placeholder { color: var(--text-3); }
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); background: var(--surface3); }
.form-control.error { border-color: var(--red); }
select.form-control { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%239aa0ad' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; background-size: 16px; padding-right: 2.5rem; }
textarea.form-control { min-height: 100px; resize: vertical; }
.form-hint  { font-size: .78rem; color: var(--text-3); }
.form-error { font-size: .78rem; color: var(--red); }
.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius) 0 0 var(--radius); }
.input-group .btn { border-radius: 0 var(--radius) var(--radius) 0; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead { background: var(--surface2); }
th { padding: .85rem 1rem; text-align: left; font-weight: 600; color: var(--text-2); white-space: nowrap; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
td { padding: .9rem 1rem; border-top: 1px solid var(--border); color: var(--text); }
tr:hover td { background: rgba(255,255,255,.02); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .65rem; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.badge-primary { background: rgba(249,115,22,.15); color: var(--accent); }
.badge-success { background: rgba(34,197,94,.15);  color: var(--green); }
.badge-danger  { background: rgba(239,68,68,.15);  color: var(--red); }
.badge-warning { background: rgba(234,179,8,.15);  color: var(--yellow); }
.badge-info    { background: rgba(59,130,246,.15); color: var(--blue); }
.badge-purple  { background: rgba(168,85,247,.15); color: var(--purple); }
.badge-muted   { background: var(--surface2);      color: var(--text-2); }

/* Alerts */
.alert { display: flex; align-items: flex-start; gap: .75rem; padding: 1rem 1.25rem; border-radius: var(--radius); font-size: .9rem; border-left: 3px solid; }
.alert-success { background: rgba(34,197,94,.08);  border-color: var(--green);  color: #86efac; }
.alert-danger  { background: rgba(239,68,68,.08);  border-color: var(--red);    color: #fca5a5; }
.alert-warning { background: rgba(234,179,8,.08);  border-color: var(--yellow); color: #fde68a; }
.alert-info    { background: rgba(59,130,246,.08); border-color: var(--blue);   color: #93c5fd; }

/* Stat cards */
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; display: flex; flex-direction: column; gap: .5rem; position: relative; overflow: hidden; }
.stat-label { font-size: .8rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-icon { position: absolute; right: 1.25rem; top: 1.25rem; width: 44px; height: 44px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; background: rgba(255,255,255,.05); color: var(--icon-color, var(--accent)); }

/* Tabs */
.tabs { display: flex; gap: .25rem; padding: .25rem; background: var(--surface2); border-radius: var(--radius); }
.tab { flex: 1; text-align: center; padding: .55rem 1rem; border-radius: calc(var(--radius) - 2px); font-size: .875rem; font-weight: 500; color: var(--text-2); cursor: pointer; transition: var(--tr); }
.tab.active { background: var(--surface3); color: var(--text); }
.tab:hover:not(.active) { color: var(--text); }

/* Modal */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.7); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; pointer-events: none; transition: var(--tr); }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal { background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius-xl); padding: 2rem; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; transform: scale(.95); transition: var(--tr); }
.modal-overlay.open .modal { transform: scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.modal-title { font-family: var(--font-head); font-size: 1.3rem; }
.modal-close { background: var(--surface2); border: none; color: var(--text-2); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }

/* Hero */
.hero { position: relative; background: linear-gradient(135deg,#0d1117 0%,#0f1a2b 50%,#0d1117 100%); overflow: hidden; padding: 5rem 0; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 50% at 70% 50%, rgba(249,115,22,.12), transparent); }
.hero .container { position: relative; z-index: 1; }
.hero-tag { display: inline-flex; align-items: center; gap: .5rem; background: var(--accent-glow); border: 1px solid rgba(249,115,22,.3); color: var(--accent); border-radius: 999px; padding: .3rem .9rem; font-size: .8rem; font-weight: 600; margin-bottom: 1.5rem; }
.hero-title { color: var(--text); margin-bottom: 1.25rem; }
.hero-title span { color: var(--accent); }
.hero-sub { font-size: 1.1rem; color: var(--text-2); margin-bottom: 2rem; max-width: 520px; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 3rem; margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--border); }
.hero-stat .num { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--text); }
.hero-stat .lbl { font-size: .8rem; color: var(--text-3); }

/* Section */
.section { padding: 4rem 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.section-title { font-family: var(--font-head); font-size: 1.6rem; }
.section-title span { color: var(--accent); }

/* Categories */
.cat-grid { display: flex; flex-wrap: wrap; gap: .75rem; }
.cat-pill { display: flex; align-items: center; gap: .5rem; padding: .6rem 1.1rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 999px; font-size: .875rem; font-weight: 500; color: var(--text-2); cursor: pointer; transition: var(--tr); }
.cat-pill:hover, .cat-pill.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }

/* Pagination */
.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 2.5rem; }
.page-btn { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-2); font-size: .875rem; cursor: pointer; transition: var(--tr); }
.page-btn:hover, .page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Wallet */
.wallet-card { background: linear-gradient(135deg,#1a1f2e,#0f1520); border: 1px solid rgba(249,115,22,.25); border-radius: var(--radius-xl); padding: 2rem; position: relative; overflow: hidden; }
.wallet-balance { font-family: var(--font-head); font-size: 2.75rem; font-weight: 800; color: var(--text); }
.wallet-label { font-size: .8rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .5rem; }

/* Toast */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: .75rem; }
.toast { display: flex; align-items: center; gap: .75rem; background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius); padding: .85rem 1.25rem; font-size: .875rem; box-shadow: var(--shadow-lg); min-width: 280px; max-width: 400px; }
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--blue); }
.toast.warning { border-left: 3px solid var(--yellow); }

/* Spinner */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border2); border-top-color: var(--accent); border-radius: 50%; animation: mh-spin .7s linear infinite; }

/* Progress bar */
.progress-bar { height: 8px; background: var(--surface2); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }

/* Ticket messages */
.msg-wrap { display: flex; gap: 1rem; margin-bottom: 1.25rem; }
.msg-wrap.mine { flex-direction: row-reverse; }
.msg-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface3); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; flex-shrink: 0; }
.msg-bubble { max-width: 70%; padding: .85rem 1.1rem; border-radius: var(--radius-lg); font-size: .875rem; line-height: 1.5; }
.msg-wrap:not(.mine) .msg-bubble { background: var(--surface2); border-radius: 4px var(--radius-lg) var(--radius-lg) var(--radius-lg); }
.msg-wrap.mine .msg-bubble { background: rgba(249,115,22,.15); border-radius: var(--radius-lg) 4px var(--radius-lg) var(--radius-lg); }

/* Avatar upload */
.avatar-upload { width: 100px; height: 100px; border-radius: 50%; background: var(--surface2); border: 3px solid var(--border2); display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; position: relative; transition: var(--tr); }
.avatar-upload:hover { border-color: var(--accent); }
.avatar-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; opacity: 0; transition: var(--tr); font-size: .75rem; color: #fff; text-align: center; }
.avatar-upload:hover .avatar-overlay { opacity: 1; }

/* Qty control */
.qty-input { display: flex; align-items: center; background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius); overflow: hidden; }
.qty-btn { width: 36px; height: 36px; background: none; border: none; color: var(--text); cursor: pointer; font-size: 1.1rem; font-weight: 600; transition: var(--tr); }
.qty-btn:hover { background: var(--surface3); color: var(--accent); }
.qty-num { min-width: 40px; text-align: center; font-weight: 600; font-size: .9rem; }

/* Dash */
.dash-header { margin-bottom: 2rem; }
.dash-title  { font-family: var(--font-head); font-size: 1.8rem; margin-bottom: .25rem; }
.dash-sub    { color: var(--text-2); }

/* Checkout */
.checkout-grid { display: grid; grid-template-columns: 1fr 400px; gap: 2rem; align-items: start; }
.order-summary { position: sticky; top: calc(var(--nav-h) + 1rem); }

/* Footer */
footer { background: var(--surface); border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3,1fr); gap: 3rem; margin-bottom: 3rem; }
.footer-col h4 { font-size: .9rem; font-weight: 700; margin-bottom: 1rem; }
.footer-col a { display: block; color: var(--text-2); font-size: .875rem; margin-bottom: .5rem; transition: var(--tr); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: .8rem; color: var(--text-3); }

/* Seller/Admin nav */
.sub-nav { background: var(--surface); border-bottom: 1px solid var(--border); padding: .6rem 0; }
.sub-nav .container { display: flex; gap: .2rem; align-items: center; overflow-x: auto; }
.sub-nav a { display: flex; align-items: center; gap: .35rem; padding: .42rem .8rem; border-radius: var(--radius-sm); font-size: .84rem; font-weight: 500; color: var(--text-2); white-space: nowrap; text-decoration: none; transition: var(--tr); }
.sub-nav a:hover { color: var(--text); background: var(--surface2); }
.sub-nav a.active { color: var(--accent); background: var(--accent-glow); }

/* Utilities */
.mt-1{margin-top:.5rem} .mt-2{margin-top:1rem} .mt-3{margin-top:1.5rem} .mt-4{margin-top:2rem}
.mb-1{margin-bottom:.5rem} .mb-2{margin-bottom:1rem} .mb-3{margin-bottom:1.5rem} .mb-4{margin-bottom:2rem}
.p-3{padding:1.5rem} .p-4{padding:2rem}
.text-accent{color:var(--accent)} .text-success{color:var(--green)} .text-danger{color:var(--red)} .text-muted{color:var(--text-2)}
.text-center{text-align:center} .text-right{text-align:right}
.fw-bold{font-weight:700} .fw-600{font-weight:600}
.hidden{display:none!important} .w-full{width:100%}
.divider{border:none;border-top:1px solid var(--border);margin:1.5rem 0}
.relative{position:relative} .overflow-hidden{overflow:hidden}

@keyframes mh-spin { to { transform: rotate(360deg); } }
@keyframes mh-slide-in { from { transform: translateX(100%); opacity:0; } to { transform: translateX(0); opacity:1; } }
@keyframes mh-shimmer { to { background-position: -200% 0; } }

.skeleton { background: linear-gradient(90deg,var(--surface2) 25%,var(--surface3) 50%,var(--surface2) 75%); background-size: 200% 100%; animation: mh-shimmer 1.5s infinite; border-radius: var(--radius); }

/* V9 – Comprehensive Mobile-First Responsive CSS */
@media(max-width:1200px){
  .grid-5{grid-template-columns:repeat(4,1fr)}
  .grid-4{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:1024px){
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .grid-5{grid-template-columns:repeat(3,1fr)}
  .layout-sidebar{grid-template-columns:1fr}
  .sidebar{position:static;display:flex;flex-wrap:wrap;gap:.5rem;padding:.75rem}
  .sidebar .sidebar-title{width:100%;margin-bottom:.25rem}
  .sidebar .sidebar-link{padding:.35rem .75rem;border-radius:var(--radius-sm);background:var(--surface2)}
  .checkout-grid{grid-template-columns:1fr}
  .stat-card{padding:1.25rem}
}
@media(max-width:768px){
  :root{--nav-h:56px}
  .navbar .container{padding:0 .75rem}
  .nav-brand{font-size:1.1rem}
  .nav-search{display:none}
  .nav-links{gap:.5rem}
  .nav-links .btn-sm{padding:.35rem .65rem;font-size:.78rem}
  .nav-avatar{width:34px;height:34px;font-size:.8rem}
  .hero{padding:2.5rem 0 2rem}
  .hero h1{font-size:1.9rem}
  .hero-actions{flex-direction:column;align-items:flex-start;gap:.75rem}
  .hero-actions .btn-lg{width:100%;justify-content:center}
  .hero-stats{flex-wrap:wrap;gap:1rem}
  .hero-stats .stat-item{flex:1;min-width:80px}
  .grid-2{grid-template-columns:1fr}
  .grid-3,.grid-4,.grid-5{grid-template-columns:repeat(2,1fr)}
  .footer-grid{grid-template-columns:1fr 1fr;gap:1.5rem}
  .section-header{flex-direction:column;align-items:flex-start;gap:.5rem}
  .dash-header{flex-direction:column;align-items:flex-start;gap:.5rem}
  .flex-between{flex-wrap:wrap;gap:.5rem}
  .table-wrap table{min-width:600px}
  .stat-card{padding:1rem}
  .stat-value{font-size:1.6rem}
  .card{padding:1rem}
  .modal{padding:1.25rem;max-width:calc(100vw - 2rem)}
  .modal-overlay .modal{margin:.75rem;max-width:100%}
  .wallet-card{padding:1.5rem}
  .wallet-balance{font-size:2rem}
  .snav .container,.anav .container{padding:0 .5rem}
  .chat-win,.chat-window{width:calc(100vw - 2rem);right:1rem;max-height:420px}
  .grid-4.stat-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:600px){
  .grid-3,.grid-4,.grid-5{grid-template-columns:repeat(2,1fr)}
  .card-product .prod-name{font-size:.85rem}
  .card-product .prod-price{font-size:.95rem}
  .btn-lg{padding:.7rem 1.25rem;font-size:.9rem}
  .hero h1{font-size:1.6rem}
}
@media(max-width:480px){
  .grid-2,.grid-3,.grid-4,.grid-5{grid-template-columns:repeat(2,1fr)}
  .footer-grid{grid-template-columns:1fr}
  .hero{padding:1.75rem 0}
  .hero h1{font-size:1.4rem}
  .hero p{font-size:.9rem}
  .hero-stats{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}
  .container{padding:0 .75rem}
  .section-title{font-size:1.25rem}
  .page-main{padding-top:var(--nav-h)}
  .snav,.anav{top:var(--nav-h)}
  .wallet-card{padding:1.25rem}
  .wallet-balance{font-size:1.75rem}
  .modal{padding:1rem}
  .flex-gap{flex-wrap:wrap}
  .btn{min-height:40px}
  form .grid-2{grid-template-columns:1fr}
  .chat-win,.chat-window{right:0;width:100vw;border-radius:var(--radius-lg) var(--radius-lg) 0 0}
  .input-group{flex-wrap:nowrap}
  .table-wrap{border-radius:var(--radius-sm)}
  .snav a,.anav a{font-size:.77rem;padding:.35rem .6rem;gap:.25rem}
}
@media(max-width:360px){
  .grid-2,.grid-3,.grid-4,.grid-5{grid-template-columns:1fr}
  .nav-links .btn{display:none}
  .nav-links .btn:last-child{display:flex}
  .hero h1{font-size:1.25rem}
}
/* Touch-friendly mobile interactions */
@media(hover:none){
  .btn:active{transform:scale(.97);opacity:.9}
  .card-product:active{transform:translateY(-1px)}
  .nav-link:active{opacity:.7}
}

/* V7: Broken image fallback - show accent colored background */
img.prod-img-el { background: var(--surface2); }
img[src=""], img:not([src]) { opacity: 0; }
.prod-img img { background: var(--surface2); min-height: 40px; }

/* V7: Chat window styles */
.chat-window { position:fixed; bottom:0; right:2rem; width:360px; background:var(--surface); border:1px solid var(--border2); border-radius:var(--radius-lg) var(--radius-lg) 0 0; box-shadow:var(--shadow-lg); z-index:300; display:none; flex-direction:column; max-height:480px; }
.chat-head { display:flex; align-items:center; justify-content:space-between; padding:.75rem 1rem; background:var(--surface2); border-radius:var(--radius-lg) var(--radius-lg) 0 0; border-bottom:1px solid var(--border); }
.chat-body { flex:1; overflow-y:auto; padding:1rem; display:flex; flex-direction:column; gap:.6rem; min-height:200px; }
.chat-foot { padding:.75rem; border-top:1px solid var(--border); }
.chat-bubble { max-width:80%; padding:.6rem .9rem; border-radius:var(--radius-lg); font-size:.875rem; line-height:1.5; word-break:break-word; }
.chat-mine { align-self:flex-end; background:rgba(249,115,22,.15); border-radius:var(--radius-lg) 4px var(--radius-lg) var(--radius-lg); }
.chat-other { align-self:flex-start; background:var(--surface2); border-radius:4px var(--radius-lg) var(--radius-lg) var(--radius-lg); }

/* V8: Seller/Admin sub-navigation bars */
.snav,.anav{background:var(--surface);border-bottom:1px solid var(--border);padding:.55rem 0;margin-top:var(--nav-h);position:sticky;top:0;z-index:90}
.snav .container,.anav .container{display:flex;gap:.15rem;overflow-x:auto;scrollbar-width:none}
.snav .container::-webkit-scrollbar,.anav .container::-webkit-scrollbar{display:none}
.snav a,.anav a{display:flex;align-items:center;gap:.35rem;padding:.4rem .85rem;border-radius:var(--radius-sm);font-size:.83rem;font-weight:500;color:var(--text-2);white-space:nowrap;text-decoration:none;transition:.2s}
.snav a:hover,.anav a:hover{color:var(--text);background:var(--surface2)}
.snav a.on,.anav a.on{color:var(--accent);background:var(--accent-glow)}

/* V8: Progress bar */
.progress-bar{height:6px;background:var(--surface2);border-radius:3px;overflow:hidden}
.progress-fill{height:100%;border-radius:3px;transition:width .4s ease}

/* V8: Chat bubbles (global) */
.cbubble,.chat-bubble{max-width:80%;padding:.6rem .9rem;border-radius:var(--radius-lg);font-size:.875rem;line-height:1.5;word-break:break-word}
.cmine,.chat-mine{align-self:flex-end;background:rgba(249,115,22,.15);border-radius:var(--radius-lg) 4px var(--radius-lg) var(--radius-lg)}
.cother,.chat-other{align-self:flex-start;background:var(--surface2);border-radius:4px var(--radius-lg) var(--radius-lg) var(--radius-lg)}
.chat-win,.chat-window{position:fixed;bottom:0;right:2rem;width:360px;background:var(--surface);border:1px solid var(--border2);border-radius:var(--radius-lg) var(--radius-lg) 0 0;box-shadow:var(--shadow-lg);z-index:300;display:none;flex-direction:column;max-height:500px}
.chat-hd,.chat-head{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem;background:var(--surface2);border-radius:var(--radius-lg) var(--radius-lg) 0 0;border-bottom:1px solid var(--border);flex-shrink:0}
.chat-bd,.chat-body{flex:1;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.6rem;min-height:180px}
.chat-ft,.chat-foot{padding:.75rem;border-top:1px solid var(--border);flex-shrink:0}

/* V8: Online status dot */
.online-dot{width:8px;height:8px;border-radius:50%;display:inline-block;margin-right:4px;flex-shrink:0}

/* V8: Currency selection pills */
.cur-card{padding:.9rem 1.1rem;background:var(--surface2);border:2px solid var(--border2);border-radius:var(--radius-lg);cursor:pointer;text-align:center;transition:.2s;min-width:90px}
.cur-card:hover,.cur-card.on{border-color:var(--accent);background:var(--accent-glow);color:var(--accent)}

/* V8: Address display box */
.addr-box{background:var(--surface2);border:1px solid var(--border2);border-radius:var(--radius);padding:1rem;font-family:monospace;font-size:.88rem;word-break:break-all;position:relative;line-height:1.6}
