/* ══════════════════════════════════════════════════
   TW Index — Design System
   ══════════════════════════════════════════════════ */
:root {
  --pink:     #E8547A;
  --pink-l:   #FFF0F4;
  --pink-m:   #FFD6E4;
  --orange:   #FF5100;
  --orange-l: #FFF3EE;
  --green:    #18A048;
  --green-l:  #E8FFF0;
  --purple:   #7B2FBE;
  --black:    #111111;
  --grey-d:   #999999;
  --grey-m:   #E0E0E0;
  --grey-l:   #F8F8FA;
  --white:    #FFFFFF;
  --shadow:   0 2px 8px rgba(0,0,0,.07);
  --shadow-m: 0 4px 16px rgba(0,0,0,.10);
}
*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Noto Sans TC', system-ui, sans-serif; background: var(--grey-l); color: var(--black); margin: 0; }
a { text-decoration: none; }

/* ── Utility bar ── */
.tw-util-bar {
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid #eee;
  text-align: center;
  font-size: 12px;
  color: var(--grey-d);
  padding: 5px 0;
  position: relative; z-index: 200;
}

/* ── Header ── */
.tw-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.5);
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.tw-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; flex-shrink: 0;
}
.tw-logo-text { font-size: 15px; font-weight: 900; color: var(--black); line-height: 1.1; }
.tw-logo-sub  { font-size: 9px; font-weight: 700; color: var(--pink); display: block; }
.tw-search {
  flex: 1;
  min-width: 0; /* allow flexbox shrink */
  height: 36px; border-radius: 18px;
  border: 1.5px solid #e8e8e8; background: #f5f5f5;
  padding: 0 14px; font-size: 12px; color: var(--black);
  font-family: inherit;
}
.tw-search:focus { outline: none; border-color: var(--pink); background: #fff; }
.tw-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.tw-nav a {
  font-size: 13px; color: var(--black); padding: 6px 10px;
  border-radius: 8px; font-weight: 500; white-space: nowrap;
}
.tw-nav a:hover { background: #f5f5f5; }
.tw-nav a.shopee { color: var(--orange); font-weight: 700; }
.tw-nav a.makuake { color: var(--green); font-weight: 700; }
.tw-nav-icons { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.tw-nav-icon {
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: transparent; cursor: pointer;
  font-size: 18px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.tw-cart-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--pink); color: #fff;
  font-size: 9px; font-weight: 700;
  width: 15px; height: 15px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ── Sub-nav (2nd row) ── */
.tw-subnav {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center;
  padding: 0 20px;
  height: 40px;
  position: sticky; top: 60px; z-index: 190;
  overflow-x: auto; scrollbar-width: none;
}
.tw-subnav::-webkit-scrollbar { display: none; }
.tw-subnav a {
  font-size: 12px; color: var(--black); padding: 0 14px;
  height: 40px; display: flex; align-items: center;
  white-space: nowrap; border-bottom: 2px solid transparent;
  font-weight: 500;
}
.tw-subnav a:hover  { color: var(--pink); }
.tw-subnav a.active { color: var(--pink); border-bottom-color: var(--pink); font-weight: 700; }
.tw-subnav a.all    { color: var(--pink); font-weight: 700; }

