/* ── Discover page styles ── */

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--p-bg); padding-top: 56px; min-height: 100vh; }

.disc-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 20px 120px;
}

/* ── Guest topbar ── */
.disc-guest-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 56px; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: var(--p-bg); border-bottom: 1px solid var(--p-border-soft);
}
.disc-guest-logo img { height: 32px; width: auto; }
.disc-login-btn {
  font-size: 13px; color: var(--p-text); text-decoration: none;
  padding: 6px 14px; border: 1px solid var(--p-border-2); border-radius: 8px;
}

/* ── Search bar ── */
.disc-search-wrap { margin-bottom: 20px; }
.disc-search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--p-bg-2); border: 1px solid var(--p-border-2);
  border-radius: 14px; padding: 10px 14px;
  transition: border-color 0.2s;
}
.disc-search-bar:focus-within { border-color: var(--p-accent, #3b82f6); }
.disc-search-icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--p-text-muted); }
.disc-search-input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 15px; color: var(--p-text); font-family: inherit;
}
.disc-search-input::placeholder { color: var(--p-text-muted); opacity: 0.6; }
.disc-search-submit {
  width: 32px; height: 32px; border-radius: 8px; border: none;
  background: var(--p-accent, #3b82f6); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: opacity 0.15s;
}
.disc-search-submit:hover { opacity: 0.85; }
.disc-search-submit svg { width: 18px; height: 18px; }

/* ── Spinner ── */
.disc-spinner {
  width: 20px; height: 20px; border: 2px solid var(--p-border-2);
  border-top-color: var(--p-accent, #3b82f6);
  border-radius: 50%; animation: discSpin 0.6s linear infinite; flex-shrink: 0;
}
@keyframes discSpin { to { transform: rotate(360deg); } }

/* ── Filter chips ── */
.disc-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 24px;
}
.disc-chips {
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; flex-shrink: 0;
}
.disc-chips::-webkit-scrollbar { display: none; }
.disc-chip {
  padding: 7px 16px; border-radius: 20px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--p-border-2); background: var(--p-bg-2);
  color: var(--p-text-muted); cursor: pointer; white-space: nowrap;
  transition: all 0.15s; user-select: none;
}
.disc-chip:hover { border-color: var(--p-accent, #3b82f6); color: var(--p-text); }
.disc-chip.active {
  background: var(--p-accent, #3b82f6); color: #fff;
  border-color: var(--p-accent, #3b82f6);
}

/* ── Mode toggle ── */
.disc-mode-toggle {
  display: flex; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--p-border-2); flex-shrink: 0;
}
.disc-mode-btn {
  padding: 7px 14px; font-size: 12px; font-weight: 600;
  border: none; background: var(--p-bg-2); color: var(--p-text-muted);
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.disc-mode-btn:not(:last-child) { border-right: 1px solid var(--p-border-2); }
.disc-mode-btn:hover { color: var(--p-text); }
.disc-mode-btn.active {
  background: var(--p-accent, #3b82f6); color: #fff;
}

/* ── Location input ── */
.disc-location-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--p-bg-2); border: 1px solid var(--p-border-2);
  border-radius: 10px; padding: 6px 12px;
  animation: discSlideIn 0.2s ease-out;
}
@keyframes discSlideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.disc-loc-icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--p-text-muted); }
.disc-location-input {
  background: none; border: none; outline: none; font-size: 13px;
  color: var(--p-text); width: 180px; font-family: inherit;
}
.disc-location-input::placeholder { color: var(--p-text-muted); opacity: 0.6; }
.disc-loc-clear {
  background: none; border: none; color: var(--p-text-muted); font-size: 18px;
  cursor: pointer; padding: 0 2px; line-height: 1;
}

/* ── Location suggestions (stub) ── */
.disc-loc-suggestions {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 100;
  background: var(--p-bg-2); border: 1px solid var(--p-border-2);
  border-radius: 10px; margin-top: 4px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.disc-loc-suggestion {
  padding: 10px 14px; font-size: 13px; color: var(--p-text);
  cursor: pointer; transition: background 0.1s;
}
.disc-loc-suggestion:hover { background: var(--p-bg-3); }

/* ── Results grid ── */
.disc-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ── Result card ── */
.disc-card {
  position: relative; border-radius: 14px; overflow: hidden;
  background: var(--p-bg-2); border: 1px solid var(--p-border-soft);
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none; display: block; color: inherit;
}
.disc-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.disc-card-cover {
  width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
}
.disc-card-body { padding: 14px; }
.disc-card-title {
  font-size: 15px; font-weight: 700; color: var(--p-text);
  margin-bottom: 4px; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.disc-card-desc {
  font-size: 12px; color: var(--p-text-muted); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 10px;
}
.disc-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--p-text-muted);
}
.disc-card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.disc-card-tag {
  padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600;
  background: var(--p-bg-3); color: var(--p-text-muted); text-transform: uppercase;
  letter-spacing: 0.03em;
}
.disc-card-price {
  font-weight: 700; color: var(--p-accent, #3b82f6); white-space: nowrap;
}

/* ── Empty + loading states ── */
.disc-empty {
  text-align: center; padding: 60px 20px; color: var(--p-text-muted);
}
.disc-empty p { margin-top: 12px; font-size: 14px; }
.disc-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 40px; color: var(--p-text-muted); font-size: 14px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .disc-container { padding: 14px 12px 120px; }
  .disc-filters { gap: 8px; }
  .disc-location-input { width: 140px; }
  .disc-results { grid-template-columns: 1fr 1fr; gap: 12px; }
  .disc-card-body { padding: 10px; }
  .disc-card-title { font-size: 13px; }
  .disc-card-desc { font-size: 11px; -webkit-line-clamp: 1; }
}
@media (max-width: 380px) {
  .disc-results { grid-template-columns: 1fr; }
}
