.ds-apt-root,
.ds-apt-root * {
  box-sizing: border-box;
}

.ds-apt-root img {
  max-width: none;
}

.ds-apt-featured-wrap {
  width: 100%;
  position: relative;
}

.ds-apt-featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 260px 260px;
  gap: 14px;
}

.ds-apt-mobile-featured,
.ds-apt-mobile-counter {
  display: none;
}

.ds-apt-tile {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  cursor: pointer;
  background: #dcdcdc;
  border-radius: 4px;
}

.ds-apt-tile.is-large {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  min-height: 534px;
}

.ds-apt-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.ds-apt-tile:hover img {
  transform: scale(1.03);
}

.ds-apt-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0.18) 100%);
  pointer-events: none;
}

.ds-apt-show-all {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  color: #111111;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

.ds-apt-show-all svg {
  width: 17px;
  height: 17px;
  display: block;
  flex: 0 0 17px;
}

.ds-apt-modal,
.ds-apt-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.ds-apt-modal {
  background: rgba(17, 17, 17, 0.48);
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.ds-apt-modal::-webkit-scrollbar {
  width: 12px;
}

.ds-apt-modal::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.28);
  border-radius: 999px;
}

.ds-apt-modal[hidden],
.ds-apt-lightbox[hidden] {
  display: none !important;
}

.ds-apt-modal.is-open,
.ds-apt-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ds-apt-dialog {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  height: auto;
  margin: 0;
  background: #ececec;
  overflow: visible;
  display: flex;
  flex-direction: column;
  border-radius: 0;
}

.ds-apt-close {
  appearance: none;
  border: 0;
  background: #ffffff;
  color: #111111;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  right: calc(env(safe-area-inset-right, 0px) + 14px);
  left: auto !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 1000001;
  box-shadow: 0 8px 20px rgba(0,0,0,0.10);
}

.ds-apt-head {
  padding: 16px 84px 18px 24px;
  background: #ececec;
  flex: 0 0 auto;
}

.ds-apt-head h3 {
  margin: 0 0 16px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 600;
  color: #1f1f1f;
}

.ds-apt-strip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 8px 4px 2px;
  scrollbar-width: thin;
  scroll-padding-left: 16px;
}

.ds-apt-strip-item {
  flex: 0 0 108px;
  cursor: pointer;
}

