/* SKILLSUPS FRONTEND 100% FINAL PATCH */
:root{--safe-bottom:18px;--topbar-h:76px}.page{padding-bottom:calc(34px + env(safe-area-inset-bottom,0px))}.topbar{position:sticky;top:12px;z-index:80;border-radius:24px!important;margin-top:12px!important;min-height:64px!important}.brand{min-width:max-content}.brand img{width:46px!important;height:46px!important;border-radius:14px!important}.brand span,.brand strong{font-weight:950;letter-spacing:-.045em}.nav-actions,.top-actions,.topbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.hero{padding-block:clamp(38px,6vw,74px)!important}.hero h1{max-width:900px}.shop-layout,.product-layout,.login-layout{align-items:start}.products-grid,.product-grid{grid-template-columns:repeat(auto-fill,minmax(235px,1fr))!important}.product-card{min-height:100%;display:flex!important;flex-direction:column!important}.product-card .product-body{display:flex;flex-direction:column;gap:10px;flex:1}.product-card .btn,.product-card button{margin-top:auto}.category-panel{position:sticky;top:96px;max-height:calc(100vh - 120px);overflow:auto}.cart-modal,.nav-menu-modal,.recommendation-modal,.partner-modal{max-height:min(88vh,820px);overflow:auto}.cart-modal-overlay[aria-hidden="false"],.nav-menu-overlay[aria-hidden="false"],.category-modal-overlay[aria-hidden="false"]{display:flex!important;opacity:1!important;pointer-events:auto!important}.cart-modal-overlay[aria-hidden="true"],.nav-menu-overlay[aria-hidden="true"],.category-modal-overlay[aria-hidden="true"]{display:none!important}.empty-state{border:1px dashed rgba(255,255,255,.16)!important;border-radius:28px!important;background:rgba(255,255,255,.05)!important}.status-badge,.pill,.badge{border-radius:999px;border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.08);padding:7px 10px;color:#fff}.status-active{background:rgba(20,210,120,.14)!important;border-color:rgba(20,210,120,.35)!important}.status-ended,.status-inactive{background:rgba(255,80,80,.14)!important;border-color:rgba(255,80,80,.35)!important}.sk-toast{position:fixed;left:50%;bottom:22px;transform:translateX(-50%) translateY(20px);z-index:9999;background:linear-gradient(135deg,rgba(15,16,24,.96),rgba(30,22,18,.96));border:1px solid rgba(253,62,6,.35);box-shadow:0 22px 70px rgba(0,0,0,.38),0 16px 50px rgba(253,62,6,.18);color:#fff;border-radius:18px;padding:13px 16px;display:flex;gap:10px;align-items:center;opacity:0;transition:.25s ease;max-width:min(92vw,520px);font-weight:750}.sk-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}.sk-toast i{color:var(--sk-orange)}.skeleton{position:relative;overflow:hidden;background:rgba(255,255,255,.08)!important}.skeleton:after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.12),transparent);animation:sk-shimmer 1.25s infinite}@keyframes sk-shimmer{100%{transform:translateX(100%)}}.frontend-note{border:1px solid rgba(253,62,6,.26);background:linear-gradient(135deg,rgba(253,62,6,.12),rgba(255,255,255,.045));border-radius:24px;padding:16px;display:flex;gap:12px;align-items:flex-start;color:rgba(255,255,255,.78)}.frontend-note strong{color:#fff}.admin-shell{min-height:100vh}.admin-table-wrap{overflow:auto;border-radius:24px}.admin-table{width:100%;border-collapse:collapse}.admin-table th,.admin-table td{padding:14px;border-bottom:1px solid rgba(255,255,255,.09);text-align:left}.admin-table th{color:rgba(255,255,255,.62);font-size:12px;text-transform:uppercase;letter-spacing:.08em}.admin-action-row{display:flex;gap:8px;flex-wrap:wrap}.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:16px}.two-col{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);gap:18px}.mobile-bottom-safe{height:env(safe-area-inset-bottom,0px)}@media(max-width:920px){.category-panel{display:none}.shop-layout,.product-layout,.login-layout,.two-col{grid-template-columns:1fr!important}.filter-mobile-btn{display:inline-flex!important}.topbar{top:8px;margin-top:8px!important;border-radius:20px!important}.header-search{order:10;width:100%;max-width:none!important}.products-grid,.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.product-card .product-image,.product-card img{border-radius:18px!important}.nav-actions,.top-actions,.topbar-actions{gap:8px}.brand span{display:none}}@media(max-width:560px){body{font-size:14px}.page{width:min(100% - 16px,1220px)!important}.topbar{min-height:56px!important;padding:8px!important}.brand img{width:40px!important;height:40px!important}.products-grid,.product-grid{grid-template-columns:1fr!important}.hero{padding-block:28px!important}.hero h1{font-size:clamp(32px,12vw,52px)!important}.cart-modal,.nav-menu-modal,.recommendation-modal,.partner-modal{width:calc(100vw - 18px)!important;border-radius:24px!important}.footer-row{padding-bottom:24px!important}}

