/* --- Square Category Grid with Liquid Glass Effects --- */
.categories-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
  justify-content: center;
}

/* Square Card Container */
.category-square-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1; /* Guarantees a perfect square */
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  display: block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  /* background-color: #121212; Fallback baseline dark color */
  text-decoration: none;
}

/* Category Image Background */
.category-square-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

/* Subtle dark overlay to add contrast behind the glass frame */
.category-square-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 2;
  transition: opacity 0.4s ease;
}

/* Hover Actions on Card */
.category-square-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 45px rgba(150, 29, 0, 0.22);
}

.category-square-card:hover .category-square-bg {
  transform: scale(1.06);
}

/* Floating Liquid Glass Frame */
.category-glass-frame {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  padding: 8px 22px;
  border-radius: 20px;
  
  /* Liquid Glassmorphism Effect */
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
  
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-square-card:hover .category-glass-frame {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.48);
  box-shadow: 0 12px 40px 0 rgba(150, 29, 0, 0.35);
  transform: translateY(-2px);
}

/* Category Text Content */
.category-glass-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.category-glass-subtitle {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--secondary-color, #ffc135);
  letter-spacing: 1.5px;
}

.category-glass-title {
  font-size: 1rem;
  font-weight: 800;
  /* font-family: var(--header-font-1), 'Alfa Slab One', cursive, sans-serif; */
  color: #ffffff;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Glass Interactive Icon */
.category-glass-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 18px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.category-square-card:hover .category-glass-icon {
  background: var(--secondary-color, #ffc135);
  color: #212529;
  border-color: var(--secondary-color, #ffc135);
  transform: rotate(45deg) scale(1.08);
  box-shadow: 0 4px 10px rgba(255, 193, 53, 0.3);
}

/* Desktop sizing constraints to keep grid cells proportional */
@media (min-width: 900px) {
  .categories-list {
    grid-template-columns: repeat(3, 1fr); /* Force 3 columns on large screens */
    gap: 2.5rem;
  }
}

/* Mobile responsive details */
@media (max-width: 600px) {
  .categories-list {
    gap: 1.5rem;
    padding: 1rem 0;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .category-square-card {
    border-radius: 20px;
  }

  .category-glass-frame {
    bottom: 15px;
    left: 15px;
    right: 15px;
    padding: 12px 16px;
    border-radius: 16px;
  }
  
  .category-glass-subtitle {
    font-size: 9px;
    letter-spacing: 1px;
  }

  .category-glass-icon {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }
}
