/* ============================================================
   OMG Gallery — Frontend Base Styles
   v1.1.40 2026-10-05
   Scope: all .omg-gallery instances — theme overrides in themes.css
   ============================================================ */

/* ── 1. RESET / BASE ─────────────────────────────────────── */
.omg-gallery {
  box-sizing: border-box;
  width: 100%;
  position: relative;
  --omg-gallery-focus: var(--mc-accent, var(--omg-accent, #c5960c));
}

.omg-gallery *,
.omg-gallery *::before,
.omg-gallery *::after {
  box-sizing: inherit;
}

/* ── 2. GALLERY ITEM ─────────────────────────────────────── */
.omg-gallery-item {
  position: relative;
  overflow: hidden;
  display: block;
}

.omg-gallery-link {
  display: block;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
}

.omg-gallery-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.omg-gallery-video-tile,
.omg-gallery-file-tile {
  display: flex;
  position: relative;
  min-height: 180px;
  background: linear-gradient(135deg, rgba(23, 3, 9, 0.92), rgba(135, 10, 28, 0.86));
  background-size: cover;
  background-position: center;
  color: #f2d56b;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.omg-gallery-video-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 2, 8, 0.2), rgba(18, 2, 8, 0.62));
  z-index: -1;
}

.omg-gallery-video-play,
.omg-gallery-file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(242, 213, 107, 0.86);
  border-radius: 8px;
  background: rgba(20, 2, 8, 0.58);
  color: #f2d56b;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.omg-gallery-file-label {
  width: auto;
  min-width: 120px;
  min-height: 44px;
  padding: 0 18px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.omg-gallery-item:hover .omg-gallery-photo,
.omg-gallery-link:hover .omg-gallery-photo {
  transform: scale(1.04);
}

/* ── 3. CAPTION ──────────────────────────────────────────── */
.omg-gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.4;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.omg-gallery-item:hover .omg-gallery-caption,
.omg-gallery-link:hover .omg-gallery-caption {
  transform: translateY(0);
}

/* Always-on captions */
.omg-gallery--captions-always .omg-gallery-caption {
  transform: translateY(0);
}

/* No captions */
.omg-gallery--captions-none .omg-gallery-caption {
  display: none;
}

/* ── 4. DOWNLOAD BUTTON ──────────────────────────────────── */
.omg-gallery-download {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.2s;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 5;
  white-space: nowrap;
}

.omg-gallery--download-on .omg-gallery-download {
  display: flex;
}

.omg-gallery-item:hover .omg-gallery-download,
.omg-gallery-link:hover .omg-gallery-download {
  opacity: 1;
}

.omg-gallery-download:hover {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
}

/* ── 5. FILTER BAR ───────────────────────────────────────── */
.omg-gallery-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.omg-gallery-filter-btn {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: all 0.2s;
  line-height: 1.2;
  white-space: nowrap;
}

.omg-gallery-filter-btn.is-active,
.omg-gallery-filter-btn:hover {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

.omg-gallery-item.is-hidden {
  display: none;
}

.omg-gallery-item.is-filtering {
  opacity: 0.3;
  transform: scale(0.95);
  transition: all 0.3s ease;
}

/* ── 6. PASSWORD FORM ────────────────────────────────────── */
.omg-gallery-password-form {
  max-width: 360px;
  margin: 40px auto;
  text-align: center;
  padding: 40px 32px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.omg-gallery-password-form p {
  margin: 0 0 20px;
  font-size: 15px;
  color: #444;
  line-height: 1.5;
}

.omg-gallery-password-form label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  text-align: left;
}

.omg-gallery-password-form input[type="password"] {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.omg-gallery-password-form input[type="password"]:focus {
  border-color: #1a1a1a;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.omg-gallery-password-form button,
.omg-gallery-password-form input[type="submit"] {
  width: 100%;
  min-height: 44px;
  padding: 11px 20px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.omg-gallery-password-form button:hover,
.omg-gallery-password-form input[type="submit"]:hover {
  background: #333;
}

.omg-gallery-password-error {
  color: #c00;
  font-size: 16px;
  margin-top: 10px;
  display: block;
}

/* ── 7. ERROR / EMPTY STATES ─────────────────────────────── */
.omg-gallery-error {
  padding: 40px 20px;
  text-align: center;
  color: #777;
  font-size: 16px;
  line-height: 1.45;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.omg-gallery-empty {
  padding: 40px 20px;
  text-align: center;
  color: #777;
  font-size: 16px;
  line-height: 1.45;
  background: #f9f9f9;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.omg-gallery-error p,
.omg-gallery-empty p {
  margin: 0;
}

.omg-gallery-shortcode-header {
  margin: 0 0 22px;
  max-width: 760px;
}

.omg-gallery-shortcode-header h2 {
  margin: 0 0 8px;
  color: var(--mc-text, #1a1a1a);
  font-family: var(--mc-serif, Georgia, serif);
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: 0;
}

.omg-gallery-shortcode-header p {
  margin: 0;
  color: var(--mc-text-mid, #555);
  font-family: var(--mc-sans, system-ui, sans-serif);
  font-size: 15px;
  line-height: 1.6;
}

/* ── 8. NATIVE VIDEO POST GALLERY ───────────────────────── */
.omg-video-gallery {
  width: min(1120px, calc(100% - clamp(36px, 6vw, 88px)));
  margin: clamp(18px, 3vw, 34px) auto;
  --omg-video-accent: var(--mc-accent, var(--omg-gallery-focus, #d9bb61));
  --omg-video-ink: var(--mc-text, #2b0710);
  --omg-video-muted: var(--mc-text-mid, #76666a);
  --omg-video-card: var(--mc-card, #fffaf0);
  --omg-video-border: rgba(133, 14, 32, 0.18);
  min-width: 0;
}

.omg-video-gallery-grid {
  display: grid;
  grid-template-columns: repeat(var(--omg-video-cols, 3), minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 28px);
}

.omg-video-gallery-grid,
.omg-video-gallery-slider,
.omg-video-card,
.omg-video-card-link,
.omg-video-card-body {
  min-width: 0;
}

.omg-video-gallery--slider {
  --omg-video-slides-current: var(--omg-video-slides, 3);
}

.omg-video-gallery-track {
  display: flex;
  gap: var(--omg-video-gap, 20px);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.omg-video-gallery-track::-webkit-scrollbar {
  display: none;
}

.omg-video-gallery-track .omg-video-card {
  flex: 0 0 calc(
    (100% - (var(--omg-video-slides-current) - 1) * var(--omg-video-gap, 20px)) /
      var(--omg-video-slides-current)
  );
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.omg-video-card {
  min-width: 0;
  border: 1px solid var(--omg-video-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--omg-video-card);
  box-shadow: 0 18px 46px rgba(60, 8, 18, 0.1);
}

.omg-video-card-link {
  display: grid;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.omg-video-card-media {
  position: relative;
  min-height: clamp(150px, 18vw, 230px);
  background: linear-gradient(135deg, #2b0710, #8f1228);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.omg-video-card-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 2, 8, 0.06), rgba(18, 2, 8, 0.56));
  z-index: -1;
}

.omg-video-card-play {
  width: 56px;
  height: 56px;
  border: 2px solid rgba(255, 239, 185, 0.86);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(25, 2, 8, 0.62);
  color: var(--omg-video-accent);
  font-size: 20px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.26);
  transition: transform 0.2s ease, background 0.2s ease;
}

.omg-video-card-body {
  display: grid;
  gap: 10px;
  padding: clamp(18px, 2vw, 24px);
}

.omg-video-card-date {
  color: var(--omg-video-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.omg-video-card-title {
  color: var(--omg-video-ink);
  font-family: var(--mc-serif, Georgia, serif);
  font-size: 26px;
  line-height: 1.08;
  font-weight: 800;
  overflow-wrap: break-word;
}

.omg-video-card-excerpt {
  color: var(--omg-video-muted);
  font-size: 15px;
  line-height: 1.55;
}

.omg-video-card-action {
  width: fit-content;
  max-width: 100%;
  margin-top: 6px;
  color: #6f0718;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  border-bottom: 2px solid var(--omg-video-accent);
}

.omg-video-card-link:hover .omg-video-card-play,
.omg-video-card-link:focus-visible .omg-video-card-play {
  transform: scale(1.06);
  background: rgba(25, 2, 8, 0.82);
}

.omg-video-card-link:focus-visible {
  outline: 3px solid var(--omg-video-accent);
  outline-offset: 4px;
}

.omg-video-slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 52px;
  margin-top: 18px;
}

.omg-video-slider-arrows {
  display: flex;
  gap: 10px;
}

.omg-video-slider-arrow {
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--omg-video-border);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--omg-video-card);
  color: var(--omg-video-ink);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(21, 18, 18, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.omg-video-slider-arrow:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--omg-video-accent);
}

.omg-video-slider-arrow:focus-visible,
.omg-video-slider-dot:focus-visible {
  outline: 3px solid var(--omg-video-accent);
  outline-offset: 3px;
}

.omg-video-slider-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.omg-video-slider-dots {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: min(50vw, 360px);
  padding: 8px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.omg-video-slider-dots::-webkit-scrollbar {
  display: none;
}

.omg-video-slider-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(92, 84, 86, 0.32);
  background: color-mix(in srgb, var(--omg-video-muted) 42%, transparent);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.omg-video-slider-dot.is-active {
  width: 28px;
  border-radius: 8px;
  background: var(--omg-video-accent);
}

.omg-video-slider-status {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 820px) {
  .omg-gallery-shortcode-header h2 {
    font-size: 32px;
    line-height: 1.12;
  }

  .omg-video-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .omg-video-gallery--slider {
    --omg-video-slides-current: var(--omg-video-slides-tablet, 2);
  }
}

@media (max-width: 520px) {
  .omg-video-gallery {
    width: calc(100% - 28px);
    margin: 16px auto;
  }

  .omg-video-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .omg-video-gallery--slider {
    --omg-video-slides-current: var(--omg-video-slides-mobile, 1);
  }

  .omg-video-gallery-track {
    gap: var(--omg-video-gap, 14px);
  }

  .omg-video-slider-controls {
    align-items: flex-start;
    margin-top: 14px;
  }

  .omg-video-slider-arrow {
    width: 44px;
    height: 44px;
  }

  .omg-video-card-media {
    min-height: 112px;
  }

  .omg-video-card-body {
    padding: 14px;
    gap: 7px;
  }

  .omg-video-card-title {
    font-size: 21px;
    line-height: 1.12;
  }

  .omg-video-card-excerpt {
    display: none;
  }

  .omg-video-card-action,
  .omg-video-card-date {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .omg-video-gallery-track {
    scroll-behavior: auto;
  }

  .omg-video-slider-arrow,
  .omg-video-slider-dot {
    transition: none;
  }
}

.omg-gallery-wrap.omg-preset-portfolio,
.omg-gallery-wrap.omg-preset-editorial,
.omg-gallery-wrap.omg-preset-case-study,
.omg-gallery-wrap.omg-preset-proof {
  --omg-gallery-card-bg: var(--mc-card, #fff);
  --omg-gallery-border: var(--mc-border, rgba(0, 0, 0, 0.12));
  --omg-gallery-shadow: var(--mc-shadow-sm, 0 14px 34px rgba(0, 0, 0, 0.08));
  margin: 0 auto 40px;
}

.omg-gallery-wrap.omg-preset-portfolio .omg-gallery-item,
.omg-gallery-wrap.omg-preset-editorial .omg-gallery-item,
.omg-gallery-wrap.omg-preset-case-study .omg-gallery-item,
.omg-gallery-wrap.omg-preset-proof .omg-gallery-item {
  border: 1px solid var(--omg-gallery-border);
  background: var(--omg-gallery-card-bg);
  box-shadow: var(--omg-gallery-shadow);
}

.omg-gallery-wrap.omg-preset-portfolio .omg-gallery-caption,
.omg-gallery-wrap.omg-preset-editorial .omg-gallery-caption,
.omg-gallery-wrap.omg-preset-case-study .omg-gallery-caption,
.omg-gallery-wrap.omg-preset-proof .omg-gallery-caption {
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
  padding: 28px 16px 14px;
  font-weight: 600;
}

/* -- 8. PORTFOLIO ENTRY CPT OUTPUT -------------------------------- */
.omg-portfolio-entries {
  box-sizing: border-box;
  width: 100%;
  margin: 0 auto 40px;
}

.omg-portfolio-entries *,
.omg-portfolio-entries *::before,
.omg-portfolio-entries *::after {
  box-sizing: inherit;
}

.omg-portfolio-entry-grid {
  display: grid;
  grid-template-columns: repeat(var(--omg-portfolio-cols, 3), minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
  align-items: stretch;
}

.omg-portfolio-entry-card {
  overflow: hidden;
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  border: 1px solid var(--mc-border, rgba(255, 255, 255, 0.14));
  border-radius: 8px;
  background: var(--mc-card, #121217);
  color: var(--mc-text, #fff);
}

.omg-portfolio-entry-card figure {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: rgba(255, 255, 255, 0.06);
}

.omg-portfolio-entry-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.omg-portfolio-entry-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.omg-portfolio-entry-kicker {
  margin: 0;
  color: var(--mc-accent, #c79b3b);
  font-family: var(--mc-sans, system-ui, sans-serif);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

.omg-portfolio-entry-card h3 {
  margin: 0;
  color: inherit;
  font-family: var(--mc-serif, Georgia, serif);
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: 0;
}

.omg-portfolio-entry-card p {
  margin: 0;
  color: var(--mc-text-mid, rgba(255, 255, 255, 0.72));
  font-family: var(--mc-sans, system-ui, sans-serif);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .omg-portfolio-entry-grid {
    grid-template-columns: repeat(var(--omg-portfolio-cols-tablet, 2), minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .omg-portfolio-entry-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .omg-portfolio-entry-body {
    padding: 12px;
  }

  .omg-portfolio-entry-card h3 {
    font-size: 22px;
  }
}

.omg-gallery-recovery-grid {
  display: grid;
  grid-template-columns: repeat(var(--omg-cols, 3), minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}
.omg-gallery-media-recovery { min-width: 0; }
.omg-gallery-media-recovery summary {
  min-height: 44px;
  cursor: pointer;
  font-family: var(--mc-sans, inherit);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: inherit;
}
.omg-gallery-media-recovery summary span { display: inline-block; padding: 12px; }
.omg-gallery-media-recovery summary:focus-visible {
  outline: 2px solid var(--omg-gallery-focus);
  outline-offset: 2px;
}
.omg-gallery-media-recovery .omg-gallery-recovery-preview {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.omg-gallery-media-recovery[open] .omg-gallery-recovery-preview { display: none; }
.omg-gallery-media-recovery .omg-gallery-recovery-full {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
@media (max-width: 768px) {
  .omg-gallery-recovery-grid { grid-template-columns: repeat(var(--omg-cols-tablet, 2), minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .omg-gallery-recovery-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ── 8. ALBUM LAYOUT ─────────────────────────────────────── */
.omg-album {
  margin: 0 0 40px;
}

.omg-album-header {
  margin-bottom: 20px;
}

.omg-album-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #1a1a1a;
  line-height: 1.2;
}

.omg-album-description {
  font-size: 16px;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

.omg-album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.omg-album-gallery-card {
  display: block;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.omg-album-gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.omg-album-gallery-cover {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f0f0f0;
}

.omg-album-gallery-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.omg-album-gallery-card:hover .omg-album-gallery-cover img {
  transform: scale(1.05);
}

.omg-album-gallery-info {
  padding: 12px 16px;
}

.omg-album-gallery-name {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.omg-album-gallery-count {
  font-size: 14px;
  color: #777;
  margin: 0;
}

.omg-album-count-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.omg-album-wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  margin: 0 auto 40px;
}

.omg-album-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 16px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--mc-card, #fff);
  color: var(--mc-text, #0a1628);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
}

.omg-album-back:focus-visible {
  outline: 3px solid var(--omg-gallery-focus);
  outline-offset: 3px;
}

.omg-album-wrap.omg-cols-1 {
  grid-template-columns: minmax(0, 1fr);
}

.omg-album-wrap.omg-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.omg-album-wrap.omg-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.omg-album-card {
  min-width: 0;
}

.omg-album-card-link {
  display: grid;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(10, 22, 40, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #0a1628;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(10, 22, 40, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.omg-album-card-link:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 58, 237, 0.28);
  box-shadow: 0 18px 42px rgba(10, 22, 40, 0.12);
  color: #0a1628;
  text-decoration: none;
}

.omg-album-card-link:focus-visible {
  outline: 3px solid var(--omg-gallery-focus);
  outline-offset: 3px;
}

.omg-album-cover {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(10, 22, 40, 0.08), rgba(124, 58, 237, 0.08));
}

.omg-album-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.omg-album-card-link:hover .omg-album-cover img {
  transform: scale(1.04);
}

.omg-album-cover--empty {
  display: grid;
  min-height: 180px;
  place-items: center;
}

.omg-album-cover-placeholder {
  display: inline-flex;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(10, 22, 40, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.omg-album-info {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.omg-album-name {
  overflow-wrap: anywhere;
  color: #0a1628;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.omg-album-count {
  color: #475569;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.omg-album-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px;
  border: 1px solid rgba(10, 22, 40, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

/* ── 9. RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 768px) {
  .omg-gallery-filter-bar {
    gap: 6px;
    margin-bottom: 16px;
  }

  .omg-gallery-filter-btn {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 16px;
  }

  .omg-album-grid {
    gap: 16px;
  }

  .omg-album-wrap,
  .omg-album-wrap.omg-cols-3,
  .omg-album-wrap.omg-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .omg-album-title {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .omg-gallery-shortcode-header h2 {
    font-size: 28px;
    line-height: 1.14;
  }

  .omg-album-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .omg-album-wrap,
  .omg-album-wrap.omg-cols-2,
  .omg-album-wrap.omg-cols-3,
  .omg-album-wrap.omg-cols-4 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .omg-gallery-password-form {
    padding: 28px 20px;
    margin: 24px auto;
  }

  .omg-album-title {
    font-size: 21px;
  }

  .omg-gallery-caption {
    font-size: 14px;
    padding: 6px 10px;
  }
}

/* ── 10. ACCESSIBILITY ───────────────────────────────────── */
.omg-gallery-link:focus-visible {
  outline: 2px solid var(--omg-gallery-focus);
  outline-offset: 2px;
  z-index: 5;
  position: relative;
}

.omg-gallery-filter-btn:focus-visible {
  outline: 2px solid var(--omg-gallery-focus);
  outline-offset: 2px;
}

.omg-gallery-download:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  opacity: 1;
}

/* Screen reader only */
.omg-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reduced motion — disable all transitions and transforms */
@media (prefers-reduced-motion: reduce) {
  .omg-gallery-photo,
  .omg-gallery-caption,
  .omg-gallery-download,
  .omg-gallery-filter-btn,
  .omg-album-gallery-card,
  .omg-album-gallery-cover img,
  .omg-gallery-item.is-filtering {
    transition: none;
    transform: none;
    animation: none;
  }

  .omg-gallery-item:hover .omg-gallery-photo,
  .omg-gallery-link:hover .omg-gallery-photo {
    transform: none;
  }

  .omg-gallery-item:hover .omg-gallery-caption,
  .omg-gallery-link:hover .omg-gallery-caption {
    transform: translateY(0);
  }

  .omg-album-gallery-card:hover {
    transform: none;
  }
}
