/* ============================================================
   EVERFUL WHOLESALE EXACT PRODUCT CARD & UI SYSTEM
   ============================================================ */

/* Exact Everful Wholesale Typography Hierarchy */
.ef-serif-title,
.everful-serif-heading,
.catalog-heading,
.cc-section-title,
.featured-cats-heading {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  font-weight: 500 !important;
  letter-spacing: -0.015em !important;
}

.product-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 16px 5px !important;
  padding: 0 4px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Card Outer Container */
.everful-card {
  background: #ffffff;
  border-radius: 8px !important;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #f1f5f9;
}

.everful-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

/* Image Stage Container (Strict 1:1 Aspect Ratio) */
.ef-img-stage {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 8px 8px 0 0 !important;
  overflow: hidden !important;
  background: #f8fafc;
  box-sizing: border-box;
}

/* ── Horizontal Swipe Slider ── */
.ef-swipe-track {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  display: flex !important;
  flex-direction: row !important;
  overflow-x: scroll !important;
  overflow-y: hidden !important;
  scroll-snap-type: x mandatory !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  background: #f8fafc !important;
  cursor: grab !important;
}
.ef-swipe-track::-webkit-scrollbar { display: none !important; }
.ef-swipe-track:active { cursor: grabbing !important; }

.ef-swipe-slide {
  flex: 0 0 100% !important;
  width: 100% !important;
  height: 100% !important;
  scroll-snap-align: start !important;
  scroll-snap-stop: always !important;
  display: block !important;
  text-decoration: none !important;
}
.ef-swipe-slide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
}

/* Dot Indicators */
.ef-swipe-dots {
  position: absolute !important;
  bottom: 7px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  z-index: 10 !important;
  pointer-events: none !important;
}
.ef-swipe-dot {
  width: 5px !important;
  height: 5px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.55) !important;
  transition: all 0.2s ease !important;
  display: block !important;
}
.ef-swipe-dot.active {
  background: #ffffff !important;
  width: 14px !important;
  border-radius: 3px !important;
}

/* Position dots relative to the card (swipe-track is not position:relative by default in flex) */
.everful-card {
  background: #ffffff;
  border-radius: 8px !important;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #f1f5f9;
}
/* Wrapper so dots sit on top of the slider */
.ef-swipe-wrap {
  position: relative !important;
  width: 100% !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
  border-radius: 8px 8px 0 0 !important;
}


/* Swipeable Image Track & Slides */
.ef-img-track {
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x mandatory !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.ef-img-track::-webkit-scrollbar {
  display: none !important;
}

.ef-img-slide {
  flex: 0 0 100% !important;
  width: 100% !important;
  height: 100% !important;
  scroll-snap-align: start !important;
  scroll-snap-stop: always !important;
  position: relative !important;
  display: block !important;
}

.ef-img-slide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Dot Indicators Overlay (Instagram-style) */
.ef-img-dots {
  position: absolute !important;
  bottom: 8px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  z-index: 10 !important;
  background: rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  padding: 3px 8px !important;
  border-radius: 9999px !important;
  pointer-events: none !important;
}

.ef-img-dot {
  width: 5px !important;
  height: 5px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.5) !important;
  transition: all 0.2s ease !important;
}

.ef-img-dot.active {
  background: #ffffff !important;
  width: 7px !important;
  height: 7px !important;
}