/* =========================================================
   SHOP IMAGE VISIBILITY PATCH
   Objectif : faire ressortir les photos produits dans les cards
   sans crop agressif, avec un rendu premium Skillsups.
   ========================================================= */
.products-grid,
.product-grid{
  align-items:stretch!important;
}

.product-card{
  isolation:isolate!important;
}

.product-card .product-visual,
.product-visual{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:260px!important;
  height:clamp(240px, 24vw, 330px)!important;
  padding:18px!important;
  border-radius:28px 28px 18px 18px!important;
  background:
    radial-gradient(circle at 50% 36%, rgba(253,62,6,.24), transparent 42%),
    radial-gradient(circle at 20% 10%, rgba(255,154,31,.18), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.035))!important;
}

.product-card .product-visual::before,
.product-visual::before{
  content:"";
  position:absolute;
  inset:12px;
  border-radius:24px;
  border:1px solid rgba(255,255,255,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  pointer-events:none;
}

.product-card .product-visual img,
.product-visual img,
.product-card img.product-image,
.product-card .product-image{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  display:block!important;
  border-radius:20px!important;
  filter:saturate(1.14) contrast(1.06) drop-shadow(0 18px 28px rgba(0,0,0,.34))!important;
  transform:translateZ(0)!important;
}

.product-card:hover .product-visual img,
.product-card:hover img.product-image{
  transform:scale(1.055)!important;
}

.product-badge,
.recommendation-tag{
  z-index:3!important;
}

.product-body{
  padding-top:16px!important;
}

@media(max-width:920px){
  .product-card .product-visual,
  .product-visual{
    min-height:220px!important;
    height:clamp(210px, 42vw, 285px)!important;
    padding:14px!important;
    border-radius:24px 24px 16px 16px!important;
  }
}

@media(max-width:560px){
  .product-card .product-visual,
  .product-visual{
    min-height:245px!important;
    height:300px!important;
    padding:16px!important;
  }
}

/* Shop infinite scroll + mobile 2 columns */
.products-load-more{grid-column:1/-1;width:100%;display:flex;justify-content:center;align-items:center;gap:10px;min-height:54px;margin:22px 0 8px;color:var(--sk-text,#fff);font-weight:800}.products-load-more .products-end{display:inline-flex;align-items:center;gap:8px;padding:12px 16px;border-radius:999px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.13)}@media(max-width:560px){.products-grid,.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}.product-card{border-radius:18px!important}.product-card .product-body{padding:10px!important;gap:7px!important}.product-title,.product-card h3{font-size:13px!important;line-height:1.18!important}.product-card .price,.product-card .product-price{font-size:15px!important}.product-actions{gap:6px!important}.product-actions .btn{min-height:34px!important;padding:8px 7px!important;font-size:11px!important}}

/* SHOP STABILITY + COMPACT MOBILE CARDS PATCH */
#skillsups-page-root .products-grid,#skillsups-page-root .product-grid{align-items:stretch!important;overflow-anchor:none!important}#skillsups-page-root .product-card{contain:layout paint!important;transform:translateZ(0)!important;backface-visibility:hidden!important;will-change:auto!important}#skillsups-page-root .product-card .product-visual{overflow:hidden!important;flex:0 0 auto!important;transform:translateZ(0)!important;backface-visibility:hidden!important}#skillsups-page-root .product-card .product-visual img,#skillsups-page-root .product-card img.product-image,#skillsups-page-root .product-card .product-image{display:block!important;width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important;transform:translateZ(0)!important;backface-visibility:hidden!important;content-visibility:visible!important}@media(hover:none){#skillsups-page-root .product-card:hover .product-visual img,#skillsups-page-root .product-card:hover img.product-image{transform:translateZ(0)!important}}@media(max-width:560px){#skillsups-page-root .products-grid,#skillsups-page-root .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}#skillsups-page-root .product-card{border-radius:16px!important;min-height:0!important}#skillsups-page-root .product-card .product-visual,#skillsups-page-root .product-visual{min-height:128px!important;height:136px!important;padding:8px!important;border-radius:16px 16px 12px 12px!important}#skillsups-page-root .product-card .product-body,#skillsups-page-root .product-body{padding:8px!important;gap:5px!important}#skillsups-page-root .product-card .product-topline,#skillsups-page-root .product-card .product-meta,#skillsups-page-root .product-card .product-price-row,#skillsups-page-root .product-card .product-actions{gap:5px!important}#skillsups-page-root .product-title,#skillsups-page-root .product-card h3,#skillsups-page-root .product-card .product-title a{font-size:12px!important;line-height:1.15!important;margin:0!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important}#skillsups-page-root .product-card .product-category,#skillsups-page-root .product-card .stock,#skillsups-page-root .product-card .old-price{font-size:9px!important}#skillsups-page-root .product-card .price,#skillsups-page-root .product-card .product-price,#skillsups-page-root .product-card .product-price-row strong{font-size:13px!important;line-height:1.1!important}#skillsups-page-root .product-actions{grid-template-columns:1fr!important}#skillsups-page-root .product-actions .btn,#skillsups-page-root .product-actions button{min-height:30px!important;padding:7px 6px!important;font-size:10px!important;border-radius:10px!important}}


/* === Shop ecommerce performance pack: lazy images, skeleton, compact mobile cards === */
#skillsups-page-root .products-grid,
#skillsups-page-root .product-grid {
  align-items: stretch !important;
  overflow-anchor: none !important;
}

#skillsups-page-root .product-card {
  overflow: hidden !important;
  contain: layout paint !important;
  transform: translateZ(0) !important;
  backface-visibility: hidden !important;
  min-width: 0 !important;
}

#skillsups-page-root .product-card .product-visual {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 220px !important;
  min-height: 220px !important;
  overflow: hidden !important;
  padding: 0 !important;
  background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.04)) !important;
  border-radius: 18px 18px 12px 12px !important;
  transform: translateZ(0) !important;
  backface-visibility: hidden !important;
}

