/* =========================================================
   KEDO — STYLE.CSS (TEMU LIGHT VERSION) + COMPLEMENTS (PROD)
   Corrigé mobile + z-index + drawers + panier flottant
   ========================================================= */

/* ================= RESET ================= */

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:#f5f5f5;
  color:#222;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

img{ max-width:100%; display:block; }
button,input,select,textarea{ font:inherit; }
a{ text-decoration:none; color:inherit; }
.hidden{ display:none !important; }

/* ================= THEME ================= */

:root{
  --bg:#f5f5f5;
  --panel:#ffffff;
  --card:#ffffff;
  --text:#222;
  --muted:#666;
  --line:rgba(0,0,0,0.08);
  --ok:#22c55e;
  --bad:#ef4444;
  --warn:#f59e0b;
  --btn:#ff6a00;
  --shadow:0 6px 20px rgba(0,0,0,0.08);
  --radius:18px;
}

/* ================= LAYOUT ================= */

.wrap{
  max-width:1200px;
  margin:0 auto;
  padding:0 14px;
}

/* ================= TOPBAR ================= */

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:#fff;
  border-bottom:1px solid var(--line);
}

.topbar-in{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
}

.brand-logo{
  width:42px;
  height:42px;
  border-radius:12px;
  background:#fff;
  border:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:center;
}

.brand-logo img{
  width:100%;
  height:100%;
  object-fit:contain;
  border-radius:12px;
}

.brand-title b{ font-weight:900; }

.brand-title span{
  font-size:12px;
  color:var(--muted);
}

/* ================= SEARCH ================= */

.searchbox{
  display:flex;
  align-items:center;
  gap:10px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:999px;
  padding:10px 12px;
  width:100%;
  max-width:720px;
}

.searchbox input{
  border:0;
  outline:0;
  background:transparent;
  width:100%;
}

.searchbar{
  flex:1;
  display:flex;
  justify-content:center;
}

.searchbox .ico{ opacity:.75; }

.searchbox button{
  border:0;
  background:transparent;
  cursor:pointer;
  font-size:16px;
  line-height:1;
  width:38px;
  height:38px;
  border-radius:12px;
}

.searchbox button:hover{
  background:rgba(0,0,0,0.04);
}

.searchbox button:active{
  transform:scale(.98);
}

/* ================= TOP ACTIONS ================= */

.top-actions{
  display:flex;
  align-items:center;
  gap:8px;
}

.cartBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:14px;
  width:44px;
  height:44px;
  cursor:pointer;
  box-shadow:0 2px 10px rgba(0,0,0,0.05);
}

.cartBtn:active{ transform:scale(.98); }

.cartCount{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 6px;
  border-radius:999px;
  background:var(--btn);
  color:#fff;
  font-size:11px;
  font-weight:900;
  line-height:1;
}

/* ================= STATUS ================= */

.ok{ color:var(--ok); }
.bad{ color:var(--bad); }
.warn{ color:var(--warn); }
.status{ font-size:13px; }

/* ================= GRID ================= */

.grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
  padding-bottom:120px;
}

@media (min-width:860px){
  .grid{ grid-template-columns:repeat(4,1fr); }
}

/* ================= CARD ================= */

.card{
  background:#fff;
  border-radius:18px;
  border:1px solid var(--line);
  box-shadow:0 4px 14px rgba(0,0,0,0.06);
  overflow:hidden;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease;
  will-change:transform;
  position:relative;
}

.card:hover{
  transform:translateY(-3px);
  box-shadow:0 10px 30px rgba(0,0,0,0.12);
}

.card:active{
  transform:scale(.98);
}

/* ================= PRODUCT ================= */

.pimg{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  background:#eee;
}

.pbody{ padding:12px; }

.ptitle{ font-weight:700; }

.pmeta{
  font-size:12px;
  color:var(--muted);
  margin-top:4px;
}

.pprice{
  font-weight:900;
  margin-top:6px;
  color:var(--btn);
  font-size:15px;
}

/* ================= BUTTONS ================= */

.btn{
  background:var(--btn);
  color:#fff;
  border:0;
  padding:12px;
  border-radius:14px;
  font-weight:700;
  cursor:pointer;
}

.btn.outline{
  background:#fff;
  border:1px solid var(--line);
  color:#222;
}

.btn:active{ transform:scale(.98); }

/* ================= CHIPS / CATEGORIES ================= */

