/**
 * Home page — search-first header (no top nav links)
 */

/* Keep sticky/fixed header above main content (main follows chrome in DOM) */
.fb-site-chrome {
  z-index: 1000 !important;
}

main.main {
  z-index: 0 !important;
}

.fb-header-search-only .nav-menu {
  display: none !important;
}

.fb-header-search-only .header-container {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: clamp(10px, 2vw, 18px) !important;
  width: 100% !important;
}

.fb-header-search-only .logo {
  grid-column: 1;
  justify-self: start;
  text-decoration: none;
  color: inherit;
}

.fb-header-search-only .fb-header-search-zone {
  grid-column: 2;
  min-width: 0;
  width: 100%;
  position: relative;
  z-index: 6;
  pointer-events: auto;
}

.fb-header-search-only .fb-header-search-zone .search-wrapper {
  display: block !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  opacity: 1 !important;
  overflow: visible !important;
  pointer-events: auto !important;
  perspective: none !important;
}

.fb-header-search-only .fb-header-search-pill {
  display: flex !important;
  align-items: center !important;
  position: relative !important;
  width: 100% !important;
  min-height: 44px;
  padding: 0 0.85rem 0 2.65rem !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  transform: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
  cursor: text;
  pointer-events: auto !important;
  touch-action: manipulation;
}

.fb-header-search-only .fb-header-search-pill::before {
  display: none !important;
}

.fb-header-search-only .fb-header-search-pill:hover,
.fb-header-search-only .fb-header-search-pill:focus-within {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 61, 61, 0.45) !important;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 61, 61, 0.15) !important;
}

.fb-header-search-only .fb-header-search-pill .search-icon {
  position: absolute !important;
  left: 1rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: rgba(255, 255, 255, 0.55) !important;
  pointer-events: none !important;
}

.fb-header-search-only .fb-header-search-pill input {
  width: 100% !important;
  min-width: 0 !important;
  padding: 0.72rem 2rem 0.72rem 0 !important;
  height: auto !important;
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  outline: none !important;
  transform: none !important;
  pointer-events: auto !important;
  touch-action: manipulation;
}

.fb-header-search-only .fb-header-search-pill input::placeholder {
  color: rgba(189, 195, 199, 0.72) !important;
}

.fb-header-search-only .fb-header-search-pill .search-clear {
  position: absolute !important;
  right: 0.45rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  pointer-events: auto !important;
  touch-action: manipulation;
}

.fb-header-search-only .header-right {
  grid-column: 3;
  justify-self: end;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  pointer-events: auto !important;
  z-index: 7;
}

.fb-header-search-only .mobile-search-trigger {
  display: none !important;
}

.fb-header-search-only .fb-header-icon-btn,
.fb-header-search-only .fb-header-wishlist {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto !important;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.fb-header-search-only .fb-header-wishlist:hover,
.fb-header-search-only .fb-header-wishlist:focus-visible {
  background: rgba(255, 61, 61, 0.18);
  border-color: rgba(255, 61, 61, 0.4);
  color: #fff;
}

.fb-header-search-only .fb-header-wishlist .wishlist-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--primary, #ff3d3d);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.fb-header-search-only .fb-header-wishlist .wishlist-badge:empty {
  display: none;
}

.fb-header-search-only .fb-header-apk-btn,
.fb-header-search-only #fbHeaderApkBtn {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 7;
}

@media (max-width: 768px) {
  .fb-header-search-only .fb-header-apk-btn,
  .fb-header-search-only #fbHeaderApkBtn {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
}

@media (min-width: 769px) {
  .fb-header-search-only .fb-header-apk-btn,
  .fb-header-search-only #fbHeaderApkBtn {
    display: inline-flex !important;
  }
}

.fb-header-search-only .hamburger-menu {
  pointer-events: auto !important;
  touch-action: manipulation;
  cursor: pointer;
}

