/* nav-plus.css — site chrome extras: mega menu, search overlay, mobile menu.
   Injected by chrome() in src/ui.js. All ids/classes prefixed lc-nav-. */

/* Restore the `hidden` attribute inside the mini-cart drawer. Drawer rules like
   .lc-drawer__empty/.lc-drawer__foot (display:grid) and .lc-drawer__row (display:flex)
   otherwise beat the UA `[hidden]{display:none}`, leaving the empty-cart block, foot,
   and discount row stuck visible. Scoped to #lc-drawer so the mega/mobile/search menus
   — which deliberately keep `hidden` and reveal via `.is-open` — stay unaffected. */
#lc-drawer [hidden] { display: none !important; }

/* ---------- shared drop animation ---------- */
@keyframes lcNavDrop {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- mega menu (All Wallpaper) ---------- */
.lc-nav-megaWrap { display: inline-flex; }
#lc-nav-allBtn .lc-nav-caret {
  display: inline-block; font-size: 10px; opacity: .55;
  margin-left: 4px; transition: transform .2s;
}
#lc-nav-allBtn[aria-expanded="true"] .lc-nav-caret { transform: rotate(180deg); }

.lc-nav-mega {
  position: absolute; left: 0; right: 0; top: 100%;
  display: none;
  grid-template-columns: repeat(3, 1fr); gap: 8px 34px;
  padding: 28px clamp(24px, 6vw, 80px) 34px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  z-index: 25;
}
.lc-nav-mega.is-open { display: grid; animation: lcNavDrop .22s ease; }
.lc-nav-mega__col b {
  display: block; font-size: 12px; font-weight: 900;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 10px;
}
.lc-nav-mega__col a {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; border-radius: 12px;
  text-decoration: none; font-weight: 700; font-size: 14.5px; color: var(--ink);
  transition: background .15s, color .15s;
}
.lc-nav-mega__col a:hover { background: var(--tint); color: var(--pink); }
.lc-nav-dot {
  flex: none; width: 16px; height: 16px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(58, 45, 92, .12);
}
@media (max-width: 900px) { .lc-nav-mega { display: none !important; } }

