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

:root {
  --green: #10B981;
  --green-dark: #059669;
  --green-light: #34D399;
  --green-bg: rgba(16,185,129,0.06);
  --green-bg2: rgba(16,185,129,0.10);
  --bg: #F3F4F6;
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
  --radius: 8px;
  --radius-lg: 12px;
  --font: 'DM Sans', 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--gray-600);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: color var(--transition); }
.container { max-width: 1360px; margin: 0 auto; padding: 24px 20px; }

/* ===== TOP BAR ===== */
.top-bar { background: var(--gray-900); color: var(--gray-400); font-size: 12px; padding: 6px 0; }
.top-bar-inner {
  max-width: 1360px; margin: 0 auto; padding: 0 20px;
  display: flex; justify-content: space-between; align-items: center;
}
.top-bar a { color: var(--gray-400); margin-left: 12px; }
.top-bar a:hover { color: var(--green-light); }

/* ===== HEADER ===== */
.header {
  background: var(--white); border-bottom: 1px solid var(--gray-200);
  padding: 0; position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-xs);
}
.header-inner {
  max-width: 1360px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 16px;
}

/* ===== LOGO ===== */
.logo { font-size: 20px; font-weight: 700; color: var(--green); letter-spacing: 0.5px; white-space: nowrap; }
.logo span { color: var(--gray-700); }

/* ===== SEARCH ===== */
.search-box { flex: 1; display: flex; max-width: 400px; }
.search-box input {
  flex: 1; padding: 8px 12px; border: 1px solid var(--gray-200); border-right: none;
  border-radius: var(--radius) 0 0 var(--radius); font-size: 13px; font-family: var(--font);
  outline: none; background: var(--gray-50); transition: border-color var(--transition);
}
.search-box input:focus { border-color: var(--green); background: var(--white); }
.search-box button {
  padding: 8px 18px; background: var(--green); color: var(--white); border: none;
  border-radius: 0 var(--radius) var(--radius) 0; font-size: 13px; font-family: var(--font);
  font-weight: 500; cursor: pointer; transition: background var(--transition);
}
.search-box button:hover { background: var(--green-dark); }

