/* RunFree Search Overlay Styles - Nike-Inspired Design */

/* Screen Reader Only - Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Prevent body scroll when overlay is open - iOS Safari fix */
body.search-overlay-open {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-overflow-scrolling: none;
}

.search-overlay {
  position: fixed;
  top: -500px;
  left: 0;
  right: 0;
  height: calc(65vh + 500px);
  max-height: calc(600px + 500px);
  background: var(--white);
  z-index: 99999;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  padding-top: 500px;
  overflow: hidden;
  transform: translateY(-100%);
  transform-origin: top center;
  will-change: transform;
}

.search-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 500px;
  background: var(--white);
  pointer-events: none;
  z-index: -1;
}

.search-overlay.active {
  animation: slideDownBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slideDownBounce {
  0% {
    transform: translateY(-100%) scaleY(0.95);
  }
  50% {
    transform: translateY(0) scaleY(1.03);
  }
  65% {
    transform: translateY(0) scaleY(0.98);
  }
  80% {
    transform: translateY(0) scaleY(1.01);
  }
  100% {
    transform: translateY(0) scaleY(1);
  }
}

.search-overlay[aria-hidden="true"] {
  display: none;
}

/* Header Section */
.search-overlay-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 40px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--white);
  position: relative;
  z-index: 1;
}

.search-logo {
  flex-shrink: 0;
  width: 120px;
  height: 100%;
}

.search-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.search-input-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--input) !important;
  border: none !important;
  border-radius: 100px !important;
  padding: 0 !important;
  height: 70px !important;
  transition: box-shadow 0.2s ease;
}

.search-input-container:focus-within {
  outline: unset !important;
  box-shadow: none !important;
  appearance: none;
  background-color: var(--input) !important;
  position: relative;
}

.search-input-container:focus-within::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 100px;
  padding: 2px;
  background: conic-gradient(
    from var(--angle),
    transparent 0deg,
    transparent 30deg,
    #0fb865 60deg,
    #3285ff 100deg,
    #f94543 180deg,
    #fabd10 260deg,
    transparent 300deg,
    transparent 360deg
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: 
    linear-gradient(#fff 0 0) content-box exclude, 
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: shine-rotate 3s linear infinite;
  pointer-events: none;
}

@keyframes shine-rotate {
  0% {
    --angle: 0deg;
  }
  100% {
    --angle: 360deg;
  }
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.search-input-container .search-icon {
  color: #d2d8e5;
  font-size: 28px;
  font-weight: bold;
  margin-left: 20px;
  margin-right: 0;
  position: relative;
  z-index: 1;
}

.icon-Broswer-Close.clear-search.x {
  font-size: 32px;
  color: #d2d8e5;
  border: none;
  background: transparent;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.icon-Broswer-Close.clear-search.x:hover {
  color: var(--red);
  transition: 0.1s;
}

.icon-Broswer-Close.clear-search.x:active {
  color:  var(--red);
  -webkit-transform: translateY(1px);
  transform: translateY(1px);
  transition: 0.1s;
}

.icon-Broswer-Close.clear-search.x:focus {
  outline: none !important;
  box-shadow: none !important;
}

.icon-Broswer-Close.clear-search.x:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.search-overlay-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 0 20px !important;
  font-size: 25px !important;
  font-weight: 600 !important;
  color: var(--almostblack) !important;
  outline: none !important;
  height: 100% !important;
  margin-top: 4px !important;
  box-shadow: unset !important;
  position: relative;
  z-index: 1;
}

.search-overlay-input::placeholder {
  color: #b2bacb;
  font-size: 20px;
  text-transform: capitalize;
  text-align: left;
}

.search-input-container .clear-search {
  color: var(--input);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s ease;
  margin-right: 25px;
  margin-bottom: 0px;
  position: relative;
  z-index: 1;
}

.search-input-container .clear-search:hover {
  color: var(--almostblack);
}

.search-cancel {
  flex-shrink: 0;
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--almostblack);
  padding: 10px 20px;
  cursor: pointer;
  transition: opacity 0.2s ease;
  font-family: inherit;
}

.search-cancel:hover {
  color: var(--red);
  text-decoration: underline;
  transition: var(--transition);
}

/* Only show focus outline for keyboard navigation */
.search-cancel:focus {
  outline: none;
}

.search-cancel:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.search-cancel:active {
  color: var(--red);
  -webkit-transform: translateY(1px);
  transform: translateY(1px);
  transition: 0.1s;
}

/* Content Section */
.search-overlay-content {
  display: flex;
  flex: 1;
  overflow: hidden;
  gap: 0px;
  padding: 0 0px 0 20px;
  position: relative;
}

.search-overlay-content::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 100%;
  background: linear-gradient(to left, var(--bggrey) 0%, rgba(238, 241, 245, 0) 100%);
  pointer-events: none;
  z-index: 10;
}

