/*
Theme Name: Astra Child
Template: astra
Version: 1.0
*/

#buyer-search-wrap {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  height: 44px;
}

#buyer-search-input {
  flex: 1;
  min-width: 0;
  border: none !important;
  outline: none !important;
  padding: 0 14px !important;
  font-size: 15px;
  background: transparent !important;
  height: 44px !important;
  box-shadow: none !important;
  width: auto;
  margin: 0 !important;
}

#buyer-search-icon {
  flex-shrink: 0;
  background: none !important;
  border: none !important;
  padding: 0 12px;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  border-radius: 0 !important;
  min-height: unset !important;
  height: 44px;
  width: 44px;
}

#buyer-search-icon:hover {
  color: #060097;
  background: none !important;
}

/* Buyer main layout */
#buyer-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

#buyer-controls {
  display: flex;
  gap: 12px;
  width: 100%;
}

#buyer-search-wrap {
  flex: 1;
}

#buyer-categories-wrap {
  flex: 1;
}

#buyer-categories-wrap select {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 0 14px;
  font-size: 15px;
  background: #fff;
  cursor: pointer;
}

#buyer-results-wrap {
  min-height: 300px;
  border: 1px solid #2a2a4a;
  border-radius: 8px;
  padding: 8px;
}

.buyer-result-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #2a2a4a;
  gap: 12px;
}

.buyer-result-item:last-child {
  border-bottom: none;
}

/* Mobile */
@media (max-width: 767px) {
  #buyer-controls {
    flex-direction: column;
  }

  #buyer-categories-wrap select {
    width: 100%;
  }
}

/* Two column layout */
.elementor-545 > .elementor {
  display: flex;
  flex-wrap: wrap;
}

#user-avatar,
#user-name,
#user-following,
#user-online-status,
#user-messages {
  width: 220px !important;
  transform: none !important;
}

#search-field,
#categories-dropdown,
#search-results {
  flex: 1;
  transform: none !important;
}

/* Two column layout via CSS */
.elementor-id-545 .elementor {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: auto;
  gap: 16px;
  padding: 20px;
}

#user-avatar { grid-column: 1; grid-row: 1; }
#user-name { grid-column: 1; grid-row: 2; }
#user-following { grid-column: 1; grid-row: 3; }
#user-online-status { grid-column: 1; grid-row: 4; }
#user-messages { grid-column: 1; grid-row: 5; }

#search-field {
  grid-column: 2;
  grid-row: 1 / 6;
}

@media (max-width: 767px) {
  .elementor-id-545 .elementor {
    grid-template-columns: 1fr;
  }
  #user-avatar,
  #user-name,
  #user-following,
  #user-online-status,
  #user-messages,
  #search-field {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
}

/* Page layout */
.elementor-545 {
  display: grid !important;
  grid-template-columns: 220px 1fr !important;
  grid-template-rows: auto auto auto auto auto !important;
  gap: 8px 16px !important;
  padding: 20px !important;
  align-items: start !important;
}

#user-avatar { grid-column: 1 !important; grid-row: 1 !important; }
#user-name { grid-column: 1 !important; grid-row: 2 !important; }
#user-following { grid-column: 1 !important; grid-row: 3 !important; }
#user-online-status { grid-column: 1 !important; grid-row: 4 !important; }
#user-messages { grid-column: 1 !important; grid-row: 5 !important; }

.elementor-element-18b9952 {
  grid-column: 2 !important;
  grid-row: 1 / 6 !important;
}

@media (max-width: 767px) {
  .elementor-545 {
    grid-template-columns: 1fr !important;
  }
  #user-avatar, #user-name, #user-following,
  #user-online-status, #user-messages,
  .elementor-element-18b9952 {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
}

.seller-cats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px 0;
}

.seller-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  transition: background 0.2s;
  cursor: pointer;
}

.seller-cat-item:hover {
  background: #060097;
  color: #fff;
}

.seller-cat-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.seller-cat-name {
  font-size: 14px;
  text-align: center;
}

@media (max-width: 767px) {
  .seller-cats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Seller categories grid - override */
.seller-cats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 20px;
  width: 100%;
}

.seller-cat-item {
  position: relative;
  padding: 20px 12px;
  background: #0d0d2b;
  border: 1px solid #1a1a4a;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.seller-cat-item:hover {
  background: #060097;
  border-color: #060097;
}

.seller-cat-title {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.seller-cat-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #0d0d2b;
  border: 1px solid #060097;
  border-radius: 8px;
  z-index: 9999;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.seller-cat-item:hover .seller-cat-dropdown {
  display: block;
}

.seller-cat-dropdown-item {
  display: block;
  padding: 10px 14px;
  color: #ccc;
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid #1a1a4a;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.seller-cat-dropdown-item:hover {
  background: #060097;
  color: #fff;
}

.seller-cat-dropdown-item:last-child {
  border-bottom: none;
}
#buyer-search-input {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #333 !important;
}

#buyer-search-input::placeholder {
  color: #aaa !important;
}

#buyer-categories-select {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #333 !important;
}

#buyer-search-icon {
  background-color: #000 !important;
}

#buyer-search-icon svg {
  fill: #fff !important;
  stroke: #fff !important;
}

#buyer-results-wrap {
  min-height: calc(100vh - 231px - 32px) !important;
}

#buyer-search-icon {
  background-color: #000 !important;
  color: #fff !important;
  border: none !important;

}

#buyer-search-icon:hover {
  background-color: #111 !important;
  color: #fff !important;
}

#buyer-search-icon svg {
  stroke: #fff !important;
}
#buyer-search-input {
  border-radius: 0 !important;
}

#buyer-search-icon {
  border-radius: 0 !important;
}

@media (max-width: 1024px) {
  .seller-cats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .seller-cats-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 12px;
    gap: 8px;
  }

  .seller-cat-item {
    padding: 16px 8px;
  }

  .seller-cat-dropdown {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 0;
    max-height: 50vh;
    border-radius: 12px 12px 0 0;
  }
}