/* ===== NAV ===== */
.nav-bar { background: var(--green); }
.nav-inner {
  max-width: 1360px; margin: 0 auto; padding: 0 20px;
  display: flex; gap: 0; overflow-x: auto;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-inner a {
  padding: 10px 18px; font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.85);
  transition: all var(--transition); position: relative; white-space: nowrap;
}
.nav-inner a:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-inner a.active { color: #fff; font-weight: 600; background: rgba(255,255,255,0.15); }

/* ===== NOTICE BAR ===== */
.notice-bar {
  background: var(--green-bg); border-bottom: 1px solid var(--gray-200);
  padding: 12px 0; overflow: hidden;
}
.notice-bar-inner {
  max-width: 1360px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 12px; font-size: 13px;
}
.notice-bar-label {
  background: var(--green); color: var(--white); padding: 3px 12px;
  border-radius: 4px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.notice-bar-text { color: var(--gray-600); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.notice-bar-text a { color: var(--green-dark); font-weight: 500; }

/* ===== STAT BAR ===== */
.stat-bar {
  background: var(--white); border-bottom: 1px solid var(--gray-200); padding: 14px 0;
}
.stat-bar-inner {
  max-width: 1360px; margin: 0 auto; padding: 0 20px;
  display: flex; justify-content: center; gap: 56px;
}
.stat-item { text-align: center; }
.stat-item .stat-num { font-size: 22px; font-weight: 700; color: var(--green); }
.stat-item .stat-label { font-size: 13px; color: var(--gray-400); margin-top: 4px; }

/* ===== PORTAL LAYOUT ===== */
.portal-layout {
  display: grid; grid-template-columns: 240px 1fr 240px; gap: 24px;
  max-width: 1360px; margin: 0 auto; padding: 24px 20px;
}

/* ===== SIDEBAR BOX ===== */
.sidebar-box {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-xs); border: 1px solid var(--gray-200);
  margin-bottom: 20px; overflow: hidden;
}
.sidebar-box::before {
  content: ''; display: block; height: 3px; background: var(--green);
}
.sidebar-title {
  font-size: 15px; font-weight: 700; color: var(--gray-700);
  padding: 16px 16px 12px; display: flex; align-items: center; gap: 8px;
}
.sidebar-title::before {
  content: ''; width: 3px; height: 14px; background: var(--green);
  border-radius: 2px; flex-shrink: 0;
}
.sidebar-list { list-style: none; padding: 0 0 12px; }
.sidebar-list li { padding: 0; }
.sidebar-list li a {
  display: block; padding: 9px 16px; font-size: 14px; color: var(--gray-500);
  transition: all var(--transition); border-left: 2px solid transparent;
}
.sidebar-list li a:hover {
  color: var(--green-dark); background: var(--green-bg);
  border-left-color: var(--green);
}
.sidebar-list li a.active {
  color: var(--green-dark); background: var(--green-bg);
  border-left-color: var(--green); font-weight: 600;
}

/* Sidebar tags */
.sidebar-tags { padding: 10px 16px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.sidebar-tags a {
  display: inline-block; padding: 5px 12px; font-size: 12px;
  background: var(--gray-50); color: var(--gray-500); border-radius: 4px;
  border: 1px solid var(--gray-200); transition: all var(--transition);
}
.sidebar-tags a:hover { background: var(--green-bg); color: var(--green-dark); border-color: var(--green); }

/* ===== QUICK LINKS ===== */
.quick-links {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  padding: 12px 16px 16px;
}
.quick-links a {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 8px; background: var(--gray-50); border-radius: var(--radius);
  font-size: 13px; color: var(--gray-600); text-align: center;
  transition: all var(--transition); border: 1px solid var(--gray-200);
}
.quick-links a:hover { background: var(--green-bg); color: var(--green-dark); border-color: var(--green); }
.quick-links a .ql-icon { font-size: 20px; }

/* ===== BREADCRUMB BAR ===== */
.breadcrumb-bar {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 8px 14px; margin-bottom: 12px;
  font-size: 12px; color: var(--gray-400);
}
.breadcrumb-bar a { color: var(--green); }
.breadcrumb-bar a:hover { text-decoration: underline; }

/* ===== HOME TABS ===== */
.home-tabs {
  display: flex; gap: 0; margin-bottom: 0; background: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow-xs); overflow: hidden;
  border: 1px solid var(--gray-200); border-bottom: none;
}
.home-tabs a {
  flex: 1; text-align: center; padding: 14px 10px; font-size: 15px; font-weight: 500;
  color: var(--gray-500); cursor: pointer; transition: all var(--transition);
  border-bottom: 2px solid transparent;
}
.home-tabs a:hover { color: var(--green); background: var(--green-bg); }
.home-tabs a.active { color: var(--green); border-bottom-color: var(--green); background: var(--white); font-weight: 600; }

/* ===== SECTION BLOCK ===== */
.section-block {
  background: var(--white); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-xs); margin-bottom: 24px;
  border: 1px solid var(--gray-200); border-top: none;
}
.section-title { font-size: 15px; font-weight: 700; color: var(--gray-700); padding: 14px 16px 0; }

/* ===== INFO LIST (Compact Portal Style) ===== */
.info-list { list-style: none; padding: 8px 0; }
.info-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px; border-bottom: 1px solid var(--gray-100);
  transition: all var(--transition);
}
.info-list li:hover { background: var(--green-bg); }
.info-list li:last-child { border-bottom: none; }
.info-left { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.info-left h4 { font-size: 15px; font-weight: 500; color: var(--gray-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-left h4 a:hover { color: var(--green); }
.info-left p { font-size: 12px; color: var(--gray-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; }
.info-right { text-align: right; flex-shrink: 0; margin-left: 12px; display: flex; align-items: center; gap: 10px; }
.info-right .price {
  color: var(--white); background: var(--green); font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: 4px; white-space: nowrap;
}
.info-right .date { font-size: 12px; color: var(--gray-300); white-space: nowrap; }

/* ===== TAGS ===== */
.tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 3px; margin-right: 4px; font-weight: 600; }
.tag-hot { background: var(--green-bg2); color: var(--green-dark); }
.tag-rec { background: #EFF6FF; color: #3B82F6; }

/* ===== HOMEPAGE BANNER ===== */
.home-banner {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  padding: 32px 24px 28px; text-align: center; color: var(--white);
}
.home-banner h1 { font-size: 24px; font-weight: 700; color: var(--white); margin-bottom: 6px; letter-spacing: -0.3px; }
.home-banner p { font-size: 13px; color: rgba(255,255,255,0.8); font-weight: 400; }

/* ===== DETAIL PAGE ===== */
.detail-wrap { max-width: 860px; margin: 16px auto; padding: 0 20px; }
.breadcrumb { font-size: 12px; color: var(--gray-400); margin-bottom: 12px; }
.breadcrumb a { color: var(--green); }
.breadcrumb a:hover { text-decoration: underline; }

.detail-btns { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.back-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px;
  background: var(--green); color: var(--white); border-radius: var(--radius);
  font-size: 12px; font-weight: 500; transition: all var(--transition);
}
.back-btn:hover { background: var(--green-dark); }
.back-btn-light { background: var(--white); color: var(--green); border: 1px solid var(--green); }
.back-btn-light:hover { background: var(--green-bg); }

.detail-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; border: 1px solid var(--gray-200); }
.detail-top { padding: 20px 24px; border-bottom: 1px solid var(--gray-200); }
.detail-top h1 { font-size: 22px; font-weight: 700; color: var(--gray-800); margin: 10px 0 6px; }
.detail-tags span {
  display: inline-block; font-size: 11px; padding: 2px 10px; border-radius: 4px;
  margin-right: 4px; background: var(--green-bg); color: var(--green-dark); font-weight: 500;
}
.detail-meta { margin-top: 12px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--gray-400); }
.price-big { color: var(--green); font-size: 24px; font-weight: 700; }
.detail-body { padding: 20px 24px; }
.detail-body h3 { font-size: 15px; font-weight: 600; color: var(--gray-700); margin: 20px 0 10px; padding-left: 10px; border-left: 3px solid var(--green); }
.detail-body h3:first-child { margin-top: 0; }
.detail-body p { font-size: 13px; color: var(--gray-500); line-height: 1.8; margin-bottom: 10px; }
.detail-body ul { padding-left: 18px; margin-bottom: 10px; }
.detail-body li { font-size: 13px; color: var(--gray-500); line-height: 1.9; }

.detail-contact { background: var(--gray-800); padding: 20px 24px; color: var(--white); }
.detail-contact h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: var(--green-light); border: none; padding: 0; }
.detail-contact p { font-size: 13px; line-height: 1.9; opacity: 0.8; }

/* ===== AUTH PAGES ===== */
.auth-wrap { display: flex; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; border: 1px solid var(--gray-200); }
.auth-header { background: var(--white); padding: 24px 24px 0; text-align: center; }
.auth-header h2 { font-size: 20px; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.auth-header p { font-size: 12px; color: var(--gray-400); }
.auth-form { padding: 20px 24px 28px; }
.auth-msg { padding: 8px 12px; border-radius: 6px; font-size: 12px; margin-bottom: 12px; display: none; }
.auth-msg.error { display: block; background: #FEF2F2; color: #EF4444; }
.auth-msg.success { display: block; background: var(--green-bg); color: var(--green-dark); }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 500; color: var(--gray-500); margin-bottom: 4px; }
.form-group input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--gray-200); border-radius: 6px;
  font-size: 13px; font-family: var(--font); outline: none; background: var(--white);
  transition: all var(--transition);
}
.form-group input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }

