/* ── Homepage ── */
.page-grid-wrap { padding: 28px 32px 56px; max-width: 1400px; margin: 0 auto; }
.brand-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* Brand card */
.brand-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.07); padding: 24px; display: flex; flex-direction: column; gap: 14px; cursor: pointer; transition: box-shadow .2s ease, border-color .2s ease; text-decoration: none; color: inherit; }
.brand-card:hover { box-shadow: var(--shadow-hover); border-color: var(--border-hover); }
.brand-card:hover .brand-name { color: var(--indigo); }
.brand-card:hover .verified-btn { color: var(--indigo); border-color: var(--indigo); }
.brand-card-top { display: flex; align-items: center; gap: 16px; }
.brand-img-wrap { flex-shrink: 0; }
.brand-img { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; background: var(--bg); }
.brand-img-placeholder { width: 76px; height: 76px; border-radius: 10px; flex-shrink: 0; background: linear-gradient(135deg, #E0E4F0, #C8CDE0); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; color: #8892B0; }
.brand-name { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; transition: color .2s; }
.brand-desc { font-size: .925rem; line-height: 1.6; color: var(--text-body); flex: 1; }
.verified-btn { display: block; width: 100%; padding: 11px 16px; text-align: center; font-size: .88rem; font-weight: 600; color: var(--text-primary); border: 1.5px solid var(--border); border-radius: 8px; background: transparent; transition: color .2s, border-color .2s; }

/* Search card */
.search-card { grid-column: span 2; background: var(--surface); border: 2.5px solid var(--text-primary); border-radius: 20px; padding: 48px 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; }
.search-title { font-size: 3rem; font-weight: 800; color: var(--text-primary); line-height: 1.1; letter-spacing: -.02em; }
.search-title span { color: var(--indigo); }
.search-subtitle { font-size: 1rem; color: var(--text-body); }
.search-form { display: flex; width: 100%; max-width: 520px; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; }
.search-form:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.search-form input { flex: 1; height: 50px; padding: 0 16px; font-family: var(--font); font-size: .95rem; border: none; outline: none; color: var(--text-primary); background: transparent; }
.search-form input::placeholder { color: var(--text-muted); }
.search-form button { height: 50px; padding: 0 24px; background: var(--indigo); color: #fff; font-family: var(--font); font-size: .95rem; font-weight: 700; border: none; cursor: pointer; transition: background .18s; flex-shrink: 0; }
.search-form button:hover { background: var(--indigo-hover); }

/* Live search results dropdown */
.search-results-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border: 1.5px solid var(--border); border-top: none; border-radius: 0 0 10px 10px; box-shadow: var(--shadow); z-index: 100; max-height: 320px; overflow-y: auto; display: none; }
.search-results-dropdown.active { display: block; }
.search-result-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; transition: background .15s; text-decoration: none; color: var(--text-primary); }
.search-result-item:hover { background: var(--indigo-light); }
.search-result-item strong { font-size: .9rem; font-weight: 600; }
.search-result-item span { font-size: .8rem; color: var(--text-muted); }
.search-form-wrap { position: relative; width: 100%; max-width: 520px; }
.no-brands { padding: 48px; text-align: center; color: var(--text-muted); }

/* ── Search dropdown ── */
.search-form-wrap { position: relative; width: 100%; max-width: 520px; }
.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  z-index: 200;
  overflow: hidden;
  max-height: 360px;
  overflow-y: auto;
}
.search-dropdown.open { display: block; }
.dd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background .15s;
  border-bottom: 1px solid var(--border);
}
.dd-item:last-child { border-bottom: none; }
.dd-item:hover { background: var(--indigo-light); }
.dd-logo { width: 36px; height: 36px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.dd-logo img { width: 100%; height: 100%; object-fit: cover; }
.dd-placeholder { font-weight: 800; font-size: .9rem; color: var(--indigo); }
.dd-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dd-text strong { font-size: .9rem; font-weight: 700; color: var(--text-primary); }
.dd-text span { font-size: .78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Dropdown item layout fix - name left, desc below, logo right ── */
.dd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background .15s;
  border-bottom: 1px solid var(--border);
}
.dd-item:last-child { border-bottom: none; }
.dd-item:hover { background: var(--indigo-light); }
.dd-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: left;
}
.dd-text strong {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.dd-text span {
  font-size: .76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.dd-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  order: 2; /* logo on right */
}
.dd-logo img { width: 100%; height: 100%; object-fit: cover; }
.dd-placeholder {
  font-weight: 800;
  font-size: .85rem;
  color: var(--indigo);
}