/* Overlay Action Icons (Wishlist Top-Right & Cart Bottom-Right) */
.product-card .icon-btn,
.product-card .ef-icon-btn,
.everful-card .ef-icon-btn,
.robu-product-card .robu-wishlist-btn,
.robu-product-card .robu-cart-btn,
.ef-icon-btn,
.icon-btn,
.robu-wishlist-btn,
.robu-cart-btn {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: absolute !important;
  z-index: 10 !important;
  border: none !important;
  outline: none !important;
  cursor: pointer !important;
  color: #000000 !important;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* Expanded Touch Target (Minimum 40x40px tap area for mobile) */
.product-card .icon-btn::after,
.product-card .ef-icon-btn::after,
.everful-card .ef-icon-btn::after,
.robu-product-card .robu-wishlist-btn::after,
.robu-product-card .robu-cart-btn::after,
.ef-icon-btn::after,
.icon-btn::after,
.robu-wishlist-btn::after,
.robu-cart-btn::after {
  content: "" !important;
  position: absolute !important;
  top: -6px !important;
  left: -6px !important;
  right: -6px !important;
  bottom: -6px !important;
  z-index: 1 !important;
}

/* Inner Icon (SVG / Font-icon) Sizing & Color */
.product-card .icon-btn svg,
.product-card .ef-icon-btn svg,
.everful-card .ef-icon-btn svg,
.robu-product-card .robu-wishlist-btn svg,
.robu-product-card .robu-cart-btn svg,
.robu-wishlist-btn i,
.robu-cart-btn i,
.ef-icon-btn svg,
.icon-btn svg {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  max-width: 15px !important;
  max-height: 15px !important;
  stroke: #000000 !important;
  stroke-width: 1.8px !important;
  color: #000000 !important;
  flex-shrink: 0 !important;
  display: block !important;
}

/* Wishlist Heart Button Position: Top-Right (6px offset) */
.product-card .wishlist-btn,
.product-card .ef-wishlist-btn,
.everful-card .ef-wishlist-btn,
.robu-product-card .robu-wishlist-btn,
.ef-wishlist-btn,
.wishlist-btn,
.robu-wishlist-btn {
  top: 6px !important;
  right: 6px !important;
  bottom: auto !important;
  left: auto !important;
  color: #000000 !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
}

.product-card .wishlist-btn:hover,
.product-card .ef-wishlist-btn:hover,
.everful-card .ef-wishlist-btn:hover,
.robu-wishlist-btn:hover,
.ef-wishlist-btn:hover,
.wishlist-btn:hover {
  background: #ffffff !important;
  transform: scale(1.08) !important;
}

.product-card .wishlist-btn.active,
.product-card .ef-wishlist-btn.active,
.everful-card .ef-wishlist-btn.active,
.robu-wishlist-btn.active,
.ef-wishlist-btn.active,
.wishlist-btn.active {
  background: rgba(255, 255, 255, 0.95) !important;
}

.product-card .wishlist-btn.active svg,
.product-card .ef-wishlist-btn.active svg,
.everful-card .ef-wishlist-btn.active svg,
.robu-product-card .robu-wishlist-btn.active svg,
.ef-wishlist-btn.active .ef-heart-icon,
.wishlist-btn.active svg {
  fill: #e11d48 !important;
  stroke: #e11d48 !important;
  color: #e11d48 !important;
}

/* Cart Bag Button Position: Bottom-Right (6px offset) */
.product-card .cart-btn,
.product-card .ef-cart-btn,
.everful-card .ef-cart-btn,
.robu-product-card .robu-cart-btn,
.ef-cart-btn,
.cart-btn,
.robu-cart-btn {
  bottom: 6px !important;
  right: 6px !important;
  top: auto !important;
  left: auto !important;
  color: #000000 !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
}

.product-card .cart-btn:hover,
.product-card .ef-cart-btn:hover,
.everful-card .ef-cart-btn:hover,
.robu-cart-btn:hover,
.ef-cart-btn:hover,
.cart-btn:hover {
  background: #000000 !important;
  color: #ffffff !important;
  transform: scale(1.08) !important;
}

.product-card .cart-btn:hover svg,
.product-card .ef-cart-btn:hover svg,
.everful-card .ef-cart-btn:hover svg,
.robu-cart-btn:hover svg,
.ef-cart-btn:hover svg,
.cart-btn:hover svg {
  stroke: #ffffff !important;
  color: #ffffff !important;
}

.product-card .cart-btn.in-cart,
.product-card .cart-btn.added,
.product-card .ef-cart-btn.in-cart,
.product-card .ef-cart-btn.added,
.everful-card .ef-cart-btn.in-cart,
.everful-card .ef-cart-btn.added,
.ef-cart-btn.in-cart,
.ef-cart-btn.added,
.cart-btn.in-cart,
.cart-btn.added {
  background: #10b981 !important;
  color: #ffffff !important;
}

.product-card .cart-btn.in-cart svg,
.product-card .cart-btn.added svg,
.product-card .ef-cart-btn.in-cart svg,
.product-card .ef-cart-btn.added svg,
.everful-card .ef-cart-btn.in-cart svg,
.everful-card .ef-cart-btn.added svg,
.ef-cart-btn.in-cart svg,
.ef-cart-btn.added svg,
.cart-btn.in-cart svg,
.cart-btn.added svg {
  stroke: #ffffff !important;
  color: #ffffff !important;
}

/* Multi-Image Thumbnails Below Cover Photo */
.ef-thumb-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 8px 4px 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.ef-thumb-row::-webkit-scrollbar {
  display: none !important;
}
.ef-thumb-box {
  width: 38px !important;
  height: 38px !important;
  border-radius: 7px !important;
  overflow: hidden !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #ffffff !important;
  padding: 0 !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  transition: all 0.15s ease !important;
  outline: none !important;
}
.ef-thumb-box img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}
.ef-thumb-box.active,
.ef-thumb-box:hover {
  border-color: #f05a29 !important;
  box-shadow: 0 0 0 2px rgba(240, 90, 41, 0.25) !important;
}
.ef-thumb-more {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #f05a29 !important;
  background: #fff7ed !important;
  border-color: #ffedd5 !important;
}

/* Card Body Content */
.ef-card-body {
  padding: 6px 5px 6px !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  overflow: hidden !important;
  min-width: 0 !important;
}

.ef-title-link {
  text-decoration: none !important;
  display: block !important;
  overflow: hidden !important;
  min-width: 0 !important;
}

.ef-product-title {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #1e293b !important;
  line-height: 1.35 !important;
  margin: 0 0 2px 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  display: block !important;
}

/* Importerr-style variant count badge */
.ef-variant-badge {
  display: inline-block !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  color: #f05a29 !important;
  letter-spacing: 0.04em !important;
  margin-bottom: 3px !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
}