.auth-submit {
  width: 100%; padding: 10px; background: var(--green); color: var(--white); border: none;
  border-radius: 6px; font-size: 14px; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: all var(--transition);
}
.auth-submit:hover { background: var(--green-dark); }
.auth-link { text-align: center; margin-top: 14px; font-size: 12px; color: var(--gray-400); }
.auth-link a { color: var(--green); font-weight: 500; }
.auth-link a:hover { text-decoration: underline; }

/* ===== PUBLISH ===== */
.publish-wrap { max-width: 680px; margin: 16px auto; padding: 0 20px; }
.publish-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; border: 1px solid var(--gray-200); }
.publish-header { background: var(--white); padding: 18px 24px; border-bottom: 1px solid var(--gray-200); }
.publish-header h2 { font-size: 18px; font-weight: 700; color: var(--gray-800); }
.publish-header p { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.publish-form { padding: 20px 24px; }
.publish-form .form-group select,
.publish-form .form-group textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--gray-200); border-radius: 6px;
  font-size: 13px; font-family: var(--font); outline: none; background: var(--white);
  transition: all var(--transition);
}
.publish-form .form-group textarea { height: 110px; resize: vertical; }
.publish-form .form-group select:focus,
.publish-form .form-group textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.publish-submit {
  padding: 10px 32px; background: var(--green); color: var(--white); border: none;
  border-radius: 6px; font-size: 14px; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: all var(--transition);
}
.publish-submit:hover { background: var(--green-dark); }

