/* ============================================================
   clone.css — UI clone จาก line-shopping.top
   Primary: #00C01E  Font: Roboto
   ============================================================ */
@import url('line-ui.css');

:root {
  /* Exact colors from reference site */
  --primary:      #00C01E;
  --primary2:     #EBF9F1;
  --primary-dark: #009918;
  --primary-bg:   #FFFFFF;
  --text1:        #151515;
  --text2:        #575757;
  --text3:        #B5B5B5;
  --border:       #ebedf0;
  --red:          #f23648;
  --red-bg:       #fddfe2;
  --success:      #21a67a;
  --success-bg:   #e0eee4;
  --dark:         #101415;
  --dark2:        #1C1C1E;
  --gray1:        #f7f8fa;
  --gray2:        #f2f3f5;
  --radius:       12px;
  --nav-h:        52px;
  --shadow:       0 4px 15px rgba(148,148,148,.2);
}

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

html, body {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Roboto', sans-serif;
  background: var(--primary2);
  color: var(--text1);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

/* ── Mobile container ── */
.app-root {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--primary2);
  position: relative;
}

/* ── Top nav bar ── */
.brand-logo {
  display: inline-flex;
  align-items: baseline;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1.1px;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Roboto', sans-serif;
}
.brand-logo .brand-g {
  color: var(--primary);
  font-size: 1.25em;
  font-style: italic;
  margin-right: -1px;
}
.brand-logo .brand-market {
  color: #1155cc;
  font-weight: 900;
}
.top-bar {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.top-bar .top-back {
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.top-bar .top-title {
  flex: 1;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
}
.top-bar .top-right { color: #fff; font-size: 16px; }

/* ── Bottom nav ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-h);
  background: #fff;
  display: flex;
  border-top: 1px solid var(--border);
  z-index: 200;
  box-shadow: 0 -2px 8px rgba(0,0,0,.06);
}
.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text3);
  font-size: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: color .15s;
}
.bn-item { font-size: 10px; font-weight: 500; }
.bn-item.active { color: var(--primary); }
.bn-item.active i { transform: scale(1.1); }
.bn-item:active { opacity: .65; }

/* page has bottom nav */
.has-nav { padding-bottom: calc(var(--nav-h) + 4px); }

/* ── Cards ── */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  overflow: hidden;
}
.card-body { padding: 16px; }

/* ── Buttons ── */
.btn-primary {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background .2s;
}
.btn-primary:active { background: var(--primary-dark); }
.btn-primary:disabled { background: #ccc; cursor: default; }

.btn-outline {
  display: block;
  width: 100%;
  padding: 13px;
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

/* ── Form fields ── */
.field-wrap { margin-bottom: 14px; }
.field-wrap label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; font-weight: 500; }
.field-wrap input, .field-wrap select {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid #e5e5e5;
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
  background: #fff;
}
.field-wrap input:focus { border-color: var(--primary); }

/* ── Alert ── */
.alert-err  { background: #fff1f0; color: #d9534f; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.alert-ok   { background: #f0fdf4; color: #16a34a; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }

/* ── Divider ── */
.divider { height: 8px; background: #f5f5f5; margin: 0 -0px; }

/* ── List rows ── */
.list-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f5f5f5;
  gap: 12px;
  text-decoration: none;
  color: var(--text1);
}
.list-row:last-child { border-bottom: none; }
.list-row .lr-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.list-row .lr-label { flex: 1; font-size: 15px; }
.list-row .lr-right { color: var(--text3); font-size: 13px; display: flex; align-items: center; gap: 4px; }

/* ── Avatar circle ── */
.avatar-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Section heading ── */
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
}
.sec-head h3 { font-size: 16px; font-weight: 700; }
.sec-head a  { font-size: 13px; color: var(--primary); text-decoration: none; }

/* ── Tag / Badge ── */
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.tag-green { background: var(--primary2); color: var(--primary); }
.tag-red   { background: #fff1f0; color: var(--red); }
.tag-gray  { background: #f5f5f5; color: var(--text2); }
.tag-orange{ background: #fff7ed; color: #ea580c; }

/* ── Progress bar ── */
.progress-wrap { background: #f0f0f0; border-radius: 999px; height: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #00e032); border-radius: 999px; transition: width .4s; }

/* ── Product card ── */
.prod-card {
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.prod-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.prod-card .pc-body { padding: 8px 10px 10px; }
.prod-card .pc-name { font-size: 13px; line-height: 1.4; color: var(--text1); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-card .pc-price { font-size: 16px; font-weight: 700; color: var(--red); margin-top: 4px; }
.prod-card .pc-sold  { font-size: 11px; color: var(--text3); }

/* ── Banner swiper ── */
.banner-wrap { width: 100%; aspect-ratio: 2/1; overflow: hidden; position: relative; background: var(--primary2); }
.banner-wrap img { width: 100%; height: 100%; object-fit: cover; }

/* ── Mission ticket ── */
.ms-ticket {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 16px;
  padding: 20px;
  color: #fff;
  margin: 16px;
}
.ms-ticket .ms-level { font-size: 13px; opacity: .85; }
.ms-ticket .ms-balance { font-size: 32px; font-weight: 700; margin: 4px 0 2px; }
.ms-ticket .ms-row { display: flex; justify-content: space-between; margin-top: 14px; font-size: 13px; opacity: .9; }

/* ── Stat boxes ── */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
.stat-box { background: #f9fafb; border-radius: 10px; padding: 14px; }
.stat-box .sb-label { font-size: 12px; color: var(--text3); }
.stat-box .sb-val   { font-size: 20px; font-weight: 700; color: var(--text1); margin-top: 2px; }

/* ── Home search bar ── */
.home-search {
  background: var(--primary);
  padding: 12px 16px 16px;
}
.home-search .hs-bar {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.15);
  border-radius: 999px;
  padding: 10px 16px;
  gap: 8px;
  color: rgba(255,255,255,.8);
  font-size: 14px;
  cursor: pointer;
}
.home-search .hs-bar i { font-size: 16px; }

/* ── Category icons ── */
.cat-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; padding: 16px 12px 8px; }
.cat-item { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; }
.cat-item .ci-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--primary2); display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--primary); }
.cat-item .ci-label { font-size: 11px; color: var(--text2); text-align: center; line-height: 1.3; }

/* ── Skeleton loading ── */
.skel { background: linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%); background-size: 200% 100%; animation: skel-anim 1.2s infinite; border-radius: 6px; }
@keyframes skel-anim { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── Wallet / Withdraw ── */
.wallet-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 28px 20px 36px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.wallet-hero::after {
  content: '';
  position: absolute;
  right: -30px; bottom: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.wallet-hero .wh-label { font-size: 13px; opacity: .85; }
.wallet-hero .wh-amount { font-size: 36px; font-weight: 700; margin: 6px 0 2px; }
.wallet-hero .wh-sub { font-size: 13px; opacity: .8; }

.wallet-actions { display: flex; gap: 12px; padding: 16px; }
.wa-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: #f9fafb;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text2);
  font-family: inherit;
  transition: background .15s;
}
.wa-btn i { font-size: 22px; color: var(--primary); }
.wa-btn:active { background: var(--primary2); }

/* ── Transaction row ── */
.tx-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f5;
  gap: 12px;
}
.tx-row .tx-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.tx-row .tx-label { flex: 1; }
.tx-row .tx-label b { font-size: 14px; display: block; }
.tx-row .tx-label small { font-size: 12px; color: var(--text3); }
.tx-row .tx-amount { font-size: 15px; font-weight: 700; }
.tx-row .tx-amount.pos { color: var(--primary); }
.tx-row .tx-amount.neg { color: var(--red); }

/* ── Login page ── */
.login-page {
  min-height: 100vh;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.login-hero {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 60px 32px 48px;
  text-align: center;
  color: #fff;
}
.login-hero .lh-logo { font-size: 36px; font-weight: 700; letter-spacing: -1px; }
.login-hero .lh-sub  { font-size: 14px; opacity: .85; margin-top: 6px; }
.login-body { flex: 1; padding: 28px 20px 40px; }
.tab-row {
  display: flex;
  background: #f5f5f5;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}
.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text3);
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.tab-btn.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* ── Profile page ── */
.profile-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 28px 20px 40px;
  color: #fff;
}
.profile-hero .ph-row { display: flex; align-items: center; gap: 16px; }
.profile-hero .ph-name { font-size: 18px; font-weight: 700; }
.profile-hero .ph-id   { font-size: 13px; opacity: .8; margin-top: 2px; }

.profile-balance-row {
  margin: -20px 16px 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  padding: 16px;
  display: flex;
  justify-content: space-around;
  position: relative;
  z-index: 10;
}
.pbl-item { text-align: center; }
.pbl-item .pbl-val { font-size: 20px; font-weight: 700; color: var(--primary); }
.pbl-item .pbl-label { font-size: 12px; color: var(--text3); margin-top: 2px; }
.pbl-divider { width: 1px; background: var(--border); }

/* ── Order card (cart) ── */
.order-card {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f5;
  align-items: flex-start;
}
.order-card img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.order-card .oc-body { flex: 1; }
.order-card .oc-name { font-size: 14px; line-height: 1.4; }
.order-card .oc-price { font-size: 16px; font-weight: 700; color: var(--red); margin-top: 4px; }
.order-card .oc-qty   { font-size: 13px; color: var(--text3); }

/* ── Checkout steps ── */
.checkout-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
}
.cs-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.cs-body { flex: 1; }
.cs-title { font-size: 15px; font-weight: 600; }
.cs-sub   { font-size: 13px; color: var(--text3); margin-top: 2px; }

/* ── Misc utils ── */
.text-primary { color: var(--primary); }
.text-red     { color: var(--red); }
.text-gray    { color: var(--text3); }
.text-bold    { font-weight: 700; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.px-16 { padding-left: 16px; padding-right: 16px; }
.py-12 { padding-top: 12px; padding-bottom: 12px; }
.flex  { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.font-bold { font-weight: 700; }
.rounded-full { border-radius: 999px; }
.hidden { display: none !important; }
