/* ============================================
   CATWALK SEARCH OVERLAY STYLES
   Fullscreen search based on reference theme
   ============================================ */

/* Search Overlay - Hidden by default */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 254, 254, 0.98);
  /* Reference: Almost white, slight transparency */
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  /* Align to top */
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding-top: 120px;
  /* Space from top - reference uses approx 120-150px */
}

/* Half Screen on Desktop */
@media (min-width: 992px) {
  .search-overlay {
    height: 50vh !important;
    /* Back to half height */
    align-items: center;
    padding-top: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* Prevent visual leaks */
  }
}

/* Active State */
.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Search Container */
.search-overlay .search-container {
  width: 100%;
  max-width: 900px;
  /* Reference uses similar width */
  padding: 0 40px;
}

/* Close Button (X) */
.search-overlay .search-close {
  position: absolute;
  top: 40px;
  right: 55px;
  /* Match nav padding */
  background: none;
  border: none;
  font-size: 32px;
  /* Large X */
  color: #151515;
  cursor: pointer;
  padding: 10px;
  line-height: 1;
  transition: color 0.3s ease, transform 0.2s ease;
  font-weight: 300;
  /* Thin font */
}

.search-overlay .search-close:hover {
  color: var(--catwalk-pink, #eca3b6);
  transform: rotate(90deg);
  /* Fun rotation on hover */
}

/* Search Form */
.search-overlay .search-form {
  position: relative;
  width: 100%;
}

/* Search Input */
.search-overlay .search-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(21, 21, 21, 0.15);
  /* Subtle underline */
  background: transparent;
  font-family: "futura-pt", sans-serif;
  font-size: 28px;
  /* Reference: 28.8px - large and bold */
  font-weight: 400;
  color: rgb(23, 21, 23);
  /* Near-black from reference */
  padding: 20px 60px 20px 0;
  /* Right padding for icon */
  outline: none;
  transition: border-color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.search-overlay .search-input::placeholder {
  color: rgba(21, 21, 21, 0.4);
  /* Subtle placeholder */
}

.search-overlay .search-input:focus {
  border-bottom-color: var(--catwalk-pink, #eca3b6);
  /* Pink underline on focus */
}

/* Search Icon (inside input) */
.search-overlay .search-submit {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 20px;
  color: #151515;
  cursor: pointer;
  padding: 10px;
  transition: color 0.3s ease;
}

.search-overlay .search-submit:hover {
  color: var(--catwalk-pink, #eca3b6);
}

/* Search Results Container */
.search-overlay .search-results {
  margin-top: 40px;
  max-height: calc(50vh - 140px); /* Fits within 50vh overlay */
  overflow-y: auto;
  padding-right: 10px;
}

/* Results styling */
.search-overlay .search-results .title {
  font-family: "futura-pt", sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #151515;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(21, 21, 21, 0.1);
}

.search-overlay .search-results ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.search-overlay .search-results li {
  margin-bottom: 10px;
}

.search-overlay .search-results a {
  color: #151515;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
  display: block;
  padding: 8px 0;
}

.search-overlay .search-results a:hover {
  color: var(--catwalk-pink, #eca3b6);
}

/* Product results with images */
.search-overlay .search-product {
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-overlay .search-product .image {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 0; /* Sharp edges */
  overflow: hidden;
}

.search-overlay .search-product .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-overlay .search-product .product-name {
  font-weight: 500;
}

.search-overlay .search-product .price-box {
  font-size: 14px;
  color: var(--catwalk-pink, #eca3b6);
}

/* Search Overlay Logo (Far Left) */
.search-overlay-logo {
  position: absolute;
  top: 50px;
  left: 60px;
  z-index: 10;
}

.search-overlay-logo img {
  height: 30px;
  /* Adjust based on logo design */
  width: auto;
}

.search-overlay-logo .text-logo {
  font-family: "Didot", "Bodoni MT", serif;
  font-size: 24px;
  color: #151515;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 991px) {
  .search-overlay-logo {
    display: none;
    /* Hide on mobile/tablet if needed, or adjust pos */
  }
}
/* Ensure it's visible on desktop */
@media (min-width: 992px) {
  .search-overlay-logo {
    display: block !important;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .search-overlay {
    padding-top: 80px;
  }

  .search-overlay .search-container {
    padding: 0 20px;
  }

  .search-overlay .search-close {
    top: 20px;
    right: 20px;
    font-size: 28px;
  }

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