/**
 * Homepage category strip — loaded separately so it applies when the main
 * stylesheet is replaced by style-rtl.css (wp_style_add_data rtl replace).
 *
 * @package Food Grocery Hub
 */

/* Homepage category strip — white bar on soft green + subtle pattern (Pro-style) */
.fgh-home-categories {
  padding: 28px 0 32px;
 
  background-size: 22px 22px, 100% 100%;
  border-bottom: none;
}

/* Overlap hero/slider: bar sits slightly on top of banner (#slider is z-index 9 in style.css). */
main.fgh-pro-home .fgh-home-categories {
  margin-top: clamp(-40px, -5vw, -56px);
  padding-top: 48px;
  position: relative;
  z-index: 12;
}

.fgh-cat-bar {
  background: #fff;
  border-radius: 22px;
  box-shadow:
    0 10px 40px rgba(63, 95, 47, 0.12),
    0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 22px 14px 26px;
}

.fgh-cat-scroll {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(63, 95, 47, 0.35) transparent;
}

.fgh-cat-scroll::-webkit-scrollbar {
  height: 6px;
}

.fgh-cat-scroll::-webkit-scrollbar-thumb {
  background: rgba(63, 95, 47, 0.25);
  border-radius: 3px;
}

.fgh-cat-item {
  flex: 1 1 0;
  min-width: 68px;
  max-width: 110px;
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start;
  text-align: center;
  text-decoration: none;
  color: var(--brand-forest, #3f5f2f);
  padding: 6px 4px 4px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.fgh-cat-item:hover,
.fgh-cat-item:focus-visible {
  color: var(--brand-forest, #3f5f2f);
  opacity: 0.88;
  outline: none;
}

.fgh-cat-item:focus-visible {
  box-shadow: 0 0 0 2px var(--brand-sage, #98a87d);
  border-radius: 8px;
}

.fgh-cat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  margin: 0 0 10px;
  border-radius: 0;
  background: transparent;
  color: var(--brand-forest, #3f5f2f);
  font-size: 28px;
  line-height: 1;
}

.fgh-cat-icon i {
  display: block;
  line-height: 1;
  font-style: normal;
  font-variant: normal;
  /* Solid icons need heavy weight; 400 breaks Font Awesome glyphs. */
  font-weight: 900;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.fgh-cat-label {
  display: block !important;
  width: 100%;
  font-family: "Manrope", sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-transform: capitalize;
  color: inherit;
}

@media screen and (min-width: 992px) {
  .fgh-home-categories {
    padding: 32px 0 36px;
  }

  main.fgh-pro-home .fgh-home-categories {
    margin-top: -115px;
    padding-top: 56px;
  }

  .fgh-cat-bar {
    padding: 26px 28px 30px;
    border-radius: 26px;
  }

  .fgh-cat-scroll {
    flex-wrap: nowrap;
    justify-content: space-between;
    overflow-x: visible;
    gap: 12px;
  }

  .fgh-cat-item {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    padding: 8px 6px;
  }

  .fgh-cat-icon {
    font-size: 32px;
    margin-bottom: 12px;
  }

  .fgh-cat-label {
    font-size: 13px;
  }
}

@media screen and (max-width: 575px) {
  .fgh-cat-bar {
    padding: 18px 10px 22px;
    border-radius: 18px;
  }

  .fgh-cat-item {
    min-width: 72px;
    max-width: none;
  }

  .fgh-cat-icon {
    font-size: 24px;
    margin-bottom: 8px;
  }

  .fgh-cat-label {
    font-size: 11px;
  }
}
