/* ===================================================================
   eShop — Product Cards (UNIQUE CSS)
   Compat maximale (pas de :is, fallback aspect-ratio)
   Cible : #eg-root, #eg-root-recent, #eg-root-offers
   =================================================================== */

/* ------------ TOKENS / ROOT ------------ */
#eg-root,
#eg-root-recent,
#eg-root-offers{
  --eg-ink:#0b1324;
  --eg-muted:#667085;
  --eg-bg:#f6f7fb;

  --eg-glass:rgba(255,255,255,.62);
  --eg-glass-border:rgba(255,255,255,.34);

  --eg-blue:#1e6bd7;
  --eg-ok:#10b981;
  --eg-red:#ef4444;

  --eg-radius:10px;
  --eg-shadow:0 6px 16px rgba(2,6,23,.06);
  --eg-minw:200px;

  color:var(--eg-ink);
  font-family:'Poppins', Arial, sans-serif;
  font-size:12.5px;
  line-height:1.4;
}

@media (min-width:1440px){ #eg-root, #eg-root-recent, #eg-root-offers{ --eg-minw:190px } }
@media (min-width:1680px){ #eg-root, #eg-root-recent, #eg-root-offers{ --eg-minw:180px } }
@media (min-width:1920px){ #eg-root, #eg-root-recent, #eg-root-offers{ --eg-minw:170px } }

#eg-root *, #eg-root *::before, #eg-root *::after,
#eg-root-recent *, #eg-root-recent *::before, #eg-root-recent *::after,
#eg-root-offers *, #eg-root-offers *::before, #eg-root-offers *::after{
  box-sizing:border-box;
}
#eg-root a, #eg-root-recent a, #eg-root-offers a{ color:inherit; text-decoration:none }

/* ------------ CONTAINER ------------ */
#eg-root .eg-container, #eg-root-recent .eg-container, #eg-root-offers .eg-container{
  width:min(96vw,1800px);
  margin:0 auto;
  padding:6px 8px 12px;
}

/* ------------ TOOLBAR ------------ */
#eg-root .eg-toolbar, #eg-root-recent .eg-toolbar, #eg-root-offers .eg-toolbar{
  display:flex; align-items:center; justify-content:space-between;
  margin:8px 0; color:var(--eg-muted); font-size:13px;
}
#eg-root .eg-titlebar, #eg-root-recent .eg-titlebar, #eg-root-offers .eg-titlebar{
  display:flex; align-items:center; gap:8px; color:#0b1324; font-weight:800;
}
#eg-root .eg-titlebar i, #eg-root-recent .eg-titlebar i, #eg-root-offers .eg-titlebar i{ color:#111827 }

/* ------------ PAGE HEAD ------------ */
#eg-root .eg-pagehead, #eg-root-recent .eg-pagehead, #eg-root-offers .eg-pagehead{
  margin:8px 0 10px; padding:10px 12px;
  border:1px solid rgba(15,23,42,.08);
  border-radius:12px;
  background:linear-gradient(180deg,#fff,#fff9);
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  box-shadow:0 10px 24px rgba(2,6,23,.06);
}
#eg-root .eg-left, #eg-root-recent .eg-left, #eg-root-offers .eg-left{ display:flex; align-items:center; gap:10px }
#eg-root .eg-h1, #eg-root-recent .eg-h1, #eg-root-offers .eg-h1{ margin:0; font:800 18px/1.2 'Poppins',Arial; color:#0f172a }
#eg-root .eg-sub, #eg-root-recent .eg-sub, #eg-root-offers .eg-sub{
  font:700 11px/1 'Poppins',Arial; color:#334155;
  background:#fff; border:1px solid rgba(15,23,42,.08); padding:6px 8px; border-radius:8px;
}

/* ------------ HEAD XL ------------ */
#eg-root .eg-head-xl, #eg-root-recent .eg-head-xl, #eg-root-offers .eg-head-xl{
  margin:20px 0 12px; text-align:center;
}
#eg-root .eg-h1.xl, #eg-root-recent .eg-h1.xl, #eg-root-offers .eg-h1{
  margin:0; font:800 24px/1.2 'Poppins',Arial; color:#111827;
}
#eg-root .eg-head-sub, #eg-root-recent .eg-head-sub, #eg-root-offers .eg-subtext{
  margin-top:6px; color:var(--eg-muted); font:600 12.5px 'Poppins',Arial;
}

