@keyframes drift-fadeZoomIn {
  0% {
    transform: scale(1.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes drift-fadeZoomOut {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  15% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(0.5);
    opacity: 0;
  }
}

@keyframes drift-loader-rotate {
  0% {
    transform: translate(-50%, -50%) rotate(0);
  }
  50% {
    transform: translate(-50%, -50%) rotate(-180deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(-360deg);
  }
}

@keyframes drift-loader-before {
  0% {
    transform: scale(1);
  }
  10% {
    transform: scale(1.2) translateX(6px);
  }
  25% {
    transform: scale(1.3) translateX(8px);
  }
  40% {
    transform: scale(1.2) translateX(6px);
  }
  50% {
    transform: scale(1);
  }
  60% {
    transform: scale(0.8) translateX(6px);
  }
  75% {
    transform: scale(0.7) translateX(8px);
  }
  90% {
    transform: scale(0.8) translateX(6px);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes drift-loader-after {
  0% {
    transform: scale(1);
  }
  10% {
    transform: scale(1.2) translateX(-6px);
  }
  25% {
    transform: scale(1.3) translateX(-8px);
  }
  40% {
    transform: scale(1.2) translateX(-6px);
  }
  50% {
    transform: scale(1);
  }
  60% {
    transform: scale(0.8) translateX(-6px);
  }
  75% {
    transform: scale(0.7) translateX(-8px);
  }
  90% {
    transform: scale(0.8) translateX(-6px);
  }
  100% {
    transform: scale(1);
  }
}

@-webkit-keyframes drift-fadeZoomIn {
  0% {
    -webkit-transform: scale(1.5);
    opacity: 0;
  }
  100% {
    -webkit-transform: scale(1);
    opacity: 1;
  }
}

@-webkit-keyframes drift-fadeZoomOut {
  0% {
    -webkit-transform: scale(1);
    opacity: 1;
  }
  15% {
    -webkit-transform: scale(1.1);
    opacity: 1;
  }
  100% {
    -webkit-transform: scale(0.5);
    opacity: 0;
  }
}

@-webkit-keyframes drift-loader-rotate {
  0% {
    -webkit-transform: translate(-50%, -50%) rotate(0);
  }
  50% {
    -webkit-transform: translate(-50%, -50%) rotate(-180deg);
  }
  100% {
    -webkit-transform: translate(-50%, -50%) rotate(-360deg);
  }
}

@-webkit-keyframes drift-loader-before {
  0% {
    -webkit-transform: scale(1);
  }
  10% {
    -webkit-transform: scale(1.2) translateX(6px);
  }
  25% {
    -webkit-transform: scale(1.3) translateX(8px);
  }
  40% {
    -webkit-transform: scale(1.2) translateX(6px);
  }
  50% {
    -webkit-transform: scale(1);
  }
  60% {
    -webkit-transform: scale(0.8) translateX(6px);
  }
  75% {
    -webkit-transform: scale(0.7) translateX(8px);
  }
  90% {
    -webkit-transform: scale(0.8) translateX(6px);
  }
  100% {
    -webkit-transform: scale(1);
  }
}

@-webkit-keyframes drift-loader-after {
  0% {
    -webkit-transform: scale(1);
  }
  10% {
    -webkit-transform: scale(1.2) translateX(-6px);
  }
  25% {
    -webkit-transform: scale(1.3) translateX(-8px);
  }
  40% {
    -webkit-transform: scale(1.2) translateX(-6px);
  }
  50% {
    -webkit-transform: scale(1);
  }
  60% {
    -webkit-transform: scale(0.8) translateX(-6px);
  }
  75% {
    -webkit-transform: scale(0.7) translateX(-8px);
  }
  90% {
    -webkit-transform: scale(0.8) translateX(-6px);
  }
  100% {
    -webkit-transform: scale(1);
  }
}

.drift-zoom-pane {
  background: rgba(0, 0, 0, 0.5);
  /* This is required because of a bug that causes border-radius to not
  work with child elements in certain cases. */
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
}

.drift-zoom-pane.drift-opening {
  animation: drift-fadeZoomIn 180ms ease-out;
  -webkit-animation: drift-fadeZoomIn 180ms ease-out;
}

.drift-zoom-pane.drift-closing {
  animation: drift-fadeZoomOut 210ms ease-in;
  -webkit-animation: drift-fadeZoomOut 210ms ease-in;
}

.drift-zoom-pane.drift-inline {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 75px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.drift-loading .drift-zoom-pane-loader {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  width: 66px;
  height: 20px;
  animation: drift-loader-rotate 1800ms infinite linear;
  -webkit-animation: drift-loader-rotate 1800ms infinite linear;
}

.drift-zoom-pane-loader:before,
.drift-zoom-pane-loader:after {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  position: absolute;
  top: 50%;
  margin-top: -10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
}

.drift-zoom-pane-loader:before {
  left: 0;
  animation: drift-loader-before 1800ms infinite linear;
  -webkit-animation: drift-loader-before 1800ms infinite linear;
}

.drift-zoom-pane-loader:after {
  right: 0;
  animation: drift-loader-after 1800ms infinite linear;
  -webkit-animation: drift-loader-after 1800ms infinite linear;
  animation-delay: -900ms;
  -webkit-animation-delay: -900ms;
}

.drift-bounding-box {
  background-color: rgba(0, 0, 0, 0.4);
}



/* Custom styles */

:root {
    --bg: #f2f4f7;
    --panel: #ffffff;
    --text: #102130;
    --muted: #5d6a74;
    --accent: #d4021d;
    --line: #d7dde3;
    --main-photo-size: 400px;
    --thumb-photo-size: 96px;
}


@@media (max-width: 1300px) {
    :root {
        --main-photo-size: 300px;
    }
}

.wrapper {
    background-color: transparent;
}

.product-layout {
    display: grid;
    grid-template-columns: var(--main-photo-size) minmax(0, 1fr);
    column-gap: 28px;
}

.product-gallery {
    min-width: 0;
    width: var(--main-photo-size);
    position: relative;
}

/**/
    .product-gallery.is-loading .main-image-frame img,
    .product-gallery.is-loading .thumb-rail,
    .product-gallery.is-loading .product-note {
        opacity: 0;
    }

.product-gallery-skeleton {
    position: absolute;
    inset: 0;
    display: none;
    z-index: 3;
    pointer-events: none;
}

.product-gallery.is-loading .product-gallery-skeleton {
    display: block;
}

.skeleton-main,
.skeleton-thumb,
.skeleton-note {
    position: relative;
    overflow: hidden;
    background: #e8edf2;
}

.skeleton-main {
    width: var(--main-photo-size);
    height: var(--main-photo-size);
    border: 1px solid var(--line);
}

.skeleton-thumbs {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-left: 52px;
    margin-right: 52px;
}

.skeleton-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--line);
}

.skeleton-note {
    margin: 10px auto 0;
    width: 85%;
    height: 14px;
    border-radius: 2px;
}

    .skeleton-main::after,
    .skeleton-thumb::after,
    .skeleton-note::after {
        content: "";
        position: absolute;
        top: 0;
        left: -130%;
        width: 120%;
        height: 100%;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.65) 50%, rgba(255, 255, 255, 0) 100%);
        animation: skeleton-shimmer 1.1s infinite;
    }

@keyframes skeleton-shimmer {
    100% {
        left: 130%;
    }
}
/**/

.main-image-frame {
    width: 100%;
    height: var(--main-photo-size);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.drift-demo-trigger {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: crosshair;
}

.drift-bounding-box {
    z-index: 50;
}

.thumb-rail {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    column-gap: 8px;
}

.thumb-nav {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #de1c24;
    font-size: 55px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-top: -30px;
}

    .thumb-nav:disabled {
        opacity: 0.35;
        cursor: not-allowed;
    }

.thumb-window {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: center;
    gap: 10px;
}

.thumb-btn {
    border: 1px solid transparent;
    background: #fff;
    padding: 0;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
}

@@media (max-width: 1300px) {
    .product-layout {
        grid-template-columns: 300px minmax(0, 1fr);
    }

    .product-gallery {
        width: 300px;
    }

    .main-image-frame {
        width: 300px;
        height: 300px;
    }

    .skeleton-main {
        width: 300px;
        height: 300px;
    }
}

.thumb-btn:not(.is-active):hover {
    border-color: var(--line);
}

.thumb-btn.is-active {
    border-color: #de1c24;
}

.thumb-btn img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-note {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.product-detail {
    position: relative;
    min-height: 540px;
    overflow: hidden;
}

.product-code {
    margin: 0;
    font-size: 14px;
    letter-spacing: 0.06em;
    color: #8c97a0;
    text-transform: uppercase;
}

h1 {
    margin: 8px 0 12px;
    font-size: 36px;
    line-height: 1.1;
}

.product-meta {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #394550;
}

.spec-list {
    padding-left: 18px;
    margin: 0 0 24px;
    color: #2f3f4b;
}

    .spec-list li {
        margin: 8px 0;
    }

.cta {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    padding: 12px 20px;
}



@media (max-width: 980px) {
    .wrapper {
        margin: 0;
        border: 0;
        box-shadow: none;
        padding: 16px;
    }

    .product-layout {
        grid-template-columns: 1fr;
        row-gap: 20px;
    }

    .product-gallery {
        width: 100%;
    }

    .main-image-frame {
        width: min(100%, var(--main-photo-size));
        height: min(100vw - 34px, var(--main-photo-size));
        margin: 0 auto;
    }

    .skeleton-main {
        width: min(100%, 400px);
        height: min(100vw - 34px, 400px);
        margin: 0 auto;
    }

    .skeleton-thumbs {
        margin-left: 52px;
        margin-right: 52px;
    }

    .drift-demo-trigger {
        width: 100%;
        height: 100%;
    }

    .product-detail {
        min-height: 0;
    }

    .drift-bounding-box {
        display: none;
    }
}