.my-posts { margin-top: 20px; }
.my-posts h3 { font-size: 15px; font-weight: 600; color: var(--gray-700); margin-bottom: 10px; }
.post-item { padding: 12px; border: 1px solid var(--gray-200); border-radius: var(--radius); margin-bottom: 8px; transition: all var(--transition); background: var(--white); }
.post-item:hover { border-color: var(--green); box-shadow: var(--shadow-xs); }
.post-item h4 { font-size: 14px; font-weight: 500; color: var(--gray-700); }
.post-item p { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

/* ===== MALL ===== */
.mall-layout {
  display: grid; grid-template-columns: 200px 1fr; gap: 16px;
  max-width: 1360px; margin: 0 auto; padding: 16px 20px;
}
.mall-sidebar {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-200); box-shadow: var(--shadow-xs);
  overflow: hidden; align-self: start;
}
.mall-sidebar::before { content: ''; display: block; height: 3px; background: var(--green); }
.mall-sidebar-title {
  font-size: 14px; font-weight: 700; color: var(--gray-700);
  padding: 12px 14px 8px; border-bottom: 1px solid var(--gray-100);
}
.mall-sidebar-list { list-style: none; padding: 4px 0; }
.mall-sidebar-list li a {
  display: block; padding: 8px 14px; font-size: 13px; color: var(--gray-500);
  transition: all var(--transition); border-left: 2px solid transparent;
}
.mall-sidebar-list li a:hover { color: var(--green-dark); background: var(--green-bg); border-left-color: var(--green); }
.mall-sidebar-list li a.active { color: var(--green-dark); background: var(--green-bg); border-left-color: var(--green); font-weight: 600; }

.mall-content { min-width: 0; }
.mall-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.mall-filter button {
  padding: 6px 16px; border: 1px solid var(--gray-200); border-radius: 20px;
  background: var(--white); color: var(--gray-500); font-size: 12px; font-family: var(--font);
  font-weight: 500; cursor: pointer; transition: all var(--transition);
}
.mall-filter button:hover { border-color: var(--green); color: var(--green); }
.mall-filter button.active { background: var(--green); color: var(--white); border-color: var(--green); }