/* ------------ SECTION HEAD ------------ */
#eg-root .eg-sec, #eg-root-recent .eg-sec, #eg-root-offers .eg-sec{
  display:flex; align-items:center; justify-content:space-between; gap:10px; margin:16px 2px 10px;
}
#eg-root .eg-title, #eg-root-recent .eg-title, #eg-root-offers .eg-title{
  margin:0; font:800 16px/1.25 'Poppins',Arial; color:#0f172a; display:flex; align-items:center; gap:8px;
}
#eg-root .eg-right, #eg-root-recent .eg-right, #eg-root-offers .eg-right{ display:flex; gap:10px; align-items:center }
#eg-root .eg-link, #eg-root-recent .eg-link, #eg-root-offers .eg-link{
  display:inline-flex; gap:6px; align-items:center;
  border:1px solid rgba(15,23,42,.08); background:#fff; border-radius:999px;
  padding:6px 10px; font:700 12px 'Poppins',Arial;
}
#eg-root .eg-badge, #eg-root-recent .eg-badge, #eg-root-offers .eg-badge{
  display:inline-flex; gap:6px; align-items:center;
  border:1px dashed rgba(15,23,42,.1); background:#fff; border-radius:999px;
  padding:6px 10px; font:700 11px 'Poppins',Arial; color:#475569;
}
#eg-root .sr-only, #eg-root-recent .sr-only, #eg-root-offers .sr-only{
  position:absolute !important; clip:rect(1px,1px,1px,1px); padding:0; border:0; height:1px; width:1px; overflow:hidden;
}

#eg-root .eg-grid, #eg-root-recent .eg-grid, #eg-root-offers .eg-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fill, minmax(var(--eg-minw), 1fr)) !important;
  gap:8px !important;
  grid-auto-flow:row dense;
}
#eg-root .eg-grid > *, #eg-root-recent .eg-grid > *, #eg-root-offers .eg-grid > *{ min-width:0 }

@media (max-width:720px){
  #eg-root-offers .eg-grid{
    display:flex !important; overflow-x:auto; gap:12px !important; padding:4px 2px 8px;
    scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch;
  }
  #eg-root-offers .eg-card{ flex:0 0 68%; scroll-snap-align:start }
}

@media (max-width:480px){
  #eg-root, #eg-root-recent, #eg-root-offers{ font-size:12px; }
  #eg-root .eg-grid, #eg-root-recent .eg-grid, #eg-root-offers .eg-grid{
    grid-template-columns:repeat(2, minmax(0,1fr)) !important;
    gap:8px !important;
  }
  #eg-root .eg-grid > .eg-card:nth-last-child(1):nth-child(odd),
  #eg-root-recent .eg-grid > .eg-card:nth-last-child(1):nth-child(odd),
  #eg-root-offers .eg-grid > .eg-card:nth-last-child(1):nth-child(odd){
    grid-column:1 / -1;
  }
}

#eg-root .eg-card, #eg-root-recent .eg-card, #eg-root-offers .eg-card{
  position:relative; overflow:hidden; border-radius:var(--eg-radius);
  background:var(--eg-glass); border:1px solid var(--eg-glass-border);
  box-shadow:0 2px 10px rgba(2,6,23,.05), inset 0 1px 0 rgba(255,255,255,.35);
  transition:transform .16s ease, box-shadow .16s ease; backdrop-filter:blur(8px);
}
#eg-root .eg-card:hover, #eg-root-recent .eg-card:hover, #eg-root-offers .eg-card:hover{
  transform:translateY(-2px); box-shadow:0 10px 24px rgba(2,6,23,.12);
}
#eg-root .eg-card.is-disabled .eg-media img,
#eg-root-recent .eg-card.is-disabled .eg-media img,
#eg-root-offers .eg-card.is-disabled .eg-media img{
  filter:grayscale(.82) saturate(.55) brightness(.94);
}

