.theme6-gallery {
  background: #f8fafc;
}

.theme6-gallery--has-images {
  padding-top: clamp(3.1rem, 5.4vw, 5.25rem);
  padding-bottom: clamp(3rem, 5.4vw, 4.6rem);
}

.theme6-gallery--empty {
  padding-top: clamp(1.75rem, 4vw, 2.75rem);
  padding-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.theme6-gallery--empty .theme6-gallery__header {
  margin-bottom: clamp(1rem, 3vw, 1.35rem);
}

.theme6-gallery__header {
  margin-bottom: clamp(1.6rem, 4.2vw, 2.45rem);
  margin-top: 0;
}

.theme6-gallery__header-main {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.theme6-gallery__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-top: 0.15rem;
  border-radius: 12px;
  color: #2a8489;
  background: rgba(42, 132, 137, 0.1);
  border: 1px solid rgba(42, 132, 137, 0.2);
}

.theme6-gallery__title-group {
  flex: 1;
  min-width: 0;
}

.theme6-gallery__accent {
  display: block;
  width: 3rem;
  height: 3px;
  border-radius: 999px;
  background: #2a8489;
  margin-bottom: 0.65rem;
}

.theme6-gallery__title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.4rem, 3vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #0f172a;
}

.theme6-gallery__subtitle {
  margin: 0;
  font-size: 0.965rem;
  line-height: 1.45;
  font-weight: 400;
  color: #64748b;
  letter-spacing: 0.01em;
  max-width: 36rem;
}

.theme6-gallery__subtitle--empty {
  max-width: 40rem;
}

.theme6-gallery__collection-name {
  margin: 0.65rem 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #94a3b8;
}

html[dir=rtl] .theme6-gallery__header-main {
  flex-direction: row-reverse;
}

.theme6-gallery__slider-row {
  margin-top: 0;
}

.theme6-gallery__swiper-shell {
  padding-inline: clamp(0.1rem, 0.8vw, 0.8rem);
}

.theme6-gallery__swiper-shell--single .theme6-gallery__nav,
.theme6-gallery__swiper-shell--single .theme6-gallery__pagination {
  display: none !important;
}

.theme6-gallery__swiper-shell--single .theme6-home-gallery-slider {
  max-width: min(760px, 100%);
  margin-inline: auto;
}

.theme6-gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.theme6-gallery__nav:hover {
  color: #2a8489;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

.theme6-gallery__nav.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.theme6-gallery__nav--prev {
  left: clamp(0rem, 1vw, 0.5rem);
}

.theme6-gallery__nav--next {
  right: clamp(0rem, 1vw, 0.5rem);
}

html[dir=rtl] .theme6-gallery__nav--prev {
  left: auto;
  right: clamp(0rem, 1vw, 0.5rem);
}

html[dir=rtl] .theme6-gallery__nav--next {
  right: auto;
  left: clamp(0rem, 1vw, 0.5rem);
}

.theme6-home-gallery-slider .swiper-slide {
  height: auto;
  box-sizing: border-box;
  animation: theme6-gallery-card-enter 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.theme6-home-gallery-slider .swiper-slide:nth-child(2) {
  animation-delay: 0.08s;
}

.theme6-home-gallery-slider .swiper-slide:nth-child(3) {
  animation-delay: 0.16s;
}

.theme6-home-gallery-slider .swiper-slide:nth-child(4) {
  animation-delay: 0.24s;
}

.theme6-home-gallery-slider .swiper-wrapper {
  align-items: stretch;
}

.theme6-gallery__link {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  height: clamp(130px, 13vw, 170px);
  min-height: 130px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  background: #e8edf2;
  isolation: isolate;
}

.theme6-gallery__link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 42%, rgba(15, 23, 42, 0.56) 100%);
  opacity: 0.62;
  transition: opacity 0.3s ease;
}

.theme6-gallery__link::after {
  content: "";
  position: absolute;
  top: 0;
  left: -140%;
  width: 70%;
  height: 100%;
  z-index: 2;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.35) 48%, transparent 100%);
  transform: skewX(-18deg);
  transition: left 0.65s ease;
  pointer-events: none;
}

.theme6-gallery__link:hover {
  transform: translateY(-7px) scale(1.01);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.theme6-gallery__link:hover::before {
  opacity: 0.86;
}

.theme6-gallery__link:hover::after {
  left: 150%;
}

.theme6-gallery__img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.65s ease;
}

.theme6-gallery__link:hover .theme6-gallery__img {
  transform: scale(1.09);
}

.theme6-gallery__label {
  position: absolute;
  z-index: 2;
  inset-inline-start: 14px;
  inset-inline-end: 14px;
  bottom: 12px;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.theme6-gallery__link:hover .theme6-gallery__label {
  opacity: 1;
  transform: translateY(0);
}

.theme6-gallery .theme6-gallery__pagination.swiper-pagination {
  position: relative !important;
  margin-top: 1.25rem;
  inset: auto !important;
  width: 100% !important;
  text-align: center !important;
  transform: none !important;
}

.theme6-gallery .theme6-gallery__pagination .swiper-pagination-bullet {
  width: 7px;
  height: 7px;
  background: rgba(15, 23, 42, 0.22);
  opacity: 1;
}

.theme6-gallery .theme6-gallery__pagination .swiper-pagination-bullet-active {
  width: 22px;
  border-radius: 999px;
  background: #2a8489;
}

@media (max-width: 575.98px) {
  .theme6-gallery__link {
    height: 170px;
    min-height: 170px;
  }

  .theme6-gallery__label {
    opacity: 1;
    transform: none;
  }
}
.theme6-gallery__empty {
  margin-top: 0;
}

.theme6-gallery__empty-panel {
  margin-inline: auto;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  max-width: 900px;
}

.theme6-gallery__empty-visual {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.theme6-gallery__empty-icon {
  color: rgba(42, 132, 137, 0.45);
}

.theme6-gallery__skeleton-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.theme6-gallery__skeleton-item {
  position: relative;
  flex: 1 1 160px;
  min-height: 112px;
  border-radius: 12px;
  background: linear-gradient(145deg, #e8edf2 0%, #dfe7f0 100%);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.theme6-gallery__skeleton-shimmer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.65) 45%, transparent 90%);
  animation: theme6-gallery-shimmer 1.85s ease-in-out infinite;
}

@keyframes theme6-gallery-shimmer {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .theme6-home-gallery-slider .swiper-slide {
    animation: none !important;
  }

  .theme6-gallery__link,
  .theme6-gallery__img,
  .theme6-gallery__label,
  .theme6-gallery__link::before,
  .theme6-gallery__link::after {
    transition: none !important;
  }

  .theme6-gallery__link:hover .theme6-gallery__img {
    transform: none;
  }

  .theme6-gallery__skeleton-shimmer {
    animation: none;
    opacity: 0.35;
  }
}

@keyframes theme6-gallery-card-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