.ds-apt-strip-button {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.ds-apt-strip-thumb {
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.ds-apt-strip-item.is-active .ds-apt-strip-thumb {
  border-color: #111111;
}

.ds-apt-strip-thumb img {
  width: 100%;
  height: 66px;
  display: block;
  object-fit: cover;
}

.ds-apt-strip-label {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.25;
  color: #444444;
  white-space: normal;
}

.ds-apt-body {
  flex: 0 0 auto;
  overflow: visible;
  padding: 10px 24px 42px;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.ds-apt-sections {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.ds-apt-section {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
  margin: 0 0 56px;
  scroll-margin-top: 28px;
}

.ds-apt-meta {
  padding-top: 6px;
  position: sticky;
  top: 16px;
  align-self: start;
}

.ds-apt-title {
  margin: 0 0 7px;
  color: #222222;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
}

.ds-apt-details {
  margin: 0;
  color: #6b6b6b;
  font-size: 12px;
  line-height: 1.6;
}

.ds-apt-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.ds-apt-photo {
  position: relative;
  background: #d8d8d8;
  overflow: hidden;
  cursor: pointer;
  border: 0;
  padding: 0;
}

.ds-apt-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.ds-apt-photo.is-fit {
  background: #ffffff;
}

.ds-apt-photo.is-fit img {
  object-fit: contain;
}

.ds-apt-photo.is-hero {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 10;
}

.ds-apt-photo.is-half {
  aspect-ratio: 4 / 3;
}

.ds-apt-photo.is-full {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 10;
}

.ds-apt-photo.is-wide {
  grid-column: 1 / -1;
  aspect-ratio: 21 / 9;
}

.ds-apt-empty {
  padding: 24px;
  background: #ffffff;
}

.ds-apt-lightbox {
  z-index: 1000000;
  background: #000000;
}

.ds-apt-lightbox-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.ds-apt-lightbox-close,
.ds-apt-lightbox-nav {
  appearance: none;
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  position: absolute;
  z-index: 5;
}

.ds-apt-lightbox-close {
  top: 22px;
  left: 24px;
  width: 30px;
  height: 30px;
  font-size: 30px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.ds-apt-lightbox-counter {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  z-index: 5;
}

.ds-apt-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 999px;
  font-size: 36px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ds-apt-lightbox-nav.is-prev {
  left: 22px;
}

.ds-apt-lightbox-nav.is-next {
  right: 22px;
}

.ds-apt-lightbox-inner {
  width: 100vw;
  height: 100vh;
  padding: 74px 96px 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-apt-lightbox-figure {
  margin: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 16px;
}

.ds-apt-lightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.ds-apt-lightbox-caption {
  color: #ffffff;
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
  min-height: 24px;
}

body.ds-apt-lock {
  overflow: hidden;
}

@media (max-width: 1200px) {
  .ds-apt-section {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 36px;
  }

  .ds-apt-lightbox-inner {
    padding-left: 72px;
    padding-right: 72px;
  }
}

@media (max-width: 1024px) {
  .ds-apt-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 320px 200px 200px;
  }

  .ds-apt-tile.is-large {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 320px;
  }

  .ds-apt-section {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 42px;
  }

  .ds-apt-meta {
    position: static;
  }

  .ds-apt-lightbox-inner {
    padding: 80px 52px 88px;
  }
}

@media (max-width: 767px) {
  .ds-apt-featured-wrap {
    overflow: hidden;
  }

  .ds-apt-featured-grid {
    display: none;
  }

  .ds-apt-mobile-featured {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: #dcdcdc;
    border-radius: 4px;
  }

  .ds-apt-mobile-featured::-webkit-scrollbar {
    display: none;
  }

  .ds-apt-mobile-slide {
    flex: 0 0 100%;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 0;
    padding: 0;
    margin: 0;
    display: block;
    cursor: pointer;
    scroll-snap-align: start;
    background: #dcdcdc;
  }

  .ds-apt-mobile-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .ds-apt-mobile-counter {
    display: inline-flex;
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 3;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(17,17,17,0.72);
    color: #ffffff;
    font-size: 14px;
    line-height: 1;
    font-weight: 600;
  }

  .ds-apt-head {
    padding: 16px 76px 14px 16px;
  }

  .ds-apt-head h3 {
    font-size: 28px;
    margin-bottom: 14px;
  }

  .ds-apt-body {
    padding: 10px 16px 28px;
  }

  .ds-apt-show-all {
    display: none;
  }

  .ds-apt-strip {
    gap: 10px;
    padding-left: 2px;
    padding-right: 6px;
  }

  .ds-apt-strip-item {
    flex: 0 0 74px;
  }

  .ds-apt-strip-thumb img {
    height: 52px;
  }

  .ds-apt-strip-label {
    font-size: 11px;
    line-height: 1.2;
    margin-top: 6px;
  }

  .ds-apt-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .ds-apt-photo.is-hero,
  .ds-apt-photo.is-half,
  .ds-apt-photo.is-full,
  .ds-apt-photo.is-wide {
    aspect-ratio: auto;
  }

  .ds-apt-photo.is-hero {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 10;
  }

  .ds-apt-photo.is-half {
    aspect-ratio: 4 / 3;
  }

  .ds-apt-photo.is-full,
  .ds-apt-photo.is-wide {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 10;
  }

  .ds-apt-close {
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: calc(env(safe-area-inset-right, 0px) + 12px);
    width: 44px;
    height: 44px;
    font-size: 28px;
  }

  .ds-apt-lightbox-close {
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    left: 14px;
    width: 28px;
    height: 28px;
    font-size: 28px;
  }

  .ds-apt-lightbox-counter {
    top: calc(env(safe-area-inset-top, 0px) + 18px);
    font-size: 16px;
  }

  .ds-apt-lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 30px;
    top: calc(50% + 10px);
  }

  .ds-apt-lightbox-nav.is-prev {
    left: 10px;
  }

  .ds-apt-lightbox-nav.is-next {
    right: 10px;
  }

  .ds-apt-lightbox-inner {
    padding: calc(env(safe-area-inset-top, 0px) + 56px) 12px calc(env(safe-area-inset-bottom, 0px) + 28px);
    height: 100vh;
    display: block;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ds-apt-lightbox-figure {
    width: 100%;
    height: auto;
    min-height: 100%;
    display: block;
  }

  .ds-apt-lightbox-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
    display: block;
    margin: 0 auto;
  }

  .ds-apt-lightbox-caption {
    font-size: 14px;
    padding: 12px 8px 0;
  }
}


@media (max-width: 767px) {
  .ds-apt-lightbox-inner {
    padding: max(56px, env(safe-area-inset-top, 0px) + 36px) 10px max(54px, env(safe-area-inset-bottom, 0px) + 18px);
  }

  .ds-apt-lightbox-figure {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    gap: 10px;
    grid-template-rows: auto auto;
    align-content: center;
    justify-items: center;
  }

  .ds-apt-lightbox-image {
    display: block;
    width: auto;
    max-width: min(100%, calc(100vw - 20px));
    height: auto;
    max-height: calc(100dvh - 132px);
    object-fit: contain;
    margin: 0 auto;
  }

  .ds-apt-lightbox-caption {
    width: 100%;
    max-width: calc(100vw - 24px);
    min-height: 0;
    padding: 0 4px env(safe-area-inset-bottom, 0px);
    font-size: 13px;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ds-apt-lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 28px;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(2px);
  }

  .ds-apt-lightbox-nav.is-prev { left: 6px; }
  .ds-apt-lightbox-nav.is-next { right: 6px; }
}

/* v2.2.0 fixes */
.ds-apt-lightbox-shell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-apt-lightbox-inner {
  width: 100vw;
  height: 100vh;
  padding: 74px 84px 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ds-apt-lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.ds-apt-lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, calc(100vw - 220px));
  max-height: calc(100dvh - 180px);
  object-fit: contain;
  object-position: center center;
  margin: 0 auto;
}

.ds-apt-lightbox-caption {
  max-width: min(880px, calc(100vw - 64px));
}

@media (max-width: 1024px) {
  .ds-apt-lightbox-inner {
    padding: calc(env(safe-area-inset-top, 0px) + 56px) 18px calc(env(safe-area-inset-bottom, 0px) + 34px);
  }

  .ds-apt-lightbox-figure {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .ds-apt-lightbox-image {
    max-width: calc(100vw - 48px);
    max-height: calc(100dvh - 170px);
  }
}

@media (max-width: 767px) {
  .ds-apt-strip-item {
    flex: 0 0 86px;
  }

  .ds-apt-strip-label {
    white-space: normal;
    word-break: break-word;
  }

  .ds-apt-lightbox-inner {
    padding: calc(env(safe-area-inset-top, 0px) + 52px) 12px calc(env(safe-area-inset-bottom, 0px) + 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .ds-apt-lightbox-figure {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }

  .ds-apt-lightbox-image {
    max-width: calc(100vw - 28px);
    max-height: calc(100dvh - 150px);
    width: auto;
    height: auto;
    margin: 0 auto;
  }

  .ds-apt-lightbox-caption {
    width: auto;
    max-width: calc(100vw - 32px);
    padding: 0 4px;
  }
}


/* v2.2.1 mobile contain fix */
.ds-apt-lightbox-shell {
  overflow: hidden;
}

.ds-apt-lightbox-inner {
  box-sizing: border-box;
}

.ds-apt-lightbox-figure {
  overflow: hidden;
}

.ds-apt-lightbox-image {
  object-fit: contain !important;
  object-position: center center !important;
}

@media (max-width: 767px) {
  .ds-apt-lightbox-inner {
    width: 100vw;
    height: 100dvh;
    padding: calc(env(safe-area-inset-top, 0px) + 52px) 12px calc(env(safe-area-inset-bottom, 0px) + 18px) !important;
    overflow: hidden !important;
  }

  .ds-apt-lightbox-figure {
    width: 100%;
    height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 76px) !important;
    min-height: 0;
    max-height: none;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  .ds-apt-lightbox-image {
    width: 100% !important;
    height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 136px) !important;
    max-width: 100% !important;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 136px) !important;
    object-fit: contain !important;
    object-position: center center !important;
    margin: 0 auto;
    background: #000;
  }

  .ds-apt-lightbox-caption {
    width: 100%;
    max-width: 100%;
    text-align: center;
    padding: 0 6px;
    flex: 0 0 auto;
  }
}


/* v2.3.0 listing click + view all behavior */
.ds-apt-tile{position:relative}
.ds-apt-tile-button{
  width:100%;
  height:100%;
  border:0;
  padding:0;
  margin:0;
  background:transparent;
  display:block;
  cursor:pointer;
}
.ds-apt-tile-button img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.ds-apt-mobile-show-all{
  display:none;
}

@media (max-width: 767px){
  .ds-apt-mobile-show-all{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:100%;
    margin-top:12px;
    border:0;
    border-radius:14px;
    background:#fff;
    color:#111;
    box-shadow:0 8px 20px rgba(0,0,0,.12);
    padding:14px 16px;
    font-size:15px;
    font-weight:600;
    cursor:pointer;
  }
}
