/* Страница товара по референсу IKEA (NYSJÖN): одно большое фото с миниатюрами, узкая правая колонка
   покупки, строки со стрелкой открывают панель справа. Современнее — закреплённая колонка, свайп-галерея,
   скругление 8px у фото. Токены — в shop.css (.tmp). */
.tmp-wrap {
  max-width: 1348px;
  margin: 0 auto;
  padding: 0 24px;
}
.tmp-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
  padding-top: 20px;
  padding-bottom: 28px;
}
.tmp-crumbs svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}
.tmp-crumbs a:hover {
  text-decoration: underline;
}
.tmp-crumbs span:last-child {
  color: var(--muted);
}

.tmp-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 80px;
  align-items: start;
}

/* галерея: большое фото, полоса прогресса, миниатюры */
.tmp-stage {
  position: relative;
}
.tmp-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: 8px;
  background: var(--well);
}
.tmp-track::-webkit-scrollbar {
  display: none;
}
.tmp-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.tmp-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.tmp-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background-color 0.15s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.tmp-stage:hover .tmp-arrow,
.tmp-arrow:focus-visible {
  opacity: 1;
}
.tmp-arrow:hover {
  background: var(--well);
}
.tmp-arrow[disabled] {
  visibility: hidden;
}
.tmp-arrow--prev {
  left: 16px;
}
.tmp-arrow--next {
  right: 16px;
}
.tmp-progress {
  position: relative;
  height: 2px;
  background: var(--hair);
  margin: 24px auto 0;
  max-width: 420px;
  overflow: hidden;
  border-radius: 2px;
}
.tmp-progress span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease;
}
.tmp-thumbs {
  display: flex;
  justify-content: safe center;
  gap: 8px;
  margin-top: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}
.tmp-thumbs::-webkit-scrollbar {
  display: none;
}
.tmp-thumb {
  flex: none;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--well);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.tmp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tmp-thumb:hover {
  border-color: var(--muted);
}
.tmp-thumb.is-active {
  border: 2px solid var(--ink);
}

/* описание под фото и строки со стрелкой */
.tmp-about {
  margin-top: 56px;
  max-width: 760px;
}
.tmp-about p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
}
.tmp-art {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 12px;
  color: var(--text);
}
.tmp-art b {
  background: var(--ink);
  color: #fff;
  padding: 3px 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.tmp-rows {
  margin-top: 40px;
  border-top: 1px solid var(--hair);
  max-width: 760px;
}
.tmp-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 0;
  border: 0;
  border-bottom: 1px solid var(--hair);
  background: transparent;
  color: var(--ink);
  font: 700 18px "Montserrat", Arial, sans-serif;
  text-align: left;
  cursor: pointer;
}
.tmp-row small {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
.tmp-row:hover span {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.tmp-row svg {
  transition: transform 0.15s ease;
}
.tmp-row:hover svg {
  transform: translateX(3px);
}

/* правая колонка */
.tmp-buy {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  padding-top: 8px;
}
.tmp-buy h1 {
  margin: 4px 0 4px;
  font-family: "Montserrat", Arial, sans-serif !important;
  font-size: 22px !important;
  line-height: 1.3 !important;
  font-weight: 800 !important;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.tmp-desc {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}
.tmp-price {
  margin: 16px 0 0;
}
.tmc-price--big b {
  font-size: 40px;
}
.tmc-price--big span {
  font-size: 18px;
  margin-top: 4px;
}
.tmp-facts {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.tmp-facts li {
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  padding: 0 !important;
  margin: 0 !important;
}
.tmp-facts li::before {
  content: none !important;
  display: none !important;
}
.tmp-facts svg {
  color: var(--ink);
  margin-top: -1px;
}
.tmp-add {
  margin-top: 32px;
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font: 700 15px "Montserrat", Arial, sans-serif;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.tmp-add:hover {
  background: var(--accent-press);
}
.tmp-add.is-added {
  background: var(--ink);
  color: #fff;
}
.tmp-add[aria-busy="true"] {
  opacity: 0.7;
}
.tmp-links {
  margin-top: 28px;
  border-top: 1px solid var(--hair);
}
.tmp-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--hair);
  background: transparent;
  color: var(--ink) !important;
  text-align: left;
  cursor: pointer;
  font-family: "Montserrat", Arial, sans-serif;
}
.tmp-link span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tmp-link b {
  font-size: 14px;
  font-weight: 700;
}
.tmp-link small {
  font-size: 13px;
  color: var(--text);
}
.tmp-link:hover b {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.tmp-link svg {
  flex: none;
}
.tmp-stock {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.tmp-stock i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0a8a00;
}
.tmp-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* блоки ниже */
.tmp-block {
  margin-top: 96px;
}
.tmp-block h2 {
  margin: 0 0 28px;
  font-family: "Montserrat", Arial, sans-serif !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  color: var(--ink);
}
.tmp > .tmp-block:last-of-type {
  margin-bottom: 96px;
}
.tmp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 16px;
}
.tmp-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 4 * 16px) / 5);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.tmp-rail::-webkit-scrollbar {
  display: none;
}
.tmp-rail > * {
  scroll-snap-align: start;
}
.tmp-progress--rail {
  max-width: none;
  margin-top: 32px;
}
.tmp-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.tmp-gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
}
.tmp-video {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}
.tmp-video iframe,
.tmp-video video {
  width: 100%;
  height: 100%;
  border: 0;
}

