/* Header Buttons */
.main_header .acc_btn {
  border-radius: 50%;
  padding: 4px;
  border: none;
  background-color: var(--primary-color);
  filter: brightness(20%);
}

.main_header .wishlist-icon {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main_header .wishlist-icon button {
  border: none;
  background-color: transparent;
  padding-top: 5px;
}

.main_header .wishlist-icon button:focus {
  outline: none;
}

.main_header .search-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.main_header .search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 15vh 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 9999;
}

.main_header .search-toggle-btn {
  padding: 0;
}

.main_header .icon-search {
  font-size: 32px;
}

.main_header .btn-link:hover {
  text-decoration: none;
}

.main_header .search-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.main_header .search-box-wrapper {
  width: 90%;
  max-width: 550px;
  transform: translateY(-20px);
  transition: transform 0.4s ease;
}

.main_header .search-overlay.active .search-box-wrapper {
  transform: translateY(0);
}

.main_header .search-box {
  position: relative;
  width: 100%;
  background: #fff;
  border-radius: 30px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  padding: 10px 20px;
  transition: border-radius 0.3s ease;
}

/* media queries */

.main_header .search-box.has-results {
  border-radius: 16px;
}

.main_header .search-box .autocomplete {
  width: 100%;
}

.main_header .search-box .search-input-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  gap: 12px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.main_header .search-box.has-results .search-input-row {
  border-bottom-color: #eee;
}

.main_header .search-box .search-icon {
  font-size: 18px;
  color: #999;
  flex-shrink: 0;
}

.main_header .search-box input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 16px;
  background: transparent;
  min-width: 0;
}

.main_header .close-search {
  background: #f5f5f5;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: absolute;
  top: 29px;
  left: 4%;
  transform: translate(-50%, -50%);

 [dir="ltr"] & {
    right: 1%;
    left: auto;
  }
}

.main_header .close-search:hover {
  background: #e0e0e0;
  color: #333;
}

/* Autocomplete items inside search box */
.main_header .search-box .autocomplete-items {
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 0;
  box-shadow: none;
  border-radius: 15px;
  overflow-y: auto;
}

.main_header .search-box .autocomplete-items:empty {
  display: none;
}

.main_header .search-box .autocomplete-item:last-of-type {
  border-bottom: none;
}

.main_header .search-box .autocomplete-view-all {
  border-radius: 0;
}

.main_header .icon-heart-mask {
  background-color: var(
    --header-text-color-primary-bg,
    var(--text-color-primary-bg)
  );
}

/* Wishlist Modal */
.main_header .wishlist-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}

.main_header .modal-custom {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: var(--backGround-color);
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-20px);
  transition: 0.4s;
}

.main_header .modal-custom.active {
  opacity: 1;
  transform: translateY(0);
  background-color: #fff;
}

.main_header .modal-dialog-custom {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  border-radius: 0;
  box-shadow: none;
}

.main_header .modal-body-custom {
  padding: 10px 0;
}

.modal-body-custom .vertical_prod {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1024px) {
  .modal-body-custom .vertical_prod {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .modal-body-custom .vertical_prod {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 450px) {
  .modal-body-custom .vertical_prod {
    grid-template-columns: repeat(1, 1fr);
  }

  .main_header .modal-body-custom {
    padding: 20px;
  }
}

.modal-body-custom .vertical_prod .product-item {
  box-shadow: 0 8px 24px #00000024;
  justify-content: space-around;
}
.modal-body-custom .vertical_prod .product-item .product_details {
  padding-right: 20px;
}
.main_header .modal-content-custom {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.main_header .modal-header-custom {
  padding: 15px 20px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main_header .modal-title-custom {
  margin: 0;
  font-size: 1.5rem;
  color: var(--header-primary-color);
}

.main_header .close-btn-custom {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
}

/* Wishlist Grid */
.main_header .wishlist-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  justify-items: center;
}

/* للموبايلات الصغيرة جداً */
@media (max-width: 480px) {
  .main_header .wishlist-grid {
    padding: 20px;
  }
}

/* Wishlist Card */
.main_header .wishlist-card {
  overflow: hidden;
  background: linear-gradient(180deg, #808080d1, #8080803d);
  border-radius: 16px;
  padding: 10px 10px 30px;
  border: 1px solid #eeeeee54;
  border-top-color: #eeeeee;
  border-bottom-color: transparent;
  position: relative;
  transition: 0.3s ease;
  width: 100%;
  aspect-ratio: 2 / 4;
  /* أفضل نسبة للكارت */
}

/* Hover effect */
.main_header .wishlist-card:hover {
  transform: translateY(-5px);
}

/* Image inside card */
.main_header .wishlist-card img {
  width: 100%;
  height: auto;
  max-height: 60%;
  border-radius: 8px;
  object-fit: cover;
}

.main_header .wishlist-card .spinner {
  width: 20px !important;
  height: 20px;
}

/* Card Body */
.main_header .wishlist-card-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* Product title */
.main_header .wishlist-card-body h5 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

/* Product description */
.main_header .wishlist-card-body .product-discription p {
  font-size: 14px;
  font-weight: 400;
  color: #bbbbbb;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* Price */
.main_header .wishlist-card-body p {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-color);
  flex: 1;
  margin: 0;
}

/* Button */
.main_header .wishlist-card-body button {
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 5px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: auto;
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

/* Button Image */
.main_header .wishlist-card-body button img {
  width: unset;
  height: unset;
  border-radius: unset;
  object-fit: cover;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .main_header .wishlist-card {
    aspect-ratio: 3 / 4;
  }

  .main_header .wishlist-card-body h5 {
    font-size: 17px;
  }

  .main_header .wishlist-card-body p {
    font-size: 15px;
  }

  .main_header .wishlist-card-body button {
    font-size: 15px;
    height: 48px;
  }

  .main_header .search-box {
    width: 80%;
  }

  .main_header .wishlist-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .main_header .close-search {
    left: 7% !important;
  }
  .main_header .search-box {
    width: 100%;
  }
  .main_header .wishlist-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .main_header .wishlist-card {
    aspect-ratio: 4 / 5;
    padding: 8px 8px 20px;
  }

  .main_header .wishlist-card-body h5 {
    font-size: 16px;
  }

  .main_header .wishlist-card-body p {
    font-size: 14px;
  }

  .main_header .wishlist-card-body button {
    font-size: 14px;
    height: 46px;
  }
}

@media (max-width: 480px) {
  .main_header .wishlist-card {
    aspect-ratio: 1 / 2.3;
    padding: 6px 6px 16px;
  }

  .main_header .wishlist-card-body h5 {
    font-size: 15px;
  }

  .main_header .wishlist-card-body p {
    font-size: 13px;
  }

  .main_header .wishlist-card-body button {
    font-size: 14px;
    height: 44px;
  }
}

.remove-from-wishlist-btn {
  border-radius: 50% !important;
  border: none !important;
}
@media (max-width: 350px) {
  .main_header .search-box {
    width: 100%;
  }
}
.empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
