/* ========================================
   SEARCH RESULTS PAGE - Search Form
   ======================================== */

.region-content #block-belgrade-subtheme-exposedformall-products-searchpage-1,
.region-content #block-numart-light-exposedformall-products-searchpage-1,
.view-all-products-search .views-exposed-form,
#block-belgrade-subtheme-exposedformall-products-searchpage-1:not(.search-popup-processed),
#block-numart-light-exposedformall-products-searchpage-1:not(.search-popup-processed) {
  margin-top: 30px;
  margin-bottom: 30px;
  max-width: 1000px;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.view-all-products-search {
  margin-left: auto;
  margin-right: auto;
}

.view-all-products-search .view-content {
  margin-left: auto;
  margin-right: auto;
}

.region-content #block-belgrade-subtheme-exposedformall-products-searchpage-1 form,
.region-content #block-numart-light-exposedformall-products-searchpage-1 form,
#block-belgrade-subtheme-exposedformall-products-searchpage-1:not(.search-popup-processed) form,
#block-numart-light-exposedformall-products-searchpage-1:not(.search-popup-processed) form {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.region-content #block-belgrade-subtheme-exposedformall-products-searchpage-1 .js-form-item,
.region-content #block-numart-light-exposedformall-products-searchpage-1 .js-form-item,
#block-belgrade-subtheme-exposedformall-products-searchpage-1:not(.search-popup-processed) .js-form-item,
#block-numart-light-exposedformall-products-searchpage-1:not(.search-popup-processed) .js-form-item {
  flex: 1;
  min-width: 300px;
  margin: 0;
}

.region-content #block-belgrade-subtheme-exposedformall-products-searchpage-1 input[type="text"],
.region-content #block-numart-light-exposedformall-products-searchpage-1 input[type="text"],
#block-belgrade-subtheme-exposedformall-products-searchpage-1:not(.search-popup-processed) input[type="text"],
#block-numart-light-exposedformall-products-searchpage-1:not(.search-popup-processed) input[type="text"] {
  width: 100% !important;
  padding: 14px 24px;
  font-size: 16px;
  border: 2px solid var(--nm-gray-200);
  border-radius: 50px;
  background: #fff;
  color: #333;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.region-content #block-belgrade-subtheme-exposedformall-products-searchpage-1 input[type="text"]:focus,
.region-content #block-numart-light-exposedformall-products-searchpage-1 input[type="text"]:focus,
#block-belgrade-subtheme-exposedformall-products-searchpage-1:not(.search-popup-processed) input[type="text"]:focus,
#block-numart-light-exposedformall-products-searchpage-1:not(.search-popup-processed) input[type="text"]:focus {
  border-color: var(--nm-primary-color);
  box-shadow: 0 4px 25px rgba(102, 126, 234, 0.2);
}

.region-content #block-belgrade-subtheme-exposedformall-products-searchpage-1 .form-actions,
.region-content #block-numart-light-exposedformall-products-searchpage-1 .form-actions,
#block-belgrade-subtheme-exposedformall-products-searchpage-1:not(.search-popup-processed) .form-actions,
#block-numart-light-exposedformall-products-searchpage-1:not(.search-popup-processed) .form-actions {
  margin: 0;
  flex-shrink: 0;
}

.region-content #block-belgrade-subtheme-exposedformall-products-searchpage-1 .form-actions.ms-auto,
.region-content #block-numart-light-exposedformall-products-searchpage-1 .form-actions.ms-auto,
#block-belgrade-subtheme-exposedformall-products-searchpage-1:not(.search-popup-processed) .form-actions.ms-auto,
#block-numart-light-exposedformall-products-searchpage-1:not(.search-popup-processed) .form-actions.ms-auto {
  margin-left: 0 !important;
}

.region-content #block-belgrade-subtheme-exposedformall-products-searchpage-1 input[type="submit"],
.region-content #block-numart-light-exposedformall-products-searchpage-1 input[type="submit"],
#block-belgrade-subtheme-exposedformall-products-searchpage-1:not(.search-popup-processed) input[type="submit"],
#block-numart-light-exposedformall-products-searchpage-1:not(.search-popup-processed) input[type="submit"] {
  padding: 14px 40px;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--nm-primary-color) 0%, var(--nm-primary-hover) 100%);
  color: #fff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  min-width: 120px;
    margin-bottom: 10px !important;
}

