/* ===== Shop-like theme ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { min-height: 100%; width: 100vw; overflow-x: hidden; }
body { font-family: "Roboto", "Kanit", "Segoe UI", Arial, sans-serif; background: #f5f5f5; color: #222; font-size: 14px; min-height: 100vh; width: 100vw; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }
i.fa, i.fas, i.far, i.fab { line-height: 1; }
#site-header { flex-shrink: 0; width: 100%; }
#site-main { flex: 1; display: flex; flex-direction: column; width: 100%; overflow-y: auto; }
#site-footer { flex-shrink: 0; margin-top: auto; width: 100%; }
main, .container { flex: 1; width: 100%; }
/* ===== Top bar ===== */
.sitebar { background: linear-gradient(-180deg, #e67e22, #f39c12); color: #fff; font-size: 13px; }
.sitebar-inner {
  max-width: 1200px; margin: 0 auto; padding: 4px 16px;
  display: flex; justify-content: space-between; align-items: center; min-height: 30px;
}
.sitebar a { margin: 0 8px; opacity: .95; display: inline-flex; align-items: center; gap: 4px; }
.sitebar a:hover { opacity: .75; }

/* ===== Header ===== */
.header { background: linear-gradient(-180deg, #e67e22, #f39c12); color: #fff; padding: 10px 0 12px; }
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 16px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px;
}
.logo { font-size: 30px; font-weight: 700; letter-spacing: -1px; display: flex; align-items: center; gap: 8px; color: #fff; }
.logo i { font-size: 38px; }
.logo .brand { line-height: 1; }
.logo .brand-logo { height: 48px; width: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,.2)); transition: transform .25s; }
.logo:hover .brand-logo { transform: scale(1.04); }

.search { background: #fff; border-radius: 2px; padding: 2px; display: flex; align-items: center; position: relative; min-width: 0; width: 100%; height: 42px; }
.search input { flex: 1; border: none; outline: none; padding: 10px 12px; font-size: 14px; background: transparent; min-width: 0; height: 100%; }
.search-btn {
  background: linear-gradient(0deg, #e67e22, #f39c12);
  border: none; color: #fff; padding: 10px 14px; cursor: pointer; border-radius: 2px;
  font-size: 14px; display: flex; align-items: center; gap: 6px; min-width: 0; height: 100%;
}
.search-btn:hover { opacity: .9; }
.hot-keywords { margin-top: 6px; font-size: 11.5px; display: flex; gap: 12px; flex-wrap: wrap; }
.hot-keywords a { opacity: .95; }

.header-right { display: flex; align-items: center; gap: 20px; min-width: 0; }
.cart-icon { position: relative; font-size: 26px; cursor: pointer; color: #fff; }
.cart-icon .badge {
  position: absolute; top: -8px; right: -12px;
  background: #fff; color: #e67e22; border-radius: 10px;
  font-size: 12px; padding: 0 6px; font-weight: 500; min-width: 20px; text-align: center;
  border: 2px solid #e67e22; line-height: 16px;
}
.nav-user { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.nav-user a { color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.avatar-mini {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; color: #e67e22; display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700;
}

/* ===== Hero banners ===== */
.hero { width: 100%; margin: 0; padding: 16px; display: grid; grid-template-columns: 2fr 1fr; gap: 6px; background: #f5f5f5; }
.hero .main-banner {
  border-radius: 4px; height: 280px; background-size: cover; background-position: center;
  background-image: url('https://images.unsplash.com/photo-1607083206869-4c7672e72a8a?w=1400&q=80');
}
.hero .side { display: grid; grid-template-rows: 1fr 1fr; gap: 6px; }
.hero .side div { border-radius: 4px; background-size: cover; background-position: center; }

/* ===== Section ===== */
.section { width: 100%; margin: 0; background: #fff; border-radius: 0; overflow: hidden; box-shadow: none; border-bottom: 1px solid #f1f1f1; }
.section-title {
  padding: 16px 20px; font-size: 14px; color: #999; text-transform: uppercase;
  letter-spacing: 1.5px; border-bottom: 1px solid #f1f1f1; font-weight: 500;
}
.section-title.flash {
  color: #e67e22; font-size: 20px; font-weight: 500; text-transform: none; letter-spacing: 0;
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
}
.section-title.flash i { color: #ffce00; font-size: 22px; }
.flash-bar { display: flex; align-items: center; gap: 14px; padding: 14px 20px; }
.countdown { display: flex; gap: 4px; }
.countdown span { background: #333; color: #fff; padding: 3px 6px; border-radius: 3px; font-size: 13px; min-width: 26px; text-align: center; font-weight: 500; }

/* Category grid */
.cats { display: grid; grid-template-columns: repeat(10, 1fr); border-top: 1px solid #f5f5f5; }
.cat {
  padding: 16px 8px; text-align: center; font-size: 12.5px;
  border-right: 1px solid #f5f5f5; border-bottom: 1px solid #f5f5f5;
  cursor: pointer; transition: box-shadow .2s; background: #fff; color: #333;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.cat:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.cat-ic {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #fdf4e8, #fae5c8);
  display: grid; place-items: center; color: #e67e22; font-size: 26px;
}

/* ===== Products (Shop style) ===== */
.products { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 14px; background: #fafafa; width: 100%; margin: 0; }
.product {
  background: #fff; cursor: pointer; border-radius: 10px;
  transition: transform .18s, box-shadow .18s, border-color .18s; position: relative;
  border: 1px solid transparent; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.product:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.14); border-color: #e67e22; }
.product .p-img-wrap { position: relative; width: 100%; aspect-ratio: 1/1; overflow: hidden; background: #fafafa; }
.product .p-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.product:hover .p-img { transform: scale(1.04); }
.product .p-info { padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product .p-name {
  font-size: 13px; line-height: 1.4; height: 36px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: #222;
  word-break: break-word;
}
.product .p-tags { display: flex; flex-wrap: wrap; gap: 3px; min-height: 18px; }
.product .p-tags .tag { font-size: 10px; padding: 2px 5px; border-radius: 2px; font-weight: 500; line-height: 1.4; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.product .p-tags .tag-free { background: #26aa99; color: #fff; }
.product .p-tags .tag-cheap { background: #fff; color: #e67e22; border: 1px solid #e67e22; }
.product .p-tags .tag-voucher { background: #fdf4e8; color: #e67e22; border: 1px solid #f5cd94; }
.product .p-price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.product .p-price { color: #e67e22; font-size: 18px; font-weight: 600; display: inline-flex; align-items: baseline; gap: 1px; letter-spacing: -0.2px; }
.product .p-price small { font-size: 12px; font-weight: 500; }
.product .p-oldprice { color: #9e9e9e; font-size: 12px; text-decoration: line-through; }
.product .p-sold { margin-left: auto; color: #757575; font-size: 11px; white-space: nowrap; }
.product .p-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: #757575; font-size: 11px; margin-top: 2px; }
.product .p-rating { display: inline-flex; align-items: center; gap: 3px; color: #757575; }
.product .p-rating i { color: #ffb400; font-size: 11px; }
.product .p-location { color: #9e9e9e; font-size: 11px; display: inline-flex; align-items: center; gap: 4px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product .badge-sale {
  position: absolute; top: 0; right: 0;
  background: linear-gradient(180deg,#ffd839,#ffbc00);
  color: #e67e22; font-size: 13px; padding: 4px 7px 5px; font-weight: 700;
  border-bottom-left-radius: 6px; line-height: 1;
  box-shadow: 0 2px 4px rgba(0,0,0,.12);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.product .badge-sale small { font-size: 9px; font-weight: 600; letter-spacing: .3px; }
.product .badge-mall { display: inline-block; background: #e67e22; color: #fff; padding: 1px 4px; font-size: 10px; margin-right: 4px; border-radius: 2px; font-weight: 500; }
.product .badge-mall-ribbon {
  position: absolute; top: 0; left: 0;
  background: #e67e22; color: #fff; font-size: 10px;
  padding: 2px 6px; font-weight: 600; letter-spacing: .3px;
  border-bottom-right-radius: 3px; z-index: 2;
}
.product .p-ribbon {
  position: absolute; left: 0; bottom: 0;
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 8px 2px 6px; letter-spacing: .3px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  z-index: 2;
}
.product .p-ribbon.r-payday { background: #e67e22; }
.product .p-ribbon.r-recom  { background: #d0011b; }
.product .p-ribbon.r-bestsell { background: #f69113; }
.product .p-ribbon.r-flash { background: linear-gradient(90deg,#ff5722,#ff1744); }

/* ===== Buttons ===== */
.btn {
  padding: 10px 16px; border: none; cursor: pointer; font-size: 14px;
  border-radius: 2px; transition: opacity .2s; display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  font-family: inherit;
}
.btn:hover { opacity: .9; }
.btn-primary { background: #e67e22; color: #fff; }
.btn-outline { background: #fff; color: #e67e22; border: 1px solid #e67e22; }
.btn-block { width: 100%; }

/* ===== Layout ===== */
.container { width: 100%; margin: 0; padding: 0 16px; }
.card { background: #fff; padding: 24px; border-radius: 4px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
h2 { font-size: 18px; margin-bottom: 12px; font-weight: 500; display: flex; align-items: center; gap: 8px; }

/* ===== Product detail ===== */
.pd-grid { display: grid; grid-template-columns: 450px 1fr; gap: 30px; background: #fff; padding: 20px; border-radius: 2px; width: 100%; margin: 0; }
.pd-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border: 1px solid #f0f0f0; }
.pd-title { font-size: 20px; line-height: 1.4; margin-bottom: 10px; font-weight: 500; }
.pd-rating { display: flex; align-items: center; gap: 14px; color: #555; font-size: 14px; padding-bottom: 10px; border-bottom: 1px solid #f1f1f1; }
.pd-rating .stars-inline { color: #e67e22; }
.pd-price { background: #fafafa; padding: 16px 20px; margin: 14px 0; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.pd-price .old { text-decoration: line-through; color: #929292; font-size: 16px; }
.pd-price .now { font-size: 30px; color: #e67e22; font-weight: 500; }
.pd-price .disc { background: #e67e22; color: #fff; font-size: 12px; padding: 2px 6px; border-radius: 2px; font-weight: 700; }
.pd-row { display: flex; gap: 20px; margin: 16px 0; align-items: center; font-size: 14px; }
.pd-row .label { color: #757575; width: 110px; font-size: 13px; }
.qty { display: inline-flex; border: 1px solid #e0e0e0; }
.qty button { background: #fff; border: none; width: 32px; height: 32px; cursor: pointer; font-size: 16px; color: #555; }
.qty button:hover { background: #fafafa; }
.qty input { width: 50px; text-align: center; border: none; border-left: 1px solid #e0e0e0; border-right: 1px solid #e0e0e0; outline: none; font-size: 14px; }
.pd-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.pd-actions .btn { padding: 14px 20px; font-size: 15px; }
.btn-addcart { background: #fdf4e8; color: #e67e22; border: 1px solid #e67e22; }
.btn-addcart:hover { background: #ffe7dc; opacity: 1; }

/* ===== Cart ===== */
.cart-table { background: #fff; border-radius: 2px; }
.cart-head, .cart-item {
  display: grid; grid-template-columns: 40px 2fr 1fr 140px 1fr 1fr 60px;
  gap: 10px; padding: 16px; align-items: center; font-size: 14px;
}
.cart-head { color: #888; border-bottom: 1px solid #eee; text-align: center; }
.cart-head > :nth-child(2) { text-align: left; }
.cart-item { border-bottom: 1px solid #f5f5f5; text-align: center; }
.cart-item img { width: 80px; height: 80px; object-fit: cover; }
.cart-item .ci-name { display: flex; gap: 14px; align-items: center; text-align: left; }
.cart-item .ci-name a { flex: 1; line-height: 1.4; }
.remove-btn { background: none; border: none; color: #555; cursor: pointer; font-size: 16px; }
.remove-btn:hover { color: #e67e22; }
.cart-summary {
  background: #fff; padding: 18px 20px; position: sticky; bottom: 0;
  display: flex; justify-content: flex-end; align-items: center; gap: 24px;
  border-top: 1px dashed #e0e0e0; margin-top: 12px;
}
.price { color: #e67e22; font-weight: 500; }

.empty-state { text-align: center; padding: 60px 20px; background: #fff; }
.empty-state .big-ic { font-size: 100px; color: #e0e0e0; margin-bottom: 20px; }
.empty-state h2 { color: #555; margin-bottom: 16px; font-weight: 400; justify-content: center; }

/* ===== Checkout ===== */
.ck-section { background: #fff; padding: 20px 24px; margin-bottom: 12px; border-radius: 2px; }
.ck-address { border-top: 3px solid #e67e22; }
.ck-address h2 { color: #e67e22; }
.ck-total { display: grid; grid-template-columns: 1fr auto; gap: 8px 40px; margin: 10px 0; padding: 16px 0; border-top: 1px solid #f1f1f1; }

/* ===== Profile ===== */
.profile-layout { display: grid; grid-template-columns: 230px 1fr; gap: 16px; align-items: start; }
.side-menu { background: #fff; padding: 20px 0; border-radius: 2px; }
.side-profile { padding: 0 20px 20px; border-bottom: 1px solid #f0f0f0; text-align: center; }
.side-profile strong { font-size: 15px; display: block; }
.side-profile .edit-link { font-size: 12px; color: #888; display: inline-flex; gap: 4px; align-items: center; margin-top: 4px; }
.side-menu a {
  display: flex; align-items: center; gap: 10px; padding: 12px 20px;
  color: #555; font-size: 14px; border-left: 3px solid transparent;
}
.side-menu a i { width: 18px; text-align: center; color: #888; font-size: 15px; }
.side-menu a.active, .side-menu a:hover { color: #e67e22; border-left-color: #e67e22; background: #fafafa; }
.side-menu a.active i, .side-menu a:hover i { color: #e67e22; }
.avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg,#e67e22,#f39c12); color: #fff;
  display: grid; place-items: center; font-size: 32px; margin: 0 auto 10px; font-weight: 700;
}

/* Profile hero */
.profile-hero {
  background: linear-gradient(135deg, #e67e22, #f39c12); color: #fff;
  padding: 24px; border-radius: 6px; margin-bottom: 12px;
  display: flex; gap: 20px; align-items: center;
}
.profile-hero .avatar { background: rgba(255,255,255,.2); border: 3px solid #fff; margin: 0; }
.profile-hero h3 { font-size: 22px; font-weight: 500; }
.profile-hero .pid { opacity: .9; font-size: 13px; margin-top: 4px; display: flex; align-items: center; gap: 8px; }

/* Quick stats */
.quick-stats { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; padding: 20px; border-radius: 4px; margin-bottom: 12px; }
.qs-item { text-align: center; cursor: pointer; transition: color .2s; }
.qs-item:hover { color: #e67e22; }
.qs-item i { font-size: 30px; color: #e67e22; margin-bottom: 8px; display: block; }
.qs-item .lbl { font-size: 13px; color: #555; }

/* ===== Wallet ===== */
.wallet-card {
  background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
  color: #fff; padding: 30px; border-radius: 8px; margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.wallet-card::before { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; background: rgba(255,255,255,.1); border-radius: 50%; }
.wallet-card::after { content: ""; position: absolute; right: 40px; bottom: -60px; width: 140px; height: 140px; background: rgba(255,255,255,.08); border-radius: 50%; }
.wallet-card > * { position: relative; }
.wallet-card .wl-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; opacity: .95; }
.wallet-balance { font-size: 42px; font-weight: 700; margin: 10px 0; letter-spacing: -0.5px; }
.tx-list { background: #fff; padding: 0 20px; border-radius: 2px; }
.tx { display: flex; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid #f5f5f5; align-items: center; gap: 12px; }
.tx:last-child { border: none; }
.tx-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.tx-icon.plus { background: #e8f8ed; color: #2ecc71; }
.tx-icon.minus { background: #fdecea; color: #e67e22; }
.tx-info { flex: 1; }
.tx-info small { color: #999; display: block; margin-top: 2px; font-size: 12px; }
.tx .amt.plus { color: #2ecc71; font-weight: 500; }
.tx .amt.minus { color: #e67e22; font-weight: 500; }

/* ===== Form ===== */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: #555; margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #e0e0e0; border-radius: 2px;
  font-size: 14px; font-family: inherit; outline: none;
}
.form-row input:focus, .form-row textarea:focus { border-color: #e67e22; }

/* ===== Footer ===== */
.footer { background: #fbfbfb; border-top: 4px solid #e67e22; margin-top: 40px; padding: 30px 0 20px; color: #555; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.footer h4 { font-size: 13px; text-transform: uppercase; margin-bottom: 10px; font-weight: 700; color: #222; letter-spacing: .5px; }
.footer a { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #757575; padding: 5px 0; }
.footer a:hover { color: #e67e22; }
.copyright { text-align: center; font-size: 12px; color: #999; padding: 20px; border-top: 1px solid #eee; margin-top: 20px; }

/* ===== Toast ===== */
.toast {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.8); color: #fff;
  padding: 14px 24px; border-radius: 4px; z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,.25); display: flex; align-items: center; gap: 10px;
  font-size: 14px; animation: slideIn .3s;
}
.toast i { color: #2ecc71; font-size: 18px; }
@keyframes slideIn { from { top: 60px; opacity: 0; } to { top: 80px; opacity: 1; } }

/* ===== Radio box ===== */
.radio-box {
  border: 1px solid #e0e0e0; padding: 14px 16px; margin-bottom: 8px; cursor: pointer;
  display: flex; align-items: center; gap: 12px; border-radius: 2px;
  transition: border-color .15s, background .15s;
}
.radio-box:hover { border-color: #e67e22; }
.radio-box.active { border-color: #e67e22; background: #fdf4e8; }
.radio-box .pay-ic { font-size: 22px; color: #e67e22; width: 28px; text-align: center; }

/* ===== Mobile Bottom Nav ===== */
.mobile-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  background: #fff; border-top: 1px solid #e0e0e0;
  box-shadow: 0 -2px 8px rgba(0,0,0,.06);
  padding: 6px 0 4px;
}
.mobile-nav-inner {
  display: grid; grid-template-columns: repeat(5, 1fr);
  max-width: 600px; margin: 0 auto;
}
.mnav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #757575; font-size: 11px; text-align: center; padding: 6px 2px;
  position: relative;
}
.mnav-item i { font-size: 20px; }
.mnav-item.active { color: #e67e22; }
.mnav-item .mnav-badge {
  position: absolute; top: 2px; right: calc(50% - 22px);
  background: #e67e22; color: #fff; border-radius: 10px;
  font-size: 10px; padding: 0 5px; font-weight: 600; min-width: 16px;
  border: 1.5px solid #fff; line-height: 14px;
}
.mnav-item.center {
  background: #e67e22; color: #fff;
  border-radius: 50%; width: 52px; height: 52px;
  justify-content: center; margin: -18px auto 0;
  box-shadow: 0 4px 10px rgba(238,77,45,.4);
}
.mnav-item.center i { font-size: 22px; }
.mnav-item.center .lbl { display: none; }

/* Hamburger mobile toggle */
.mobile-menu-btn {
  display: none; background: none; border: none; color: #fff;
  font-size: 22px; cursor: pointer; padding: 4px 8px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  html { min-height: 100%; width: 100vw; overflow-x: hidden; }
  body { min-height: 100vh; width: 100vw; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; padding-bottom: 72px; }
  #site-main { padding-bottom: 72px; width: 100%; }
  #site-header { flex-shrink: 0; width: 100%; }
  #site-footer { flex-shrink: 0; margin-top: auto; width: 100%; }
  main, .container { flex: 1; width: 100%; }
  .sitebar { display: none; }
  .header { padding: 10px 0 10px; width: 100%; }
  .header-inner {
    width: 100% !important; max-width: none !important;
    grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 0 10px; margin: 0 !important;
  }
  .header-inner > * { min-width: 0; }
  .search, .search input, .header-right, .service-wrap { min-width: 0; }
  .search { width: 100%; }
  .sitebar-inner { width: 100% !important; max-width: none !important; }
  .hero { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 12px !important; grid-template-columns: 1fr; gap: 8px; }
  .section { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; border-radius: 0; }
  .container { width: 100% !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
  .footer-inner { width: 100% !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
  .profile-layout { width: 100% !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
  .logo { font-size: 20px; }
  .logo i { font-size: 24px; }
  .logo .brand { display: none; }
  .logo .brand-logo { height: 36px; }
  .hot-keywords { display: none; }
  .header-right { gap: 10px; }
  .nav-user { display: none; }
  .cart-icon { font-size: 22px; }
  .search input { padding: 8px 10px; font-size: 13px; }
  .search-btn { padding: 8px 10px !important; min-width: 0; }
  .search-btn span { display: none; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .search { width: 100%; min-width: 0; }
  .header-right { min-width: 0; }
  .header-right > * { min-width: 0; }
  .service-wrap { min-width: 0; }
  .mobile-nav { display: block; }
  .hero .main-banner { height: 160px; }
  .hero .side { display: none; }
  .cats { grid-template-columns: repeat(4, 1fr); width: 100%; margin: 0; }
  .cat { padding: 12px 4px; font-size: 11px; }
  .cat-ic { width: 50px; height: 50px; font-size: 22px; }
  .products { grid-template-columns: repeat(2, 1fr); gap: 4px; padding: 4px; width: 100%; margin: 0; }
  .product .p-name { font-size: 12.5px; }
  .product .p-price { font-size: 16px; }
  .section-title { padding: 12px 14px; font-size: 13px; }
  .section-title.flash { font-size: 17px; }
  .countdown span { padding: 2px 4px; font-size: 11px; min-width: 22px; }
}

@media (max-width: 720px) {
  html { min-height: 100%; width: 100vw; overflow-x: hidden; }
  body { min-height: 100vh; height: auto; }
  #site-header { flex-shrink: 0; }
  main, .container, .profile-layout { flex: 1; min-height: auto; }
  #site-footer { flex-shrink: 0; margin-top: auto; }
  .header { padding-left: 0 !important; padding-right: 0 !important; padding: 10px 0 10px !important; }
  .header-inner { grid-template-columns: 1fr; padding: 0 10px !important; gap: 8px; }
  .header-inner > * { width: 100%; }
  .search { width: 100%; border-radius: 0 !important; height: 40px; }
  .search input { min-width: 0; padding: 8px 10px; }
  .header-right { justify-content: flex-end; width: 100%; margin-top: 0; }
  .search-btn { min-width: 0; padding: 8px 10px !important; }

  .feature-strip,
  .mall-section,
  .promo-banner,
  .load-more,
  .hero,
  .section,
  .container,
  .footer-inner,
  .sitebar-inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .mall-section { grid-template-columns: 1fr; gap: 10px; }
  .promo-banner { padding: 0 !important; }
  .load-more { padding: 0 !important; }
  .load-more .btn { width: 100%; box-sizing: border-box; }
  .feature-item { padding: 14px 8px; }
  .sec-head { padding: 12px 12px; }
  .sec-head .title { font-size: 14px; }
  .sec-head .see-all { font-size: 12px; }
  .pd-grid { grid-template-columns: 1fr; gap: 14px; padding: 12px; }
  .pd-title { font-size: 16px; }
  .pd-price .now { font-size: 24px; }
  .pd-actions { flex-direction: column; }
  .pd-actions .btn { width: 100%; }

  .profile-layout { grid-template-columns: 1fr; min-width: 0; }
  .profile-hero { padding: 18px; gap: 14px; flex-wrap: wrap; justify-content: space-between; }
  .profile-hero > div { min-width: 0; }
  .profile-hero h3 { font-size: 18px; }
  .profile-hero .avatar { width: 60px; height: 60px; font-size: 24px; }
  .side-menu { padding: 10px 0; }
  .side-profile { display: none; }
  .side-menu { display: flex; overflow-x: auto; gap: 0; }
  .side-menu a { white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; padding: 10px 14px; }
  .side-menu a.active, .side-menu a:hover { border-left: none; border-bottom-color: #e67e22; background: transparent; }

  .quick-stats { grid-template-columns: repeat(4, 1fr); padding: 12px 8px; }
  .qs-item i { font-size: 24px; }
  .qs-item .lbl { font-size: 12px; }

  .footer-inner { grid-template-columns: repeat(2, 1fr); }

  .cart-head { display: none; }
  .cart-item {
    grid-template-columns: 30px 1fr auto;
    grid-template-areas: "chk img name" "chk img price" "chk img qty" ". . del";
    gap: 6px 10px; padding: 12px;
  }
  .cart-item > :nth-child(1) { grid-area: chk; align-self: center; }
  .cart-item .ci-name { grid-area: name; gap: 10px; }
  .cart-item .ci-name img { width: 60px; height: 60px; grid-area: img; }
  .cart-item > :nth-child(3) { grid-area: price; font-size: 14px; text-align: left; }
  .cart-item > :nth-child(4) { grid-area: qty; justify-self: start; }
  .cart-item > :nth-child(5) { display: none; }
  .cart-item > :nth-child(6) { display: none; }
  .cart-item .remove-btn { grid-area: del; justify-self: end; }
  .cart-summary { flex-direction: column; gap: 10px; align-items: stretch; text-align: center; }
  .cart-summary .btn { width: 100%; }

  .ck-section { padding: 14px; }
  .ck-total { gap: 6px 20px; }
}

/* Small Mobile (600px and below) */
@media (max-width: 600px) {
  html { height: 100%; width: 100%; }
  body { min-height: 100vh; height: auto; font-size: 13px; }
  main, .container { flex: 1; min-height: auto; }
  #site-footer { margin-top: auto; }
  .search input { padding: 6px 8px; font-size: 12px; }
  .search-btn { padding: 6px 12px; font-size: 12px; }
  .header-right { gap: 8px; }
  .cart-icon { font-size: 20px; }
  .btn { padding: 8px 12px !important; font-size: 13px; max-width: 100%; white-space: normal; }
  .btn-primary, .btn-addcart, .btn-outline { padding-left: 12px !important; padding-right: 12px !important; }
  .pd-grid { padding: 10px; gap: 10px; }
  .pd-title { font-size: 14px; }
  .pd-price .now { font-size: 22px; }
  .pd-row { gap: 16px; }
  .qty input { width: 44px; }
  .qty button { width: 28px; height: 28px; font-size: 14px; }
  .ck-section { padding: 10px; }
  body { font-size: 13px; }
}

/* Extra Small Mobile (480px and below) */
@media (max-width: 480px) {
  html { height: 100%; width: 100%; }
  body { min-height: 100vh; height: auto; font-size: 12px; }
  main, .container { flex: 1; min-height: auto; }
  #site-footer { margin-top: auto; }
  .logo { font-size: 16px; }
  .logo i { font-size: 20px; }
  .logo .brand-logo { height: 28px; }
  .search input { padding: 5px 6px; font-size: 11px; }
  .search-btn { padding: 5px 10px; font-size: 11px; }
  .cart-icon { font-size: 18px; }
  .hero .main-banner { height: 120px; }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .cat { padding: 10px 3px; font-size: 10px; }
  .cat-ic { width: 45px; height: 45px; font-size: 18px; }
  .products { grid-template-columns: repeat(2, 1fr); }
  .product .p-name { font-size: 11px; }
  .product .p-price { font-size: 14px; }
  .btn { padding: 7px 10px; font-size: 12px; }
  .pd-grid { padding: 8px; gap: 8px; }
  .pd-title { font-size: 13px; }
  .pd-price .now { font-size: 20px; }
  .pd-price .old { font-size: 14px; }
  .pd-row { gap: 12px; margin: 10px 0; font-size: 13px; }
  .pd-row .label { width: 90px; font-size: 12px; }
  .qty input { width: 40px; font-size: 12px; }
  .qty button { width: 26px; height: 26px; font-size: 12px; }
  .pd-actions { gap: 8px; margin-top: 16px; }
  .pd-actions .btn { padding: 10px 14px; font-size: 12px; }
  .container { padding: 0 6px; margin: 8px 0; }
  .ck-section { padding: 8px; }
  h2 { font-size: 15px; margin-bottom: 8px; }
  .card { padding: 16px; margin-bottom: 8px; }
  body { font-size: 12px; }
}

/* Very Small Mobile (380px and below) */
@media (max-width: 380px) {
  html { height: 100%; width: 100%; }
  body { min-height: 100vh; height: auto; font-size: 11px; }
  main, .container { flex: 1; min-height: auto; }
  #site-footer { margin-top: auto; }
  .header { padding: 6px 0; }
  .header-inner { gap: 6px; }
  .logo { font-size: 14px; gap: 3px; }
  .logo i { font-size: 18px; }
  .search { padding: 2px; }
  .search input { padding: 4px 5px; font-size: 10px; }
  .search-btn { padding: 4px 8px; font-size: 10px; }
  .cart-icon { font-size: 16px; }
  .hero .main-banner { height: 100px; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .cat { padding: 8px 2px; font-size: 9px; }
  .cat-ic { width: 40px; height: 40px; font-size: 16px; }
  .product { border-radius: 6px; }
  .product .p-badge { font-size: 9px; padding: 1px 4px; }
  .product .p-name { font-size: 10px; }
  .product .p-price { font-size: 13px; }
  .btn { padding: 6px 10px; font-size: 11px; }
  .pd-grid { padding: 6px; gap: 6px; }
  .pd-title { font-size: 12px; }
  .pd-price { padding: 10px 12px; margin: 8px 0; }
  .pd-price .now { font-size: 18px; }
  .pd-price .old { font-size: 12px; }
  .pd-price .disc { font-size: 9px; padding: 1px 4px; }
  .pd-row { gap: 8px; margin: 6px 0; font-size: 11px; }
  .pd-row .label { width: 70px; font-size: 10px; }
  .qty { border: 1px solid #e0e0e0; }
  .qty input { width: 36px; font-size: 10px; }
  .qty button { width: 24px; height: 24px; font-size: 11px; }
  .pd-actions { gap: 4px; margin-top: 12px; }
  .pd-actions .btn { padding: 8px 10px; font-size: 10px; }
  .container { padding: 0 4px; margin: 6px 0; }
  .ck-section { padding: 6px; }
  .card { padding: 12px; }
  h2 { font-size: 13px; margin-bottom: 6px; }
  body { font-size: 11px; }
}

@media (max-width: 400px) {
  .cats { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Homepage Enhanced Styles ===== */
/* Banner carousel */
.banner-carousel {
  position: relative; border-radius: 4px; overflow: hidden; height: 280px;
  background: #eee;
}
.banner-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity .6s ease;
}
.banner-slide.active { opacity: 1; }
.banner-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 2;
}
.banner-dots span {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5);
  cursor: pointer; transition: width .2s, background .2s;
}
.banner-dots span.active { width: 20px; border-radius: 4px; background: #e67e22; }
.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 34px; height: 44px; background: rgba(0,0,0,.35); color: #fff;
  border: none; cursor: pointer; font-size: 16px; transition: background .2s;
}
.banner-arrow:hover { background: rgba(0,0,0,.55); }
.banner-arrow.prev { left: 0; }
.banner-arrow.next { right: 0; }

/* Feature strip (Free shipping, Coin, etc.) */
.feature-strip {
  max-width: 1200px; margin: 12px auto; padding: 0 16px;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 0;
  background: #fff; border-radius: 4px; overflow: hidden;
}
.feature-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 18px 8px; font-size: 12.5px; color: #333; text-align: center;
  cursor: pointer; transition: background .15s;
}
.feature-item:hover { background: #fafafa; }
.feature-item .f-ic {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px; color: #fff;
}
.fic-1 { background: linear-gradient(135deg,#f5b041,#e67e22); }
.fic-2 { background: linear-gradient(135deg,#26c6da,#00acc1); }
.fic-3 { background: linear-gradient(135deg,#ffce00,#ff9800); }
.fic-4 { background: linear-gradient(135deg,#66bb6a,#43a047); }
.fic-5 { background: linear-gradient(135deg,#ab47bc,#8e24aa); }
.fic-6 { background: linear-gradient(135deg,#42a5f5,#1e88e5); }
.fic-7 { background: linear-gradient(135deg,#ef5350,#e53935); }
.fic-8 { background: linear-gradient(135deg,#f39c12,#b8561f); }

/* Mall banner section */
.mall-section {
  max-width: 1200px; margin: 16px auto; padding: 0 16px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.mall-card {
  background: #fff; border-radius: 4px; overflow: hidden; cursor: pointer;
  transition: box-shadow .2s, transform .2s; position: relative;
}
.mall-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.12); transform: translateY(-2px); }
.mall-card .mall-img { width: 100%; aspect-ratio: 2/1; object-fit: cover; }
.mall-card .mall-caption { padding: 10px 12px; font-size: 13px; color: #e67e22; font-weight: 500; }
.mall-tag {
  position: absolute; top: 8px; left: 8px;
  background: #e67e22; color: #fff; font-size: 10px; padding: 2px 6px;
  border-radius: 2px; font-weight: 700;
}

/* Section header with "See all" link */
.sec-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid #f1f1f1;
}
.sec-head .title {
  font-size: 16px; color: #555; text-transform: uppercase; font-weight: 500; letter-spacing: 1px;
}
.sec-head .title.red { color: #e67e22; text-transform: none; letter-spacing: 0; font-size: 20px; }
.sec-head .see-all { color: #e67e22; font-size: 13px; display: flex; align-items: center; gap: 4px; }

/* Daily deal items with progress bar */
.fs-progress {
  background: #ffe1d5; height: 16px; border-radius: 8px; margin-top: 6px; overflow: hidden; position: relative;
}
.fs-progress-bar {
  height: 100%; background: linear-gradient(90deg,#f39c12,#e67e22); border-radius: 8px; position: relative;
}
.fs-progress-text {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 11px; color: #fff; font-weight: 600; text-shadow: 0 1px 1px rgba(0,0,0,.3);
}

/* Daily discover grid - 6 columns */
.products-6 { grid-template-columns: repeat(6, 1fr); }

/* Promo banner full-width */
.promo-banner {
  max-width: 1200px; margin: 16px auto; padding: 0 16px;
}
.promo-banner img { width: 100%; border-radius: 4px; }

/* Load more button */
.load-more {
  max-width: 1200px; margin: 16px auto; padding: 0 16px; text-align: center;
}
.load-more .btn {
  padding: 12px 50px; background: #fff; color: #e67e22;
  border: 1px solid #e67e22; font-size: 14px;
}
.load-more .btn:hover { background: #fdf4e8; }

@media (max-width: 900px) {
  .banner-carousel { height: 180px; }
  .feature-strip { grid-template-columns: repeat(4, 1fr); }
  .mall-section { grid-template-columns: repeat(2, 1fr); margin: 8px; padding: 0; }
  .products-6 { grid-template-columns: repeat(2, 1fr); }
  .sec-head { padding: 12px 14px; }
  .sec-head .title { font-size: 14px; }
  .banner-arrow { display: none; }
}

/* ===== Customer Service Dropdown ===== */

/* ===== Unified Design System (Shop Orange) ===== */
:root {
  --brand-1: #ee4d2d;
  --brand-2: #f53d2d;
  --brand-3: #f69113;
  --brand-soft: #fff4ec;
  --brand-dark: #d73211;
  --accent: var(--brand-1);
  --accent-soft: var(--brand-soft);
  --text: #222;
  --text-soft: #555;
  --muted: #9aa0a6;
  --border: #eef0f2;
  --bg: #f5f5f5;
  --card: #ffffff;
  --success: #26aa99;
  --warning: #ff9d00;
  --danger: #f53d2d;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 28px rgba(0,0,0,.10);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}
body { background: var(--bg); color: var(--text); }

/* Unified brand gradient across sitebar, header, key accents */
.sitebar { background: linear-gradient(180deg, var(--brand-2), var(--brand-1)); }
.header  { background: linear-gradient(180deg, var(--brand-2), var(--brand-1)); }
.search-btn { background: linear-gradient(180deg, var(--brand-3), var(--brand-1)); }
.search-btn:hover { filter: brightness(1.05); }

/* Cart badge + avatar */
.cart-icon .badge { background: #fff; color: var(--brand-1); border-color: var(--brand-1); }
.avatar-mini { background: #fff; color: var(--brand-1); }

/* Flash / accents */
.section-title.flash { color: var(--brand-1); }
.cat-ic { background: var(--brand-soft); color: var(--brand-1); }
.product:hover { border-color: var(--brand-1); }
.product .p-price { color: var(--brand-1); }
.product .p-tags .tag-cheap { color: var(--brand-1); border-color: var(--brand-1); }
.product .p-tags .tag-voucher { background: var(--brand-soft); color: var(--brand-1); border-color: var(--brand-soft); }

/* Primary CTA normalization */
.lg-btn-primary,
.btn-primary,
.btn.primary { background: linear-gradient(180deg, var(--brand-3), var(--brand-1)) !important; border: none !important; color: #fff !important; }
.lg-btn-primary:hover,
.btn-primary:hover,
.btn.primary:hover { filter: brightness(1.05); }

