[hidden]{display:none !important;}
:root{
  --bg:#0b0f14;
  --card:#111823;
  --card2:#0f1620;
  --text:#e9eef6;
  --muted:#aab6c6;
  --line:rgba(255,255,255,.08);
  --brand:#39d98a;
  --brand2:#2bb8ff;
  --danger:#ff4d4d;
  --shadow: 0 14px 30px rgba(0,0,0,.35);
  --radius:20px;
  --radius2:28px;
  --pad:14px;
  --max:980px;
  --tap:48px;
  --font: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  background: radial-gradient(1200px 600px at 20% -10%, rgba(43,184,255,.18), transparent 50%),
              radial-gradient(900px 700px at 90% 0%, rgba(57,217,138,.16), transparent 50%),
              var(--bg);
  color:var(--text);
  padding-bottom: 78px; /* bottom nav */
}
a{color:inherit;text-decoration:none}
.container{
  max-width:var(--max);
  margin:0 auto;
  padding: 14px 14px 22px;
}
.topbar{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(14px);
  background: rgba(11,15,20,.65);
  border-bottom:1px solid var(--line);
  padding: 10px 14px;
  display:flex; align-items:center; justify-content:space-between;
}
.brand{display:flex;align-items:center;gap:10px}
.brand__dot{width:12px;height:12px;border-radius:999px;background:linear-gradient(135deg,var(--brand),var(--brand2));box-shadow:0 0 0 6px rgba(57,217,138,.12)}
.brand__name{font-weight:800; letter-spacing:.2px}
.topbar__sub{font-size:12px;color:var(--muted); margin-left:22px; margin-top:2px}
.iconbtn{
  height:var(--tap); min-width:var(--tap);
  border-radius: 999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color:var(--text);
  display:grid; place-items:center;
  position:relative;
}
.iconbtn.mini{height:40px;min-width:40px}
.badge{
  position:absolute; top:-6px; right:-6px;
  min-width:20px; height:20px;
  padding:0 6px;
  display:grid; place-items:center;
  border-radius:999px;
  background: var(--brand2);
  color:#051018;
  font-size:12px; font-weight:800;
  border:2px solid rgba(11,15,20,.85);
}

.bottomnav{
  position:fixed; left:0; right:0; bottom:0;
  height:70px;
  background: rgba(11,15,20,.78);
  backdrop-filter: blur(16px);
  border-top:1px solid var(--line);
  display:flex;
  padding: 10px 10px 12px;
  gap:10px;
}
.navitem{
  flex:1;
  border-radius: 18px;
  display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  gap:4px;
  color:var(--muted);
  border:1px solid transparent;
}
.navitem.active{
  background: rgba(255,255,255,.05);
  border-color: var(--line);
  color: var(--text);
}
.navicon{font-size:18px}
.navlabel{font-size:11px; font-weight:700; letter-spacing:.2px}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid var(--line);
  border-radius: var(--radius2);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card.subtle{box-shadow:none;background:rgba(255,255,255,.03)}
.card.success{border-color: rgba(57,217,138,.35)}
.success__icon{font-size:40px; margin-bottom:10px}

.m0{margin:0}
.small{font-size:12px}
.muted{color:var(--muted)}
.mono{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}

.btn{
  height:48px;
  padding:0 14px;
  border-radius: 18px;
  border:1px solid transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color:#061018;
  font-weight:900;
  display:inline-flex; align-items:center; justify-content:center;
  gap:10px;
}
.btn.full{width:100%}
.btn.small{height:42px;border-radius:16px;font-weight:800}
.btn.ghost{
  background: rgba(255,255,255,.04);
  color: var(--text);
  border-color: var(--line);
}
.btn.disabled{opacity:.45; pointer-events:none}

.input{
  width:100%;
  height:48px;
  padding:0 14px;
  border-radius: 18px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  outline:none;
}
.input:focus{border-color: rgba(43,184,255,.6); box-shadow: 0 0 0 5px rgba(43,184,255,.14)}

.label{display:block;font-size:12px;color:var(--muted);font-weight:800;margin:10px 0 6px}

.row{display:flex; gap:12px; align-items:center}
.row.between{justify-content:space-between}
.divider{height:1px;background:var(--line);margin:12px 0}
.total{font-size:18px;font-weight:900}