.region-content #block-belgrade-subtheme-exposedformall-products-searchpage-1 input[type="submit"]:hover,
.region-content #block-numart-light-exposedformall-products-searchpage-1 input[type="submit"]:hover,
#block-belgrade-subtheme-exposedformall-products-searchpage-1:not(.search-popup-processed) input[type="submit"]:hover,
#block-numart-light-exposedformall-products-searchpage-1:not(.search-popup-processed) input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Mobile responsive for results page search */
@media screen and (max-width: 768px) {
  .region-content #block-belgrade-subtheme-exposedformall-products-searchpage-1,
  .region-content #block-numart-light-exposedformall-products-searchpage-1,
  #block-belgrade-subtheme-exposedformall-products-searchpage-1:not(.search-popup-processed),
  #block-numart-light-exposedformall-products-searchpage-1:not(.search-popup-processed) {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 0 15px;
  }

  .region-content #block-belgrade-subtheme-exposedformall-products-searchpage-1 form,
  .region-content #block-numart-light-exposedformall-products-searchpage-1 form,
  #block-belgrade-subtheme-exposedformall-products-searchpage-1:not(.search-popup-processed) form,
  #block-numart-light-exposedformall-products-searchpage-1:not(.search-popup-processed) form {
    flex-direction: column;
    gap: 10px;
  }

  .region-content #block-belgrade-subtheme-exposedformall-products-searchpage-1 .js-form-item,
  .region-content #block-numart-light-exposedformall-products-searchpage-1 .js-form-item,
  #block-belgrade-subtheme-exposedformall-products-searchpage-1:not(.search-popup-processed) .js-form-item,
  #block-numart-light-exposedformall-products-searchpage-1:not(.search-popup-processed) .js-form-item {
    min-width: 100%;
    width: 100%;
  }

  .region-content #block-belgrade-subtheme-exposedformall-products-searchpage-1 .form-actions,
  .region-content #block-numart-light-exposedformall-products-searchpage-1 .form-actions,
  #block-belgrade-subtheme-exposedformall-products-searchpage-1:not(.search-popup-processed) .form-actions,
  #block-numart-light-exposedformall-products-searchpage-1:not(.search-popup-processed) .form-actions {
    width: 100%;
  }

  .region-content #block-belgrade-subtheme-exposedformall-products-searchpage-1 input[type="submit"],
  .region-content #block-numart-light-exposedformall-products-searchpage-1 input[type="submit"],
  #block-belgrade-subtheme-exposedformall-products-searchpage-1:not(.search-popup-processed) input[type="submit"],
  #block-numart-light-exposedformall-products-searchpage-1:not(.search-popup-processed) input[type="submit"] {
    width: 100%;
  }
}

/* ========================================
   SEARCH RESULTS - Grid Toggle (Mobile)
   ======================================== */

@media screen and (max-width: 768px) {
  .search-results-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 15px;
    margin-bottom: 10px;
  }

  .view-all-products-search .view-header.search-grid-header-active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
  }

  .view-all-products-search .views-view-responsive-grid,
  .view-all-products-search .views-view-responsive-grid--horizontal {
    justify-content: flex-start !important;
  }

  .view-all-products-search .view-content.mobile-grid-1 .views-view-responsive-grid__item,
  .view-all-products-search .views-view-responsive-grid.mobile-grid-1 .views-view-responsive-grid__item,
  .view-all-products-search .views-view-responsive-grid--horizontal.mobile-grid-1 .views-view-responsive-grid__item {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .view-all-products-search .view-content.mobile-grid-2 .views-view-responsive-grid,
  .view-all-products-search .view-content.mobile-grid-2 .views-view-responsive-grid--horizontal,
  .view-all-products-search .views-view-responsive-grid.mobile-grid-2,
  .view-all-products-search .views-view-responsive-grid--horizontal.mobile-grid-2 {
    justify-content: flex-start !important;
    gap: 10px !important;
  }

  .view-all-products-search .view-content.mobile-grid-2 .views-view-responsive-grid__item,
  .view-all-products-search .views-view-responsive-grid.mobile-grid-2 .views-view-responsive-grid__item,
  .view-all-products-search .views-view-responsive-grid--horizontal.mobile-grid-2 .views-view-responsive-grid__item {
    width: calc((100% - 10px) / 2) !important;
    max-width: calc((100% - 10px) / 2) !important;
    flex: 0 0 calc((100% - 10px) / 2) !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .view-all-products-search .view-content.mobile-grid-3 .views-view-responsive-grid,
  .view-all-products-search .view-content.mobile-grid-3 .views-view-responsive-grid--horizontal,
  .view-all-products-search .views-view-responsive-grid.mobile-grid-3,
  .view-all-products-search .views-view-responsive-grid--horizontal.mobile-grid-3 {
    justify-content: flex-start !important;
    gap: 10px !important;
  }

  .view-all-products-search .view-content.mobile-grid-3 .views-view-responsive-grid__item,
  .view-all-products-search .views-view-responsive-grid.mobile-grid-3 .views-view-responsive-grid__item,
  .view-all-products-search .views-view-responsive-grid--horizontal.mobile-grid-3 .views-view-responsive-grid__item {
    width: calc((100% - 20px) / 3) !important;
    max-width: calc((100% - 20px) / 3) !important;
    flex: 0 0 calc((100% - 20px) / 3) !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .search-grid-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 1rem;
  }

  .search-grid-toggle .grid-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 4px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #999;
    transition: all 0.2s ease;
  }

  .search-grid-toggle .grid-toggle-btn:hover {
    color: #666;
  }

  .search-grid-toggle .grid-toggle-btn.active {
    color: #333;
    background: var(--nm-gray-100);
  }

  .search-grid-toggle .grid-toggle-btn svg {
    width: 18px;
    height: 18px;
  }

}