#eg-root .eg-rank, #eg-root-recent .eg-rank, #eg-root-offers .eg-rank{
  position:absolute; left:8px; top:8px; z-index:5;
  display:inline-flex; align-items:center; gap:6px;
  padding:5px 7px; border-radius:999px; font:800 11px/1 'Poppins',Arial; color:#0b1220;
  background:#fff; border:1px solid rgba(15,23,42,.08);
  box-shadow:0 6px 14px rgba(2,6,23,.12);
}
#eg-root .eg-rank i, #eg-root-recent .eg-rank i, #eg-root-offers .eg-rank i{ font-size:12px; color:#f59e0b }

#eg-root .eg-media, #eg-root-recent .eg-media, #eg-root-offers .eg-media{ position:relative; background:#fff }
#eg-root .eg-imgwrap, #eg-root-recent .eg-imgwrap, #eg-root-offers .eg-imgwrap{
  width:100%; position:relative; overflow:hidden;
}
#eg-root .eg-imgwrap::before, #eg-root-recent .eg-imgwrap::before, #eg-root-offers .eg-imgwrap::before{
  content:""; display:block; padding-top:100%;
}
@supports (aspect-ratio:1 / 1){
  #eg-root .eg-imgwrap, #eg-root-recent .eg-imgwrap, #eg-root-offers .eg-imgwrap{ aspect-ratio:1/1; }
  #eg-root .eg-imgwrap::before, #eg-root-recent .eg-imgwrap::before, #eg-root-offers .eg-imgwrap::before{ display:none; padding-top:0; }
}
#eg-root .eg-imgwrap img, #eg-root-recent .eg-imgwrap img, #eg-root-offers .eg-imgwrap img{
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; object-position:center; display:block; transition:transform .2s; image-rendering:auto;
}
#eg-root .eg-card:hover .eg-imgwrap img, #eg-root-recent .eg-card:hover .eg-imgwrap img, #eg-root-offers .eg-card:hover .eg-imgwrap img{
  transform:scale(1.012);
}

#eg-root .eg-ph, #eg-root-recent .eg-ph, #eg-root-offers .eg-ph{
  position:absolute; left:8px; top:8px; z-index:3; display:none;
  background:rgba(17,24,39,.78); color:#fff; border:1px solid rgba(255,255,255,.25);
  padding:3px 6px; border-radius:8px; font:800 9.5px/1 'Poppins',Arial;
}
#eg-root .eg-card.is-disabled .eg-ph, #eg-root-recent .eg-card.is-disabled .eg-ph, #eg-root-offers .eg-card.is-disabled .eg-ph{ display:inline-block }

#eg-root .eg-overlay, #eg-root-recent .eg-overlay, #eg-root-offers .eg-overlay{
  position:absolute; right:8px; top:8px; z-index:4;
  display:flex; gap:5px; opacity:0; transform:translateY(-4px);
  transition:.14s; pointer-events:none;
}
#eg-root .eg-card:hover .eg-overlay, #eg-root-recent .eg-card:hover .eg-overlay, #eg-root-offers .eg-card:hover .eg-overlay{
  opacity:1; transform:none; pointer-events:auto;
}
#eg-root .eg-icon, #eg-root-recent .eg-icon, #eg-root-offers .eg-icon{
  width:24px; height:24px; border-radius:7px;
  border:1px solid var(--eg-glass-border);
  background:#ffffffc8; backdrop-filter:blur(6px);
  display:grid; place-items:center; cursor:pointer; font-size:10px; color:#0f172a;
  box-shadow:0 3px 8px rgba(2,6,23,.08), inset 0 1px 0 rgba(255,255,255,.35);
}