.searchbar{margin: 6px 0 14px}
.searchwrap{position:relative}
#searchClear{position:absolute; right:6px; top:4px}
.suggest{
  margin-top:10px;
  border:1px solid var(--line);
  background: rgba(17,24,35,.92);
  border-radius: 18px;
  overflow:hidden;
}
.suggest a{
  display:block;
  padding: 12px 14px;
  border-bottom:1px solid var(--line);
}
.suggest a:last-child{border-bottom:none}
.suggest a:hover{background: rgba(255,255,255,.04)}

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
}
.pcard{
  border-radius: 26px;
  overflow:hidden;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
}
.pcard__img{display:block; aspect-ratio: 1 / 1; background: rgba(255,255,255,.03)}
.pcard__img img{width:100%;height:100%;object-fit:cover;display:block}
.imgph{
  width:100%;height:100%;
  display:grid;place-items:center;
  color:rgba(255,255,255,.45);
  font-size:12px;
}
.imgph.big{min-height: 240px}
.pcard__body{padding: 12px}
.pcard__name{font-weight:900;font-size:13px;line-height:1.2; min-height: 34px}
.pcard__meta{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px}
.chip{
  font-size:12px;
  font-weight:900;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(57,217,138,.14);
  border:1px solid rgba(57,217,138,.25);
  color: var(--text);
}
.chip.ghost{background:rgba(255,255,255,.04);border-color:var(--line)}
.pcard__actions{display:flex; gap:10px; margin-top:12px}
.pcard__actions .btn{flex:1}

.pdetail{display:grid; gap:14px}
.pdetail__img{border-radius:22px; overflow:hidden; border:1px solid var(--line); background: rgba(255,255,255,.03)}
.pdetail__img img{width:100%;height:auto;display:block}
.qty{display:flex; align-items:center; gap:10px}
.qty__input{max-width: 110px; text-align:center}

.cartlist{margin-top:10px}
.cartitem{
  display:grid;
  grid-template-columns: 1fr 90px 90px;
  gap:10px;
  align-items:center;
  padding: 10px 0;
  border-bottom:1px solid var(--line);
}
.cartitem:last-child{border-bottom:none}
.cartitem__name{font-weight:900;font-size:13px}
.cartitem__total{font-weight:900;text-align:right}

.empty{padding: 18px 0; text-align:center}
.empty__icon{font-size:42px}
.empty__text{margin-top:6px;color:var(--muted);font-weight:800}

.alert{
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,77,77,.10);
  border:1px solid rgba(255,77,77,.22);
  color:#ffd0d0;
  font-size:12px;
  margin: 10px 0;
}

.pager{
  display:flex; align-items:center; justify-content:space-between;
  margin: 14px 0 4px;
  gap:10px;
}
.pager__info{color:var(--muted);font-size:12px;font-weight:800}

.toast{
  position:fixed; left:50%; transform:translateX(-50%);
  bottom: 86px;
  background: rgba(17,24,35,.95);
  border:1px solid var(--line);
  padding: 10px 12px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-width: calc(100% - 24px);
  width: 520px;
  color: var(--text);
  font-size: 12px;
  z-index: 60;
}

.kv{margin-top:12px}
.kv__row{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line)}
.kv__row:last-child{border-bottom:none}

@media (min-width: 780px){
  .grid{grid-template-columns: repeat(3, minmax(0,1fr))}
  .pdetail{grid-template-columns: 1.1fr 1fr; align-items:start}
}


/* --- POLISH PACK v1 --- */
.pcard, .btn, .iconbtn, .navitem { -webkit-tap-highlight-color: transparent; }
.pcard:active { transform: scale(0.995); }
.btn:active { transform: translateY(1px); filter: brightness(0.98); }
.iconbtn:active { transform: scale(0.98); }
.navitem:active { transform: scale(0.99); }

.pcard { transition: transform .12s ease, background .12s ease; }
.pcard:hover { background: rgba(255,255,255,.045); }

.imgph{
  position:relative;
  overflow:hidden;
}
.imgph::before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(120deg, rgba(255,255,255,.03), rgba(255,255,255,.10), rgba(255,255,255,.03));
  transform: translateX(-60%);
  animation: shimmer 1.25s infinite;
}
@keyframes shimmer {
  0%{ transform: translateX(-60%); }
  100%{ transform: translateX(60%); }
}
.imgph span{ position:relative; z-index:1; }

.imgph { font-weight:800; letter-spacing:.2px; }
.imgph::after{
  content:"🖼️";
  position:absolute;
  font-size:22px;
  opacity:.55;
  bottom:12px; right:12px;
}

.fabcart{
  position:fixed;
  right:16px;
  bottom: 88px;
  width: 58px; height: 58px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  display:grid; place-items:center;
  box-shadow: 0 18px 38px rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.10);
  z-index: 65;
}
.fabcart__icon{ font-size: 22px; }
.fabcart__badge{
  position:absolute; top:-8px; right:-8px;
  min-width:22px; height:22px;
  padding:0 7px;
  border-radius:999px;
  background: #051018;
  color: var(--text);
  border:2px solid rgba(11,15,20,.85);
  display:grid; place-items:center;
  font-size:12px; font-weight:900;
}

