.xeeni-latest-gallery-loading {
  color: #888888;
  text-align: center;
  padding: 30px 0;
  width: 100%;
}

.xeeni-latest-gallery-pager {
  display: flex !important;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 16px;
  width: 100%;
}

.xeeni-latest-gallery-pager-btn {
  padding: 8px 20px;
  background: #444444;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.xeeni-latest-gallery-pager-btn:hover,
.xeeni-latest-gallery-pager-btn:focus {
  background: #222222;
}

.xeeni-latest-gallery-pager-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

#xeeni-latest-gallery-grid .u-list-item,
#xeeni-latest-gallery-grid .u-repeater-item {
  height: auto !important;
  min-height: 0 !important;
  margin-top: 2px !important;
  margin-bottom: 2px !important;
}

#xeeni-latest-gallery-grid .u-container-layout-17 {
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  height: auto !important;
  min-height: 0 !important;
}

.xeeni-latest-gallery-trigger {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.xeeni-gallery-image-count {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #f5c800;
  color: #000000;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 4px;
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 2;
}

.xeeni-latest-gallery-trigger:hover,
.xeeni-latest-gallery-trigger:focus {
  text-decoration: none;
  color: inherit;
}

.xeeni-latest-gallery-trigger img {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.xeeni-latest-gallery-trigger:hover img,
.xeeni-latest-gallery-trigger:focus img {
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.xeeni-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 14, 24, 0.94);
}

.xeeni-gallery-modal.is-open {
  display: flex;
}

.xeeni-gallery-dialog {
  position: relative;
  width: min(1100px, 100%);
  max-height: 92vh;
  overflow: hidden;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.xeeni-gallery-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.75);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.xeeni-gallery-content {
  padding: 28px 28px 24px;
}

.xeeni-gallery-title {
  margin: 0 72px 6px 0;
  color: #1b1b1b;
  font-size: 2rem;
  line-height: 1.15;
}

.xeeni-gallery-copy {
  margin: 0 0 18px;
  color: #555555;
}

.xeeni-gallery-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  background: #f5f5f5;
  border-radius: 14px;
  overflow: hidden;
}

.xeeni-gallery-stage img {
  display: block;
  width: 100%;
  max-height: 64vh;
  object-fit: contain;
  background: #f5f5f5;
}

.xeeni-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.45);
  color: #ffffff;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
}

.xeeni-gallery-nav[disabled] {
  opacity: 0.35;
  cursor: default;
}

.xeeni-gallery-nav.prev {
  left: 18px;
}

.xeeni-gallery-nav.next {
  right: 18px;
}

.xeeni-gallery-thumbs {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  padding-bottom: 4px;
  overflow-x: auto;
}

.xeeni-gallery-thumb {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #f4f4f4;
  cursor: pointer;
  overflow: hidden;
}

.xeeni-gallery-thumb.is-active {
  border-color: #478ac9;
}

.xeeni-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.xeeni-gallery-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .xeeni-latest-gallery-block {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .xeeni-latest-gallery-block > .u-container-layout {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .xeeni-latest-gallery-block .u-group-2 {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .xeeni-latest-gallery-block .u-list-2,
  .xeeni-latest-gallery-block .u-repeater-2,
  .xeeni-latest-gallery-block .u-list-item,
  .xeeni-latest-gallery-block .u-container-layout-17,
  .xeeni-latest-gallery-block .xeeni-latest-gallery-trigger,
  .xeeni-latest-gallery-block .xeeni-latest-gallery-trigger img {
    width: 100% !important;
    max-width: 100% !important;
  }

  .xeeni-latest-gallery-block .u-container-layout-16 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .xeeni-latest-gallery-block .u-text-49,
  .xeeni-latest-gallery-block .u-text-50 {
    word-break: break-word;
  }

  .xeeni-gallery-modal {
    padding: 10px;
  }

  .xeeni-gallery-content {
    padding: 18px 18px 16px;
  }

  .xeeni-gallery-title {
    margin-right: 54px;
    font-size: 1.35rem;
  }

  .xeeni-gallery-stage {
    min-height: 240px;
  }

  .xeeni-gallery-stage img {
    max-height: 48vh;
  }

  .xeeni-gallery-nav {
    width: 42px;
    height: 42px;
    font-size: 30px;
  }

  .xeeni-gallery-nav.prev {
    left: 10px;
  }

  .xeeni-gallery-nav.next {
    right: 10px;
  }

  .xeeni-gallery-thumb {
    width: 68px;
    height: 68px;
  }
}
