
/* make grid items equal height */
.cat-page .wc-block-product-categories-list {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  column-gap: 16px !important;
  row-gap: 10px;
  align-items: stretch !important;
  padding-left: 0px;
  margin: 0px;
}

/* target the most common inner containers (anchor or content wrapper)
   and force them to be column flex containers with a 16px gap */
.cat-page .wc-block-product-categories-list li,
.cat-page .wc-block-product-categories-list li > a,
.cat-page .wc-block-product-categories-list li .wc-block-product-categories-list__content {
  height: 100% !important;
}

/* Ensure anchor/content is the flex container with gap */
.cat-page .wc-block-product-categories-list li > a,
.cat-page .wc-block-product-categories-list li .wc-block-product-categories-list__content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 16px !important;            /* preferred modern approach */
  padding: 12px !important;
  box-sizing: border-box !important;
}

/* Fallback: if gap still doesn't apply, add spacing under the image */
.cat-page .wc-block-product-categories-list img {
  display: block !important;
  margin: 0 auto 0px auto !important; /* fallback spacing */
  width: 160px !important;
  height: 160px !important;
  object-fit: cover !important;
  border-radius: 4px !important;
  background: #f6f6f6 !important;
}

/* Title styling */
.cat-page .wc-block-product-categories-list .wc-block-product-categories-list__title,
.cat-page .wc-block-product-categories-list li > a > .wc-block-product-categories-list__title,
.cat-page .wc-block-product-categories-list li > a > span {
  margin: 0 !important;
  color: #333 !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  text-align: center !important;
}

/* card visual (unchanged from your style) */ 
.cat-page .wc-block-product-categories-list li {
  list-style: none !important;
  margin: 0 !important;
  border-radius: 6px !important;
  border: 1px solid #F6F6F6 !important;
  transition: transform .25s ease, box-shadow .25s ease !important;
  background: #fff;
}

.cat-page .wc-block-product-categories-list-item__image {
  border: 0px !important;
  max-width: 160px !important;
  margin: 0px !important;
}

/* hover */
.cat-page .wc-block-product-categories-list li:hover {
    transform: translateY(-4px);
    background: #FFFFFF;
    box-shadow: 0 3px 30px 0 rgba(0,0,0,0.08);
}

/* responsive adjustments (keep yours if you prefer) */
@media (max-width: 1400px) { .cat-page .wc-block-product-categories-list { grid-template-columns: repeat(6, 1fr) !important; } }
@media (max-width: 1200px) { .cat-page .wc-block-product-categories-list { grid-template-columns: repeat(5, 1fr) !important; } }
@media (max-width: 992px)  { .cat-page .wc-block-product-categories-list { grid-template-columns: repeat(4, 1fr) !important; } }
@media (max-width: 768px)  { .cat-page .wc-block-product-categories-list { grid-template-columns: repeat(3, 1fr) !important; gap:18px !important; } 
                             .cat-page .wc-block-product-categories-list img { width: 160px !important; height: 160px !important; } }
@media (max-width: 520px)  { .cat-page .wc-block-product-categories-list { grid-template-columns: repeat(2, 1fr) !important; } 
                             .cat-page .wc-block-product-categories-list img { width: 160px !important; height: 120px !important; }}


.alphabet-list {
  display: flex;
  padding-left: 0;
  list-style: none;
  gap: 12px;
  justify-content: space-between !important;  
}

@media (max-width: 600px) {
  .alphabet-list {
    flex-wrap: nowrap;           
    overflow-x: auto;            
    white-space: nowrap;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
  }

  .alphabet-list li {
    flex: 0 0 auto;              
    min-width: 32px;
    text-align: center;
  }
}

.alphabet-list::-webkit-scrollbar {
  display: none;
}
.alphabet-list {
  scrollbar-width: none;
}

.cat-details h2 {
  line-height: 26px;
}

/*  display: flex;
  padding-left: 0px;
  list-style: none;
  justify-content: space-between !important;

    li a:hover {
      color: #561AFD;
    }

}

@media (max-width: 600px) {
  .alphabet-list {
    gap: 6px 8px;
  }

  .alphabet-list li {
    min-width: 24px;
    font-size: 13px;
  }
}*/

.cat-list {
  
  padding-left: 0px;
  list-style: none; 


    li {
      font-size: 14px;
      font-weight: 400;
      line-height: 1.5;
      color: #67656C;      
    } 

    li:not(:last-child) {
      margin-bottom: 10px;
    }

    li a:hover {
      color: #561AFD;
    }

}

.cat-group {
  gap: 16px;
}

.cat-group p a:hover {
  color: #561AFD;
}

/*.category-group {
  display: none;
}

.category-group:target {
  display: block;
}

.category-wrapper:not(:has(.category-group:target))
.category-group:first-child {
  display: block;
}

.editor-styles-wrapper .category-group {
  display: block !important;
}*/


.category-group {
  display: none;
}


.category-group:first-child {
  display: block;
}


.category-group:target {
  display: block;
}

.category-group:first-child:not(:target) {
  display: block;
}

.editor-styles-wrapper .category-group {
  display: block !important;
}


@media (max-width: 1200px) {
  .alphabet {
    padding: 10px !important;
  }
}

@media (max-width: 781px) {
  .alphabet {
    width: 80px;
  }
}

/********* CATEGORY LIST BLOCK **************/

/*.cat-filter .wc-block-product-categories-list {
  display: grid !important;
  grid-template-columns: repeat(1, 1fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
  padding-left: 0px; 
  padding-top: 32px;
  padding-bottom: 32px;
  list-style: none;
}



.cat-filter .wc-block-product-categories-list li {
  font-weight: 600;
  padding: 28px;
  border-radius: 4px !important;
  border: 1px solid #F6F6F6 !important;  
  background: #FFFFFF;
  box-shadow: 0 3px 30px 0 rgba(0, 0, 0, 0.08);
}

.cat-filter .wc-block-product-categories-list li:hover {
  box-shadow: 0 3px 30px 0 rgba(0, 0, 0, 0.08);
}

.cat-filter .wc-block-product-categories-list li .wc-block-product-categories-list {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  border: 0px !important; 
  padding: 0px !important;
  gap: 24px !important; 
  margin-top: 16px !important;

  .wc-block-product-categories-list-item {
    border: 0px !important;
    font-weight: 400 !important;
    padding: 0px !important;
    background: transparent !important;
    box-shadow: 0 0px 0px 0 rgba(0, 0, 0, 0) !important;
  }
}

@media (max-width:375px) {
  .cat-filter .wc-block-product-categories-list li .wc-block-product-categories-list {
    grid-template-columns: repeat(1, 1fr) !important;
  }
}*/