.ef-badge-new {
  background: #f05a29 !important;
  color: #ffffff !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
  margin-right: 4px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  line-height: 1.4 !important;
  letter-spacing: 0.02em !important;
}

/* Price Line with Single Star Rating */
.ef-price-line {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 4px !important;
  margin-top: auto !important;
  margin-bottom: 0 !important;
  width: 100% !important;
}

.ef-price-wrap {
  display: flex !important;
  align-items: baseline !important;
  gap: 4px !important;
}

.ef-price-amount {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: #f05a29 !important;
}

.ef-original-price {
  font-size: 11px !important;
  color: #94a3b8 !important;
  text-decoration: line-through !important;
  font-weight: 400 !important;
}

.ef-rating-single {
  display: inline-flex !important;
  align-items: center !important;
  gap: 2.5px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  background: #fefce8 !important;
  border: 1px solid #fef08a !important;
  padding: 1px 5px !important;
  border-radius: 6px !important;
  line-height: 1 !important;
}

.ef-rating-single svg {
  width: 11px !important;
  height: 11px !important;
  fill: #f59e0b !important;
  stroke: #f59e0b !important;
}

.ef-stars {
  display: flex !important;
  align-items: center !important;
  gap: 1px !important;
}

.ef-star-icon {
  width: 11px !important;
  height: 11px !important;
  flex-shrink: 0 !important;
}

.ef-review-count {
  font-size: 11px !important;
  color: #64748b !important;
  font-weight: 500 !important;
}

/* Full-Width Add to Cart Button (Exact Jumia-style) */
.ef-add-to-cart-btn {
  width: 100% !important;
  background: #f05a29 !important;
  color: #ffffff !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
  padding: 0 !important;
  margin-top: 4px !important;
  margin-bottom: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  transition: background-color 0.2s ease, transform 0.15s ease !important;
  height: 32px !important;
  outline: none !important;
  box-sizing: border-box !important;
}

.ef-add-to-cart-btn:hover {
  background: #dc4c18 !important;
  box-shadow: none !important;
}

.ef-add-to-cart-btn:active {
  transform: scale(0.98) !important;
}

.ef-add-to-cart-btn.added,
.ef-add-to-cart-btn.in-cart {
  background: #10b981 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* Responsive Media Queries */
@media (max-width: 1400px) {
  .product-grid { 
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important; 
    gap: 14px 4px !important; 
  }
}

@media (max-width: 1200px) {
  .product-grid { 
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important; 
    gap: 14px 4px !important; 
  }
}

@media (max-width: 992px) {
  .product-grid { 
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important; 
    gap: 12px 4px !important; 
  }
}

@media (max-width: 768px) {
  .product-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 8px !important;
    padding: 8px 6px 16px !important;
    align-items: stretch !important;
  }

  .ef-img-stage,
  .ef-swipe-wrap,
  .ef-swipe-track {
    aspect-ratio: 1 / 0.94 !important;
  }
  .ef-card-body {
    padding: 5px 5px 5px !important;
  }
  .ef-variant-badge {
    font-size: 8.5px !important;
    margin-bottom: 1px !important;
    line-height: 1 !important;
  }
  .ef-product-title {
    font-size: 11.5px !important;
    line-height: 1.25 !important;
    margin-bottom: 1px !important;
  }
  .ef-price-amount {
    font-size: 13.5px !important;
  }
  .ef-rating-single {
    padding: 1px 3.5px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 480px) {
  .product-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px 5px !important;
    padding: 0 4px !important;
    align-items: stretch !important;
  }
  .ef-img-stage,
  .ef-swipe-wrap,
  .ef-swipe-track {
    aspect-ratio: 1 / 0.92 !important;
  }
  .ef-card-body {
    padding: 4px 4px 4px !important;
  }
  .ef-variant-badge {
    font-size: 8px !important;
    margin-bottom: 1px !important;
    line-height: 1 !important;
  }
  .ef-product-title {
    font-size: 11px !important;
    line-height: 1.2 !important;
    margin-bottom: 1px !important;
  }
  .ef-price-amount {
    font-size: 13px !important;
  }
  .ef-rating-single {
    padding: 0.5px 3px !important;
    font-size: 9.5px !important;
  }
  .ef-rating-single svg {
    width: 9.5px !important;
    height: 9.5px !important;
  }
}

/* Desktop Responsive Sizing for Overlay Icons (Max 32px circle, 16px icon) */
@media (min-width: 768px) {
  .product-card .icon-btn,
  .product-card .ef-icon-btn,
  .everful-card .ef-icon-btn,
  .robu-product-card .robu-wishlist-btn,
  .robu-product-card .robu-cart-btn,
  .ef-icon-btn,
  .icon-btn,
  .robu-wishlist-btn,
  .robu-cart-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    max-width: 32px !important;
    max-height: 32px !important;
  }

  .product-card .icon-btn svg,
  .product-card .ef-icon-btn svg,
  .everful-card .ef-icon-btn svg,
  .robu-product-card .robu-wishlist-btn svg,
  .robu-product-card .robu-cart-btn svg,
  .robu-wishlist-btn i,
  .robu-cart-btn i,
  .ef-icon-btn svg,
  .icon-btn svg {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
  }
}
