/* ========================= */
/* 🎨 Admin Gallery Layout   */
/* ========================= */
.admin-gallery-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.admin-gallery-card {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.admin-gallery-card .cover,
.admin-gallery-card .cover-fade,
.gallery-cover,
.cover {
  position: relative;
  width: 100%;
  max-height: 300px;
  overflow: hidden;
  background: #f9f9fb;
}

.admin-gallery-card .cover img,
.admin-gallery-card .cover-fade img,
.gallery-cover img,
.cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.cover-fade img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 400ms ease;
}

.cover-fade img.active {
  opacity: 1;
}

/* ========================= */
/* 📷 Cover thumbnail stil   */
/* ========================= */
.cover-thumb {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ========================= */
/* 📱 Responsive Sidebar fix */
/* ========================= */
@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 250px;
    background: #111;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    padding-top: 60px;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar a {
    display: block;
    padding: 12px 18px;
    color: #ddd;
    text-decoration: none;
  }

  .sidebar a:hover {
    background: #222;
    color: #fff;
  }

  /* Overlay efekat kad je sidebar otvoren */
  .sidebar-overlay {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 999;
  }

  body.sidebar-open .sidebar-overlay {
    display: block;
  }

  /* Glavni sadržaj da ne bude ispod sidebar-a */
  main {
    position: relative;
    z-index: 1;
  }

  /* Meni dugme */
  #toggleSidebar {
    display: inline-block;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    background: #ff0077;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-weight: 600;
  }
}
