/* ═══════════════════════════════════════════
   CHABOUM DIRECTORY — Front-end Styles
   ═══════════════════════════════════════════ */

/* ── Variables ── */
.cbd-wrap {
  --cbd-accent:   #e8a020;
  --cbd-radius:   16px;
  --cbd-gap:      24px;
  --cbd-shadow:   0 4px 24px rgba(0,0,0,.10);
  --cbd-font:     inherit;
  font-family: var(--cbd-font);
}

/* ── Controls bar ── */
.cbd-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  align-items: center;
}

.cbd-search-wrap {
  flex: 1 1 220px;
}

.cbd-search {
  width: 100%;
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 50px;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
  background: #fff;
}
.cbd-search:focus { border-color: var(--cbd-accent); }

.cbd-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cbd-filter-btn {
  padding: 7px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 50px;
  background: transparent;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  color: inherit;
}
.cbd-filter-btn:hover,
.cbd-filter-btn.active {
  background: var(--cbd-accent);
  border-color: var(--cbd-accent);
  color: #fff;
}

/* ── Grid ── */
.cbd-grid {
  display: grid;
  grid-template-columns: repeat(var(--cbd-cols, 3), 1fr);
  gap: var(--cbd-gap, 24px);
}

/* ── List ── */
.cbd-list {
  display: flex;
  flex-direction: column;
  gap: var(--cbd-gap, 16px);
}
.cbd-list .cbd-card {
  flex-direction: row;
  align-items: flex-start;
}
.cbd-list .cbd-card-header {
  flex-shrink: 0;
}

/* ── Carousel ── */
.cbd-carousel {
  position: relative;
  overflow: hidden;
}
.cbd-carousel-track {
  display: flex;
  gap: var(--cbd-gap, 24px);
  transition: transform .4s cubic-bezier(.25,.46,.45,.94);
  will-change: transform;
}
.cbd-carousel-track .cbd-card {
  flex: 0 0 calc((100% - var(--cbd-gap, 24px) * (var(--cbd-visible, 3) - 1)) / var(--cbd-visible, 3));
  min-width: 0;
}
.cbd-carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}
.cbd-prev,
.cbd-next {
  background: var(--cbd-accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cbd-prev:hover,
.cbd-next:hover { opacity: .85; transform: scale(1.1); }
.cbd-prev:disabled,
.cbd-next:disabled { opacity: .35; cursor: default; transform: none; }

.cbd-dots {
  display: flex;
  gap: 8px;
}
.cbd-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #d1d5db;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.cbd-dot.active {
  background: var(--cbd-accent);
  transform: scale(1.3);
}

/* ── Country sections ── */
.cbd-country-section { margin-bottom: 48px; }

.cbd-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  position: relative;
  display: inline-block;
}
.cbd-section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--cbd-accent);
  border-radius: 3px;
}

/* ── Card base ── */
.cbd-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: var(--cbd-radius);
  background: #fff;
  transition: transform .25s, box-shadow .25s;
  overflow: hidden;
}
.cbd-card:hover {
  transform: translateY(-4px);
}

/* Card style: shadow (default) */
.cbd-card-shadow .cbd-card {
  box-shadow: var(--cbd-shadow);
}
.cbd-card-shadow .cbd-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,.16);
}

/* Card style: bordered */
.cbd-card-bordered .cbd-card {
  border: 2px solid #e5e7eb;
  box-shadow: none;
}
.cbd-card-bordered .cbd-card:hover {
  border-color: var(--cbd-accent);
}

/* Card style: minimal */
.cbd-card-minimal .cbd-card {
  box-shadow: none;
  padding: 16px 0;
  border-radius: 0;
  border-bottom: 1px solid #f3f4f6;
}
.cbd-card-minimal .cbd-card:hover {
  transform: none;
}

/* Card style: glassmorphism */
.cbd-card-glassmorphism .cbd-card {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 8px 32px rgba(0,0,0,.10);
}

