/* 
      ============================================= SECTION SEARCH =============================================
*/

.section__search {
  background-color: var(--primary-color-50);
}

.search__bar__section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.search__bar__content {
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--gray-color-300);
  border-radius: 50px;
  padding: 0.5rem;
  background-color: var(--white-color);
  width: 100%;
  max-width: 500px;
}

.search__bar__input {
  padding: 0.5rem 1rem;
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.875rem;
  background-color: transparent;
}

.search__bar__input::placeholder {
  color: var(--gray-color-400);
  font-size: 0.875rem;
}

.search__bar__content svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--gray-color-500);
}

/* 
      ============================================= SECTION CATEGORY =============================================
*/
.section__categories {
  background-color: var(--primary-color-50);
  padding-bottom: 1rem;
}

.categories__content {
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.categories__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  cursor: pointer;
  padding: 1rem;
  border-radius: 8px;
  background-color: var(--white-color);
}

.categories__item--active {
  background-color: var(--primary-color-500);
  color: var(--white-color);
}

.categories__item:hover {
  background-color: var(--primary-color-500);
  color: var(--white-color);
}

/* 
      ============================================= SECTION PRODUCTOS =============================================
*/
.products__section__header {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.products__section__header h2 {
  color: var(--gray-color-900);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.products__cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* 
      ============================================= SECTION PAGINATION =============================================
*/
.custom__pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid var(--gray-color-200);
    overflow: hidden;
}

.pagination__item {
    color: var(--primary-color-500);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid var(--gray-color-200);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination__item--active, .pagination__item:hover {
    background-color: var(--primary-color-500);
    color: var(--white-color);
    cursor: pointer;
}


.pagination__left, .pagination__prev {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-color-200);
}

.pagination__left svg, .pagination__prev svg {
  height: 24px;
  width: 24px;
  color: var(--gray-color-500);
}

/* 
      ============================================= CUSTOM CARD PRODUCT =============================================
*/
.product__card {
  background-color: var(--white-color);
  border: 1px solid var(--gray-color-200);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.product__card__content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.product__card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-color-900);
  margin: 0;
}

.product__card__description {
  font-size: 0.875rem;
  color: var(--gray-color-500);
  margin: 0.25rem 0 0 0;
  flex: 1;
}

.product__card__footer {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 1px solid var(--gray-color-200);
  background-color: var(--gray-color-50);
  gap: 0.5rem;
  margin-top: 0.875rem;
}

.product__card__price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-color-900);
  margin: 0;
}

.product__card__button {
  background-color: var(--primary-color-500);
  color: var(--white-color);
  border: none;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.75rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.3s ease;
}

.product__card__button:hover {
  background-color: var(--primary-color-600);
}

.product__card__button svg {
  width: 1.875rem;
  height: 1.875rem;
  color: var(--white-color);
}

.product__card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

/* 
      ============================================= CUSTOM DROPDOWN STYLES =============================================
*/

/* Botón personalizado del dropdown */
.custom-dropdown-btn {
  background-color: var(--while-color) !important;
  border: 1px solid var(--gray-color-200) !important;
  color: var(--gray-color-500) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  padding: 0.75rem 1rem !important;
  border-radius: 0.5rem !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.custom-dropdown-btn:hover {
  background-color: var(--gray-color-50) !important;
  border-color: var(--primary-color-500) !important;
  color: var(--primary-color-500) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.custom-dropdown-btn:focus {
  box-shadow: 0 0 0 3px rgba(196, 16, 209, 0.2) !important;
  border-color: var(--primary-color-500) !important;
}

/* Flecha personalizada */
.dropdown-arrow {
  transition: transform 0.3s ease;
  color: var(--gray-color-900);
}

.custom-dropdown-btn[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
  color: var(--primary-color-500);
}

/* Ocultar la flecha por defecto de Bootstrap */
.custom-dropdown-btn::after {
  display: none !important;
}

/* Menu dropdown personalizado */
.custom-dropdown-menu {
  border: 1px solid var(--gray-color-200) !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
  padding: 0.5rem 0 !important;
  min-width: 220px !important;
  margin-top: 0.5rem !important;
  background-color: var(--white-color) !important;
  border: 1px solid var(--gray-color-200) !important;
}

/* Items del dropdown */
.custom-dropdown-item {
  color: var(--gray-color-900) !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.875rem !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  border: none !important;
  background: transparent !important;
  width: 100% !important;
  text-align: left !important;
  font-weight: 400 !important;
}

.custom-dropdown-item:hover {
  background-color: var(--primary-color-50) !important;
  color: var(--primary-color-500) !important;
}

.custom-dropdown-item:active,
.custom-dropdown-item.active {
  background-color: var(--primary-color-500) !important;
  color: var(--white-color) !important;
}

/* Iconos de los items */
.item-icon {
  color: var(--gray-color-500);
  transition: color 0.2s ease;
}

.custom-dropdown-item:hover .item-icon {
  color: var(--primary-color-500);
}

.custom-dropdown-item.active .item-icon {
  color: var(--white-color);
}

/* 
      ============================================= SM =============================================
*/
@media (min-width: 640px) {
  .products__section__header h2 {
    font-size: 1.5rem;
  }

  .products__cards {
    gap: 0.5rem;
  }

  .product__card {
    flex-direction: row;
    align-items: center;
    padding: 0.5rem;
    gap: 0.875rem;
  }
  .product__card__title {
    font-size: 0.875rem;
  }

  .product__card__description {
    font-size: 0.75rem;
  }

  .product__card__price {
    font-size: 0.875rem;
  }

  .product__card__button {
    margin-left: auto;
    padding: 0.5rem 1rem;
  }

  .product__card__image {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 0.375rem;
  }

  .product__card__content {
    padding: 0;
    gap: 0rem;
  }

  .product__card__info {
    flex: 1;
  }
}

/* 
      ============================================= MD =============================================
*/
@media (min-width: 768px) {
  .products__cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
