/* =========================================================
   Premium UI layer: compact inline buttons + shimmer skeleton
   ========================================================= */

.btn-row-inline{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:nowrap;
}

.btn-row-inline a{
  min-width:0; /* allows ellipsis */
}

.product-actions .product-btn,
.jumia-product-actions .jumia-btn{
  padding:6px 8px !important;
  font-size:12px !important;
  line-height:1 !important;
  border-radius:10px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:6px !important;
  white-space:nowrap !important;
}

.product-actions .product-btn .btn-text,
.jumia-product-actions .jumia-btn .btn-text{
  display:inline-block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:100%;
}

/* Keep wishlist square-ish and smaller */
.product-actions .product-btn[aria-label="Wishlist"],
.jumia-product-actions .jumia-btn[aria-label="Wishlist"]{
  padding:6px 8px !important;
  width:34px;
  flex:0 0 auto;
}

/* Make primary/secondary not too wide */
.product-actions .product-btn-primary,
.jumia-product-actions .jumia-btn-primary{
  flex:1 1 auto;
}
.product-actions .product-btn-secondary,
.jumia-product-actions .jumia-btn-secondary{
  flex:1 1 auto;
}

/* Slightly tighter on small phones */
@media (max-width: 420px){
  .product-actions .product-btn,
  .jumia-product-actions .jumia-btn{
    padding:6px 6px !important;
    font-size:11px !important;
    gap:5px !important;
  }
  .product-actions .product-btn[aria-label="Wishlist"],
  .jumia-product-actions .jumia-btn[aria-label="Wishlist"]{
    width:32px;
  }
}

/* =========================
   Shimmer skeleton
   ========================= */
.skeleton-box{
  position:absolute;
  inset:0;
  border-radius:14px;
  background: rgba(0,0,0,0.08);
  overflow:hidden;
}

.skeleton-box::after{
  content:"";
  position:absolute;
  inset:-40% -60%;
  transform: rotate(20deg);
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.35) 50%,
    rgba(255,255,255,0) 100%);
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer{
  0%{ transform: translateX(-40%) rotate(20deg); }
  100%{ transform: translateX(40%) rotate(20deg); }
}

/* Hide skeleton when loaded */
.skeleton-wrap.is-loaded .skeleton-box{ display:none; }

/* =========================
   Mini cart toast
   ========================= */
.mini-cart-toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 99999;
  max-width: 92vw;
  width: 420px;
  pointer-events: none;
  opacity: 0;
}

.mini-cart-toast.show{
  opacity: 1;
  transition: opacity .18s ease;
}

.mini-cart-toast .toast-inner{
  pointer-events: auto;
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-radius:16px;
  background: rgba(20,20,20,0.92);
  color: #fff;
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
  backdrop-filter: blur(8px);
}

.mini-cart-toast img{
  width:40px;
  height:40px;
  border-radius:10px;
  object-fit:contain;
  background: rgba(255,255,255,0.12);
}

.mini-cart-toast .meta{
  flex:1;
  min-width:0;
}
.mini-cart-toast .title{
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-cart-toast .sub{
  font-size: 12px;
  opacity: .85;
}

.mini-cart-toast .cta{
  flex:0 0 auto;
  padding:8px 10px;
  border-radius:12px;
  background: rgba(255,255,255,0.14);
  color:#fff;
  font-weight:700;
  font-size:12px;
  text-decoration:none;
}

/* =========================
   Cart count bump
   ========================= */
@keyframes cartBump{
  0%{ transform: scale(1); }
  35%{ transform: scale(1.18); }
  100%{ transform: scale(1); }
}
.cart-bump{
  animation: cartBump .28s ease;
}

/* =========================
   No-crop image option (contain)
   ========================= */
.product-card img,
.jumia-product-card img{
  object-fit: contain !important;
  background: rgba(0,0,0,0.03);
}

/* === Tiny phones: keep actions on one line by shortening labels === */
.btn-text-short{display:none;}
@media (max-width:359px){
  .btn-text-full{display:none !important;}
  
@media (max-width:319px){
  /* Ultra-small devices safety: tighter spacing and smaller icons */
  .btn-row-inline{ gap:4px !important; }

  .btn-row-inline .product-btn,
  .btn-row-inline .jumia-btn{
    padding:6px 8px !important;
    font-size:11px !important;
    line-height:1 !important;
  }

  .btn-row-inline a[aria-label="Wishlist"]{
    width:34px !important;
    min-width:34px !important;
    padding:6px !important;
    justify-content:center !important;
  }

  .btn-row-inline i,
  .btn-row-inline svg{
    font-size:14px !important;
    width:14px !important;
    height:14px !important;
  }
}
.btn-text-short{display:inline !important;}
}



/* --- Unified Product Action Row (cards + detail pages) --- */
.product-action-row{
  display:flex !important;
  gap:10px !important;
  align-items:center !important;
  justify-content:space-between !important;
  flex-wrap:nowrap !important;
}
.product-action-row .action-item{flex:1 1 auto;}
.product-action-row .product-btn{width:auto !important; flex:1 1 auto;}
/* Ensure detail page buttons match card buttons (no pill) */
.product-action-row .product-btn,
.product-actions .product-btn{
  border-radius:6px !important;
}
/* Slightly tighter on small screens */
@media (max-width: 575.98px){
  .product-action-row{gap:8px !important;}
  .product-action-row .product-btn{padding:6px 8px !important; font-size:12px !important;}
}