.mall-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mall-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--gray-200); transition: all 0.25s ease;
}
.mall-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.mall-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.mall-card-body { padding: 12px; }
.mall-card-body h4 { font-size: 13px; font-weight: 500; color: var(--gray-700); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mall-card-body .mall-price { color: var(--green); font-size: 16px; font-weight: 700; }
.mall-card-body .mall-price small { font-size: 11px; font-weight: 400; }
.mall-card-body .mall-btns { display: flex; gap: 6px; margin-top: 8px; }
.mall-card-body .mall-btns button {
  flex: 1; padding: 6px 0; border-radius: 6px; font-size: 11px; font-family: var(--font);
  font-weight: 500; cursor: pointer; transition: all var(--transition);
}
.mall-btn-add { background: var(--white); color: var(--green); border: 1px solid var(--green); }
.mall-btn-add:hover { background: var(--green-bg); }
.mall-btn-buy { background: var(--green); color: var(--white); border: none; }
.mall-btn-buy:hover { background: var(--green-dark); }
.mall-tag { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 3px; margin-bottom: 4px; font-weight: 600; }
.mall-tag.hot { background: var(--green-bg2); color: var(--green-dark); }
.mall-tag.new { background: #EFF6FF; color: #3B82F6; }

/* ===== PAGE BANNER ===== */
.page-banner {
  background: var(--gray-800); color: var(--white); text-align: center;
  padding: 32px 24px 28px; position: relative; overflow: hidden;
}
.page-banner::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(16,185,129,0.15) 0%, transparent 70%);
}
.page-banner h1 { font-size: 24px; font-weight: 700; position: relative; letter-spacing: 2px; }
.page-banner p { font-size: 13px; opacity: 0.6; position: relative; margin-top: 6px; font-weight: 300; letter-spacing: 1px; }

/* ===== MALL SIDEBAR EXTRAS ===== */
.cat-list { list-style: none; padding: 4px 0; }
.cat-list li a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; font-size: 13px; color: var(--gray-500);
  transition: all var(--transition); border-left: 2px solid transparent;
}
.cat-list li a:hover { color: var(--green-dark); background: var(--green-bg); border-left-color: var(--green); }
.cat-list li a.active { color: var(--green-dark); background: var(--green-bg); border-left-color: var(--green); font-weight: 600; }
.cat-list .count { font-size: 11px; color: var(--gray-300); }

.sidebar-contact { padding: 10px 14px 14px; }
.sidebar-contact p { font-size: 12px; color: var(--gray-400); margin-bottom: 8px; }
.sidebar-btn {
  display: block; text-align: center; padding: 8px 0; background: var(--green);
  color: var(--white); border-radius: 6px; font-size: 12px; font-weight: 600;
  transition: all var(--transition);
}
.sidebar-btn:hover { background: var(--green-dark); color: var(--white); }

.mall-main { min-width: 0; }

