/* Public partner directory — country list, country detail, reseller detail */

.directory-page { padding: 3rem 0 4rem; }

.directory-header { margin-bottom: 2rem; }
.directory-header h1 {
  color: var(--text-strong);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.country-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.875rem;
  margin-bottom: 2.5rem;
}
.country-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.1s;
}
.country-card:hover {
  border-color: var(--yellow);
  transform: translateY(-1px);
  text-decoration: none;
}
.cc-flag {
  width: 48px; height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--yellow);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.cc-body { flex: 1; min-width: 0; }
.cc-body h3 {
  margin: 0 0 0.15rem;
  color: var(--text-strong);
  font-size: 1rem;
  font-weight: 600;
}
.cc-count { color: var(--text-muted); font-size: 0.82rem; }
.cc-arrow { color: var(--text-muted); }
.country-card:hover .cc-arrow { color: var(--yellow); }

.directory-cta {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255,213,0,0.06);
  border: 1px solid rgba(255,213,0,0.25);
  border-radius: var(--radius);
  margin-top: 1.5rem;
}
.directory-cta i { color: var(--yellow); font-size: 1.4rem; }
.directory-cta strong { color: var(--text-strong); }
.directory-cta p { margin: 0.2rem 0 0; }
.directory-cta.empty {
  background: rgba(88,166,255,0.06);
  border-color: rgba(88,166,255,0.3);
}
.directory-cta.empty i { color: var(--blue); }

/* Reseller card grid (country page) */
.reseller-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.reseller-card {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.1s;
}
.reseller-card:hover {
  border-color: var(--yellow);
  transform: translateY(-1px);
  text-decoration: none;
}
.reseller-card.verified { border-left: 3px solid var(--yellow); }
.rc-logo {
  width: 64px; height: 64px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--bg);
}
.rc-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.5rem;
}
.rc-body { min-width: 0; }
.rc-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.25rem;
}
.rc-header h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rc-verified { color: var(--yellow); font-size: 0.95rem; line-height: 1; }
.rc-tier {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 0.4rem;
}
.rc-tier-bronze   { background: rgba(205,127,50,0.2);  color: #cd7f32; }
.rc-tier-silver   { background: rgba(192,192,192,0.2); color: #c0c0c0; }
.rc-tier-gold     { background: rgba(255,213,0,0.2);   color: #ffd500; }
.rc-tier-platinum { background: rgba(229,228,226,0.2); color: #e5e4e2; }
.rc-city { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.15rem; }
.rc-tagline {
  margin: 0.35rem 0 0;
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rc-arrow { color: var(--text-muted); align-self: center; }
.reseller-card:hover .rc-arrow { color: var(--yellow); }

/* Reseller detail page */
.reseller-detail {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  margin-top: 1rem;
  align-items: start;
}
.rd-side {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  align-items: flex-start;
}
.rd-logo {
  width: 100%;
  max-width: 180px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  object-fit: contain;
  background: var(--bg);
}
.rd-side .btn { width: 100%; justify-content: center; }
.rd-body > .rd-header { margin-bottom: 1.5rem; }
.rd-body h1 {
  margin: 0 0 0.35rem;
  color: var(--text-strong);
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.rd-location {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.rd-tagline {
  color: var(--text);
  font-size: 1rem;
  margin: 0.5rem 0 0;
}
.rd-section { margin-bottom: 1.75rem; }
.rd-section h3 {
  color: var(--yellow);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 0.6rem;
}
.rd-section p { margin: 0; line-height: 1.65; }
.rd-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.75rem;
}
.rd-fact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 0.65rem;
}
.rd-fact i { color: var(--yellow); font-size: 1.1rem; grid-row: span 2; align-self: center; }
.rd-fact strong { color: var(--text-strong); font-size: 0.9rem; }
.rd-fact small { color: var(--text-muted); font-size: 0.72rem; }
.rd-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.rd-chip {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .reseller-detail { grid-template-columns: 1fr; }
  .rd-side { position: static; }
}

/* ----------------------------------------------------- contact-reseller modal */
.cm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1.5rem;
}
.cm-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: cmIn 0.18s ease-out;
}
@keyframes cmIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cm-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.cm-head h3 {
  margin: 0;
  color: var(--yellow);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cm-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.cm-close:hover { color: var(--text-strong); }
.cm-body {
  padding: 1.25rem;
  overflow-y: auto;
}
.cm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
  margin-top: 0.75rem;
}
.cm-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.cm-grid input,
.cm-grid textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
}
.cm-grid input:focus,
.cm-grid textarea:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255,213,0,0.15);
}
.cm-grid textarea { resize: vertical; min-height: 100px; }
.cm-span-2 { grid-column: span 2; }
.cm-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--border);
}
.cm-status {
  margin-top: 0.875rem;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  display: none;
}
.cm-status.ok {
  display: block;
  background: rgba(126,231,135,0.1);
  color: var(--green);
  border: 1px solid rgba(126,231,135,0.3);
}
.cm-status.err {
  display: block;
  background: rgba(255,161,152,0.1);
  color: var(--red);
  border: 1px solid rgba(255,161,152,0.3);
}
@media (max-width: 560px) {
  .cm-grid { grid-template-columns: 1fr; }
  .cm-span-2 { grid-column: span 1; }
}