#eg-root .eg-rail, #eg-root-recent .eg-rail, #eg-root-offers .eg-rail{
  position:absolute; right:6px; bottom:6px; z-index:4;
  display:flex; flex-direction:column; gap:3px;
  opacity:0; transform:translateY(6px); transition:.14s; pointer-events:none;
}
#eg-root .eg-card:hover .eg-rail, #eg-root-recent .eg-card:hover .eg-rail, #eg-root-offers .eg-card:hover .eg-rail{
  opacity:1; transform:none; pointer-events:auto;
}
#eg-root .eg-chip, #eg-root-recent .eg-chip, #eg-root-offers .eg-chip{
  width:13px; height:13px; border-radius:50%; background:#fff; border:1px solid rgba(0,0,0,.08);
  display:grid; place-items:center; box-shadow:0 3px 8px rgba(2,6,23,.12);
}
#eg-root .eg-chip .eg-dot, #eg-root-recent .eg-chip .eg-dot, #eg-root-offers .eg-chip .eg-dot{
  width:7.5px; height:7.5px; border-radius:50%; border:1px solid rgba(0,0,0,.15);
}
#eg-root .eg-count, #eg-root-recent .eg-count, #eg-root-offers .eg-count{
  width:13px; height:13px; border-radius:50%; background:#111827; color:#fff;
  font:800 7px/13px 'Poppins',Arial; text-align:center; border:1px solid rgba(255,255,255,.25);
}

#eg-root .eg-header, #eg-root-recent .eg-header, #eg-root-offers .eg-header{
  display:flex; align-items:center; justify-content:space-between; gap:5px;
  padding:8px 8px 4px;
}
#eg-root .eg-title, #eg-root-recent .eg-title, #eg-root-offers .eg-title,
#eg-root .eg-titlecard, #eg-root-recent .eg-titlecard, #eg-root-offers .eg-titlecard{
  margin:0; color:#111827; font:800 12px/1.2 'Poppins',Arial;
  max-width:72%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
#eg-root .eg-meta, #eg-root-recent .eg-meta, #eg-root-offers .eg-meta{ display:flex; align-items:center; gap:5px; white-space:nowrap }
#eg-root .eg-stars, #eg-root-recent .eg-stars, #eg-root-offers .eg-stars{ display:flex; align-items:center; gap:2px; color:#f5b300; font-size:0 }
#eg-root .eg-stars i, #eg-root-recent .eg-stars i, #eg-root-offers .eg-stars i{ font-size:9px; line-height:1 }
#eg-root .eg-rval, #eg-root-recent .eg-rval, #eg-root-offers .eg-rval{ color:#8b93a3; font-size:9px; margin-left:4px }

#eg-root .eg-heart, #eg-root-recent .eg-heart, #eg-root-offers .eg-heart{
  width:20px; height:20px; border-radius:6px; border:1px solid rgba(255,255,255,.4);
  background:#fff; display:grid; place-items:center; cursor:pointer; font-size:10px; color:#6b7280;
  opacity:0; transform:translateY(-2px); pointer-events:none;
  transition:opacity .14s ease, transform .14s ease, background .14s ease, color .14s ease;
}
#eg-root .eg-card:hover .eg-heart, #eg-root-recent .eg-card:hover .eg-heart, #eg-root-offers .eg-card:hover .eg-heart{
  opacity:1; transform:none; pointer-events:auto;
}
#eg-root .eg-heart[data-on="true"], #eg-root-recent .eg-heart[data-on="true"], #eg-root-offers .eg-heart[data-on="true"]{
  color:#e11d48; background:#fff0f3; border-color:#fecaca;
}

#eg-root .eg-foot, #eg-root-recent .eg-foot, #eg-root-offers .eg-foot{
  display:grid; grid-template-columns:1fr auto; align-items:center; gap:8px;
  border-top:1px solid rgba(255,255,255,.4);
  background:linear-gradient(180deg,rgba(255,255,255,.44),rgba(255,255,255,.60));
  padding:6px 8px 8px;
}
#eg-root .eg-prices, #eg-root-recent .eg-prices, #eg-root-offers .eg-prices{
  display:flex; align-items:center; gap:6px; overflow:hidden; white-space:nowrap;
}
#eg-root .eg-pill, #eg-root-recent .eg-pill, #eg-root-offers .eg-pill{
  background:var(--eg-red); color:#fff; border:1px solid rgba(255,255,255,.35);
  padding:0 5px; height:14px; line-height:14px; border-radius:999px;
  font:800 8px/14px 'Poppins',Arial; box-shadow:0 4px 10px rgba(239,68,68,.18), inset 0 1px 0 rgba(255,255,255,.38);
}
#eg-root .eg-strike, #eg-root-recent .eg-strike, #eg-root-offers .eg-strike{
  text-decoration:line-through; text-underline-offset:2px; color:#9aa3b2;
  font:700 8px/1 'Poppins',Arial; opacity:.85; max-width:36px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