.fb-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Desktop — wider search, hide hamburger (sidebar handles nav) */
@media (min-width: 769px) {
  html.fb-desktop-ott .fb-header-search-only .hamburger-menu {
    display: none !important;
  }

  html.fb-desktop-ott .fb-header-search-only .fb-header-search-zone {
    max-width: min(880px, calc(100vw - 380px));
    margin: 0 auto;
    padding: 0 0.35rem;
  }

  html.fb-desktop-ott .fb-header-search-only .fb-header-search-pill {
    min-height: 56px;
    padding: 0 1.1rem 0 3.35rem !important;
    border-radius: 999px !important;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.07) 48%, rgba(255, 61, 61, 0.08) 100%) !important;
    border: 2px solid rgba(255, 215, 0, 0.52) !important;
    box-shadow:
      0 0 0 1px rgba(255, 61, 61, 0.2),
      0 14px 44px rgba(0, 0, 0, 0.48),
      0 0 52px rgba(255, 61, 61, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
    animation: fbDesktopSearchPulse 3.2s ease-in-out infinite;
  }

  html.fb-desktop-ott .fb-header-search-only .fb-header-search-pill::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(
      105deg,
      transparent 0%,
      rgba(255, 255, 255, 0.22) 42%,
      transparent 58%
    );
    opacity: 0.55;
    animation: fbDesktopSearchShine 4.8s ease-in-out infinite;
  }

  html.fb-desktop-ott .fb-header-search-only .fb-header-search-pill:hover,
  html.fb-desktop-ott .fb-header-search-only .fb-header-search-pill:focus-within {
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 61, 61, 0.12) 100%) !important;
    border-color: rgba(255, 215, 0, 0.82) !important;
    box-shadow:
      0 0 0 1px rgba(255, 61, 61, 0.35),
      0 18px 52px rgba(0, 0, 0, 0.52),
      0 0 64px rgba(255, 193, 7, 0.28),
      0 0 36px rgba(255, 61, 61, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px);
  }

  html.fb-desktop-ott .fb-header-search-only .fb-header-search-pill .search-icon {
    left: 1.15rem !important;
    font-size: 1.12rem !important;
    color: #ffd700 !important;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.55));
  }

  html.fb-desktop-ott .fb-header-search-only .fb-header-search-pill input {
    font-size: 1.08rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.015em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  }

  html.fb-desktop-ott .fb-header-search-only .fb-header-search-pill input::placeholder {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  html.fb-desktop-ott .fb-header-search-only .fb-header-search-pill .search-clear {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85) !important;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
  }

  html.fb-desktop-ott .fb-header-search-only .fb-header-search-pill .search-clear:hover {
    background: rgba(255, 61, 61, 0.25);
    color: #fff !important;
  }

  html.fb-desktop-ott .fb-header-search-only #fbSearchOverlayBtn {
    display: none !important;
  }

  html.fb-desktop-ott .fb-header-search-only .header-container {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
  }
}

@keyframes fbDesktopSearchPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(255, 61, 61, 0.2),
      0 14px 44px rgba(0, 0, 0, 0.48),
      0 0 52px rgba(255, 61, 61, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.14);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 215, 0, 0.35),
      0 16px 48px rgba(0, 0, 0, 0.52),
      0 0 68px rgba(255, 193, 7, 0.22),
      0 0 40px rgba(255, 61, 61, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }
}

@keyframes fbDesktopSearchShine {
  0% {
    transform: translateX(-120%);
    opacity: 0;
  }
  18% {
    opacity: 0.55;
  }
  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}

@media (min-width: 769px) and (prefers-reduced-motion: reduce) {
  html.fb-desktop-ott .fb-header-search-only .fb-header-search-pill,
  html.fb-desktop-ott .fb-header-search-only .fb-header-search-pill::after {
    animation: none !important;
  }
}

/* Mobile — always show inline search pill (not popup-only) */
@media (max-width: 768px) {
  .fb-header-search-only .header-right .search-wrapper {
    display: none !important;
  }

  .fb-header-search-only .fb-header-search-zone .search-container:not(.active) {
    display: flex !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
  }

  .fb-header-search-only .fb-header-search-pill {
    min-height: 42px;
  }

  .fb-header-search-only .fb-header-search-pill input {
    font-size: 16px !important;
  }

  html.fb-mobile-ott .fb-header-search-only .fb-header-wishlist {
    display: none !important;
  }

  html.fb-mobile-ott .fb-header-search-only .header-container {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
  }
}

/* Desktop search dropdown under pill */
@media (min-width: 769px) {
  .fb-header-search-only .fb-header-search-zone #searchResults.search-results.show,
  .fb-header-search-only .fb-header-search-zone #searchSuggestions.search-suggestions.show {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: 0 !important;
    max-height: min(420px, 52vh) !important;
    z-index: 10200 !important;
  }
}
