/*
 * Product page touch-ups on top of styles.min.css (plain CSS for the same reason
 * as payment-methods.css: the SCSS can't be rebuilt reproducibly).
 */

/* Price box stays in view next to the tall gallery */
@media (min-width: 768px) {
  .product-overview .product .product-price-box {
    align-self: start;
    position: sticky;
    top: 20px;
  }
}

/* ESTO monthly payment: logo and text side by side, logo not oversized */
#esto_calculator {
  grid-template-columns: 96px 1fr;
  grid-column-gap: 16px;
}

#esto_calculator img {
  width: 96px;
  height: auto;
  max-height: 60px;
  object-fit: contain;
}

/* Description: full width below the gallery, readable line length, real headings and lists */
.product-about {
  border-top: 1px solid #E4E7EC;
}

.product-about .container {
  padding-top: 48px;
  padding-bottom: 48px;
}

.product-about .product-description {
  max-width: 760px;
  color: #323944;
  font-size: 16px;
  line-height: 1.6;
}

.product-about .product-description p {
  color: #323944;
  margin-bottom: 16px;
}

.product-about .product-description h2,
.product-about .product-description h3,
.product-about .product-description h4 {
  color: #203456;
  font-size: 20px;
  line-height: 28px;
  margin: 32px 0 12px;
}

.product-about .product-description ul,
.product-about .product-description ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.product-about .product-description li {
  margin-bottom: 6px;
}

@media (max-width: 767.98px) {
  /* Thumbnails in one swipeable row instead of a grid that pushes the price far down */
  .product-overview .product .product-gallery {
    min-width: 0; /* let the grid column shrink so the thumbnail row scrolls instead of widening the page */
  }

  .product-thumbs {
    margin-top: 16px;
  }

  .product-thumbs ul {
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .product-thumbs ul::-webkit-scrollbar {
    display: none;
  }

  .product-thumbs li {
    flex: none;
  }

  .product-thumbs img {
    width: 60px;
    height: 60px;
    object-fit: cover;
  }

  .product-about .container {
    padding: 32px 0; /* the theme already pads .product-description by 24px on phones */
  }

  .product-about .product-description {
    font-size: 15px;
  }
}

/* Storage and colour switcher: links to the sibling products of the same model */
.product-switcher {
  margin-bottom: 20px;
}

.product-switcher .label {
  display: block;
  margin-bottom: 8px;
}

.product-switcher-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-switcher-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 40px;
  padding: 6px 12px;
  background: #fff;
  border: 2px solid #E4E7EC;
  border-radius: 8px;
  color: #323944;
  font-size: 14px;
  line-height: 18px;
  text-decoration: none;
}

.product-switcher-option small {
  color: #5C697F;
  font-size: 12px;
}

.product-switcher-option:hover {
  border-color: #D2D4DA;
  color: #323944;
}

.product-switcher-option.current {
  border-color: #1CBFD3;
  font-weight: 600;
}

.product-switcher-option.unavailable span {
  color: #929DB0;
  text-decoration: line-through;
}
