/*
Theme Name: City Directory DE
Theme URI: https://bonplanbruxelles.com
Author: V001
Version: 1.0.0
Text Domain: citydirectory-de
Description: Thème annuaire de ville mobile-first. Couleur, nom et slogan configurables via le plugin City Directory Config.
License: GNU General Public License v2
Text Domain: citydirectory
*/

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.7;
  color: #111; background: #F5F5F3;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c); text-decoration: none; transition: opacity .15s; }
a:hover { opacity: .8; }
ul { list-style: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ── COULEUR PRINCIPALE (injectée par plugin) ── */
:root {
  --c:      #E63329;
  --c2:     #C42B22;
  --c-bg:   #FEF2F1;
  --dk:     #111111;
  --mid:    #374151;
  --muted:  #6B7280;
  --light:  #F5F5F3;
  --border: #E5E7EB;
  --white:  #FFFFFF;
  --radius: 12px;
  --radius-sm: 8px;
  --trans:  .18s ease;
}

/* ── TOPBAR ── */
.cd-topbar {
  background: var(--dk);
  padding: 7px 20px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
}
.cd-topbar-left { color: #6B7280; }
.cd-topbar-right {
  background: var(--c); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 3px 12px; border-radius: 20px;
}

/* ── HEADER ── */
#cd-header {
  background: var(--white);
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
  transition: box-shadow var(--trans);
}
#cd-header.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,.08); }

.cd-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.cd-logo-mark {
  width: 34px; height: 34px;
  background: var(--c); border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.cd-logo-mark svg { width: 17px; height: 17px; stroke: #fff; fill: none; stroke-width: 2.5; }
.cd-logo-txt { font-size: 17px; font-weight: 700; color: var(--dk); }
.cd-logo-txt em { color: var(--c); font-style: normal; }

.cd-nav-links { display: flex; align-items: center; gap: 4px; }
.cd-nav-links a {
  font-size: 13px; font-weight: 500; color: var(--mid);
  padding: 7px 12px; border-radius: var(--radius-sm);
  transition: all var(--trans);
}
.cd-nav-links a:hover,
.cd-nav-links li.current-menu-item a { color: var(--c); background: var(--c-bg); }
.cd-nav-cta {
  background: var(--c) !important; color: #fff !important;
  padding: 8px 18px !important; border-radius: var(--radius-sm) !important;
  font-weight: 700 !important; margin-left: 6px !important;
}
.cd-nav-cta:hover { background: var(--c2) !important; color: #fff !important; }

/* BURGER */
.cd-burger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.cd-burger span { display: block; width: 24px; height: 2px; background: var(--dk); border-radius: 2px; }

/* ── HERO ── */
.cd-hero { background: var(--c); padding: 28px 20px 26px; }
.cd-hero-eyebrow {
  font-size: 10px; font-weight: 600; color: rgba(255,255,255,.65);
  text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px;
}
.cd-hero h1 {
  font-size: clamp(22px, 4vw, 38px); font-weight: 800;
  color: #fff; line-height: 1.15; margin-bottom: 8px; letter-spacing: -.5px;
}
.cd-hero-sub { font-size: 14px; color: rgba(255,255,255,.8); line-height: 1.6; margin-bottom: 18px; max-width: 520px; }
.cd-search-bar {
  background: var(--white); border-radius: var(--radius);
  padding: 13px 16px; display: flex; align-items: center; gap: 10px;
  max-width: 540px;
}
.cd-search-bar svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; flex-shrink: 0; }
.cd-search-bar input {
  border: none; outline: none; font-size: 14px;
  color: var(--dk); background: transparent; flex: 1; font-family: inherit;
}
.cd-search-bar input::placeholder { color: #9CA3AF; }

/* ── CATS BAR ── */
.cd-cats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.cd-cats-scroll {
  display: flex; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cd-cats-scroll::-webkit-scrollbar { display: none; }
.cd-cat {
  flex-shrink: 0; padding: 12px 16px;
  font-size: 13px; font-weight: 500; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent;
  white-space: nowrap; transition: all var(--trans);
  display: flex; align-items: center; gap: 6px;
  text-decoration: none;
}
.cd-cat:hover, .cd-cat.active { color: var(--c); border-bottom-color: var(--c); }
.cd-cat svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── SECTIONS ── */
.cd-section { padding: 28px 0; }
.cd-section-light { background: var(--light); }
.cd-section-white { background: var(--white); }

.cd-sec-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.cd-sec-title { font-size: 18px; font-weight: 700; color: var(--dk); }
.cd-sec-more { font-size: 13px; font-weight: 600; color: var(--c); }

/* ── FEATURED CARDS (scroll horizontal) ── */
.cd-feat-scroll {
  display: flex; gap: 14px; overflow-x: auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 4px;
}
.cd-feat-scroll::-webkit-scrollbar { display: none; }
.cd-feat-card {
  flex-shrink: 0; width: 260px;
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  transition: transform var(--trans), box-shadow var(--trans);
}
.cd-feat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.cd-feat-img { height: 150px; position: relative; overflow: hidden; background: var(--light); }
.cd-feat-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cd-feat-card:hover .cd-feat-img img { transform: scale(1.04); }
.cd-feat-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--c); color: #fff;
  font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 20px;
  letter-spacing: .3px;
}
.cd-feat-score {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,.55); color: #F59E0B;
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px;
  display: flex; align-items: center; gap: 3px;
}
.cd-feat-body { padding: 13px 14px; }
.cd-feat-cat { font-size: 10px; color: var(--c); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.cd-feat-title { font-size: 14px; font-weight: 600; color: var(--dk); line-height: 1.35; margin-bottom: 8px; }
.cd-feat-meta { display: flex; align-items: center; justify-content: space-between; }
.cd-feat-loc { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.cd-feat-loc svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── ARTICLE CARDS (liste verticale) ── */
.cd-art-grid { display: flex; flex-direction: column; gap: 12px; }
.cd-art-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  display: flex; transition: box-shadow var(--trans);
}
.cd-art-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.07); }
.cd-art-thumb { width: 110px; flex-shrink: 0; overflow: hidden; background: var(--light); }
.cd-art-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cd-art-card:hover .cd-art-thumb img { transform: scale(1.05); }
.cd-art-body { padding: 13px 14px 13px 16px; flex: 1; min-width: 0; }
.cd-art-cat { font-size: 10px; color: var(--c); font-weight: 700; text-transform: uppercase; letter-spacing: .8px; margin-bottom: 5px; }
.cd-art-title { font-size: 14px; font-weight: 600; color: var(--dk); line-height: 1.35; margin-bottom: 6px; }
.cd-art-excerpt { font-size: 12px; color: var(--muted); line-height: 1.55; margin-bottom: 8px; }
.cd-art-foot { display: flex; align-items: center; justify-content: space-between; }
.cd-art-loc { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 3px; }
.cd-art-loc svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; }
.cd-art-date { font-size: 11px; color: #9CA3AF; }

/* ── PILLS QUARTIERS ── */
.cd-pills-box {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
}
.cd-pills-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.cd-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.cd-pill {
  background: var(--light); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 500; color: var(--mid);
  transition: all var(--trans); text-decoration: none;
}
.cd-pill:hover { background: var(--c-bg); border-color: var(--c); color: var(--c); }

/* ── PAGE CATÉGORIE / ARCHIVE ── */
.cd-archive-hero {
  background: var(--dk); padding: 40px 20px;
  position: relative; overflow: hidden; text-align: center;
}
.cd-archive-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .12; }
.cd-archive-hero-content { position: relative; z-index: 1; }
.cd-archive-hero h1 { font-size: clamp(22px, 3vw, 36px); color: #fff; font-weight: 800; margin-bottom: 8px; }
.cd-archive-hero p { color: #9CA3AF; font-size: 15px; }
.cd-breadcrumb { font-size: 12px; color: #4B5563; margin-bottom: 10px; display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; }
.cd-breadcrumb a { color: #6B7280; }
.cd-breadcrumb a:hover { color: #fff; }

.cd-art-grid-2 {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.cd-art-card-v {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  transition: transform var(--trans), box-shadow var(--trans);
}
.cd-art-card-v:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.08); }
.cd-art-card-v-img { height: 180px; overflow: hidden; background: var(--light); position: relative; }
.cd-art-card-v-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cd-art-card-v:hover .cd-art-card-v-img img { transform: scale(1.04); }
.cd-art-card-v-body { padding: 16px 18px; }
.cd-art-card-v-cat { font-size: 10px; color: var(--c); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.cd-art-card-v-title { font-size: 16px; font-weight: 700; color: var(--dk); line-height: 1.3; margin-bottom: 7px; }
.cd-art-card-v-title a { color: inherit; }
.cd-art-card-v-title a:hover { color: var(--c); }
.cd-art-card-v-excerpt { font-size: 13px; color: var(--muted); line-height: 1.65; margin-bottom: 12px; }
.cd-art-card-v-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: #9CA3AF; }

/* ── PAGE ARTICLE (single) ── */
.cd-single-hero { height: 280px; position: relative; overflow: hidden; }
.cd-single-hero img { width: 100%; height: 100%; object-fit: cover; }
.cd-single-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.1), rgba(0,0,0,.45)); }
.cd-single-hero-badge { position: absolute; bottom: 16px; left: 20px; background: var(--c); color: #fff; font-size: 10px; font-weight: 700; padding: 4px 14px; border-radius: 20px; letter-spacing: .3px; }
.cd-single-hero-score { position: absolute; bottom: 16px; right: 20px; background: rgba(0,0,0,.55); color: #F59E0B; font-size: 11px; font-weight: 600; padding: 4px 11px; border-radius: 20px; display: flex; align-items: center; gap: 4px; }

.cd-single-layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; max-width: 1100px; margin: 0 auto; padding: 36px 20px; }

.cd-single-body {}
.cd-single-crumb { font-size: 12px; color: var(--muted); margin-bottom: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cd-single-crumb a { color: var(--muted); }
.cd-single-crumb a:hover { color: var(--c); }
.cd-single-title { font-size: clamp(20px, 3vw, 30px); font-weight: 800; color: var(--dk); line-height: 1.15; margin-bottom: 14px; letter-spacing: -.3px; }
.cd-single-strip { display: flex; gap: 14px; flex-wrap: wrap; padding: 13px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.cd-strip-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.cd-strip-item svg { width: 15px; height: 15px; stroke: var(--c); fill: none; stroke-width: 2; }

.cd-single-content p { font-size: 15px; color: var(--mid); line-height: 1.8; margin-bottom: 16px; }
.cd-single-content h2 { font-size: 20px; font-weight: 700; color: var(--dk); margin: 28px 0 12px; border-bottom: 2px solid var(--border); padding-bottom: 8px; }
.cd-single-content h3 { font-size: 17px; font-weight: 700; color: var(--dk); margin: 20px 0 9px; }
.cd-single-content ul { list-style: none; margin-bottom: 16px; }
.cd-single-content ul li { padding: 5px 0 5px 20px; position: relative; font-size: 14px; color: var(--mid); line-height: 1.65; }
.cd-single-content ul li::before { content: '✓'; position: absolute; left: 0; color: var(--c); font-weight: 700; }
.cd-single-content img { border-radius: var(--radius); margin: 20px 0; width: 100%; }
.cd-single-content img.img-auto { height: auto !important; object-fit: initial !important; }

/* CTA inline */
.cd-cta-inline {
  background: var(--c); border-radius: var(--radius); padding: 18px 20px;
  margin: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.cd-cta-inline-txt { font-size: 14px; font-weight: 600; color: #fff; line-height: 1.4; }
.cd-cta-inline-sub { font-size: 12px; font-weight: 400; color: rgba(255,255,255,.8); }
.cd-cta-inline-btn { background: #fff; color: var(--c); padding: 10px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }

/* Tags */
.cd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.cd-tag { background: var(--light); border: 1px solid var(--border); padding: 5px 13px; border-radius: 20px; font-size: 12px; color: var(--mid); }
.cd-tag a { color: inherit; }
.cd-tag a:hover { color: var(--c); }

/* SIDEBAR */
.cd-sidebar { position: sticky; top: 70px; }
.cd-sidebar-widget { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.cd-sidebar-title { background: var(--dk); color: #fff; padding: 13px 18px; font-size: 13px; font-weight: 700; }
.cd-sidebar-body { padding: 18px; }

/* Fiche pratique sidebar */
.cd-fiche { display: flex; flex-direction: column; gap: 0; }
.cd-fiche-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cd-fiche-row:first-child { padding-top: 0; }
.cd-fiche-row:last-child { border: none; padding-bottom: 0; }
.cd-fiche-row svg { width: 18px; height: 18px; stroke: var(--c); fill: none; stroke-width: 2; flex-shrink: 0; margin-top: 1px; }
.cd-fiche-lbl { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.cd-fiche-val { font-size: 13px; color: var(--dk); font-weight: 500; }
.cd-fiche-val a { color: var(--c); }

/* Bouton sidebar */
.cd-sidebar-btn { display: block; text-align: center; background: var(--c); color: #fff; padding: 13px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; margin-bottom: 10px; transition: background var(--trans); }
.cd-sidebar-btn:hover { background: var(--c2); color: #fff; }
.cd-sidebar-btn-ghost { display: block; text-align: center; background: var(--white); color: var(--dk); padding: 12px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; border: 1px solid var(--border); transition: all var(--trans); }
.cd-sidebar-btn-ghost:hover { border-color: var(--c); color: var(--c); }

/* ── PAGINATION ── */
.cd-pagination { display: flex; gap: 8px; justify-content: center; padding: 36px 0; flex-wrap: wrap; }
.cd-pagination a, .cd-pagination span { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; color: var(--dk); font-weight: 500; }
.cd-pagination a:hover, .cd-pagination .current { background: var(--c); border-color: var(--c); color: #fff; }

/* ── FOOTER ── */
#cd-footer { background: var(--dk); padding: 52px 0 0; }
.cd-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.08); }
.cd-footer-logo { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.cd-footer-logo em { color: var(--c); font-style: normal; }
.cd-footer-desc { font-size: 13px; color: #9CA3AF; line-height: 1.8; margin-bottom: 14px; }
.cd-footer-heading { font-size: 10px; font-weight: 700; color: #6B7280; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 14px; }
.cd-footer-links li { margin-bottom: 9px; }
.cd-footer-links a { font-size: 13px; color: #9CA3AF; transition: color var(--trans); }
.cd-footer-links a:hover { color: #fff; }
.cd-footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; flex-wrap: wrap; gap: 8px; }
.cd-footer-copy { color: #4B5563; font-size: 12px; }
.cd-footer-legal { display: flex; gap: 16px; }
.cd-footer-legal a { color: #4B5563; font-size: 12px; }
.cd-footer-legal a:hover { color: #9CA3AF; }

/* ── MOBILE STICKY BAR ── */
.cd-mobile-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 997;
  background: var(--dk); border-top: 1px solid rgba(255,255,255,.08);
  padding: 9px 16px; gap: 10px;
}
.cd-mobile-bar a { flex: 1; text-align: center; padding: 13px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; display: block; }
.cd-mobile-bar a:first-child { background: var(--c); color: #fff; }
.cd-mobile-bar a:last-child { background: var(--white); color: var(--dk); }

/* ── ANIMATIONS ── */
.cd-fade { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.cd-fade.visible { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════
   RESPONSIVE TABLET (≤ 1024px)
══════════════════════════════════ */
@media (max-width: 1024px) {
  .cd-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .cd-single-layout { grid-template-columns: 1fr 280px; gap: 28px; }
  .cd-art-grid-2 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

/* ══════════════════════════════════
   RESPONSIVE MOBILE (≤ 768px)
══════════════════════════════════ */
@media (max-width: 768px) {
  .cd-topbar { padding: 7px 14px; }
  .cd-topbar-left { display: none; }

  #cd-header { padding: 0 14px; height: 52px; }
  .cd-nav-links { display: none; }
  .cd-nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; inset: 0; background: #0A0A0A; z-index: 999;
    padding: 52px 0 32px; overflow-y: auto;
  }
  .cd-nav-links.open a { font-size: 22px; font-weight: 700; padding: 16px 24px; color: #9CA3AF; border-radius: 0; }
  .cd-nav-links.open a:hover { color: #fff; background: rgba(255,255,255,.04); }
  .cd-nav-links.open .cd-nav-cta { background: var(--c) !important; display: block !important; text-align: center !important; margin: 20px 24px 0 !important; padding: 15px !important; border-radius: var(--radius) !important; }
  .cd-burger { display: flex; }

  .cd-hero { padding: 20px 14px 18px; }
  .cd-hero h1 { font-size: 24px; }
  .cd-hero-sub { font-size: 13px; }
  .cd-search-bar { padding: 11px 14px; }

  .cd-section { padding: 20px 0; }
  .container { padding: 0 14px; }

  .cd-single-layout { grid-template-columns: 1fr; padding: 24px 14px; }
  .cd-sidebar { position: static; margin-top: 24px; }
  .cd-single-hero { height: 220px; }
  .cd-single-title { font-size: 22px; }

  .cd-archive-hero { padding: 32px 14px; }
  .cd-archive-hero h1 { font-size: 22px; }
  .cd-art-grid-2 { grid-template-columns: 1fr; }
  .cd-footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .cd-footer-bottom { flex-direction: column; text-align: center; }
  .cd-footer-legal { justify-content: center; }
  .cd-mobile-bar { display: flex !important; }
  #cd-footer { padding-bottom: 70px; }
  body { padding-bottom: 70px; }
  .cd-single-layout { padding-bottom: 80px; }
}

@media (max-width: 420px) {
  .cd-hero h1 { font-size: 21px; }
  .cd-single-title { font-size: 20px; }
}

/* ══════════════════════════════════
   GALERIE PHOTO (plugin cd-gallery)
══════════════════════════════════ */
.cd-gallery { margin: 28px 0; }
.cd-gallery-title {
  font-size: 17px; font-weight: 700; color: var(--dk);
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.cd-gallery-title::before { content: '📸'; font-size: 16px; }

.cd-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.cd-gallery-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cd-gallery-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.cd-gallery-item {
  position: relative; overflow: hidden;
  border-radius: var(--radius-sm);
  aspect-ratio: 1;
  background: var(--light);
  cursor: pointer;
}
.cd-gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.cd-gallery-item:hover img { transform: scale(1.06); }
.cd-gallery-item-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.cd-gallery-item:hover .cd-gallery-item-overlay { opacity: 1; }
.cd-gallery-item-overlay svg {
  width: 28px; height: 28px; stroke: #fff; fill: none; stroke-width: 2;
}

/* LIGHTBOX */
.cd-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.95);
  display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.cd-lightbox.open { display: flex; }
.cd-lightbox-inner {
  position: relative; max-width: 900px; width: 100%;
  max-height: 90vh;
}
.cd-lightbox-img {
  width: 100%; max-height: 80vh;
  object-fit: contain; border-radius: var(--radius);
}
.cd-lightbox-caption {
  text-align: center; color: rgba(255,255,255,.7);
  font-size: 13px; margin-top: 10px;
}
.cd-lightbox-close {
  position: absolute; top: -44px; right: 0;
  background: rgba(255,255,255,.1); border: none; color: #fff;
  font-size: 22px; cursor: pointer; width: 36px; height: 36px;
  border-radius: 50%; line-height: 36px; text-align: center;
}
.cd-lightbox-prev, .cd-lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.1); border: none; color: #fff;
  font-size: 22px; cursor: pointer; width: 44px; height: 44px;
  border-radius: 50%; line-height: 44px; text-align: center;
  transition: background var(--trans);
}
.cd-lightbox-prev:hover, .cd-lightbox-next:hover { background: rgba(255,255,255,.25); }
.cd-lightbox-prev { left: -56px; }
.cd-lightbox-next { right: -56px; }
.cd-lightbox-counter {
  position: absolute; bottom: -36px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.5); font-size: 12px;
}

@media (max-width: 768px) {
  .cd-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .cd-gallery-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cd-lightbox-prev { left: 4px; }
  .cd-lightbox-next { right: 4px; }
}
@media (max-width: 420px) {
  .cd-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