#skillsups-page-root .product-card .product-visual img,
#skillsups-page-root .product-card img.product-image,
#skillsups-page-root .product-card .product-image {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  display: block !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: inherit !important;
  transform: translateZ(0) !important;
  backface-visibility: hidden !important;
  filter: saturate(1.03) contrast(1.02) !important;
}

#skillsups-page-root .product-skeleton-card .skeleton-block,
#skillsups-page-root .product-skeleton-card .skeleton-line,
#skillsups-page-root .product-skeleton-card .skeleton-button {
  position: relative !important;
  overflow: hidden !important;
  background: rgba(255,255,255,.12) !important;
}

#skillsups-page-root .product-skeleton-card .skeleton-block::after,
#skillsups-page-root .product-skeleton-card .skeleton-line::after,
#skillsups-page-root .product-skeleton-card .skeleton-button::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  animation: sk-shop-shimmer 1.15s infinite;
}

#skillsups-page-root .skeleton-line {
  height: 12px !important;
  border-radius: 999px !important;
}
#skillsups-page-root .skeleton-line-small { width: 38% !important; }
#skillsups-page-root .skeleton-line-title { width: 80% !important; height: 16px !important; }
#skillsups-page-root .skeleton-line-price { width: 48% !important; height: 18px !important; }
#skillsups-page-root .skeleton-button { width: 100% !important; height: 38px !important; border-radius: 12px !important; }

@keyframes sk-shop-shimmer { 100% { transform: translateX(100%); } }

#skillsups-page-root .products-load-more {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-height: 54px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 14px 0 4px !important;
}

@media (max-width: 560px) {
  #skillsups-page-root .products-grid,
  #skillsups-page-root .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  #skillsups-page-root .product-card {
    border-radius: 16px !important;
  }
  #skillsups-page-root .product-card .product-visual {
    height: 132px !important;
    min-height: 132px !important;
    border-radius: 16px 16px 10px 10px !important;
  }
  #skillsups-page-root .product-card .product-body {
    padding: 8px !important;
    gap: 5px !important;
  }
  #skillsups-page-root .product-card .product-title,
  #skillsups-page-root .product-card h3 {
    font-size: 12px !important;
    line-height: 1.15 !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  #skillsups-page-root .product-card .product-meta {
    display: none !important;
  }
  #skillsups-page-root .product-card .product-category,
  #skillsups-page-root .product-card .old-price {
    font-size: 9px !important;
  }
  #skillsups-page-root .product-card .product-price-row strong,
  #skillsups-page-root .product-card .price,
  #skillsups-page-root .product-card .product-price {
    font-size: 13px !important;
    line-height: 1.1 !important;
  }
  #skillsups-page-root .product-actions {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  #skillsups-page-root .product-actions .btn,
  #skillsups-page-root .product-actions button {
    min-height: 30px !important;
    padding: 7px 6px !important;
    font-size: 10px !important;
    border-radius: 10px !important;
  }
}

/* === Auto infinite scroll skeleton cards === */
#skillsups-page-root .products-load-more-skeleton {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 16px !important;
  margin-top: 12px !important;
}
#skillsups-page-root .products-auto-load-sentinel { width: 100% !important; height: 34px !important; opacity: 0 !important; pointer-events: none !important; }
#skillsups-page-root .product-skeleton-card { min-height: 330px !important; pointer-events: none !important; }
#skillsups-page-root .product-skeleton-card .product-body { display: grid !important; gap: 10px !important; padding: 12px !important; }
@media (max-width: 560px) {
  #skillsups-page-root .products-load-more-skeleton { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  #skillsups-page-root .product-skeleton-card { min-height: 226px !important; }
}