.chips{
  display:flex;
  gap:10px;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  scroll-snap-type:x mandatory;
  padding:12px 0;
  scrollbar-width:none;
}

.chips::-webkit-scrollbar{ display:none; }

.chip,
.catpill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  font-size:13px;
  font-weight:700;
  color:#222;
  cursor:pointer;
  -webkit-user-select:none;
  user-select: none;
  white-space:nowrap;
  flex:0 0 auto;
  scroll-snap-align:start;
}

.chip.is-active,
.chip.active,
.catpill.is-active,
.catpill.active{
  border-color:rgba(255,106,0,0.35);
  color:var(--btn);
}

.cattabs{ display:flex; }

/* ================= DRAWERS ================= */

.backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.4);
  opacity:0;
  pointer-events:none;
  transition:0.2s;
  z-index:1190;
}

.backdrop.show{
  opacity:1;
  pointer-events:auto;
}

.drawer,
.pdrawer,
.sdrawer,
.ydrawer,
.cdrawer{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  transform:translateY(110%);
  transition:transform 0.25s ease;
  z-index:1200;
  pointer-events:none;
  will-change:transform;
}

.drawer.open,
.drawer.is-open,
.pdrawer.open,
.pdrawer.is-open,
.sdrawer.open,
.sdrawer.is-open,
.ydrawer.open,
.ydrawer.is-open,
.cdrawer.open,
.cdrawer.is-open{
  transform:translateY(0);
  pointer-events:auto;
}

.drawerPanel{
  background:#fff;
  border-radius:22px 22px 0 0;
  box-shadow:var(--shadow);
  padding:16px;
  max-height:calc(100vh - 16px);
  display:flex;
  flex-direction:column;
}

.drawerHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}

.drawerHead h3{
  margin:0;
  font-size:16px;
  font-weight:900;
}

.drawerClose{
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.drawerClose:hover{ background:rgba(0,0,0,0.04); }
.drawerClose:active{ transform:scale(.98); }

.drawerBody{
  padding-bottom:110px;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}

.cdrawer .drawerBody{
  padding-bottom:140px;
}

/* ================= CART ================= */

.cartRow{
  display:flex;
  gap:10px;
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  margin-bottom:10px;
  background:#fff;
}

.cartRow img{
  width:72px;
  height:72px;
  border-radius:12px;
  object-fit:cover;
}

.cartInfo{
  flex:1;
  min-width:0;
}

.cartName{
  font-weight:800;
  line-height:1.2;
}

.cartSub{
  font-size:12px;
  color:var(--muted);
  margin-top:4px;
}

.qtyRow{
  display:flex;
  align-items:center;
  gap:10px;
}

.qtyBtn{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:900;
  cursor:pointer;
}

.qtyVal{
  min-width:26px;
  text-align:center;
  font-weight:900;
}

.cartFooter{
  margin-top:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.totalBox{
  margin-top:12px;
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  padding-bottom:20px;
  background:#fff;
}

.totalLine{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-weight:900;
}

.checkoutBtn{
  width:100%;
  margin-top:10px;
}

/* ================= PRODUCT DRAWER ================= */

.pdetail{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.pgallery{
  display:flex;
  gap:10px;
  overflow:auto;
  scrollbar-width:none;
}

.pgallery::-webkit-scrollbar{ display:none; }

.pgallery img{
  width:100%;
  max-width:320px;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:16px;
  border:1px solid var(--line);
  background:#eee;
}

.pdesc{
  font-size:13px;
  color:var(--muted);
  line-height:1.35;
}

.pchips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.row{
  display:flex;
  gap:10px;
}

.row .btn{ flex:1; }

/* ================= FORMS ================= */

.field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:10px;
}

label{
  font-weight:700;
  font-size:13px;
}

input,select,textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  outline:none;
  background:#fff;
}

input:focus,select:focus,textarea:focus{
  border-color:rgba(255,106,0,0.35);
  box-shadow:0 0 0 3px rgba(255,106,0,0.12);
}

.checkoutTotal{
  margin-top:10px;
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background:#fff;
}

.checkoutTotal b{ font-size:16px; }

.checkoutNote{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
}

/* ================= YOU PANEL ================= */

.youHeader{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
}

.youAvatar{
  width:46px;
  height:46px;
  border-radius:16px;
  background:linear-gradient(135deg, rgba(255,106,0,.25), rgba(0,0,0,.06));
  border:1px solid var(--line);
}

.youName{ font-weight:900; }

.ytabs{
  display:flex;
  gap:10px;
  margin-top:12px;
}

.ytab{
  flex:1;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:800;
  cursor:pointer;
}

.ytab.active{
  border-color:rgba(255,106,0,0.35);
  color:var(--btn);
}

.youList{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.youItem{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  cursor:pointer;
}

.youLeft{
  display:flex;
  align-items:center;
  gap:10px;
}

.youIcon{
  width:34px;
  height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:#fff7ed;
  border:1px solid rgba(255,106,0,0.25);
}

.youLabel{ font-weight:900; }
.youRight{ color:var(--muted); font-size:18px; }

/* ================= MODAL PAY ================= */

#payModal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  opacity:0;
  pointer-events:none;
  z-index:1300;
}

#payModal.open,
#payModal.is-open{
  opacity:1;
  pointer-events:auto;
}