/* Suggestions Section */
.search-suggestions {
  width: 320px;
  flex-shrink: 0;
  padding: 20px 0px 0px 0;
  overflow-y: auto;
  border-right: 1px solid var(--border);
}

.suggestions-section {
  margin-bottom: 20px;
}

.suggestions-section:last-child {
  margin-bottom: 0px;
}

/* Recent Searches - Inline Display (centered in empty state) */
.recent-searches-inline {
  margin-bottom: 32px;
  padding: 0 20px;
  text-align: center;
}

.recent-searches-container {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 16px;
  line-height: 1.5;
  justify-content: center;
}

.recent-searches-label {
  color: var(--menu);
  font-weight: 600;
  white-space: nowrap;
}

.recent-searches-links {
  display: inline;
  color: var(--almostblack);
}

.recent-search-link {
  color: var(--menu);
  text-decoration: underline;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.recent-search-link:hover {
  color: var(--primary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

/* Only show focus outline for keyboard navigation */
.recent-search-link:focus {
  outline: none;
}

.recent-search-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}
.recent-search-link:active {  
  color: var(--primary);
  text-decoration: underline;
  -webkit-transform: translateY(1px);
  transform: translateY(1px);
  transition: 0.1s;
}

.suggestions-title {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--menu);
  font-weight: 800;
  margin-bottom: 0px;
  padding-left: 20px;
}

.suggestions-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.suggestion-item {
  padding: 7px 12px 6px 20px;
  font-size: 16px;
  color: var(--almostblack);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-left 0.2s ease;
  margin-bottom: 0px;
  margin-right: 20px;
  line-height: 1.3;
  border-left: 3px solid transparent;
}

.suggestion-item:hover {
  background: var(--input);
}

/* Only show focus outline for keyboard navigation */
.suggestion-item:focus {
  outline: none;
}

.suggestion-item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* Keyboard navigation */
.suggestion-item.keyboard-focused,
.search-product-tile.keyboard-focused,
.search-all-button.keyboard-focused {
  background: var(--input);
  border-left: 3px solid var(--primary);
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.suggestion-link {
  color: unset!important;
}

/* Loading skeleton */
.suggestion-skeleton {
  height: 28px;
  margin-right: 40px;
  margin-left: 20px;
  margin-bottom: 8px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--skeleton-one) 25%, var(--skeleton-two) 50%, var(--skeleton-two) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  pointer-events: none;
}

.suggestion-skeleton span {
  display: block;
  height: 100%;
  width: 60%;
  background: transparent;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.suggestion-item .match {
    font-weight: 700;
    background: linear-gradient(135deg, #0fb865, #3285ff, #f94543, #fabd10);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: aurora_text 10s ease-in-out infinite alternate;
    background-size: 200%;
}

@keyframes aurora_text {
    0% {
        background-position: 0% center;
    }
    25% {
        background-position: 50% 100%;
    }
    50% {
        background-position: 100% center;
    }
    75% {
        background-position: 50% 0%;
    }
    100% {
        background-position: 0% center;
    }
}

/* Product Previews Section */
.search-products {
  flex: 1;
  padding: 20px;
  overflow-x: auto;
  overflow-y: auto;
  position: relative;
  background-color: var(--bggrey);
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

/* Rainbow Loading Bar */
.search-loading-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  overflow: visible;
  display: none;
  z-index: 10;
}

.search-loading-bar.active {
  display: block;
}

.search-loading-bar-progress {
  height: 100%;
  width: 100%;
  background: linear-gradient(
    90deg,
    #0fb865 0%,
    #3285ff 25%,
    #f94543 50%,
    #fabd10 75%,
    #0fb865 100%
  );
  background-size: 200% 100%;
  animation: rainbow-slide 1s linear infinite;
}

@keyframes rainbow-slide {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}

.search-products-fade {
  display: none;
}

.product-previews-grid {
  display: flex;
  gap: 20px;
  animation: fadeIn 0.3s ease;
}

.product-previews-grid::after {
  content: '';
  width: 10px;
  flex-shrink: 0;
}

.product-previews-grid .search-product-tile {
  min-width: 215px;
  max-width: 275px;
  flex-shrink: 0;
}

.product-previews-grid .search-product-tile:last-child {
  margin-right: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-product-tile {
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
  animation: productFadeIn 0.4s ease forwards;
  opacity: 0;
  background-color: var(--white);
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  border: 2px solid transparent;
}

.search-product-tile.clickable:hover {
  border-color: var(--primary);
  box-shadow: rgba(9, 30, 66, 0.31) 0px 0px 1px, rgba(9, 30, 66, 0.25) 0px 20px 32px -8px;
  transform: scale3d(1.05, 1.05, 1);
  z-index: 100;
}

.search-product-tile.clickable:active {
  border-color: var(--primary);
  box-shadow: 0 4px 11px rgba(0, 0, 0, 0.05);
  transform: scale3d(1, 1, 1);
}

@keyframes productFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-product-tile:nth-child(1) { animation-delay: 0.05s; }
.search-product-tile:nth-child(2) { animation-delay: 0.1s; }
.search-product-tile:nth-child(3) { animation-delay: 0.15s; }
.search-product-tile:nth-child(4) { animation-delay: 0.2s; }
.search-product-tile:nth-child(5) { animation-delay: 0.25s; }
.search-product-tile:nth-child(6) { animation-delay: 0.3s; }
.search-product-tile:nth-child(7) { animation-delay: 0.35s; }
.search-product-tile:nth-child(8) { animation-delay: 0.4s; }

.search-product-tile:hover {
  border: solid 2px var(--primary);
  box-shadow: rgba(9, 30, 66, 0.309804) 0px 0px 1px,
    rgba(9, 30, 66, 0.247059) 0px 20px 32px -8px;
  transform: scale3d(1.05, 1.05, 1);
  transition: 0.2s;
  z-index: 5000;
}
 
.search-product-tile:active {
  border: solid 2px var(--primary);
  box-shadow: 0 4px 11px rgba(0, 0, 0, 0.05);
  transform: scale3d(1, 1, 1);
  transition: 0.2s;
}

.search-product-image {
  width: 100%;
  background-size: cover;
  background-position: center;
  background-color: var(--input);
  border-radius: 8px;
  position: relative;
  height: 200px !important;
}

.search-sale-badge {
  display: none;
  position: absolute;
  top: 0px;
  left: 0px;
  background: #33bc00;
  color: #fff;
  padding: 6px 13px;
  border-radius: 0px;
  font-family: var(--font-primary);
  font-size: 12px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  z-index: 998;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.05);
}

.search-sale-badge.show {
  display: inline !important;
}

.search-product-info {
  text-align: center;
}

.search-product-brand {
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--menu);
  margin-bottom: 2px;
  letter-spacing: 0.5px;
  line-height: 16px;
  text-overflow: ellipsis;
  overflow: hidden;
}

.search-product-name {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--almostblack);
  margin-bottom: 4px;
  line-height: 20px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: break-spaces;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-product-price {
  font-family: var(--font-primary);
  font-size: 18px;
  line-height: 22px;
  color: var(--almostblack);
  font-weight: 800;
}

.search-product-price .struck {
  text-decoration: line-through;
  text-decoration-color: red;
  color: var(--menu);
  font-weight: 700;
  margin-right: 6px;
  font-size: 16px;
}

/* Color Swatches in Search */
.search-product-tile .colorswatches {
  display: flex;
  gap: 4px;
  padding: 4px 0;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap; /* Prevent wrapping - overflow handled by JavaScript */
  min-height: 32px;
  z-index: 5;
  overflow: hidden; /* Hide any swatches that exceed container width */
  max-width: 100%; /* Prevent exceeding parent container width */
  box-sizing: border-box;
  position: absolute;
  top: 170px;
  left: 50%;
  transform: translateX(-50%);
}

.search-product-tile .colorswatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  background-color: #ffffff;
  border: 2px solid #eef1f5;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0; /* Prevent swatches from shrinking */
}

.search-product-tile .colorswatch:hover {
  transform: scale(1.15);
  border-color: var(--filterhr);
  z-index: 10;
}

.search-product-tile .colorswatches:empty {
  display: none;
}

/* View All Results Card */
.product.view-all-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1 !important; /* Override product tile fade-in */
  animation: rainbow 2s linear infinite; /* Override product fade-in animation */
  background: 
    linear-gradient(var(--white), var(--white)) padding-box,
    linear-gradient(var(--white) 50%, var(--glass) 80%, rgba(18, 18, 19, 0)) border-box,
    linear-gradient(90deg, 
      #0fb865,
      #3285ff,
      #f94543,
      #fabd10
    ) border-box;
  background-size: 200%;
  background-clip: padding-box, border-box, border-box;
  background-origin: border-box;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: visible;
}