.overlay{
  position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  display:grid; place-items:center;
  z-index: 80;
}
.overlay__card{
  width:min(360px, calc(100% - 28px));
  border-radius: 26px;
  border:1px solid var(--line);
  background: rgba(17,24,35,.92);
  box-shadow: var(--shadow);
  padding: 18px;
  text-align:center;
}
.overlay__text{ font-weight:900; margin-top:10px; }
.overlay__sub{ color: var(--muted); font-size:12px; margin-top:4px; }

.spinner{
  width:38px; height:38px;
  border-radius:999px;
  border:3px solid rgba(255,255,255,.14);
  border-top-color: rgba(57,217,138,.9);
  margin: 0 auto;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Better cart rows on small screens */
@media (max-width: 420px){
  .cartitem{ grid-template-columns: 1fr 78px 78px; }
  .pcard__actions{ flex-direction:column; }
  .pcard__actions .btn{ width:100%; }
}


/* Account UI */
.drop{border:1px solid var(--line); border-radius: 22px; padding: 10px 12px; background: rgba(255,255,255,.03)}
.drop > summary{list-style:none; cursor:pointer; font-weight:900}
.drop > summary::-webkit-details-marker{display:none}
.drop__body{margin-top:10px}

.tilelist{display:flex; flex-direction:column; gap:10px}
.tile{
  display:flex; align-items:center; gap:12px;
  padding: 12px 12px;
  border-radius: 22px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
}
.tile:active{transform: scale(0.995)}
.tile__icon{width:42px; height:42px; border-radius:16px; display:grid; place-items:center;
  background: rgba(255,255,255,.04); border:1px solid var(--line); font-size:18px}
.tile__title{font-weight:900}
.tile__sub{font-size:12px; color: var(--muted); margin-top:2px}
.tile__go{margin-left:auto; color: var(--muted); font-weight:900}

.orders{display:flex; flex-direction:column; gap:10px}
.ordercard{
  border-radius: 26px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  padding: 12px;
}
.ordercard__top{display:flex; justify-content:space-between; gap:10px; align-items:flex-start}
.ordercard__title{font-weight:900}
.ordercard__sub{font-size:12px; color: var(--muted); margin-top:3px}
.ordercard__actions{display:flex; gap:10px; margin-top:12px}
.ordercard__actions .btn{flex:1}

.pill{
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
}
.pill.good{border-color: rgba(57,217,138,.25); background: rgba(57,217,138,.10)}
.pill.ghost{background: rgba(255,255,255,.04)}

.btn.danger{
  background: rgba(255,77,77,.12);
  border-color: rgba(255,77,77,.25);
  color:#ffd0d0;
}


/* POLISH_PASS v1: Animated header + badge pulse + skeleton loader */

@keyframes headerGlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
.topbar{
  background: linear-gradient(120deg, rgba(43,184,255,.10), rgba(57,217,138,.10), rgba(43,184,255,.08));
  background-size: 200% 200%;
  animation: headerGlow 8s ease-in-out infinite;
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
}
.brand__name{letter-spacing:.2px}
.brand__dot{
  box-shadow: 0 0 0 6px rgba(57,217,138,.08), 0 0 28px rgba(57,217,138,.25);
  animation: pulseDot 2.8s ease-in-out infinite;
}
@keyframes pulseDot{
  0%,100%{ transform: scale(1); opacity:1; }
  50%{ transform: scale(1.08); opacity:.95; }
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(57,217,138,.35); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(57,217,138,0); }
}
.badge, .fabcart__badge{
  animation: badgePulse 1.8s ease-in-out infinite;
  will-change: transform;
}

/* Skeleton shimmer used in overlay (replaces spinner) */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeletonwrap{
  width: 100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 12px;
  margin-bottom: 10px;
}
.sk{
  background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.14), rgba(255,255,255,.06));
  background-size: 200% 100%;
  animation: shimmer 1.15s linear infinite;
  border: 1px solid rgba(255,255,255,.08);
}
.sk__ring{
  width: 54px; height: 54px;
  border-radius: 18px;
}
.sk__line{
  width: 220px; height: 14px;
  border-radius: 999px;
}
.sk__line--short{ width: 160px; opacity:.85; }

/* Remove legacy spinner if present */
.spinner{ display:none !important; }


