.joe_photo__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}
.joe_photo__head-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #222;
  margin: 0;
}
.joe_photo__count {
  font-size: 0.85rem;
  color: #999;
  margin-left: auto;
}
.joe_photo__subtitle {
  font-size: 0.85rem;
  color: #aaa;
  margin: 0;
  font-style: italic;
}

.joe_photo__sort {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.joe_photo__sort-label {
  font-size: 0.8rem;
  color: #888;
  white-space: nowrap;
}
.joe_photo__sort-btn {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #888;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.joe_photo__sort-btn:hover {
  color: #333;
  border-color: #ccc;
}
.joe_photo__sort-btn.active {
  background: #FF6B00;
  color: #fff;
  border-color: #FF6B00;
}

.joe_photo__tabs {
  margin-bottom: 24px;
}
.joe_photo__tabs-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.joe_photo__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #666;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.joe_photo__tab:hover {
  color: #333;
  border-color: #ccc;
}
.joe_photo__tab.active {
  background: #FF6B00;
  color: #fff;
  border-color: #FF6B00;
}
.joe_photo__tab-count {
  font-size: 0.7rem;
  opacity: 0.7;
}

.joe_photo__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.joe_photo__item {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eee;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.joe_photo__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(255, 107, 0, 0.08);
  border-color: #FF6B00;
}

.joe_photo__img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f5f5f5;
}
.joe_photo__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.joe_photo__item:hover .joe_photo__img img {
  transform: scale(1.05);
}

.joe_photo__overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 107, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.joe_photo__item:hover .joe_photo__overlay {
  opacity: 1;
}
.joe_photo__detail {
  text-align: center;
  transform: translateY(8px);
  transition: transform 0.3s ease;
}
.joe_photo__item:hover .joe_photo__detail {
  transform: translateY(0);
}
.joe_photo__detail p {
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0;
}

.joe_photo__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px 16px;
}
.joe_photo__info .joe_photo__title {
  font-size: 1rem;
  font-weight: 600;
  color: #222;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.joe_photo__folder {
  display: inline-block;
  font-size: 0.7rem;
  color: #FF6B00;
  background: #fff5ed;
  padding: 1px 8px;
  border-radius: 4px;
  margin-top: 2px;
  align-self: flex-start;
}
.joe_photo__locdate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
  gap: 8px;
}
.joe_photo__location {
  font-size: 0.8rem;
  color: #888;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.joe_photo__date {
  font-size: 0.8rem;
  color: #888;
  white-space: nowrap;
  flex-shrink: 0;
}
.joe_photo__meta {
  font-size: 0.76rem;
  color: #aaa;
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  margin-top: 4px;
}
.joe_photo__meta span {
  white-space: nowrap;
}

.joe_photo__sentinel {
  width: 100%;
  height: 1px;
}

/* ----- LIGHTBOX ----- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}
.lightbox.active {
  display: flex;
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s ease;
}
.lightbox-close:hover {
  background: rgba(255,255,255,0.15);
  transform: rotate(90deg);
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s ease;
}
.lightbox-nav:hover {
  background: rgba(255,255,255,0.15);
}
.lightbox-prev {
  left: 24px;
}
.lightbox-next {
  right: 24px;
}
.lightbox-image-wrapper {
  overflow: hidden;
  border-radius: 8px;
  max-width: 100%;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-image-wrapper.dragging {
  cursor: grabbing;
}
.lightbox-image-wrapper img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  pointer-events: none;
  transform-origin: center center;
}
.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
}
.lightbox-info {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 20px;
  padding: 12px 24px;
  background: rgba(255,255,255,0.06);
  border-radius: 50px;
}
.lightbox-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}
.lightbox-date {
  font-size: 0.85rem;
  color: #fff;
  font-weight: 400;
}
.lightbox-exif {
  font-size: 0.8rem;
  color: #fff;
  font-weight: 300;
  letter-spacing: 0.5px;
}
.lightbox-date::after {
  content: '|';
  margin: 0 12px;
  color: rgba(255,255,255,0.25);
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 768px) {
  .lightbox-prev {
    left: 12px;
    width: 40px;
    height: 40px;
  }
  .lightbox-next {
    right: 12px;
    width: 40px;
    height: 40px;
  }
  .lightbox-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }
  .lightbox-info {
    flex-direction: column;
    gap: 4px;
    padding: 10px 16px;
  }
}

@media (max-width: 900px) {
  .joe_photo__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .joe_photo__tabs-inner {
    gap: 6px;
  }
  .joe_photo__tab {
    padding: 5px 12px;
    font-size: 0.8rem;
  }
}
@media (max-width: 540px) {
  .joe_photo__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .joe_photo__tabs {
    flex-wrap: wrap;
  }
  .joe_photo__tabs-inner {
    gap: 5px;
  }
  .joe_photo__tab {
    padding: 4px 10px;
    font-size: 0.75rem;
  }
}
