@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: fallback;
  src: url('/assets/fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: fallback;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Great Vibes';
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: url('/assets/fonts/great-vibes-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #faf8f5;
  color: #1c1c1c;
  font-family: 'Inter', sans-serif;
}

:root {
  --ot-control-radius: 10px;
}

#app {
  min-height: 100vh;
  background: #faf8f5;
}

button,
input[type='button'],
input[type='submit'],
input[type='reset'],
.button {
  border-radius: var(--ot-control-radius);
}

@view-transition {
  navigation: auto;
}

/* Prevent early layout shift on PDP before runtime SCSS is injected */
.ot-product {
  padding: 2.5rem 0 4rem;
}

.ot-product__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.ot-product__media {
  position: sticky;
  top: 80px;
}

.ot-gallery {
  display: flex;
  gap: 12px;
  width: 100%;
  min-width: 0;
  position: relative;
}

.ot-gallery__viewport {
  display: none;
  position: relative;
  width: 100%;
}

.ot-gallery__slides {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ot-gallery__slide {
  flex: 0 0 100%;
  position: relative;
  height: 0;
  padding-bottom: calc(871 / 581 * 100%);
  background: #f0ece6;
}

.ot-gallery__slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
}

.ot-gallery__thumbs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  width: 64px;
}

.ot-gallery__thumb button {
  display: block;
  width: 64px;
  height: auto;
  aspect-ratio: 581 / 871;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: none;
  overflow: hidden;
}

.ot-gallery__thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.ot-gallery__main {
  position: relative;
  flex: 1;
  width: 100%;
  min-width: 0;
  background: #f0ece6;
  overflow: hidden;
  line-height: 0;
}

.ot-gallery__frame {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 581 / 871;
  background: #f0ece6;
}

.ot-gallery__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

@media (min-width: 1001px) and (orientation: portrait) {
  .ot-product__grid {
    grid-template-columns: 600px 1fr;
  }
}

@media (max-width: 900px) {
  .ot-product.page-width {
    width: 100%;
    max-width: none;
    padding: 0 0 4rem;
    margin-top: 0;
    overflow-x: clip;
  }

  .ot-product__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .ot-product__media {
    position: static;
  }

  .ot-gallery__main {
    border-radius: 0;
  }
}

@media (min-width: 769px) and (max-width: 900px) {
  .ot-gallery__frame {
    max-height: calc(100vh - 100px);
    width: auto;
    max-width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 1024px) {
  /* Shared carousel mechanics: hide legacy desktop main/frame, show the
     scroll-snap viewport. Layout (row vs column, vertical vs horizontal
     thumbs) is handled separately below per breakpoint. */
  .ot-gallery__viewport {
    display: block;
  }

  .ot-gallery__slides {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 12px;
    scrollbar-width: none;
  }

  .ot-gallery__main {
    display: none;
  }

  .ot-gallery__frame {
    display: none;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  /* Tablet: vertical mini-gallery on the LEFT of the carousel. DOM order is
     [__viewport, __thumbs-wrap, __main], so flip visual order with
     `order: -1` on the thumbs wrapper; __viewport fills remaining space. */
  .ot-gallery__thumbs-wrap {
    order: -1;
  }

  .ot-gallery__viewport {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 768px) {
  /* Mobile: column stack — carousel on top, horizontal thumb strip below. */
  .ot-gallery {
    flex-direction: column;
    margin-top: 0;
  }

  .ot-gallery__thumbs {
    flex-direction: row;
    width: 100%;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
    overflow-x: auto;
  }
}