.payModal{
  z-index:1300;
}

.payPanel{
  width:min(680px, 100%);
  background:#fff;
  border-radius:22px 22px 0 0;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  padding:16px;
  transform:translateY(16px);
  transition:transform .2s ease;
}

#payModal.open .payPanel,
#payModal.is-open .payPanel{
  transform:translateY(0);
}

#paypalBox{
  margin-top:10px;
}

.payChoice{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

@media (min-width:860px){
  .payChoice{
    grid-template-columns:1fr 1fr;
  }
}

.payCard{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background:#fff;
}

.payCard h4{
  margin:0;
  font-size:14px;
  font-weight:900;
}

.payCard .muted{ margin-top:6px; }
.payCard .btn{ width:100%; margin-top:10px; }

/* ================= HR / MUTED ================= */

.hr{
  height:1px;
  background:var(--line);
  margin:10px 0;
}

.muted{ color:var(--muted); }

/* ================= BOTTOM NAV ================= */

.bottomnav{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  background:#fff;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:space-around;
  padding:8px 0;
  z-index:1000;
  pointer-events:auto;
}

.bn-item{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  font-size:12px;
  cursor:pointer;
  -webkit-user-select: none;
  user-select: none;
  pointer-events:auto;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  background:transparent;
  border:0;
}

.bn-item.active,
.bn-item.is-active{
  color:var(--btn);
}

.bn-ico{
  font-size:18px;
  line-height:1;
}

.bn-lab{
  margin-top:4px;
  font-weight:700;
  font-size:11px;
}

#cartBadge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 6px;
  border-radius:999px;
  background:var(--btn);
  color:#fff;
  font-size:11px;
  font-weight:900;
  line-height:1;
  margin-left:6px;
}

/* ================= EMPTY ================= */

.emptyBox{
  padding:20px;
  text-align:center;
  color:var(--muted);
  border:1px dashed var(--line);
  border-radius:18px;
  background:#fff;
}

/* ================= SMALL FIX ================= */

button{
  -webkit-tap-highlight-color:transparent;
}

/* ================= INFOBAR ================= */

.infobar{
  margin:12px 0 8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:18px;
  box-shadow:0 2px 10px rgba(0,0,0,0.05);
}

.infobar .col{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
}

.okbox{
  width:26px;
  height:26px;
  border-radius:10px;
  background:rgba(34,197,94,0.14);
  color:var(--ok);
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(34,197,94,0.25);
  font-weight:900;
}

.divider{
  width:1px;
  align-self:stretch;
  background:var(--line);
}

/* ================= TEMU CARD ENHANCEMENT ================= */

.card:hover{
  transform:translateY(-4px);
}

@media (max-width:640px){
  .grid{
    gap:10px;
  }

  .card{
    border-radius:16px;
  }

  .pbody{
    padding:10px;
  }
}

/* ================= MOBILE IMPROVEMENT ================= */

@media (max-width:640px){
  .topbar-in{
    gap:8px;
  }

  .brand-title span{
    display:none;
  }

  .searchbox{
    padding:8px 10px;
  }

  .btn{
    padding:10px;
  }
}

/* ================= FLASH DEALS ================= */

.flash-deals{
  margin:14px 0 8px;
}

.flash-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.flash-header h2{
  margin:0;
  font-size:18px;
  font-weight:900;
}

#flashTimer{
  font-weight:900;
  font-size:13px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line, rgba(0,0,0,.08));
  background:rgba(255,255,255,.7);
  color:#111;
}

.flash-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:10px;
}

.flash-scroll{
  display:flex;
  gap:12px;
  overflow-x:auto;
  padding:6px 2px 12px;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
}

.flash-scroll::-webkit-scrollbar{ height:0; }