/* Search suggestion rows */
.sugrow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.sugrow__text{min-width:0}
.sugrow__name{font-weight:650; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.sugrow__meta{opacity:.75; font-size:12px; margin-top:2px}
.btn--mini{padding:8px 10px; border-radius:12px; font-weight:650}


/* Account accordions (polish) */
.acc{
  border:1px solid var(--line);
  border-radius: 26px;
  background: rgba(255,255,255,.03);
  overflow:hidden;
  margin-top: 12px;
}
.acc > summary{ list-style:none; }
.acc > summary::-webkit-details-marker{ display:none; }
.acc__sum{
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px; cursor:pointer;
}
.acc__left{display:flex; align-items:center; gap:12px;}
.acc__icon{
  width:44px; height:44px; border-radius:18px;
  display:grid; place-items:center;
  background: rgba(255,255,255,.04);
  border:1px solid var(--line);
  font-size:18px;
}
.acc__title{font-weight: 950;}
.acc__sub{font-size:12px; color: var(--muted); margin-top:2px;}
.acc__chev{color: var(--muted); font-weight:900; transition: transform .18s ease;}
.acc[open] .acc__chev{ transform: rotate(180deg); }
.acc__body{ padding: 0 12px 12px; border-top: 1px solid rgba(255,255,255,.06); }

/* Order accordion */
.orderacc{
  border:1px solid rgba(255,255,255,.06);
  border-radius: 22px;
  background: rgba(17,24,35,.55);
  overflow:hidden;
}
.orderacc > summary{ list-style:none; }
.orderacc > summary::-webkit-details-marker{ display:none; }
.orderacc__sum{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:10px; padding: 12px; cursor:pointer;
}
.orderacc__title{font-weight:950;}
.orderacc__sub{font-size:12px; color: var(--muted); margin-top:3px;}
.orderacc__right{display:flex; flex-direction:column; align-items:flex-end; gap:8px;}
.orderacc__amt{font-weight:950;}
.orderacc__chev{color: var(--muted); transition: transform .18s ease; font-weight:900;}
.orderacc[open] .orderacc__chev{ transform: rotate(180deg); }
.orderacc__body{ padding: 0 12px 12px; border-top: 1px solid rgba(255,255,255,.06); }


/* Cart polish */
.cartcards{ display:flex; flex-direction:column; gap:12px; margin-top:12px; }
.cartcard{
  border:1px solid rgba(255,255,255,.07);
  border-radius: 26px;
  background: rgba(15,23,34,.55);
  padding: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}
.cartcard__top{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.cartcard__name{ font-weight: 950; line-height:1.15; }
.iconbtn{
  width:42px; height:42px;
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  color: inherit;
  display:grid; place-items:center;
  cursor:pointer;
}
.iconbtn:active{ transform: translateY(1px); }

.cartcard__row{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; margin-top:10px;
}
.cartcard__meta{ min-width: 86px; }
.cartcard__total{ text-align:right; min-width: 92px; }

.cartcard__qty{
  display:flex; align-items:center; gap:8px;
  padding: 8px 10px;
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
}
.qtybtn{
  width:38px; height:38px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: inherit;
  font-size:18px;
  font-weight:900;
  cursor:pointer;
}
.qtyinput{
  width:56px;
  text-align:center;
  background: transparent;
  border: none;
  color: inherit;
  font-weight: 900;
  outline: none;
  font-size: 16px;
}
.qtyinput::-webkit-outer-spin-button,
.qtyinput::-webkit-inner-spin-button{ -webkit-appearance: none; margin: 0; }

.cartsummary{
  margin-top: 10px;
  padding: 12px;
  border-radius: 22px;
  border:1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
}

.cartactions{
  margin-top: 12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.cartactions__row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.cartactions__row2{ display:block; }


/* Cart alignment hotfix (mobile fit) */
.cartcard{ overflow:hidden; }
.cartcard__row{
  display:grid !important;
  grid-template-columns: 92px 1fr 84px;
  align-items:center;
  gap:10px;
}
.cartcard__meta{ min-width:0 !important; }
.cartcard__total{ min-width:0 !important; }
.cartcard__total .mono{ white-space:nowrap; }
.cartcard__qty{
  justify-content:center;
  width:100%;
  min-width:0;
}
.qtyinput{ width:46px; }
@media (max-width: 380px){
  .cartcard__row{
    grid-template-columns: 1fr;
    gap:10px;
  }
  .cartcard__meta, .cartcard__total{ display:flex; align-items:center; justify-content:space-between; }
  .cartcard__total{ text-align:left; }
}
.cartactions__row{ grid-template-columns: 1fr 1fr; }
.btn.full{ width:100%; }
