/* =========================================================================
   KOSE 2026 — Chrome: header, nav, search, cart drawer, footer, mobile bar
   ========================================================================= */

/* ---------- Trust strip ---------- */
.trust{background:var(--ink);color:var(--canvas)}
.trust__in{display:flex;align-items:center;gap:26px;height:40px;font-size:13px;font-weight:600;overflow:hidden}
.trust__i{display:flex;align-items:center;gap:8px;white-space:nowrap}
.trust__i svg{width:15px;height:15px;color:var(--brand)}
.trust__i b{color:#fff}
.trust__sp{margin-left:auto;display:flex;gap:20px;white-space:nowrap}
.trust__sp a{opacity:.85;font-weight:600}
.trust__sp a:hover{opacity:1}
@media(max-width:880px){ .trust__i:nth-child(n+3){display:none} .trust__sp{display:none} }

/* ---------- Header ---------- */
.hdr{position:sticky;top:0;z-index:60;background:var(--surface);border-bottom:1px solid var(--line);
  backdrop-filter:saturate(1.2)}
.hdr__main{display:flex;align-items:center;gap:22px;height:74px}
.brand{display:flex;align-items:center;gap:9px;flex-shrink:0}
.brand img{height:30px;width:auto}
.brand__logo-dark{display:none}
[data-theme="dark"] .brand__logo{display:none}
[data-theme="dark"] .brand__logo-dark{display:block}

/* location pill */
.loc{display:flex;align-items:center;gap:9px;height:46px;padding:0 15px;border-radius:var(--r-pill);
  background:var(--surface-2);border:1.5px solid var(--line);flex-shrink:0;transition:.16s}
.loc:hover{border-color:var(--ink-3)}
.loc svg{width:18px;height:18px;color:var(--brand)}
.loc__t{line-height:1.1}
.loc__t small{display:block;font-size:11px;color:var(--ink-3);font-weight:600}
.loc__t b{font-size:13.5px;font-weight:700}
@media(max-width:1080px){ .loc__t{display:none} .loc{padding:0;width:46px;justify-content:center} }

/* search */
.search{flex:1;position:relative;display:flex;align-items:center;height:52px;
  background:var(--surface-2);border:1.5px solid var(--line);border-radius:var(--r-pill);padding:0 8px 0 18px;transition:.18s}
.search:focus-within{border-color:var(--brand);box-shadow:0 0 0 4px var(--brand-soft);background:var(--surface)}
.search svg.search__i{width:20px;height:20px;color:var(--ink-3);flex-shrink:0}
.search input{flex:1;border:none;background:none;outline:none;height:100%;font-size:15.5px;padding:0 12px;font-weight:500}
.search__ai{display:flex;align-items:center;gap:7px;height:38px;padding:0 14px 0 12px;border-radius:var(--r-pill);
  background:var(--brand-soft);color:var(--brand-deep);font-weight:700;font-size:13.5px;flex-shrink:0}
.search__ai svg{width:16px;height:16px}
.search__ai:hover{background:var(--brand);color:#fff}

/* header actions */
.hact{display:flex;align-items:center;gap:6px;flex-shrink:0}
.iconbtn{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;width:58px;height:52px;
  border-radius:var(--r-sm);justify-content:center;color:var(--ink-2);transition:.14s;font-weight:600;font-size:11px}
.iconbtn:hover{background:var(--surface-2);color:var(--ink)}
.iconbtn svg{width:22px;height:22px}
.iconbtn__count{position:absolute;top:4px;right:10px;min-width:18px;height:18px;padding:0 4px;border-radius:99px;
  background:var(--warm);color:#fff;font-size:11px;font-weight:800;display:grid;place-items:center;line-height:1}

/* category nav bar */
.catbar{border-top:1px solid var(--line-2);background:var(--surface)}
.catbar__in{display:flex;align-items:center;gap:6px;height:54px;overflow-x:auto;scrollbar-width:none}
.catbar__in::-webkit-scrollbar{display:none}
.catlink{display:flex;align-items:center;gap:8px;height:38px;padding:0 14px;border-radius:var(--r-pill);
  font-weight:600;font-size:14px;color:var(--ink-2);white-space:nowrap;transition:.14s}
.catlink:hover{background:var(--surface-2);color:var(--ink)}
.catlink--all{background:var(--ink);color:var(--canvas);font-weight:700}
.catlink--all:hover{background:var(--ink);color:var(--canvas);filter:brightness(1.15)}
.catlink--all svg{width:16px;height:16px}
.catlink--deal{color:var(--warm)}

@media(max-width:880px){ .hdr__desk{display:none} }

/* ---------- Mobile header ---------- */
.mhdr{display:none}
@media(max-width:880px){
  .mhdr{display:block;position:sticky;top:0;z-index:60;background:var(--surface);border-bottom:1px solid var(--line)}
  .mhdr__top{display:flex;align-items:center;gap:12px;height:60px;padding:0 16px}
  .mhdr__top .brand img{height:26px}
  .mhdr__burger{width:42px;height:42px;border-radius:var(--r-sm);display:grid;place-items:center;background:var(--surface-2)}
  .mhdr__burger svg{width:22px;height:22px}
  .mhdr__act{margin-left:auto;display:flex;gap:4px}
  .mhdr__search{padding:0 16px 12px}
  .mhdr__search .search{height:46px}
}

/* ---------- Mobile bottom tab bar ---------- */
.tabbar{display:none}
@media(max-width:880px){
  .tabbar{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:70;background:var(--surface);
    border-top:1px solid var(--line);padding:6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow:0 -6px 20px -10px rgba(12,20,15,.18)}
  .tab{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px 0;color:var(--ink-3);
    font-size:10.5px;font-weight:700;position:relative}
  .tab svg{width:23px;height:23px}
  .tab--on{color:var(--brand-ink)}
  .tab__count{position:absolute;top:0;right:50%;transform:translateX(16px);min-width:16px;height:16px;padding:0 4px;
    border-radius:99px;background:var(--warm);color:#fff;font-size:10px;font-weight:800;display:grid;place-items:center}
  .tab--ai{color:#fff}
  .tab--ai .tab__ic{width:46px;height:38px;margin-top:-16px;border-radius:var(--r-pill);background:var(--brand);
    display:grid;place-items:center;box-shadow:var(--sh-brand);color:#fff}
  .tab--ai .tab__ic svg{width:22px;height:22px}
  .page{padding-bottom:84px}
}

/* ---------- Cart drawer ---------- */
.scrim{position:fixed;inset:0;background:rgba(8,12,9,.5);z-index:90;opacity:0;visibility:hidden;transition:.25s;backdrop-filter:blur(2px)}
.scrim.on{opacity:1;visibility:visible}
.drawer{position:fixed;top:0;right:0;bottom:0;width:min(440px,100vw);background:var(--canvas);z-index:95;
  transform:translateX(100%);transition:transform .32s cubic-bezier(.3,.8,.3,1);display:flex;flex-direction:column}
.drawer.on{transform:none}
.drawer__h{display:flex;align-items:center;justify-content:space-between;padding:20px;border-bottom:1px solid var(--line);background:var(--surface)}
.drawer__h h3{font-size:19px}
.drawer__close{width:40px;height:40px;border-radius:var(--r-pill);background:var(--surface-2);display:grid;place-items:center}
.drawer__close svg{width:20px;height:20px}
.drawer__body{flex:1;overflow-y:auto;padding:8px 16px}
.drawer__foot{padding:18px 20px calc(18px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--surface);display:flex;flex-direction:column;gap:12px}

.vgroup{margin:12px 0;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-md);overflow:hidden}
.vgroup__h{display:flex;align-items:center;gap:8px;padding:11px 14px;background:var(--surface-2);border-bottom:1px solid var(--line);font-size:13px;font-weight:700}
.vgroup__h .verified{margin-left:auto}

.citem{display:flex;gap:12px;padding:14px}
.citem+.citem{border-top:1px solid var(--line-2)}
.citem__media{width:72px;height:72px;border-radius:var(--r-sm);overflow:hidden;flex-shrink:0;border:1px solid var(--line)}
.citem__t{font-size:13.5px;font-weight:600;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.citem__meta{font-size:12px;color:var(--ink-3);margin-top:2px}
.citem__price{font-family:var(--font-display);font-weight:800;font-size:15px;margin-top:4px}

.qty{display:inline-flex;align-items:center;border:1.5px solid var(--line);border-radius:var(--r-pill);height:34px;overflow:hidden}
.qty button{width:32px;height:100%;display:grid;place-items:center;color:var(--ink-2);font-weight:700}
.qty button:hover{background:var(--surface-2);color:var(--ink)}
.qty span{min-width:28px;text-align:center;font-weight:700;font-size:14px}
.qty svg{width:15px;height:15px}

.emptycart{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;height:100%;text-align:center;padding:30px}
.emptycart svg{width:64px;height:64px;color:var(--ink-3);opacity:.5}

/* ---------- Mobile menu drawer (left) ---------- */
.menudrawer{position:fixed;top:0;left:0;bottom:0;width:min(330px,86vw);background:var(--canvas);z-index:95;
  transform:translateX(-100%);transition:transform .3s cubic-bezier(.3,.8,.3,1);display:flex;flex-direction:column}
.menudrawer.on{transform:none}
.menudrawer .drawer__h{padding:18px 20px;border-bottom:1px solid var(--line);background:var(--surface)}
.menudrawer .drawer__h .brand img{height:26px}
.menudrawer__body{flex:1;overflow-y:auto;padding:14px 16px calc(20px + env(safe-area-inset-bottom))}
.menudrawer__big{display:flex;align-items:center;gap:11px;padding:14px;border-radius:var(--r-sm);background:var(--surface);
  border:1px solid var(--line);font-weight:700;font-size:15px;margin-bottom:8px}
.menudrawer__big svg{width:20px;height:20px}
.menudrawer__lbl{font-size:11.5px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--ink-3);margin:18px 8px 8px}
.menudrawer__cat{display:flex;align-items:center;justify-content:space-between;padding:13px 12px;border-radius:var(--r-sm);
  font-weight:600;font-size:15px;color:var(--ink-2)}
.menudrawer__cat svg{width:16px;height:16px;color:var(--ink-3)}
.menudrawer__cat:hover{background:var(--surface)}

.sumline{display:flex;justify-content:space-between;font-size:14.5px;color:var(--ink-2)}
.sumline b{color:var(--ink)}
.sumtotal{display:flex;justify-content:space-between;align-items:baseline;font-size:15px;font-weight:700}
.sumtotal .num{font-family:var(--font-display);font-size:24px;font-weight:800}

/* ---------- Footer ---------- */
.foot{background:var(--ink);color:#C7D0CA;margin-top:60px}
.foot a:hover{color:#fff}
.foot__top{display:grid;grid-template-columns:1.4fr repeat(4,1fr);gap:40px;padding:56px 0 44px}
.foot__brand img{height:30px;margin-bottom:16px}
.foot__brand p{font-size:14px;line-height:1.6;max-width:280px;color:#9AA8A0}
.foot__col h4{color:#fff;font-size:14px;margin-bottom:16px;font-family:var(--font);font-weight:700}
.foot__col a{display:block;font-size:13.5px;padding:6px 0;color:#9AA8A0}
.foot__pay{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.paychip{height:34px;padding:0 12px;border-radius:8px;background:rgba(255,255,255,.08);display:flex;align-items:center;
  gap:7px;font-size:12.5px;font-weight:700;color:#fff}
.paychip svg{width:16px;height:16px;color:var(--brand)}
.foot__bottom{border-top:1px solid rgba(255,255,255,.1);padding:22px 0;display:flex;justify-content:space-between;
  align-items:center;gap:16px;font-size:13px;color:#8A988F;flex-wrap:wrap}
.foot__social{display:flex;gap:10px}
.foot__social a{width:38px;height:38px;border-radius:var(--r-pill);background:rgba(255,255,255,.08);display:grid;place-items:center}
.foot__social svg{width:18px;height:18px}
@media(max-width:980px){ .foot__top{grid-template-columns:1fr 1fr;gap:30px} .foot__brand{grid-column:1/-1} }
@media(max-width:560px){ .foot__top{grid-template-columns:1fr 1fr} }

/* ---------- Toast ---------- */
.toast-wrap{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:120;display:flex;flex-direction:column;gap:10px;align-items:center;pointer-events:none}
@media(max-width:880px){ .toast-wrap{bottom:92px} }
.toast{display:flex;align-items:center;gap:12px;background:var(--ink);color:#fff;padding:13px 18px;border-radius:var(--r-pill);
  box-shadow:var(--sh-3);font-weight:600;font-size:14px;animation:toastin .3s cubic-bezier(.2,.8,.2,1);max-width:90vw}
.toast svg{width:20px;height:20px;color:var(--brand);flex-shrink:0}
.toast img{width:30px;height:30px;border-radius:6px}
@keyframes toastin{from{opacity:0;transform:translateY(16px) scale(.95)}}

/* ---------- AI assistant sheet ---------- */
.ai-sheet{position:fixed;inset:0;z-index:100;display:none}
.ai-sheet.on{display:block}
.ai-panel{position:absolute;top:0;right:0;bottom:0;width:min(460px,100vw);background:var(--canvas);display:flex;flex-direction:column;
  transform:translateX(100%);animation:slidein .3s forwards;box-shadow:var(--sh-3)}
@keyframes slidein{to{transform:none}}
.ai-h{padding:18px 20px;background:linear-gradient(135deg,var(--brand-ink),var(--brand));color:#fff;display:flex;align-items:center;gap:12px}
.ai-h__ic{width:40px;height:40px;border-radius:var(--r-pill);background:rgba(255,255,255,.2);display:grid;place-items:center}
.ai-h__ic svg{width:22px;height:22px}
.ai-body{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:14px}
.ai-msg{max-width:85%;padding:13px 16px;border-radius:18px;font-size:14.5px;line-height:1.5}
.ai-msg--bot{background:var(--surface);border:1px solid var(--line);border-bottom-left-radius:5px;align-self:flex-start}
.ai-msg--me{background:var(--ink);color:#fff;border-bottom-right-radius:5px;align-self:flex-end}
.ai-foot{padding:14px;border-top:1px solid var(--line);background:var(--surface);display:flex;gap:10px}
.ai-sug{display:flex;flex-wrap:wrap;gap:8px}