.flash-card{
  background:#fff;
  border-radius:10px;
  padding:10px;
  position:relative;
}

.flash-card img{
  width:100%;
  border-radius:8px;
}

.flash-badge{
  position:absolute;
  top:8px;
  left:8px;
  background:#ff4d4f;
  color:#fff;
  padding:4px 8px;
  font-size:11px;
  border-radius:4px;
}

/* ================= FLOAT CART ================= */

#floatCart{
  z-index:1100 !important;
  pointer-events:auto !important;
  touch-action:none !important;
  user-select:none;
  -webkit-user-select:none;
  cursor:grab;
}

#floatCart:active{
  cursor:grabbing;
}

/* ================= FIX CLIC MOBILE ================= */

#backdrop{
  pointer-events:none;
}

#backdrop.show{
  pointer-events:auto;
}

.topbar{
  z-index:50;
}

main,
.wrap{
  position:relative;
  z-index:1;
}
.chipsScroll {
  scroll-behavior: smooth;
}

.chipsScroll::-webkit-scrollbar {
  display: none;
}

.cattabs {
  scroll-snap-type: x mandatory;
}

.catpill {
  scroll-snap-align: start;
}
.chipsScroll {
  scroll-behavior: smooth;
}

.chipsScroll::-webkit-scrollbar {
  display: none;
}

.cattabs {
  scroll-snap-type: x mandatory;
}

.catpill {
  scroll-snap-align: start;
}

/* =========================================================
   CATEGORIES — SCROLL INDEPENDANT STYLE TEMU
   ========================================================= */

#categoryTemuBox{
  display:grid;
  grid-template-columns:110px 1fr;
  gap:0;
  height:calc(100vh - 140px);
  overflow:hidden;
  background:#f5f5f5;
}

#categoryTemuBox .category-left{
  overflow-y:auto;
  overflow-x:hidden;
  background:#f3f3f3;
  border-right:1px solid rgba(0,0,0,.06);
  padding:10px 8px 90px;
  -webkit-overflow-scrolling:touch;
}

#categoryTemuBox .category-right{
  overflow-y:auto;
  overflow-x:hidden;
  background:#fff;
  padding:14px 12px 100px;
  -webkit-overflow-scrolling:touch;
}

#categoryTemuBox .category-right-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px 14px;
}

#categoryTemuBox .category-left::-webkit-scrollbar,
#categoryTemuBox .category-right::-webkit-scrollbar{
  width:6px;
}

#categoryTemuBox .category-left::-webkit-scrollbar-thumb,
#categoryTemuBox .category-right::-webkit-scrollbar-thumb{
  background:rgba(0,0,0,.14);
  border-radius:999px;
}

/* =========================================================
   CATEGORIES LEFT PANEL — STYLE TEMU
   ========================================================= */

#categoryTemuBox .category-left{
  background:#f3f3f3;
  border-right:1px solid rgba(0,0,0,.06);
  padding:10px 8px 90px;
}

#categoryTemuBox .catpill{
  width:100%;
  min-height:56px;
  border:0;
  border-radius:16px;
  background:transparent;
  color:#222;
  font-weight:800;
  font-size:15px;
  text-align:left;
  padding:14px 12px;
  cursor:pointer;
  transition:background .18s ease, color .18s ease, transform .18s ease;
}

#categoryTemuBox .catpill:hover{
  background:rgba(255,255,255,.55);
}

#categoryTemuBox .catpill.active,
#categoryTemuBox .catpill.is-active{
  background:#fff;
  color:#ff6a00;
  box-shadow:0 4px 14px rgba(0,0,0,.05);
}

#categoryTemuBox .catpill:active{
  transform:scale(.98);
}

/* =========================================================
   CATEGORIES LEFT PANEL — BARRE ORANGE ACTIVE STYLE TEMU
   ========================================================= */

#categoryTemuBox .catpill{
  position:relative;
  overflow:hidden;
}

#categoryTemuBox .catpill.active::before,
#categoryTemuBox .catpill.is-active::before{
  content:"";
  position:absolute;
  left: 6px;;
  top:10px;
  bottom:10px;
  width: 5px;
  border-radius:999px;
  background:#ff6a00;
}

.top-actions{
  display:none !important;
}

/* =========================
   PAY PANEL (TEMU STYLE)
   ========================= */

.payPanel{
  border-radius:24px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 24px 60px rgba(0,0,0,.18);
  animation:paySlideUp .28s ease;
}