/* Card style: dark */
.cbd-card-dark .cbd-card {
  background: #1a1a2e;
  color: #f0f0f0;
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
}
.cbd-card-dark .cbd-name { color: #fff; }
.cbd-card-dark .cbd-excerpt,
.cbd-card-dark .cbd-subtitle,
.cbd-card-dark .cbd-author { color: #a0a0b0; }
.cbd-card-dark .cbd-social-link { color: #a0a0b0; }
.cbd-card-dark .cbd-social-link:hover { color: var(--cbd-accent); }

/* ── Featured star ── */
.cbd-star {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 1.1rem;
}

/* ── Badges ── */
.cbd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.cbd-badge {
  background: var(--cbd-accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── Card header ── */
.cbd-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

/* ── Logo ── */
.cbd-logo-wrap {
  position: relative;
  flex-shrink: 0;
}
.cbd-logo {
  width: 80px;
  height: 80px;
  object-fit: cover;
  display: block;
}
.cbd-logo-circle .cbd-logo,
.cbd-logo-circle .cbd-logo-initials { border-radius: 50%; }
.cbd-logo-rounded .cbd-logo,
.cbd-logo-rounded .cbd-logo-initials { border-radius: 14px; }
.cbd-logo-square .cbd-logo,
.cbd-logo-square .cbd-logo-initials { border-radius: 4px; }

.cbd-logo-initials {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cbd-accent);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cbd-flag {
  position: absolute;
  bottom: -4px; right: -4px;
  font-size: 1.1rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
}

/* ── Card info ── */
.cbd-card-info { flex: 1; min-width: 0; }

.cbd-name {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
}

.cbd-subtitle {
  font-size: .82rem;
  margin: 0 0 4px;
  opacity: .75;
  font-style: italic;
  line-height: 1.3;
}

.cbd-author {
  font-size: .78rem;
  margin: 0;
  opacity: .6;
  font-style: italic;
}

/* ── Excerpt ── */
.cbd-excerpt {
  font-size: .84rem;
  line-height: 1.6;
  opacity: .75;
  margin: 0 0 14px;
  flex: 1;
}

/* ── Social icons ── */
.cbd-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,.07);
}
.cbd-card-dark .cbd-socials { border-color: rgba(255,255,255,.1); }

.cbd-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  text-decoration: none;
  transition: color .2s, transform .2s;
  width: 22px;
  height: 22px;
}
.cbd-social-link svg {
  width: 18px;
  height: 18px;
  display: block;
}
.cbd-social-link:hover {
  color: var(--cbd-accent);
  transform: scale(1.2);
}

/* Social brand colors on hover */
.cbd-social-instagram:hover { color: #E1306C !important; }
.cbd-social-spotify:hover   { color: #1DB954 !important; }
.cbd-social-youtube:hover   { color: #FF0000 !important; }
.cbd-social-facebook:hover  { color: #1877F2 !important; }
.cbd-social-twitter:hover   { color: #000 !important; }
.cbd-social-threads:hover   { color: #000 !important; }
.cbd-social-linkedin:hover  { color: #0A66C2 !important; }
.cbd-social-tiktok:hover    { color: #ff0050 !important; }
.cbd-social-untappd:hover   { color: #F6A84D !important; }

/* ── Empty state ── */
.cbd-empty {
  text-align: center;
  opacity: .5;
  padding: 40px;
  grid-column: 1 / -1;
}

/* ── Hidden (filtered out) ── */
.cbd-card.cbd-hidden {
  display: none;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .cbd-grid { grid-template-columns: repeat(var(--cbd-cols-tablet, 2), 1fr); }
  .cbd-carousel-track .cbd-card {
    flex: 0 0 calc((100% - var(--cbd-gap, 24px)) / 2);
  }
}
@media (max-width: 600px) {
  .cbd-grid { grid-template-columns: 1fr; }
  .cbd-carousel-track .cbd-card {
    flex: 0 0 100%;
  }
  .cbd-controls { flex-direction: column; align-items: stretch; }
  .cbd-list .cbd-card { flex-direction: column; }
}
