/* Facefood Category Bar — Cheezious-style horizontal category pills */

.elementor-element.elementor-widget-facefood_category_bar,
.elementor-widget-facefood_category_bar,
.elementor-widget-facefood_category_bar > .elementor-widget-container {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

.ff-category-bar {
  --ff-catbar-bg: #f8f8f8;
  --ff-catbar-active: #fedc00;
  --ff-catbar-active-text: #1a1a1a;
  --ff-catbar-pill: #ffffff;
  --ff-catbar-pill-text: #1a1a1a;
  --ff-catbar-arrow: #f15b25;
  --ff-catbar-radius: 10px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 20px;
  background: var(--ff-catbar-bg);
  border-radius: var(--ff-catbar-radius);
  font-family: Montserrat, Poppins, system-ui, sans-serif;
}

.ff-category-bar *,
.ff-category-bar *::before,
.ff-category-bar *::after {
  box-sizing: border-box;
}

.ff-category-bar__slider {
  position: relative;
  min-width: 0;
  width: 100%;
}

.ff-category-bar__track {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  cursor: grab;
  --ff-fade-l: 0px;
  --ff-fade-r: 0px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--ff-fade-l), #000 calc(100% - var(--ff-fade-r)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--ff-fade-l), #000 calc(100% - var(--ff-fade-r)), transparent 100%);
}

.ff-category-bar__slider.has-prev .ff-category-bar__track {
  --ff-fade-l: 36px;
}

.ff-category-bar__slider.has-next .ff-category-bar__track {
  --ff-fade-r: 36px;
}

.ff-category-bar__track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

.ff-category-bar__track::-webkit-scrollbar {
  display: none;
}

/* In-flow spacers so pills do not tuck under overlay arrows. */
.ff-category-bar__track::before,
.ff-category-bar__track::after {
  content: "";
  flex: 0 0 0;
  height: 1px;
  pointer-events: none;
}

.ff-category-bar__slider.has-prev .ff-category-bar__track::before {
  flex-basis: 44px;
}

.ff-category-bar__slider.has-next .ff-category-bar__track::after {
  flex-basis: 44px;
}

.elementor-widget-facefood_category_bar a.ff-category-bar__pill,
.ff-category-bar__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  height: 52px;
  min-height: 52px;
  padding: 0 20px;
  border: 0 !important;
  border-radius: 8px;
  background: var(--ff-catbar-pill) !important;
  background-color: var(--ff-catbar-pill) !important;
  color: var(--ff-catbar-pill-text) !important;
  font-family: Montserrat, Poppins, system-ui, sans-serif !important;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.15px;
  line-height: 1.2;
  text-decoration: none !important;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.elementor-widget-facefood_category_bar a.ff-category-bar__pill:hover,
.elementor-widget-facefood_category_bar a.ff-category-bar__pill:focus,
.elementor-widget-facefood_category_bar a.ff-category-bar__pill:active,
.ff-category-bar__pill:hover,
.ff-category-bar__pill:focus,
.ff-category-bar__pill:active {
  background: var(--ff-catbar-pill) !important;
  background-color: var(--ff-catbar-pill) !important;
  color: var(--ff-catbar-pill-text) !important;
  text-decoration: none !important;
}

.elementor-widget-facefood_category_bar a.ff-category-bar__pill.is-active,
.ff-category-bar__pill.is-active,
.elementor-widget-facefood_category_bar a.ff-category-bar__pill.is-active:hover,
.elementor-widget-facefood_category_bar a.ff-category-bar__pill.is-active:focus,
.ff-category-bar__pill.is-active:hover,
.ff-category-bar__pill.is-active:focus {
  background: var(--ff-catbar-active) !important;
  background-color: var(--ff-catbar-active) !important;
  color: var(--ff-catbar-active-text) !important;
}

.ff-category-bar__pill:focus-visible {
  outline: 2px solid var(--ff-catbar-arrow);
  outline-offset: 2px;
}

.ff-category-bar__icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.ff-category-bar__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ff-category-bar__label {
  color: inherit !important;
}

/* Overlay arrows — never use huge desktop left/right pixel offsets. */
.ff-category-bar__arrow {
  display: inline-flex;
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ff-catbar-arrow);
  border-radius: 50%;
  background: var(--ff-catbar-bg);
  color: var(--ff-catbar-arrow);
  transform: translateY(-50%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.ff-category-bar__arrow[hidden] {
  display: none !important;
}

.ff-category-bar__arrow--prev {
  left: 0;
  right: auto;
}

.ff-category-bar__arrow--next {
  right: 0;
  left: auto;
}

.ff-category-bar__arrow:focus-visible {
  outline: 2px solid var(--ff-catbar-arrow);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .ff-category-bar__arrow:hover {
    background: var(--ff-catbar-arrow);
    color: #fff;
  }
}

.ff-category-bar__arrow:active {
  background: var(--ff-catbar-arrow);
  color: #fff;
}

@media (max-width: 768px) {
  .e-con:has(.elementor-widget-facefood_category_bar),
  .e-con-inner:has(.elementor-widget-facefood_category_bar),
  .elementor-section:has(.elementor-widget-facefood_category_bar) > .elementor-container,
  .elementor-container:has(.elementor-widget-facefood_category_bar),
  .elementor-column:has(.elementor-widget-facefood_category_bar),
  .elementor-widget-wrap:has(.elementor-widget-facefood_category_bar) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    --width: 100% !important;
    flex-basis: 100% !important;
  }

  .ff-category-bar {
    padding: 10px;
    border-radius: 10px;
  }

  .ff-category-bar__track {
    height: 48px;
    padding: 0;
    gap: 8px;
  }

  .ff-category-bar__slider.has-prev .ff-category-bar__track::before,
  .ff-category-bar__slider.has-next .ff-category-bar__track::after {
    flex-basis: 36px;
  }

  .elementor-widget-facefood_category_bar a.ff-category-bar__pill,
  .ff-category-bar__pill {
    height: 48px;
    min-height: 48px;
    padding: 0 16px;
    font-size: 15px;
  }

  .ff-category-bar__arrow {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 360px) {
  .ff-category-bar__slider.has-prev .ff-category-bar__track::before,
  .ff-category-bar__slider.has-next .ff-category-bar__track::after {
    flex-basis: 30px;
  }

  .ff-category-bar__arrow {
    width: 28px;
    height: 28px;
  }

  .ff-category-bar__arrow svg {
    width: 14px;
    height: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ff-category-bar__pill,
  .ff-category-bar__arrow,
  .ff-category-bar__track {
    transition: none;
    scroll-behavior: auto;
  }
}