@keyframes paySlideUp{
  from{
    transform:translateY(40px);
    opacity:0;
  }
  to{
    transform:translateY(0);
    opacity:1;
  }
}

/* boutons paiement */

#payMethodsBox button{
  transition:transform .18s ease, box-shadow .18s ease, border .18s ease;
}

#payMethodsBox button:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 28px rgba(0,0,0,.08);
}

#payMethodsBox button:active{
  transform:scale(.98);
}

/* effet sélection */

#payMethodsBox button.active{
  border:2px solid #111;
  box-shadow:0 10px 24px rgba(0,0,0,.10);
}

/* Klarna style */
#klarnaFakeRow{
  transition:transform .18s ease, box-shadow .18s ease;
}

#klarnaFakeRow:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 28px rgba(0,0,0,.08);
}

#payMethodsBox button.active,
#klarnaFakeRow.active{
  border:2px solid #111 !important;
  box-shadow:0 10px 24px rgba(0,0,0,.10);
}

#payMethodsBox button.active .payRadio,
#klarnaFakeRow.active .payRadio{
  border-color:#111 !important;
}

#payMethodsBox button.active .payRadioDot,
#klarnaFakeRow.active .payRadioDot{
  background:#111 !important;
}

/* =========================
   PAY METHODS — TEMU PRO
   ========================= */

#payMethodsBox button,
#klarnaFakeRow{
  position:relative;
  transition:
    transform .16s ease,
    box-shadow .16s ease,
    border .16s ease,
    background .16s ease;
}

#payMethodsBox button:hover,
#klarnaFakeRow:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 28px rgba(0,0,0,.08);
}

#payMethodsBox button:active,
#klarnaFakeRow:active{
  transform:scale(.985);
}

#payMethodsBox button.active,
#klarnaFakeRow.active{
  border:2px solid #111 !important;
  background:#fff !important;
  box-shadow:0 12px 26px rgba(0,0,0,.10);
}

#payMethodsBox button.active .payRadio,
#klarnaFakeRow.active .payRadio{
  border-color:#111 !important;
}

#payMethodsBox button.active .payRadioDot,
#klarnaFakeRow.active .payRadioDot{
  background:#111 !important;
}

#payMethodsBox button.active .payCheck,
#klarnaFakeRow.active .payCheck{
  display:inline-flex !important;
}

#payMethodsBox button.active::after,
#klarnaFakeRow.active::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:18px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.45);
  pointer-events:none;
}

/* =========================
   BOTTOM NAV — FINAL FIX
   ========================= */

.bottomnav{
  position:fixed !important;
  left:0 !important;
  right:0 !important;
  bottom:0 !important;
  width:100% !important;
  min-height:72px !important;
  display:flex !important;
  align-items:stretch !important;
  justify-content:space-around !important;
  background:#fff !important;
  border-top:1px solid rgba(0,0,0,.08) !important;
  z-index:99999 !important;
  box-shadow:0 -8px 24px rgba(0,0,0,.08) !important;
  padding-bottom:env(safe-area-inset-bottom, 0px) !important;
}

.bottomnav .bn-item{
  flex:1 !important;
  min-width:0 !important;
  height:72px !important;
  border:0 !important;
  background:transparent !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:4px !important;
  padding:8px 4px 10px !important;
  cursor:pointer !important;
  color:#222 !important;
}

.bottomnav .bn-ico{
  font-size:20px !important;
  line-height:1 !important;
}

.bottomnav .bn-lab{
  margin-top:4px !important;
  font-size:12px !important;
  font-weight:700 !important;
  line-height:1.1 !important;
  color:#222 !important;
}

.bottomnav .bn-item.active,
.bottomnav .bn-item.is-active{
  color:#ff6a00 !important;
}

.bottomnav .bn-item.active .bn-lab,
.bottomnav .bn-item.is-active .bn-lab{
  color:#ff6a00 !important;
}

.bottomnav .bn-item.active .bn-ico,
.bottomnav .bn-item.is-active .bn-ico{
  transform:translateY(-1px) !important;
}

body{
  padding-bottom:90px !important;
}

/* évite que la zone catégories couvre la nav */
#categoryTemuBox{
  height:calc(100vh - 140px);
  max-height:calc(100vh - 150px);
}

/* =========================
   CART — TEMU STYLE
   ========================= */

.cartRow{
  transition:transform .16s ease, box-shadow .16s ease;
}

.cartRow:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(0,0,0,.06);
}

