/* Full YS Gallery CSS */

.ys-gallery {
  display: flex;
  justify-content: center;
}
.ys-gallery-main {
  display: flex;
  position: relative;
  justify-content: center;
  overflow: hidden;
  height: 100%;
}
.ys-gallery-main img {
  width: auto;
  max-height: 100%;
}
.ys-gallery-fullscreen-toggle {
  position: absolute;
  right: var(--ys-fs-offset, clamp(8px, 1.5vw, 14px));
  bottom: var(--ys-fs-offset, clamp(8px, 1.5vw, 14px));
  width: var(--ys-fs-size, clamp(28px, 3vw, 44px));
  height: var(--ys-fs-size, clamp(28px, 3vw, 44px));
  border: none;
  background: #b7a795;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: background-color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}
.ys-gallery-fullscreen-toggle::before {
  content: "";
  width: 18px;
  height: 18px;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9V5h4M9 5H5M19 9V5h-4M15 5h4M5 15v4h4M9 19H5M19 15v4h-4M15 19h4'/%3E%3C/svg%3E");
}
.ys-gallery-fullscreen-toggle:hover {
  background: #a39382;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.12);
}
.ys-gallery-fullscreen-toggle:active {
  transform: translateY(0);
}
.ys-gallery-fullscreen-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.ys-gallery-main-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(24px, 2.5vw, 36px);
  height: clamp(24px, 2.5vw, 36px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #aa9173a1;
  color: #fff;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
}
.ys-gallery-main-nav::before {
  content: "";
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 7px;
  color: #ffffffd9;
}
.ys-gallery-main-prev {
  left: clamp(8px, 2vw, 16px);
  padding-left: 7px;
}
.ys-gallery-main-prev::before {
  transform: rotate(135deg);
}
.ys-gallery-main-next {
  right: clamp(8px, 2vw, 16px);
  padding-right: 7px;
}
.ys-gallery-main-next::before {
  transform: rotate(-45deg);
}
.ys-gallery-main-nav:hover {
  background: #b7a795;
  transform: translateY(-50%) scale(1.04);
}
.ys-gallery-main-nav:active {
  transform: translateY(-50%) scale(0.98);
}
.ys-gallery-main-nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.ys-gallery-side {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.ys-gallery-thumbs-outer {
  display: flex;
  flex-direction: column;
  position: relative;
}
.ys-gallery-thumbs {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
}
.ys-gallery-thumbs::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.ys-gallery-thumb {
  cursor: pointer;
  opacity: 0.7;
  transition: 0.2s;
}
.ys-gallery-thumb.is-active {
  opacity: 1;
  box-shadow: 0 0 0 2px #fff;
}
.ys-gallery-thumb img {
  width: 100%;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}
.ys-gallery-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: none;
  cursor: pointer;
  background: var(--bg, rgba(0, 0, 0, 0.35));
  width: var(--arrow-width, 24px);
  height: var(--arrow-height, 24px);
  box-shadow: var(--outline, none);
}
.ys-gallery-arrow::before {
  content: "";
  border: solid var(--color, #fff);
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: var(--icon-size, 10px);
}
.ys-gallery-arrow-up::before {
  transform: rotate(-135deg);
}
.ys-gallery-arrow-down::before {
  transform: rotate(45deg);
}
.ys-gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.ys-gallery-lightbox.is-open,
.ys-gallery-lightbox:fullscreen,
.ys-gallery-lightbox:-webkit-full-screen {
  display: flex;
}
.ys-gallery-lightbox.is-open {
  display: flex;
}
.ys-gallery-lightbox__inner {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}
.ys-gallery-lightbox:fullscreen .ys-gallery-lightbox__inner,
.ys-gallery-lightbox:-webkit-full-screen .ys-gallery-lightbox__inner {
  max-width: 96vw;
  max-height: 96vh;
}
.ys-gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border: none;
  background: #aa9173a1;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.ys-gallery-lightbox-prev {
  left: 12px;
}
.ys-gallery-lightbox-next {
  right: 12px;
}
.ys-gallery-lightbox-nav::before {
  content: "";
  border: solid currentColor;
  border-width: 0 3px 3px 0;
  display: inline-block;
  padding: 10px;
}
.ys-gallery-lightbox-prev::before {
  transform: rotate(135deg);
}
.ys-gallery-lightbox-next::before {
  transform: rotate(-45deg);
}
.ys-gallery-lightbox-nav:hover {
  background: #b7a795;
  transform: translateY(-50%) scale(1.04);
}
.ys-gallery-lightbox-nav:active {
  transform: translateY(-50%) scale(0.98);
}
.ys-gallery-lightbox-nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.ys-gallery-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}
.ys-gallery-lightbox-close {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  cursor: pointer;
}
.ys-gallery-lightbox-close::before,
.ys-gallery-lightbox-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  background: currentColor;
}
.ys-gallery-lightbox-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.ys-gallery-lightbox-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.ys-gallery-lock {
  overflow: hidden;
}
.ys-gallery-thumbs-outer[data-arrow-pos="overlay"] .ys-gallery-arrow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.ys-gallery-thumbs-outer[data-arrow-pos="overlay"] .ys-gallery-arrow-up {
  top: 6px;
}
.ys-gallery-thumbs-outer[data-arrow-pos="overlay"] .ys-gallery-arrow-down {
  bottom: 6px;
}
.ys-gallery-thumbs-outer[data-arrow-pos="overlay"] .ys-gallery-thumbs {
  padding-top: var(--pad-top, 12px);
  padding-bottom: var(--pad-bottom, 12px);
}
.ys-gallery-thumbs-outer[data-show-arrows="0"] .ys-gallery-arrow {
  display: none;
}
.ys-gallery-thumbs-outer[data-hover="1"] .ys-gallery-arrow {
  opacity: 0;
  transition: 0.2s;
}
.ys-gallery-thumbs-outer[data-hover="1"]:hover .ys-gallery-arrow {
  opacity: 1;
}