/* ===== CART ===== */
.cart-wrap { max-width: 860px; margin: 16px auto; padding: 0 20px; }
.cart-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; border: 1px solid var(--gray-200); }
.cart-header { background: var(--white); color: var(--gray-800); padding: 18px 24px; border-bottom: 1px solid var(--gray-200); }
.cart-header h2 { font-size: 18px; font-weight: 700; }
.cart-header p { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.cart-body { padding: 18px 24px; }
.cart-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.cart-item:last-child { border-bottom: none; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 14px; font-weight: 500; color: var(--gray-700); }
.cart-item-info p { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.cart-item-price { font-weight: 700; color: var(--green); font-size: 15px; white-space: nowrap; }
.cart-item-qty { display: flex; align-items: center; gap: 6px; }
.cart-item-qty button {
  width: 26px; height: 26px; border: 1px solid var(--gray-200); border-radius: 4px;
  background: var(--white); cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center; transition: all var(--transition);
}
.cart-item-qty button:hover { border-color: var(--green); color: var(--green); }
.cart-item-qty span { font-weight: 600; min-width: 18px; text-align: center; font-size: 13px; }
.cart-total { padding: 16px 0; margin-top: 10px; border-top: 1px solid var(--gray-200); display: flex; justify-content: space-between; align-items: center; }
.cart-total-label { font-size: 14px; color: var(--gray-400); }
.cart-total-price { font-size: 22px; font-weight: 700; color: var(--green); }
.cart-checkout {
  padding: 10px 32px; background: var(--green); color: var(--white); border: none;
  border-radius: 6px; font-size: 14px; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: all var(--transition);
}
.cart-checkout:hover { background: var(--green-dark); }
.cart-empty { text-align: center; padding: 40px 0; color: var(--gray-400); font-size: 14px; }

/* ===== CONTACT ===== */
.contact-wrap { max-width: 860px; margin: 16px auto; padding: 0 20px; }
.contact-section { margin-bottom: 24px; }
.contact-section h2 { font-size: 18px; font-weight: 700; color: var(--gray-700); margin-bottom: 12px; padding-left: 12px; border-left: 3px solid var(--green); }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.contact-item {
  background: var(--white); padding: 18px; border-radius: var(--radius);
  border: 1px solid var(--gray-200); text-align: center; transition: all var(--transition);
}
.contact-item:hover { box-shadow: var(--shadow-md); border-color: var(--green); }
.contact-icon { font-size: 24px; margin-bottom: 8px; }
.contact-item h3 { font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; }
.contact-item p { font-size: 13px; color: var(--gray-400); }
.contact-item .highlight { color: var(--green); font-weight: 600; }

.contact-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--gray-200); }
.contact-table td { padding: 10px 16px; font-size: 13px; border-bottom: 1px solid var(--gray-100); }
.contact-table tr:last-child td { border-bottom: none; }
.contact-table tr:hover { background: var(--green-bg); }
.contact-table td:first-child { font-weight: 600; color: var(--gray-700); width: 130px; background: var(--gray-50); }
.contact-table td:last-child { color: var(--gray-500); }

.contact-map { margin-bottom: 24px; }
.map-placeholder { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 40px; text-align: center; }
.map-icon { font-size: 36px; margin-bottom: 8px; }
.map-placeholder p { font-size: 14px; color: var(--gray-700); font-weight: 500; }
.map-placeholder .addr { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* ===== MERCHANT ===== */
.merchant-wrap { max-width: 700px; margin: 16px auto; padding: 0 20px; }
.merchant-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; border: 1px solid var(--gray-200); }
.merchant-header { background: var(--white); padding: 18px 24px; border-bottom: 1px solid var(--gray-200); }
.merchant-header h2 { font-size: 18px; font-weight: 700; color: var(--gray-800); }
.merchant-header p { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.merchant-form { padding: 20px 24px; }
.merchant-form .form-group select,
.merchant-form .form-group textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--gray-200); border-radius: 6px;
  font-size: 13px; font-family: var(--font); outline: none; background: var(--white);
  transition: all var(--transition);
}
.merchant-form .form-group textarea { height: 110px; resize: vertical; }
.merchant-form .form-group select:focus,
.merchant-form .form-group textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.merchant-submit {
  padding: 10px 32px; background: var(--green); color: var(--white); border: none;
  border-radius: 6px; font-size: 14px; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: all var(--transition);
}
.merchant-submit:hover { background: var(--green-dark); }

/* ===== TOAST ===== */
.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%) translateY(-16px);
  background: var(--gray-800); color: var(--white); padding: 8px 20px;
  border-radius: 6px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg);
  opacity: 0; transition: all 0.25s ease; z-index: 9999; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== FOOTER ===== */