.totalBox{
  transition:box-shadow .18s ease, transform .18s ease;
}

.totalBox:hover{
  box-shadow:0 12px 26px rgba(0,0,0,.06);
}

/* =========================
   CART — TEMU PRO FINAL
   ========================= */

.cartRow{
  position:relative;
  display:flex;
  gap:12px;
  align-items:flex-start;
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  background:#fff;
  padding:12px;
  margin-bottom:12px;
  box-shadow:0 8px 20px rgba(0,0,0,.04);
  transition:transform .16s ease, box-shadow .16s ease;
}

.cartRow:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 24px rgba(0,0,0,.06);
}

.cartRow img{
  width:84px;
  height:84px;
  border-radius:14px;
  object-fit:cover;
  flex:0 0 auto;
  background:#f3f4f6;
}

.cartInfo{
  flex:1;
  min-width:0;
}

.cartName{
  font-weight:900;
  font-size:14px;
  line-height:1.25;
}

.cartSub{
  font-size:12px;
  color:#666;
  margin-top:4px;
}

.qtyRow{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:10px;
}

.qtyBtn{
  width:34px;
  height:34px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
  font-weight:900;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease;
}

.qtyBtn:hover{
  box-shadow:0 8px 18px rgba(0,0,0,.06);
}

.qtyBtn:active{
  transform:scale(.96);
}

.qtyVal{
  min-width:28px;
  text-align:center;
  font-weight:900;
  font-size:15px;
}

.cartDeleteBtn{
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:18px;
  transition:transform .15s ease, box-shadow .15s ease;
}

.cartDeleteBtn:hover{
  box-shadow:0 8px 18px rgba(0,0,0,.06);
}

.cartDeleteBtn:active{
  transform:scale(.96);
}

.cartCheck{
  width:22px;
  height:22px;
  border-radius:999px;
  border:2px solid #cfcfcf;
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  cursor:pointer;
}

.cartCheck.is-active{
  border-color:#111;
}

.cartCheckDot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:transparent;
  display:block;
}

.cartCheck.is-active .cartCheckDot{
  background:#111;
}

.cartSummaryTop button:hover{
  box-shadow:0 8px 18px rgba(0,0,0,.06);
}

.cartSummaryTop button:active{
  transform:scale(.98);
}

/* 🔔 bouton notif toujours cliquable */
#notifGlobalBtn {
  position: relative;
  z-index: 999999 !important;
  pointer-events: auto;
}

/* ✅ garder fonctionnement normal des drawers */
.drawer.open,
#backdrop.open {
  pointer-events: auto;
}

#youPage {
  padding: 12px;
}

.youHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.youUser {
  display: flex;
  gap: 10px;
  align-items: center;
}

.youAvatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #eee;
}

.youName {
  font-weight: 900;
}

.youIcons span {
  font-size: 20px;
  margin-left: 10px;
}

.youStats {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
}

.youStats .big {
  font-weight: 900;
  font-size: 18px;
}

.youMenu {
  margin-top: 14px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.08);
}

.youItem {
  padding: 14px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  font-weight: 800;
}

.youShortcuts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
}

.youBanner {
  margin-top: 14px;
  padding: 10px;
  background: #eaffea;
  color: green;
  border-radius: 12px;
  font-weight: 800;
}

#youProducts {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@keyframes kedoPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.01);
    opacity: .92;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.kedoTrackTextLine {
  position: absolute;
  left: 0;
  right: 0;
  height: 18px;
  overflow: hidden;
  white-space: nowrap;
  opacity: .75;
  font-size: 12px;
  font-weight: 900;
  color: rgba(255,255,255,.9);
}

.kedoTrackTextLine span {
  display: inline-block;
  padding-left: 100%;
  animation: kedoTextMove 9s linear infinite;
}

.kedoTrackTextLine2 span {
  animation-duration: 11s;
  animation-direction: reverse;
}