#eg-root .eg-pair, #eg-root-recent .eg-pair, #eg-root-offers .eg-pair{ display:flex; align-items:baseline; gap:3px }
#eg-root .eg-price, #eg-root-recent .eg-price, #eg-root-offers .eg-price{ font:900 11.5px/1 'Poppins',Arial; color:#0b1220 }
#eg-root .eg-curr, #eg-root-recent .eg-curr, #eg-root-offers .eg-curr{ font:800 8px/1 'Poppins',Arial; color:#6e7d90; transform:translateY(1px); letter-spacing:.1px }

#eg-root .eg-cartbtn, #eg-root-recent .eg-cartbtn, #eg-root-offers .eg-cartbtn{
  position:relative;
  width:30px; height:30px; border-radius:8px;
  border:1.6px solid var(--eg-blue);
  background:rgba(255,255,255,.72); backdrop-filter:blur(6px);
  color:var(--eg-blue); font-size:13px;
  display:grid; place-items:center; cursor:pointer;
  box-shadow:0 6px 14px rgba(30,107,215,.12), inset 0 1px 0 rgba(255,255,255,.35);
  transition:transform .14s ease, box-shadow .14s ease, color .14s ease, background .14s ease, border-color .14s ease;
}
#eg-root .eg-cartbtn:hover, #eg-root-recent .eg-cartbtn:hover, #eg-root-offers .eg-cartbtn:hover{
  background:linear-gradient(135deg,#1e6bd7,#2563eb);
  color:#fff; border-color:#1e6bd7;
  transform:translateY(-1px);
  box-shadow:0 10px 20px rgba(30,107,215,.22);
}
#eg-root .eg-cartbtn:active, #eg-root-recent .eg-cartbtn:active, #eg-root-offers .eg-cartbtn:active{
  transform:scale(.96); box-shadow:0 4px 10px rgba(30,107,215,.18);
}
#eg-root .eg-cartbtn[disabled], #eg-root-recent .eg-cartbtn[disabled], #eg-root-offers .eg-cartbtn[disabled]{
  background:#eef2f7; color:#9aa3b2; border-color:#d0d7e2; cursor:not-allowed; box-shadow:none
}
#eg-root .eg-cartbtn .eg-cart-badge,
#eg-root-recent .eg-cartbtn .eg-cart-badge,
#eg-root-offers .eg-cartbtn .eg-cart-badge{
  position:absolute; top:-6px; right:-6px;
  min-width:16px; height:16px; padding:0 4px;
  border-radius:999px; background:#ef4444; color:#fff;
  font:800 10px/16px 'Poppins', Arial; text-align:center;
  box-shadow:0 2px 6px rgba(0,0,0,.2);
}

#eg-root .eg-toast-center, #eg-root-recent .eg-toast-center, #eg-root-offers .eg-toast-center{
  position:fixed; left:50%; top:50%; transform:translate(-50%,-50%) scale(.96);
  background:#111827; color:#fff; border-radius:10px; padding:10px 12px; font-weight:800;
  box-shadow:0 20px 44px rgba(2,6,23,.34); z-index:9999; opacity:0; pointer-events:none; transition:.16s;
}
#eg-root .eg-toast-center.show, #eg-root-recent .eg-toast-center.show, #eg-root-offers .eg-toast-center.show{
  opacity:1; transform:translate(-50%,-50%) scale(1);
}
#eg-root .eg-toast-center .eg-ok, #eg-root-recent .eg-toast-center .eg-ok, #eg-root-offers .eg-toast-center .eg-ok{
  color:var(--eg-ok); margin-right:8px;
}