.footer { background: var(--gray-900); color: var(--gray-400); text-align: center; padding: 28px 20px; margin-top: 32px; }
.f-brand { font-size: 18px; font-weight: 700; color: var(--white); margin-bottom: 10px; }
.f-brand span { color: var(--green); }
.f-brand-link { text-decoration: none; display: inline-block; transition: opacity .2s; }
.f-brand-link:hover { opacity: .8; }
.footer p { font-size: 12px; margin: 4px 0; }
.footer a { color: var(--green-light); }
.footer a:hover { text-decoration: underline; }
.footer-links { display: flex; justify-content: center; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.footer-links a { font-size: 12px; color: var(--gray-400); }
.footer-links a:hover { color: var(--green-light); }

/* ===== USER AREA ===== */
#user-area { display: flex; align-items: center; gap: 6px; font-size: 13px; flex-shrink: 0; }
#user-area a { padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 500; transition: all var(--transition); }
#user-area .btn-publish { background: var(--green-bg); color: var(--green-dark); }
#user-area .btn-publish:hover { background: var(--green-bg2); }
#user-area .btn-login { background: var(--green); color: var(--white); }
#user-area .btn-login:hover { background: var(--green-dark); }
#user-area .btn-reg { background: var(--white); color: var(--green); border: 1px solid var(--green); }
#user-area .btn-reg:hover { background: var(--green-bg); }
#user-area .btn-logout { color: var(--gray-400); font-size: 12px; }
#user-area .btn-logout:hover { color: var(--green); }

/* ===== WEBSITE/APP DETAIL PAGES (Legacy) ===== */
.topbar { background: var(--gray-900); color: var(--gray-400); font-size: 12px; padding: 8px 20px; text-align: center; }
.nav { background: var(--white); border-bottom: 1px solid var(--gray-200); padding: 0 20px; display: flex; }
.nav a { padding: 10px 18px; font-size: 13px; font-weight: 500; color: var(--gray-500); transition: all var(--transition); position: relative; }
.nav a:hover { color: var(--green); }
.nav a.active { color: var(--green); font-weight: 600; }
.nav a.active::after { content: ''; position: absolute; bottom: 0; left: 18px; right: 18px; height: 2px; background: var(--green); border-radius: 1px; }
.btn-group { max-width: 860px; margin: 0 auto; padding: 0 20px 12px; }
.btn-group .btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px;
  background: var(--white); color: var(--green); border: 1px solid var(--green);
  border-radius: 6px; font-size: 12px; font-weight: 500; transition: all var(--transition);
}
.btn-group .btn:hover { background: var(--green-bg); }
.main { max-width: 860px; margin: 0 auto; padding: 0 20px 24px; }
.main .detail-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; border: 1px solid var(--gray-200); }
.main .detail-card img { width: 100%; max-height: 360px; object-fit: cover; display: block; }
.main .detail-card h1 { font-size: 22px; font-weight: 700; color: var(--gray-800); padding: 20px 24px 0; }
.main .detail-card .tags { padding: 6px 24px 0; }
.main .detail-card .tags span { display: inline-block; font-size: 11px; padding: 2px 10px; border-radius: 4px; margin-right: 4px; background: var(--green-bg); color: var(--green-dark); font-weight: 500; }
.main .detail-card .meta { padding: 10px 24px 16px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--gray-400); border-bottom: 1px solid var(--gray-200); }
.main .detail-card .body { padding: 20px 24px; }
.main .detail-card .body h2 { font-size: 15px; font-weight: 600; color: var(--gray-700); margin: 20px 0 10px; padding-left: 10px; border-left: 3px solid var(--green); }
.main .detail-card .body h2:first-child { margin-top: 0; }
.main .detail-card .body p { font-size: 13px; color: var(--gray-500); line-height: 1.8; margin-bottom: 10px; }
.main .detail-card .body ul, .main .detail-card .body ol { padding-left: 18px; margin-bottom: 10px; }
.main .detail-card .body li { font-size: 13px; color: var(--gray-500); line-height: 1.9; }
.main .contact-card { background: var(--gray-800); border-radius: var(--radius); padding: 20px 24px; margin-top: 16px; color: var(--white); }
.main .contact-card h3 { font-size: 15px; font-weight: 600; color: var(--green-light); margin-bottom: 8px; }
.main .contact-card p { font-size: 13px; line-height: 1.9; opacity: 0.8; }
.user-area { display: flex; align-items: center; gap: 6px; font-size: 13px; flex-shrink: 0; }