@keyframes kedoTextMove {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

@keyframes deliveredPop {
  0% {
    transform: scale(.92);
    opacity: .6;
  }

  60% {
    transform: scale(1.06);
    opacity: 1;
  }

  100% {
    transform: scale(1);
  }
}

@keyframes kedoShine {
  0% {
    transform: translateX(-120%);
    opacity: 0;
  }

  20% {
    opacity: .45;
  }

  100% {
    transform: translateX(220%);
    opacity: 0;
  }
}

.kedoTrackingTemu {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 -14px !important;
  background: #fff;
  overflow: hidden;
}

@media (min-width: 768px) {
  .kedoTrackingTemu {
    border: 1px solid rgba(0,0,0,.08) !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 22px rgba(0,0,0,.04) !important;
    margin: 0 !important;
  }
}

@media (max-width: 767px) {
  .orderCard {
    border-radius: 0 !important;
    box-shadow: none !important;
    border-left: 0 !important;
    border-right: 0 !important;
  }

  .orderCard #orderActionBox,
  .orderCard [id^="orderActionBox_"] {
    margin-left: -14px !important;
    margin-right: -14px !important;
  }
}

#topCategoryBar,
.shipCategoryBar{
  display:flex !important;
  gap:28px;
  overflow-x:auto;
  white-space:nowrap;
  background:#fff;
  padding:8px 28px 6px;
  scrollbar-width:none;
}

#topCategoryBar::-webkit-scrollbar,
.shipCategoryBar::-webkit-scrollbar{
  display:none;
}

.topCatBtn,
.shipCatBtn{
  border:0 !important;
  background:transparent !important;
  color:#777;
  font-size:17px;
  font-weight:800;
  padding:8px 0;
  border-bottom:4px solid transparent !important;
  flex:none;
}

.topCatBtn.active,
.shipCatBtn.active{
  color:#111;
  font-weight:900;
  border-bottom-color:#111 !important;
}

@media (max-width:767px){
  #topCategoryBar,
  .shipCategoryBar{
    gap:22px;
    padding:8px 14px 6px;
  }

  .topCatBtn,
  .shipCatBtn{
    font-size:17px;
  }
}

/* ✅ FIX ESPACES FLASH DEALS / RECOMMANDÉ */

#flashDeals{
  margin-top:8px !important;
  margin-bottom:0 !important;
  padding-bottom:0 !important;
}

#recommendedSection{
  margin-top:0 !important;
  padding-top:0 !important;
}

#recommendedSection h2{
  margin:4px 0 8px 0 !important;
}

#recommendedGrid{
  margin-top:0 !important;
  padding-top:0 !important;
}

#productsGrid{
  margin-top:8px !important;
  padding-top:0 !important;
}

/* ✅ Desktop : décale un peu les catégories */
@media (min-width:768px){
  #topCategoryBar{
    padding-left:24px !important;
  }
}

/* ✅ Catégories centrées sur ordinateur */
@media (min-width:768px){
  #topCategoryBar{
    justify-content:center !important;
    padding-left:0 !important;
    padding-right:0 !important;
  }
}

/* ✅ Réduit le grand espace entre Recommandé et produits */
#recommendedSection{
  margin-top:0 !important;
  margin-bottom:0 !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
}

#recommendedSection h2{
  margin:4px 0 8px 0 !important;
}

#recommendedGrid{
  margin-top:0 !important;
  padding-top:0 !important;
  min-height:0 !important;
  gap:10px !important;
}

#flashProducts{
  margin-top:0 !important;
  padding-top:0 !important;
}

/* ✅ COLLE LES PRODUITS À RECOMMANDÉ */

#recommendedSection{
  margin-bottom:0 !important;
  padding-bottom:0 !important;
}

#recommendedSection h2{
  margin-bottom:4px !important;
}

#recommendedGrid{
  margin-top:-24px !important;
  padding-top:0 !important;
}

#productsGrid{
  margin-top:0 !important;
}

/* ✅ SUPPRIME LE VIDE SOUS "RECOMMANDÉ POUR VOUS" */

#recommendedSection{
  margin-bottom:0 !important;
  padding-bottom:0 !important;
}

#recommendedSection h2{
  margin:0 0 6px 0 !important;
}

#recommendedGrid{
  margin-top:-78px !important;
  padding-top:0 !important;
}

#productsGrid{
  margin-top:0 !important;
}

#galleryPrev,
#galleryNext{
  display:none !important;
}

/* ======================================================
   TEMU CATEGORY PAGE
====================================================== */

#categoryTemuBox{
  display:flex;
  background:#f6f6f6;
  min-height:calc(100vh - 120px);
}

/* LEFT SIDE */
.temuCatsLeft{
  width:165px;
  background:#ececec;
  overflow-y:auto;
  padding-bottom:100px;
  border-right:1px solid rgba(0,0,0,.06);
}

.temuCatsLeft .catpill{
  width:100%;
  border:none;
  background:transparent;
  text-align:left;
  padding:18px 16px;
  font-size:17px;
  font-weight:500;
  color:#222;
  border-radius:0;
  cursor:pointer;
  line-height:1.3;
}

