/* Categories and perfume types composition layer */

.hero {
  min-height: 210px;
}

.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 220px));
  justify-content: center;
}

.category-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  overflow: hidden;
  min-height: 188px;
  aspect-ratio: auto;
  width: min(100%, 220px);
  margin-inline: auto;
  border-radius: var(--sf-radius-lg);
  border: 1px solid var(--sf-border-subtle);
  box-shadow: var(--sf-shadow-soft);
  background: var(--theme-card-bg);
  padding: 12px;
  cursor: pointer;
}

.category-image {
  width: clamp(92px, 26vw, 112px);
  height: clamp(92px, 26vw, 112px);
  min-width: clamp(92px, 26vw, 112px);
  min-height: clamp(92px, 26vw, 112px);
  flex: 0 0 auto;
  object-fit: cover;
  object-position: center;
  padding: 0;
  background: color-mix(in srgb, var(--theme-section-bg) 85%, transparent);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid var(--sf-border-subtle);
  margin: 0 auto;
}

.category-overlay {
  display: none;
  position: absolute;
  inset: 0;
  height: auto;
  background: none;
  pointer-events: none;
}

.category-name {
  position: static;
  z-index: 1;
  width: 100%;
  padding: 0 6px 2px;
  color: var(--theme-text-primary);
  font-weight: 700;
  line-height: 1.35;
  min-height: 2.8em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  word-break: break-word;
  overflow-wrap: anywhere;
  background: transparent;
  border: none;
  border-radius: 0;
  backdrop-filter: none;
}

@media (max-width: 640px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sf-space-3);
  }

  .category-tile {
    width: 100%;
    min-height: 162px;
    padding: 10px;
    gap: 8px;
  }

  .category-image {
    width: clamp(84px, 25vw, 104px);
    height: clamp(84px, 25vw, 104px);
    min-width: clamp(84px, 25vw, 104px);
    min-height: clamp(84px, 25vw, 104px);
  }

  .category-name {
    font-size: 0.9rem;
  }
}
