/* Add custom CSS styles below */ 
/* ============================================================================
   YAFA CATEGORY CARDS — FIGMA MAKE LAYOUT OVERRIDE
   ============================================================================
   
   Paste this into: Salla Dashboard → Themes → Yafa → Customize → Custom CSS
   (or add it to your existing Custom CSS file)
   
   What this does:
   - Reshapes category cards from tall portrait rectangles to compact squares
   - Removes the dark gradient text overlay
   - Moves the Arabic category name BELOW the image instead of over it
   - Gives cards white backgrounds with subtle shadows
   - Adds rounded corners matching Figma Make (14px)
   - Shrinks the image area so icons display at proper mint-circle size
   - Adds hover lift animation for interactivity
   
   IMPORTANT: After pasting, hard-refresh with Ctrl+Shift+R to see changes.
   If some cards don't update, it means Yafa is using different class names
   than expected — send me a screenshot and I'll adjust the selectors.
   ============================================================================ */


/* ---------- 1. Remove the dark gradient text overlay ---------- */
/* This kills the dark fade that yafa puts over category images so white
   text is readable. We want the image clean with text below it instead. */

.category-item::before,
.category-item::after,
.s-category-item::before,
.s-category-item::after,
[class*="category-card"]::before,
[class*="category-card"]::after,
.salla-category-card::before,
.salla-category-card::after {
  display: none !important;
  background: transparent !important;
}

.category-item .gradient,
.s-category-item .gradient,
[class*="category-card"] .gradient,
[class*="category"] [class*="overlay"] {
  display: none !important;
}


/* ---------- 2. Reshape the category cards ---------- */
/* Change card dimensions from tall portrait (yafa default) to more compact
   rectangular proportions that match Figma Make's icon card pattern. */

.category-item,
.s-category-item,
[class*="category-card"],
.salla-category-card,
.categories-list > * {
  background-color: #FFFFFF !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06) !important;
  border: none !important;
  padding: 20px 12px !important;
  aspect-ratio: 1 / 1.1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.25s ease !important;
}

.category-item:hover,
.s-category-item:hover,
[class*="category-card"]:hover,
.salla-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10) !important;
}


/* ---------- 3. Shrink and center the category image ---------- */
/* The yafa default stretches the image to fill the entire card. We want
   a small compact image in the upper portion instead, roughly 60-70% of
   the card width. */

.category-item img,
.s-category-item img,
[class*="category-card"] img,
.salla-category-card img,
.categories-list img {
  width: 70% !important;
  max-width: 140px !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  border-radius: 50% !important;
  padding: 0 !important;
  margin: 0 auto 12px auto !important;
  display: block !important;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
}


/* ---------- 4. Move the Arabic category name below the image ---------- */
/* Yafa positions text absolutely on top of the image with white color.
   We want it positioned normally below the image in dark color. */

.category-item h3,
.category-item .category-name,
.category-item [class*="title"],
.s-category-item h3,
.s-category-item .category-name,
.s-category-item [class*="title"],
[class*="category-card"] h3,
[class*="category-card"] .category-name,
[class*="category-card"] [class*="title"],
.salla-category-card h3,
.salla-category-card [class*="title"] {
  position: static !important;
  color: #0F172A !important;
  background: transparent !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-align: center !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  line-height: 1.3 !important;
  text-shadow: none !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
}


/* ---------- 5. Adjust the grid layout to fit more cards ---------- */
/* Yafa defaults to 2 columns on mobile with tall cards. We want 2-3 columns
   with compact squareish cards matching Figma Make's grid density. */

.categories-list,
.s-categories-list,
[class*="categories-grid"],
.categories-section .grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
  padding: 16px !important;
}

@media (min-width: 640px) {
  .categories-list,
  .s-categories-list,
  [class*="categories-grid"],
  .categories-section .grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}


/* ---------- 6. Remove yafa's card link wrapper padding ---------- */
/* Sometimes yafa wraps each card in an anchor tag that adds extra padding
   or background. Strip those so our card styling is clean. */

.category-item a,
.s-category-item a,
[class*="category-card"] > a,
.salla-category-card > a {
  padding: 0 !important;
  background: transparent !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  text-decoration: none !important;
}


/* ---------- 7. Force the mint circle effect on the image ---------- */
/* Your new icons already have mint backgrounds built in, but this ensures
   that if yafa applies any additional styling to images (borders, filters,
   overlays), we override it cleanly. */

.category-item img,
.s-category-item img,
[class*="category-card"] img {
  background: transparent !important;
  filter: none !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
}


/* ---------- 8. Remove any text shadows or effects on category names ---------- */

.category-item *,
.s-category-item *,
[class*="category-card"] *,
.salla-category-card * {
  text-shadow: none !important;
  -webkit-text-stroke: 0 !important;
}


/* ============================================================================
   END OF CATEGORY CARD OVERRIDE
   ============================================================================
   
   After pasting and saving, refresh your yafa preview.
   
   Expected result:
   - Cards become compact squares instead of tall portraits
   - White card background with rounded corners
   - Your mint-circle icons sit centered in the upper area of each card
   - Category name "العناية الشخصية" etc. sits below the icon in dark text
   - Dark gradient overlay is gone
   - Hover effect lifts each card slightly
   
   If ANY of these don't work, tell me exactly which one didn't change
   and send a screenshot. I'll inspect yafa's actual HTML and write more
   precise selectors for the second pass.
   ============================================================================ */