@media (prefers-reduced-motion:reduce){
  #eg-root *, #eg-root-recent *, #eg-root-offers *{ transition:none!important; animation:none!important }
}
#eg-root a:focus-visible, #eg-root button:focus-visible,
#eg-root-recent a:focus-visible, #eg-root-recent button:focus-visible,
#eg-root-offers a:focus-visible, #eg-root-offers button:focus-visible{
  outline:2px solid var(--eg-blue); outline-offset:2px; border-radius:6px;
}

@media (max-width:360px){
  #eg-root .eg-rval, #eg-root-recent .eg-rval, #eg-root-offers .eg-rval{ display:none !important }
  #eg-root .eg-stars i, #eg-root-recent .eg-stars i, #eg-root-offers .eg-stars i{ font-size:8.5px }
  #eg-root .eg-price, #eg-root-recent .eg-price, #eg-root-offers .eg-price{ font-size:11px }
  #eg-root .eg-curr,  #eg-root-recent .eg-curr,  #eg-root-offers .eg-curr{ font-size:7.5px }
}


/* ===== POPUP LOGIN (global, neutre) ===== */
.eg-popup-backdrop{
  position:fixed; inset:0; background:rgba(2,6,23,.45);
  backdrop-filter:blur(2px);
  z-index:9997; opacity:0; transition:opacity .18s ease;
}
.eg-popup{
  position:fixed; inset:0; display:grid; place-items:center;
  z-index:9998; opacity:0; pointer-events:none; transition:opacity .18s ease;
}
.eg-popup[open], .eg-popup-backdrop[open]{ opacity:1; }
.eg-popup[open]{ pointer-events:auto; }
.eg-popup[hidden], .eg-popup-backdrop[hidden]{ display:block; opacity:0; pointer-events:none; }

.eg-popup-card{
  position:relative;
  width:min(92vw, 360px);
  border-radius:12px;
  background:#fff;
  box-shadow:0 18px 50px rgba(2,6,23,.28);
  border:1px solid rgba(15,23,42,.08);
  padding:18px 16px 16px;
  display:flex; flex-direction:column; align-items:center; gap:10px;
  transform:translateY(6px) scale(.98); transition:transform .18s ease;
}
.eg-popup[open] .eg-popup-card{ transform:none; }

.eg-popup-card i.fa-user-lock{
  font-size:30px; color:#1e6bd7; margin-bottom:4px;
}
.eg-popup-card h3{
  margin:0; font:800 16px/1.2 'Poppins', Arial; color:#0f172a;
}
.eg-popup-card p{
  margin:0; text-align:center; color:#334155; font:600 12px/1.5 'Poppins', Arial;
}

.eg-popup-actions{ display:flex; gap:12px; margin-top:6px; }

.eg-btn{
  padding:8px 14px; border-radius:8px; border:1px solid rgba(15,23,42,.08);
  font:800 12px/1 'Poppins', Arial; cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease, border-color .12s ease;
}
.eg-btn:active{ transform:scale(.98); }
.eg-btn-primary{
  background:linear-gradient(135deg,#1e6bd7,#2563eb); color:#fff; border-color:#1e6bd7;
  box-shadow:0 8px 20px rgba(30,107,215,.24), inset 0 1px 0 rgba(255,255,255,.35);
}
.eg-btn-primary:hover{ filter:brightness(1.03); }
.eg-btn-ghost{
  background:#f1f5f9; color:#0f172a;
}
.eg-btn-ghost:hover{ background:#e2e8f0; }

.eg-popup-close-x{
  position:absolute; top:8px; right:8px;
  width:30px; height:30px; border-radius:8px;
  border:1px solid rgba(15,23,42,.08); background:#fff; color:#0f172a;
  display:grid; place-items:center; cursor:pointer;
}
.eg-popup-close-x:hover{ background:#f8fafc; }


#eg-root .eg-cartbtn,
#eg-root-recent .eg-cartbtn,
#eg-root-offers .eg-cartbtn{
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