/* ===== LOGIN MODAL ===== */
.lm-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 10000; display: flex; align-items: center; justify-content: center; animation: lmFadeIn .2s ease; }
@keyframes lmFadeIn { from { opacity: 0; } to { opacity: 1; } }
.lm-box { background: #fff; border-radius: 12px; width: 380px; max-width: 92vw; padding: 32px 28px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.2); animation: lmSlideUp .25s ease; }
@keyframes lmSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.lm-close { position: absolute; top: 12px; right: 16px; border: none; background: none; font-size: 24px; color: #999; cursor: pointer; line-height: 1; }
.lm-close:hover { color: #333; }
.lm-header { text-align: center; margin-bottom: 20px; }
.lm-header h2 { font-size: 20px; font-weight: 800; color: var(--gray-800); }
.lm-header p { font-size: 13px; color: var(--gray-400); margin-top: 4px; }
.lm-msg { text-align: center; font-size: 13px; padding: 8px; border-radius: 6px; margin-bottom: 12px; display: none; }
.lm-msg.error { display: block; background: #fef2f2; color: #dc2626; }
.lm-msg.success { display: block; background: #f0fdf4; color: #16a34a; }
.lm-field { margin-bottom: 16px; }
.lm-field label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; }
.lm-field input { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; outline: none; transition: border-color .2s; box-sizing: border-box; }
.lm-field input:focus { border-color: var(--green); }
.lm-submit { width: 100%; padding: 12px; background: var(--green); color: #fff; border: none; border-radius: 6px; font-size: 15px; font-weight: 700; cursor: pointer; transition: background .2s; }
.lm-submit:hover { background: var(--green-dark); }
.lm-links { text-align: center; margin-top: 14px; font-size: 13px; }
.lm-links a { color: var(--green); text-decoration: none; }
.lm-links a:hover { text-decoration: underline; }
.btn-cart { padding: 4px 10px; background: var(--green-bg); color: var(--green-dark); border-radius: 4px; font-size: 12px; text-decoration: none; font-weight: 500; }
.btn-cart:hover { background: var(--green); color: #fff; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .portal-layout { grid-template-columns: 1fr 200px; }
  .portal-layout .sidebar-left { display: none; }
  .mall-layout { grid-template-columns: 160px 1fr; }
  .mall-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-bar-inner { gap: 24px; }
}

@media (max-width: 768px) {
  .top-bar-inner { flex-direction: column; gap: 2px; text-align: center; }
  .header-inner { flex-wrap: wrap; }
  .search-box { order: 3; max-width: 100%; width: 100%; }
  .nav-inner { flex-wrap: nowrap; overflow-x: auto; }
  .nav-inner a { padding: 8px 12px; font-size: 12px; }
  .portal-layout { grid-template-columns: 1fr; }
  .portal-layout .sidebar-left,
  .portal-layout .sidebar-right { display: none; }
  .mall-layout { grid-template-columns: 1fr; }
  .mall-sidebar { display: none; }
  .mall-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .home-banner { padding: 24px 16px 20px; }
  .home-banner h1 { font-size: 20px; }
  .home-tabs a { font-size: 13px; padding: 10px 6px; }
  .info-list li { flex-direction: column; align-items: flex-start; gap: 4px; }
  .info-right { text-align: left; margin-left: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .detail-top, .detail-body, .detail-contact { padding: 16px; }
  .stat-bar-inner { gap: 16px; flex-wrap: wrap; }
  .stat-item .stat-num { font-size: 16px; }
}

@media (max-width: 480px) {
  .mall-grid { grid-template-columns: 1fr; }
  .logo { font-size: 18px; }
  .nav-inner a { padding: 8px 10px; font-size: 12px; }
  .home-tabs { flex-wrap: wrap; }
  .home-tabs a { flex: none; width: 50%; }
  .quick-links { grid-template-columns: repeat(2, 1fr); }
  .footer-links { flex-direction: column; gap: 6px; }
}
