@import url(general.css);

/* Reset and box-sizing */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body background */
body {
  background-color: var(--background-color);
}

/* Hero Header with Background Video */
.hero-header {
  position: relative;
  width: 100%;
  min-height: 80vh;
  display: flex;
  align-items: start;
  justify-content: center;
  flex-wrap: wrap;
}

.background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.7);
}

.hero-content {
  text-align: center;
  color: var(--main-background-color);
  padding: 1rem;
  width: 100%;
  max-width: 1200px;
  padding-bottom: 100px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 2rem;
}

.hero-search {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

/* Store Section */
.stores {
  padding: 2rem 5%;
  position: relative;
}

/* Swiper Styles */
.swiper {
  width: 100%;
  padding: 1rem 0;
  overflow: unset;
  overflow-x: hidden;
}

.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

.swiper-slide .store {
  width: 100%;
  aspect-ratio: 5/6;
  position: relative;
  display: block;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  color: var(--main-background-color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-out;
  border-radius: 10px;
  text-decoration: none;
  text-align: center;
}

.swiper-slide .store:hover {
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
}

/* Store details overlay */
.store_details {
  position: absolute;
  background-image: linear-gradient(0deg, #777, transparent);
  width: 100%;
  height: 200px;
  bottom: 0;
  align-content: center;
  border-radius: 0 0 10px 10px;
}

/* Store name and location */
.store_name,
.store_location {
  margin-bottom: 0;
}

.store_name {
  margin-top: 4rem;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.store_location {
  margin-top: 0.5rem;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
}

/* Swiper Navigation and Pagination */
.swiper-button-next,
.swiper-button-prev {
  color: var(--main-text-color);
}

.swiper-pagination-bullet {
  background: var(--main-text-color);
}

.swiper-pagination-bullet-active {
  background: var(--main-background-color);
}

/* Tabs */
.tab {
  display: inline-block;
  padding: 0.5rem 1rem;
  cursor: pointer;
  background: var(--main-background-color);
  border-bottom: none;
  margin-right: 0.3rem;
  border-radius: 10px 10px 0 0;
  color: var(--main-text-color);
}

.tab.active {
  background: var(--main-text-color);
  color: var(--main-background-color);
  font-weight: bold;
}

.tab-content {
  display: none;
  border-radius: 0 0 5px 5px;
}

.tab-content.active {
  display: block;
}

/* Search form */
form {
  display: flex;
  align-items: center;
  background-color: var(--main-background-color);
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  color: var(--main-text-color);
  /* flex-wrap: wrap; */
  /* gap: 0.5rem; */
}

/* Inputs and selects */
input[type="text"],
select {
  padding: 0.5rem;
  border: none;
  outline: none;
  height: 40px;
  border-radius: 8px;
  flex-grow: 1;
  min-width: 150px;
  transition: background-color 0.2s;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
}

input[type="text"]:hover,
select:hover {
  background-color: var(--hover-color);
}

/* Search button */
.search_button {
  padding: 0.8rem 1rem;
  background: var(--main-text-color);
  color: var(--main-background-color);
  border: none;
  cursor: pointer;
  border-radius: 8px;
  min-width: 100px;
  transition: background 0.2s;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
}

/* Search separator */
.search_separator {
  width: 1px;
  height: 30px;
  background-color: var(--separator-color);
  margin: 0 0.5rem;
}

.title {
  display: flex;
  justify-content: space-between;
  justify-items: center;
  margin: 10px;
}

.title a {
  color: var(--third-color);
  font-weight: bold;
  text-decoration: none;
  position: relative;
  /* Needed for the pseudo-element */
}

.title a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  /* Thickness of the underline */
  bottom: 0;
  left: 0;
  background-color: var(--third-color);
  /* Matches the text color */
  transition: width 0.3s ease;
  /* Smooth transition for width */
}

.title a:hover::after {
  width: 100%;
  /* Expands the underline on hover */
}

.separatore {
  width: 60%;
  height: 1px;
  background-color: var(--secondary-text-color);
  margin: 50px 20%;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  color: var(--third-color);
}

.dropdown-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.dropdown-group {
  position: relative;
  flex: 1;
  min-width: 150px;
}

.custom-dropdown {
  position: relative;
  width: 100%;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.dropdown-selected {
  padding: 12px;
  background: var(--main-background-color);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-icon {
  font-size: 12px;
  color: var(--second-text-color);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--main-background-color);
  border: 1px solid var(--background-color-dark);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
  max-height: 170px;
  overflow-y: auto;
}

.dropdown-menu.open {
  display: block;
  animation: slideDown 0.2s ease forwards;
}

.dropdown-menu.closing {
  animation: slideUp 0.2s ease forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.dropdown-option {
  padding: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.dropdown-option:hover {
  background-color: var(--background-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-header {
    min-height: 70vh;
  }

  .hero-title {
    font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  }

  .hero-search {
    max-width: 90%;
  }

  .store_details {
    height: 150px;
  }

  .store_name {
    margin-top: 2.5rem;
  }
}

@media (max-width: 768px) {
  .hero-header {
    min-height: 60vh;
  }

  .hero-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
  }

  .stores {
    padding: 1rem 3%;
  }

  .store {
    aspect-ratio: 4/5;
  }

  form {
    flex-direction: column;
    align-items: stretch;
  }

  .dropdown-container {
    flex-direction: column;
    gap: 0;
  }

  .dropdown-group {
    min-width: 100%;
  }

  .dropdown-menu {
    max-height: 150px;
  }

  input[type="text"],
  select,
  .search_button {
    width: 100%;
    margin: 0.3rem 0;
  }

  .search_separator {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  }

  .store_details {
    height: 120px;
  }

  .store_name {
    margin-top: 2rem;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
  }

  .store_location {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
  }
}