/* Product detail: image gallery, sticky tabs, facts, purchase and lightbox. */
#product-product {
  .thumbnails { display: flex; flex-wrap: wrap; gap: var(--srebro-space-3); padding: 0; list-style: none; }
  .thumbnails > li { margin: 0; }
  .thumbnails .thumbnail { padding: 0; border: 0; border-radius: var(--srebro-radius-card); background: var(--srebro-color-porcelain); }
  .thumbnails .thumbnail img { mix-blend-mode: multiply; }
  .thumbnails > li:first-child { flex: 1 0 100%; }
  .thumbnails > li:first-child .thumbnail { display: flex; min-height: 420px; align-items: center; justify-content: center; background: var(--srebro-color-porcelain); }
  .thumbnails > li:first-child .thumbnail img { width: 100%; max-height: min(62vw, 680px); object-fit: contain; }
  .thumbnails > li.image-additional { width: 76px; height: 76px; flex: 0 0 76px; }
  .thumbnails > li.image-additional .thumbnail { width: 76px; height: 76px; overflow: hidden; }
  .thumbnails > li.image-additional .thumbnail img { width: 100%; height: 100%; object-fit: contain; }
  h1, .srebro-product-title { margin: 0 0 16px; font-size: clamp(30px, 2.2vw, 36px); line-height: 1.14; }
  .product-info .price { color: var(--srebro-color-graphite); font: 700 36px/1.12 var(--srebro-font-body); }
  .product-info .price-old { color: var(--srebro-color-gray-500); font-size: var(--srebro-text-lg); text-decoration: line-through; }
  .product-info .list-unstyled li { margin: 9px 0; }
  .product-info .form-control { border-radius: var(--srebro-radius-control); }
  .product-info #button-cart { min-height: 48px; padding: 0 24px; border: 0; border-radius: var(--srebro-radius-control); background: var(--srebro-color-graphite); font-size: 15px; &:hover { background: var(--srebro-color-steel); } }
  .product-info .nav-tabs > li > a { border-radius: var(--srebro-radius-control) var(--srebro-radius-control) 0 0; color: var(--srebro-color-graphite); }
  .product-info .tab-content { padding: 22px 0; color: var(--srebro-color-ink); }
  .product-info table { max-width: 760px; }
  .product-info td { padding: 10px !important; }
  .srebro-stock--preorder { color: var(--srebro-color-warning); }
  .list-unstyled h2 { font-size: 36px; line-height: 1.15; }
  .nav-tabs {
    margin-bottom: 0; border-bottom-color: var(--srebro-color-line);
    > li { float: none; flex: 0 0 auto; > a { display: flex; min-height: 46px; align-items: center; border-color: transparent; color: var(--srebro-color-graphite); &:hover { border-color: transparent; background: var(--srebro-color-porcelain); } } }
  }
  .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus { border-color: var(--srebro-color-line) var(--srebro-color-line) var(--srebro-color-white); color: var(--srebro-color-graphite); }
  .srebro-product-tabs {
    position: sticky; top: 0; z-index: var(--srebro-z-sticky); margin: 0 0 20px; padding-top: 6px; background: var(--srebro-color-white);
    .nav-tabs { display: flex; align-items: stretch; margin: 0; border-bottom: 1px solid var(--srebro-color-line); }
  }
  .table-bordered { border-color: var(--srebro-color-line); > tbody > tr > td, > thead > tr > td { border-color: var(--srebro-color-line); } }
}
.mfp-image-holder {
  .mfp-content { width: auto; max-width: calc(100% - 48px); }
  .mfp-figure { overflow: hidden; border-radius: var(--srebro-radius-card); background: var(--srebro-color-white); &::after { border-radius: var(--srebro-radius-card); background: var(--srebro-color-white); } }
  .mfp-img { max-width: calc(100vw - 48px); max-height: calc(100vh - 80px) !important; object-fit: contain; }
  .mfp-title { padding: var(--srebro-space-2) 0; }
}
@media (max-width: 767px) {
  #product-product {
    .srebro-product-title { margin-bottom: var(--srebro-space-2); font-size: clamp(25px, 7vw, 32px); }
    .srebro-product-tabs {
      margin-bottom: var(--srebro-space-4);
      .nav-tabs { width: max-content; min-width: 100%; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: none; &::-webkit-scrollbar { display: none; } > li > a { min-height: 46px; padding: 12px 14px; white-space: nowrap; } }
    }
    .thumbnails > li:first-child .thumbnail { min-height: 0; }
    .thumbnails > li:first-child .thumbnail img { max-height: 86vw; }
    .thumbnails > li.image-additional { width: 64px; height: 64px; flex-basis: 64px; }
    .thumbnails > li.image-additional .thumbnail { width: 64px; height: 64px; }
    .product-info .price { font-size: 32px; }
  }
  .mfp-image-holder { .mfp-content { max-width: calc(100% - 24px); } .mfp-img { max-width: calc(100vw - 24px); max-height: calc(100vh - 100px) !important; } .mfp-figure::after { max-width: calc(100vw - 24px); } }
}
@media (prefers-reduced-motion: reduce) { #product-product *, #product-product *::before, #product-product *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