/* панель справа (как «Product features» у IKEA) */
.tmp-sheet {
  position: fixed;
  inset: 0;
  z-index: 5000;
}
.tmp-sheet[hidden] {
  display: none;
}
.tmp-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
  animation: tmp-fade 0.2s ease;
}
.tmp-sheet__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(600px, 100vw);
  background: #fff;
  display: flex;
  flex-direction: column;
  animation: tmp-slide 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}
.tmp-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 40px;
}
.tmp-sheet__head h2 {
  margin: 0;
  font-family: "Montserrat", Arial, sans-serif !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  color: var(--ink);
}
.tmp-sheet__x {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--well);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
}
.tmp-sheet__x:hover {
  background: var(--hair);
}
.tmp-sheet__body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 40px 40px;
  font-size: 15px;
  line-height: 1.65;
}
.tmp-sheet__body p {
  margin: 0 0 14px;
}
@keyframes tmp-fade {
  from {
    opacity: 0;
  }
}
@keyframes tmp-slide {
  from {
    transform: translateX(100%);
  }
}
.tmp-sub {
  margin: 28px 0 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}
.tmp-sub:first-child {
  margin-top: 0;
}
.tmp-specs {
  margin: 0;
}
.tmp-specs div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}
.tmp-specs dt {
  color: var(--text);
}
.tmp-specs dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}
.tmp-dims {
  display: grid;
  gap: 32px;
}
.tmp-dims .tm-dim-title {
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 12px;
}
.tmp-dims .tm-dim-grid {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 12px;
}
.tmp-dims svg {
  width: 100%;
  height: auto;
  background: var(--well);
  border-radius: 8px;
}
.tmp-reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.tmp-review {
  padding: 0;
  border: 0;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  background: var(--well);
  overflow: hidden;
  cursor: zoom-in;
}
.tmp-review img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* полноэкранный просмотр фото */
.tmp-zoom {
  position: fixed;
  inset: 0;
  z-index: 6000;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tmp-zoom[hidden] {
  display: none;
}
.tmp-zoom img {
  max-width: calc(100vw - 160px);
  max-height: calc(100vh - 48px);
  object-fit: contain;
}
.tmp-zoom__close,
.tmp-zoom__nav {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--well);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
}
.tmp-zoom__close:hover,
.tmp-zoom__nav:hover {
  background: var(--hair);
}
.tmp-zoom__close {
  top: 20px;
  right: 20px;
}
.tmp-zoom__prev {
  left: 24px;
}
.tmp-zoom__next {
  right: 24px;
}

/* адаптив */
@media (max-width: 1199px) {
  .tmp-top {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 48px;
  }
  .tmp-rail {
    grid-auto-columns: calc((100% - 3 * 16px) / 4);
  }
}
@media (max-width: 991px) {
  .tmp-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .tmp-buy {
    position: static;
    padding-top: 0;
  }
  .tmp-left {
    display: contents;
  }
  .tmp-stage,
  .tmp-progress:not(.tmp-progress--rail),
  .tmp-thumbs {
    order: -3;
  }
  .tmp-about {
    margin-top: 8px;
  }
  .tmp-rows {
    margin-top: 0;
  }
  .tmp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tmp-rail {
    grid-auto-columns: calc((100% - 2 * 16px) / 3);
  }
}
@media (max-width: 767px) {
  .tmp-wrap {
    padding: 0 16px;
  }
  .tmp-crumbs {
    padding-bottom: 16px;
  }
  .tmp-track {
    margin: 0 -16px;
    border-radius: 0;
  }
  .tmp-arrow {
    display: none;
  }
  .tmp-progress {
    margin-top: 16px;
  }
  .tmp-thumbs {
    display: none;
  }
  .tmp-buy h1 {
    font-size: 20px !important;
  }
  .tmc-price--big b {
    font-size: 34px;
  }
  .tmp-row {
    padding: 24px 0;
    font-size: 16px;
  }
  .tmp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 12px;
  }
  .tmp-rail {
    grid-auto-columns: 46%;
    gap: 12px;
  }
  .tmp-block {
    margin-top: 64px;
  }
  .tmp-gallery {
    grid-template-columns: 1fr 1fr;
  }
  .tmp-sheet__panel {
    top: auto;
    width: 100%;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
    animation-name: tmp-rise;
  }
  .tmp-sheet__head {
    padding: 20px 20px 12px;
  }
  .tmp-sheet__body {
    padding: 4px 20px 32px;
  }
  .tmp-reviews {
    grid-template-columns: 1fr 1fr;
  }
  .tmp-zoom img {
    max-width: 100vw;
  }
  .tmp-zoom__nav {
    top: auto;
    bottom: 24px;
  }
}
@keyframes tmp-rise {
  from {
    transform: translateY(100%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tmp *,
  .tmp-sheet__panel,
  .tmp-sheet__backdrop {
    animation: none !important;
    transition: none !important;
  }
  .tmp-track {
    scroll-behavior: auto;
  }
}