/* ---------- search overlay ---------- */
.lc-nav-search {
  position: fixed; inset: 0; z-index: 60;
  display: none; align-items: flex-start; justify-content: center;
  padding: 11vh 20px 40px;
  background: rgba(58, 45, 92, .38);
  backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
}
.lc-nav-search.is-open { display: flex; }
.lc-nav-search__panel {
  position: relative; width: min(620px, 100%);
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; animation: lcNavDrop .25s ease;
}
.lc-nav-search__close {
  position: absolute; top: -14px; right: -14px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 15px; font-weight: 800; font-family: var(--font);
  cursor: pointer; box-shadow: var(--shadow);
  transition: transform .2s;
}
.lc-nav-search__close:hover { transform: rotate(90deg); }
.lc-nav-search__panel input {
  width: 100%; padding: 14px 22px;
  border: 2px solid var(--line); border-radius: 999px;
  background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; font-weight: 700;
  outline: none; transition: border-color .2s;
}
.lc-nav-search__panel input:focus { border-color: var(--violet); }
.lc-nav-search__panel input::placeholder { color: var(--ink-soft); opacity: .7; }
.lc-nav-search__results { margin-top: 12px; max-height: 52vh; overflow: auto; }
.lc-nav-hit {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 14px;
  text-decoration: none; font-weight: 700; font-size: 15px; color: var(--ink);
  transition: background .15s;
}
.lc-nav-hit:hover { background: var(--tint); }
.lc-nav-hit__thumb {
  flex: none; width: 36px; height: 36px; border-radius: 10px;
  overflow: hidden; background: var(--tint);
}
.lc-nav-hit__thumb img, .lc-nav-hit__thumb canvas {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.lc-nav-hit__price { margin-left: auto; font-size: 13.5px; color: var(--ink-soft); }
.lc-nav-search__empty {
  padding: 18px 10px; text-align: center;
  font-weight: 700; color: var(--ink-soft);
}
.lc-nav-search__hint {
  margin-top: 10px; text-align: center;
  font-size: 12.5px; font-weight: 700; color: var(--ink-soft); opacity: .75;
}

/* ---------- mobile menu ---------- */
.lc-nav-burger { display: none; }
.lc-nav-mobile {
  display: block; /* overrides the [hidden] attribute; collapsed via max-height */
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  max-height: 0; overflow: hidden; transition: max-height .3s ease;
  z-index: 25;
}
.lc-nav-mobile.is-open { max-height: min(72vh, 620px); overflow-y: auto; }
.lc-nav-mobile__inner { padding: 16px 22px 28px; }
.lc-nav-mobile__links { display: flex; flex-direction: column; }
.lc-nav-mobile__links a {
  padding: 11px 6px; text-decoration: none;
  font-weight: 800; font-size: 16px; color: var(--ink);
  border-bottom: 1px dashed var(--line);
}
.lc-nav-mobile__links a:last-child { border-bottom: none; }
.lc-nav-mobile__group { margin-top: 14px; }
.lc-nav-mobile__group b {
  display: block; font-size: 11.5px; font-weight: 900;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 8px;
}
.lc-nav-mobile__list { display: flex; flex-wrap: wrap; gap: 8px; }
.lc-nav-mobile__list a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--tint); border: 1px solid var(--line);
  text-decoration: none; font-weight: 700; font-size: 13.5px; color: var(--ink);
}
@media (max-width: 900px) { .lc-nav-burger { display: inline-block; } }
@media (min-width: 901px) { .lc-nav-mobile { display: none; } }
/* 手机端隐藏顶栏账号图标（账号入口已在汉堡菜单里） */
@media (max-width: 900px) { #lc-nav-account { display: none; } }

/* ---------- trust badge (announcement bar) + review wall ---------- */
.lc-nav-trust { position: absolute; left: 16px; }
.trustbadge {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: #fff; font-size: 12px; font-weight: 700;
}
.trustbadge__stars { color: #ffd166; letter-spacing: 1px; font-size: 12px; }
.trustbadge__meta { opacity: .85; }
.trustwall__head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
  font-weight: 700; color: var(--ink); margin-bottom: 26px;
}
.trustwall__stars { color: #ffd166; font-size: 20px; letter-spacing: 2px; }
.trustwall__powered {
  font-size: 12px; color: var(--ink-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px; margin-left: 8px;
}
@media (max-width: 900px) { .lc-nav-trust { display: none; } }

/* ---------- mini-cart drawer ---------- */
.lc-drawer { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.lc-drawer__backdrop {
  position: absolute; inset: 0;
  background: rgba(58, 45, 92, .35);
  opacity: 0; transition: opacity .28s ease;
}
.lc-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(400px, 92vw);
  background: var(--bg); box-shadow: -18px 0 50px rgba(58, 45, 92, .25);
  display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .32s cubic-bezier(.22, .9, .3, 1);
}
.lc-drawer.is-open { pointer-events: auto; }
.lc-drawer.is-open .lc-drawer__backdrop { opacity: 1; }
.lc-drawer.is-open .lc-drawer__panel { transform: none; }

.lc-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
  font-size: 17px;
}
.lc-drawer__count { color: var(--ink-soft); font-weight: 700; }
.lc-drawer__close {
  border: none; background: var(--tint); width: 34px; height: 34px; border-radius: 50%;
  font-size: 14px; font-weight: 800; color: var(--ink); cursor: pointer;
  font-family: var(--font); transition: transform .2s;
}
.lc-drawer__close:hover { transform: rotate(90deg); }

.lc-drawer__added {
  margin: 12px 20px 0; padding: 9px 14px; border-radius: 12px;
  background: #e7f8f0; color: #1f8f63; font-weight: 800; font-size: 13.5px;
}

.lc-drawer__items { flex: 1; overflow-y: auto; padding: 14px 20px; display: grid; gap: 14px; align-content: start; }
.lc-drawer__item { display: flex; gap: 12px; align-items: flex-start; }
.lc-drawer__thumb {
  flex: none; width: 64px; height: 52px; border-radius: 10px; overflow: hidden;
  background: var(--tint); display: grid; place-items: center; font-size: 20px;
}
.lc-drawer__thumb img, .lc-drawer__thumb canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.lc-drawer__info { flex: 1; min-width: 0; display: grid; gap: 3px; }
.lc-drawer__info > b { font-size: 14px; line-height: 1.25; }
.lc-drawer__info > span { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.lc-drawer__ctl { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.lc-drawer__qty {
  display: inline-flex; align-items: center; gap: 2px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 2px;
}
.lc-drawer__qty button {
  width: 24px; height: 24px; border: none; border-radius: 50%; background: var(--tint);
  font-weight: 800; color: var(--ink); cursor: pointer; font-family: var(--font); font-size: 13px;
}
.lc-drawer__qty i { font-style: normal; font-weight: 800; font-size: 13px; min-width: 22px; text-align: center; }
.lc-drawer__ctl > b { margin-left: auto; font-size: 14px; }
.lc-drawer__rm {
  border: none; background: none; color: var(--ink-soft); cursor: pointer;
  font-size: 13px; padding: 2px; font-family: var(--font);
}
.lc-drawer__rm:hover { color: var(--pink); }

.lc-drawer__foot {
  border-top: 1px solid var(--line); padding: 16px 20px 20px; display: grid; gap: 8px;
  background: #fff;
}
.lc-drawer__row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.lc-drawer__row--total { font-size: 16px; color: var(--ink); font-weight: 900; }
.lc-drawer__ship { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.lc-drawer__checkout { text-align: center; margin-top: 6px; }
.lc-drawer__viewcart {
  text-align: center; font-size: 13.5px; font-weight: 800; color: var(--ink-soft);
  text-decoration: none; padding: 4px;
}
.lc-drawer__viewcart:hover { color: var(--pink); }
.lc-drawer__empty {
  flex: 1; display: grid; place-content: center; justify-items: center; gap: 12px;
  color: var(--ink-soft); font-weight: 700; padding: 30px;
}
.lc-drawer__empty span { font-size: 40px; }

/* ---------- language switcher (announcement bar) ---------- */
.bar__lang { position: absolute; right: 110px; }
.bar__lang select {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px; padding: 3px 10px; font-weight: 700; cursor: pointer;
}
.bar__lang option { color: var(--ink); }
@media (max-width: 700px) { .bar__lang { display: none; } }
