/* בלק צ'רי — עמוד גלריה (פיגמה frame 658:10722) */

/* ── הירו ── */
.gal-hero {
  position: relative;
  min-block-size: clamp(260px, 34vw, 400px);
  display: grid; place-items: center; overflow: hidden;
}
.gal-hero-bg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.gal-hero-overlay { position: absolute; inset: 0; background: rgba(1, 1, 1, .6); }
.gal-hero-title {
  position: relative; margin: 0; color: var(--bc-white);
  font-size: var(--fs-hero); /* 72px בדסקטופ (טוקן מכויל V2) */
  font-weight: 400; line-height: 1.25; text-align: center;
  padding-inline: 20px;
}

/* ── סקשן הגריד ── */
.gal-section { padding-block: clamp(2.2rem, 5vw, 3rem) 0; }

/* צ'יפים לסינון */
.gal-filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem;
  margin-block-end: clamp(1.4rem, 3vw, 2rem);
}
.gal-chip {
  border: 1.5px solid rgba(59, 15, 26, .25); color: var(--bc-primary);
  border-radius: var(--radius-pill); padding: .38em 1.25em;
  font-size: var(--fs-sm); font-weight: 500; background: transparent;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.gal-chip:hover { border-color: var(--bc-primary); background: rgba(59, 15, 26, .06); }
.gal-chip.active { background: var(--bc-primary); border-color: var(--bc-primary); color: var(--bc-white); }

/* ── גריד מוזאיקה — 3 עמודות, תא 432×400, מרווח 24, רדיוס 16 (כמו בפיגמה) ── */
.gal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  grid-auto-flow: row dense;
}
.gal-item {
  position: relative; display: block; inline-size: 100%; padding: 0;
  aspect-ratio: 432 / 400;
  border-radius: 16px; overflow: hidden;
  background: var(--bc-cream-warm);
  cursor: zoom-in;
}
.gal-item img {
  inline-size: 100%; block-size: 100%; object-fit: cover;
  transition: transform .45s ease;
}
.gal-item:hover img, .gal-item:focus-visible img { transform: scale(1.04); }

/* שכבת שם-מוצר (בעיצוב: שחור 20% + טקסט לבן ממורכז) */
.gal-item .gi-name {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, .35);
  color: var(--bc-white); font-size: 1.25rem; font-weight: 400;
  text-align: center; padding-inline: 14px;
  opacity: 0; transition: opacity .25s ease;
}
.gal-item:hover .gi-name, .gal-item:focus-visible .gi-name { opacity: 1; }
.gal-item:focus-visible { outline: 2px solid var(--bc-rose); outline-offset: 2px; }

/* תאי פיצ'ר 2×2 — הראשון בצד ההתחלה (ימין ב-RTL), השני בצד הסוף */
.gal-item.feat { grid-row: span 2; aspect-ratio: auto; }
.gal-item.feat-a { grid-column: span 2; }
.gal-item.feat-b { grid-column: 2 / span 2; }

.gal-empty {
  grid-column: 1 / -1; text-align: center;
  color: var(--bc-ink-soft); padding-block: 3rem; margin: 0;
}

/* אנימציית כניסה עדינה */
@media (prefers-reduced-motion: no-preference) {
  .gal-item { animation: galIn .5s ease both; }
  @keyframes galIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
  }
}

/* ── לייטבוקס ── */
.lb-layer {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(26, 10, 14, .85);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 48px);
}
.lb-layer[hidden] { display: none; }
.lb-box { margin: 0; text-align: center; max-inline-size: min(88vw, 1080px); }
.lb-box img {
  max-inline-size: 100%; max-block-size: 78vh;
  object-fit: contain; border-radius: 12px;
  box-shadow: var(--shadow-pop);
  margin-inline: auto;
  background: var(--bc-cream-warm);
}
.lb-box figcaption { color: var(--bc-white); font-size: var(--fs-lg); margin-block-start: .9rem; }

.lb-close {
  position: absolute; inset-block-start: 18px; inset-inline-start: 18px;
  background: var(--bc-white); color: var(--bc-primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.lb-close:hover { background: var(--bc-cream); }

/* חצים — מראה זהה ל-car-nav, ממוסגרים לוגית ל-RTL */
.lb-nav {
  position: absolute; inset-block-start: 50%; transform: translateY(-50%);
  inline-size: 46px; block-size: 46px; border-radius: 50%;
  background: var(--bc-white); color: var(--bc-primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
  display: grid; place-items: center;
  transition: transform .2s ease;
}
.lb-nav:hover { transform: translateY(-50%) scale(1.08); }
.lb-prev { inset-inline-start: clamp(10px, 3vw, 34px); }
.lb-next { inset-inline-end: clamp(10px, 3vw, 34px); }
.lb-prev::after, .lb-next::after {
  content: ""; inline-size: 10px; block-size: 10px;
  border-block-start: 2px solid currentColor; border-inline-end: 2px solid currentColor;
}
.lb-prev::after { transform: rotate(45deg) translate(-1px, 1px); }   /* חץ לימין (RTL: אחורה) */
.lb-next::after { transform: rotate(-135deg) translate(-1px, 1px); } /* חץ לשמאל (RTL: קדימה) */

/* ── רספונסיב ── */
@media (max-width: 960px) {
  .gal-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .gal-item { aspect-ratio: 1 / 1; border-radius: 12px; }
  .gal-item.feat, .gal-item.feat-a, .gal-item.feat-b {
    grid-column: 1 / -1; grid-row: auto; aspect-ratio: 3 / 2;
  }
  .gal-item .gi-name { font-size: 1.05rem; }
  .lb-nav { inline-size: 40px; block-size: 40px; }
  .lb-box img { max-block-size: 66vh; }
}