.temuCatsLeft .catpill.active{
  background:#fff;
  font-weight:900;
  position:relative;
  color:#111;
}

.temuCatsLeft .catpill.active::before{
  content:"";
  position:absolute;
  left:0;
  top:16px;
  bottom:16px;
  width:5px;
  border-radius:999px;
  background:#ff6a00;
}

/* RIGHT SIDE */
.category-right{
  flex:1;
  background:#fff;
  padding:14px;
  overflow-y:auto;
}

.temuCatTitle{
  font-size:34px;
  font-weight:900;
  margin-bottom:18px;
  color:#111;
}

/* GRID TEMU */
.temuFeaturedGrid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:24px 16px;
}

/* ITEM */
.temuCatItem{
  text-align:center;
  cursor:pointer;
  position:relative;
}

.temuCatImageWrap{
  position:relative;
  width:92px;
  height:92px;
  margin:0 auto 10px;
}

.temuCatImage{
  width:92px;
  height:92px;
  border-radius:999px;
  object-fit:cover;
  background:#eee;
}

.temuHot{
  position:absolute;
  top:-6px;
  right:-4px;
  background:#ff7a00;
  color:#fff;
  border-radius:999px;
  padding:4px 7px;
  font-size:11px;
  font-weight:900;
}

.temuCatName{
  font-size:16px;
  font-weight:500;
  color:#222;
  line-height:1.28;
}

/* MOBILE */
@media(max-width:768px){

  .temuCatsLeft{
    width:145px;
  }

  .temuCatTitle{
    font-size:24px;
  }

  .temuFeaturedGrid{
    grid-template-columns:repeat(3,1fr);
    gap:20px 12px;
  }

  .temuCatImage,
  .temuCatImageWrap{
    width:82px;
    height:82px;
  }

  .temuCatName{
    font-size:14px;
  }
}

/* =========================
   KEDO CATÉGORIES MOBILE TEMU
========================= */
@media (max-width: 768px){

  #categoryTemuBox{
    gap: 10px;
  }

  .temuCatsLeft{
    width: 108px !important;
    min-width: 108px !important;
    background:#f5f5f5;
  }

  .temuCatsLeft .catpill{
    font-size:13px !important;
    font-weight:700;
    line-height:1.25;
    padding:14px 10px;
    min-height:58px;
    border-radius:14px;
    white-space:normal !important;
    overflow:visible !important;
  }

  .category-right{
    padding:0 6px;
  }

  #categoryProductsTitle{
    font-size:15px !important;
    margin-bottom:10px !important;
  }

  .temuCatItem{
    width:88px !important;
  }

  .temuCatCircle{
    width:78px !important;
    height:78px !important;
  }

  .temuCatName{
    font-size:11px !important;
    line-height:1.22;
    margin-top:7px;
    font-weight:500;
  }

  .temuHot{
    font-size:10px;
    padding:3px 7px;
  }

  .category-right-grid{
    gap:16px 10px !important;
  }
}

@media (max-width:768px){

  #categoryTemuBox{
    display:grid !important;
    grid-template-columns:112px minmax(0, 1fr) !important;
    width:100vw !important;
    max-width:100vw !important;
    overflow:hidden !important;
  }

  .temuCatsLeft{
    width:112px !important;
    min-width:112px !important;
    max-width:112px !important;
    flex:0 0 112px !important;
    overflow-x:hidden !important;
  }

  .category-right{
    width:auto !important;
    min-width:0 !important;
    max-width:calc(100vw - 112px) !important;
    overflow-x:hidden !important;
    padding-left:10px !important;
    padding-right:8px !important;
  }

  .temuFeaturedGrid{
    width:100% !important;
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
    gap:18px 6px !important;
  }

  .temuCatItem{
    width:auto !important;
    min-width:0 !important;
  }

  .temuCatImageWrap,
  .temuCatImage{
    width:70px !important;
    height:70px !important;
  }

  .temuCatName{
    font-size:10.5px !important;
    line-height:1.15 !important;
    word-break:normal !important;
  }
}

.cartRow{
  background:#fff;
  border-radius:18px;
  padding:12px;
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 2px 10px rgba(0,0,0,.04);
  margin-bottom:10px;
}

.cartName{
  font-size:14px;
  font-weight:800;
  line-height:1.3;
  color:#111;
}

.force-hide{
  display:none !important;
}

#categoryTemuBox.force-hide{
  display:none !important;
}