@media (max-width: 767px) {
  .ys-gallery {
    flex-direction: column;
    height: auto !important;
    gap: 12px;
  }
  .ys-gallery-main,
  .ys-gallery-side {
    width: 100% !important;
    height: auto;
  }
  .ys-gallery-main-nav::before {
    padding: 3px;
  }
  .ys-gallery-main-prev {
    padding-left: 2px;
  }
  .ys-gallery-main-next {
    padding-right: 2px;
  }
  .ys-gallery-main {
    flex: 0 0 auto;
  }
  .ys-gallery-main img {
    height: auto;
    width: 100%;
  }
  .ys-gallery-side {
    flex: 0 0 auto;
    order: 2;
  }
  .ys-gallery-thumbs-outer {
    height: auto !important;
    padding: 0 46px;
  }
  .ys-gallery-thumbs {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    -webkit-overflow-scrolling: touch;
  }
  .ys-gallery-thumb {
    flex: 0 0 auto;
    height: 80px;
    width: 80px;
  }
  .ys-gallery-thumb img {
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
  .ys-gallery-arrow {
    display: flex !important;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
  }
  .ys-gallery-arrow-up {
    left: 4px;
  }
  .ys-gallery-arrow-down {
    right: 4px;
  }
  .ys-gallery-thumbs-outer[data-arrow-pos="overlay"] .ys-gallery-arrow {
    left: auto;
    right: auto;
    transform: translateY(-50%);
  }
  .ys-gallery-thumbs-outer[data-arrow-pos="overlay"] .ys-gallery-arrow-up {
    top: 0;
    left: 4px;
  }
  .ys-gallery-thumbs-outer[data-arrow-pos="overlay"] .ys-gallery-arrow-down {
    top: 0;
    right: 4px;
  }
  .ys-gallery-arrow-up::before {
    transform: rotate(135deg);
  }
  .ys-gallery-arrow-down::before {
    transform: rotate(-45deg);
  }
}