.product.view-all-card::before {
  content: '';
  position: absolute;
  bottom: -5%;
  left: 50%;
  z-index: 0;
  height: 10%;
  width: 90%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, 
    #0fb865,
    #3285ff,
    #f94543,
    #fabd10
  );
  filter: blur(20px);
  opacity: 0.3;
  animation: rainbow 2s linear infinite;
}

.product.view-all-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}


.view-all-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  min-height: 200px;
}

.view-all-text {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 800;
  color: var(--almostblack);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

/* Empty States */
.search-searching {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  color: #b2bacb;
  background-color: var(--bggrey);
  z-index: 5;
}

.search-empty-state{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  color: #b2bacb;
  background-color: var(--bggrey);
  z-index: 5;
}

.search-no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  color: #b2bacb;
  background-color: var(--bggrey);
  z-index: 5;
}

.empty-icon {
  color: var(--filterhr);
  font-size: 48px;
  margin-bottom: 16px;
}

.search-searching h3 {
  font-size: 54px;
  font-weight: 600;
  margin: 0;
  color: #b2bacb;
}

.search-empty-state p,
.search-no-results p{
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  color: #b2bacb;
}

.search-no-results span {
  font-size: 22px;
  color: #b2bacb;
  font-weight: 600;
  margin: 0;
  display: block;
}

