@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Old+Standard+TT:ital,wght@0,400;0,700;1,400&display=swap');

.search-title {
  font-family: 'Old Standard TT', sans-serif;
  font-size: 50px;
  margin-top: 120px;
  font-weight: 400;
  margin-bottom: 60px;
  text-align: center;
}

.search-box {
  width: 550px;
  height: 57px;
  border: 1px solid rgb(152, 149, 149);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 50px auto;
  font-family: 'Montserrat', sans-serif;
}

.search-left {
  display: flex;
  align-items: center;
  padding-left: 20px;
  flex-grow: 1;
  /* Add this to prevent the input from overflowing */
  min-width: 0;
}

.search-icon {
  width: 30px;
  height: 24px;
  margin-right: 15px;
}

.search-input {
  border: none;
  outline: none;
  font-size: 18px;
  font-family: 'Montserrat', sans-serif;
  width: 100%;
  background: transparent;
  color: #000;
}

.search-input::placeholder {
  color: rgb(152, 149, 149);
}

.search-btn {
  font-family: 'Montserrat', sans-serif;
  height: 100%;
  width: 200px;
  border: none;
  background-color: black;
  color: white;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
}

.line {
  width: 100%;
  height: 1px;
  background: #e0e0e0;
}

.results-info {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  text-align: center;
  font-style: italic;
  color: #555;
  min-height: 20px;
  margin: 20px auto;
}

.filter-sort-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  max-width: 900px;
  margin: 40px auto 20px;
  padding: 0 20px;
  gap: 45px;
}
.custom-select-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
}
.custom-select-wrapper label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: #777;
  text-transform: uppercase;
 }
.custom-select {
  position: relative;
  width: 230px;
}
.custom-select-trigger {
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
  background-color: transparent;
  cursor: pointer;
  position: relative;
  font-size: 15px;
  color: #111;
  width: 100%;
  text-align: left;
  transition: border-color 0.3s ease;
}
.custom-select-trigger:hover {
  border-color: #000;
}
.custom-select-trigger::after {
  content: '';
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #555;
  border-bottom: 1.5px solid #555;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.custom-select.open .custom-select-trigger::after {
  transform: translateY(-25%) rotate(-135deg);
 }
.custom-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #fff;
  border-radius: 4px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  margin-top: 8px;
  padding: 5px;
}
.custom-select.open .custom-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.custom-option {
  padding: 12px 15px;
  font-size: 14px; color: #333;
  cursor: pointer;
  border-radius: 3px;
  transition: background-color 0.2s ease, color 0.2s ease;
 }
.custom-option:hover {
  background-color: #f5f5f5;
  color: #000; }
.custom-option.selected {
  background-color: #eee;
  font-weight: 500; color: #000;
}

.fashion-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

.fashion-img {
  width: 375px;
  height: 375px;
  object-fit: cover;
  flex-shrink: 0;
}

.fashion-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fashion-category {
  font-size: 16px;
  color: #000000;
  margin-top: 100px;
  font-weight: 500;
  font-family: 'Montserrat', sans-serif;
}

.fashion-title {
  font-size: 24px;
  color: #000;
  text-align: left;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
}

.fashion-meta .author {
  font-weight: bold;
  text-transform: uppercase;
}

/* =================================== */
/* === MOBILE ADAPTIVE STYLES === */
/* =================================== */
@media (max-width: 768px) {
  .search-title {
    font-size: 32px;
    margin-top: 60px;
    margin-bottom: 40px;
  }

  /* --- THIS IS THE IMPROVED SEARCH BOX FIX --- */
  .search-box {
    width: 90%;
    height: 50px;
  }

  .search-left {
    padding-left: 15px;
  }

  .search-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
  }

  .search-input {
    font-size: 16px;
  }

  .search-btn {
    width: 100px; /* Make the button even smaller */
    font-size: 14px; /* Adjust font size to fit */
    padding: 0 10px; /* Add some padding */
  }
  /* --- END OF FIX --- */

  .filter-sort-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 25px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  .custom-select-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .custom-select {
    width: 100%;
  }

  .fashion-card {
    flex-direction: column;
  }

  .fashion-img {
    width: 100%;
    height: auto;
  }

  .fashion-category {
    margin-top: 15px;
  }
}