/* Footer Section */
.search-overlay-footer {
  padding: 24px 40px;
  border-top: 1px solid var(--border);
  background: var(--white);
  flex-shrink: 0;
  display: none; /* Hidden by default, shown by JavaScript when results load */
  justify-content: center;
}

.search-all-button {
  width: 225px;
  margin: 0 auto;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  margin-bottom: 0px;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 10px 24px;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  
  /* Rainbow gradient background with multiple layers */
  background: 
    linear-gradient(#121213, #121213) padding-box,
    linear-gradient(#121213 50%, rgba(18, 18, 19, 0.6) 80%, rgba(18, 18, 19, 0)) border-box,
    linear-gradient(90deg, 
    #0fb865,
    #3285ff,
    #f94543,
    #fabd10
    ) border-box;
  background-size: 200%;
  background-clip: padding-box, border-box, border-box;
  background-origin: border-box;
  animation: rainbow 2s linear infinite;
}

.search-all-button::before {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 50%;
  z-index: 0;
  height: 30%;
  width: 90%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, 
    #0fb865,
    #3285ff,
    #f94543,
    #fabd10
  );
  filter: blur(20px);
  opacity: 0.8;
  animation: rainbow 2s linear infinite;
}

.search-all-button span,
.search-all-button i,
.search-all-button div {
  position: relative;
  z-index: 1;
}

@keyframes rainbow {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

.search-all-button:hover {
  transform: scale(1.02);
}

.search-all-button:active {
  transform: translateY(2px);
}

/* Scrollbar Styling */
.search-suggestions::-webkit-scrollbar,
.search-products::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.search-suggestions::-webkit-scrollbar-track,
.search-products::-webkit-scrollbar-track {
  background: transparent;
}

.search-suggestions::-webkit-scrollbar-thumb,
.search-products::-webkit-scrollbar-thumb {
  background: var(--filterhr);
  opacity: 0.3;
  border-radius: 20px;
  cursor: pointer;
  transition: .1s;
}

.search-suggestions::-webkit-scrollbar-thumb:hover,
.search-products::-webkit-scrollbar-thumb:hover {
  background: var(--filterhr);
  opacity: 1;
  transition: .1s;
}

/* Loading State */
.search-products.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Backdrop */
.search-overlay-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.search-no-results .sad-search {
    background-size: 125px 125px;
    background-repeat: no-repeat;
    background-position: center;
    width: 125px;
    height: 125px;
    background-image: url(../images/sadsearch.svg);
    display: block;
    margin-bottom: 18px;
}

/* Autocorrect Suggestion Styling */
.autocorrect-suggestion {
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--almostblack);
}

.autocorrect-link {
  color: var(--menu);
  text-decoration: underline;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.autocorrect-link:hover {
  color: var(--primary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

/* Only show focus outline for keyboard navigation */
.autocorrect-link:focus {
  outline: none;
}

.autocorrect-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.autocorrect-link:active {  
  color: var(--primary);
  text-decoration: underline;
  -webkit-transform: translateY(1px);
  transform: translateY(1px);
  transition: 0.1s;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .search-overlay-header {
    padding: 20px 24px;
  }

  .search-overlay-content {
    gap: 24px;
    padding: 0 24px;
  }

  .search-suggestions {
    width: 280px;
  }

  .product-previews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
  }

  .search-overlay-footer {
    padding: 20px 24px;
  }
}

@media (max-width: 768px) {
  .search-overlay {
    position: fixed;
    top: -100%;
    left: 0;
    right: 0;
    bottom: auto;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for iOS Safari */
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    padding-top: 0;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }
  
  .search-overlay::before {
    display: none;
  }
  
  .search-overlay.active {
    top: 0;
    bottom: 0;
  }

  .search-overlay-header {
    padding: 16px 20px;
    gap: 12px;
  }

  .search-logo {
    display: none;
  }

  .search-overlay-input {
    font-size: 15px;
    padding: 12px 0;
  }

  .search-cancel {
    font-size: 15px;
    padding: 8px 0px;
  }

  .search-overlay-content {
    flex-direction: column;
    padding: 0px;
    gap: 0;
  }

  .search-suggestions {
    width: 100%;
    padding: 0px 0 0px;
    border-bottom: 1px solid var(--border);
  }

  .search-products {
    padding: 10px 0 10px 10px;
    overflow-x: hidden;
    overflow-y: auto;
    display: none;
  }

  .search-overlay-content::after {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to top, var(--bggrey) 0%, rgba(238, 241, 245, 0) 100%);
  }

  .product-previews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-right: 10px;
  }

  .product-previews-grid::after {
    display: none;
  }

  .product-previews-grid .search-product-tile {
    min-width: 0;
    max-width: 100%;
  }

  .search-product-name {
    font-size: 13px;
  }

  .search-product-price {
    font-size: 14px;
  }

  .search-product-price .struck {
    font-size: 14px;
  }

  .search-overlay-footer {
    padding: 16px 20px;
  }

  .search-all-button {
    padding: 10px 20px;
    font-size: 15px;
  }

  .suggestions-section {
    margin-bottom: 10px;
}
  .suggestion-item {
    margin-bottom: 0px;
    margin-right: 10px;
    margin-left: 10px;
    }
  .search-input-container {
    height: 45px !important;
  }
  .search-input-container .search-icon {
    font-size: 20px;
    margin-left: 14px;
  }

  .search-overlay-input::placeholder {
    color: #b2bacb;
    font-size: 17px;
    text-transform: capitalize;
    text-align: left;
  }

  .search-overlay-input {
    font-size: 17px !important;
    padding: 0 10px !important;
    margin-top: 7px !important;
  }

  .icon-Broswer-Close.clear-search.x {
    font-size: 22px;
    margin-right: 12px;
    margin-top: 0px;
  }
  
  .search-searching h3 {
   font-size: 42px;
  }

  #SearchFilterArea {
	  display:none;
 }
  
  .suggestions-title {
    margin-top: 10px;
  }
  .suggestion-skeleton {
    margin-right: 10px;
    margin-left: 10px;
 }

  .suggestion-skeleton span {
    width: 100%;
  }
  .search-overlay-backdrop {
    background: var(--bggrey);
 }
}