button {
  cursor: pointer;
}
dialog#size-detail,
dialog#floating-cart {
  position: fixed;
  border: none;
  padding: 4rem 2rem 6rem 2rem;
  margin: 4rem 0 0 0;
  right: 0;
  left: auto;
  top: 0;
  height: 100%;
  width: 35%;
  overflow-y: auto;
}
.vis-thumbnails {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.25rem;
}

.visualize-color.tab.active {
  max-height: calc(100vh - 7rem);
  scrollbar-width: none;
  max-width: 60vw;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
}

.visualize-color.tab.active {
  scrollbar-width: none;
}
/* For Chrome, Safari, and Opera */
.visualize-color.tab.active::-webkit-scrollbar {
  display: none;
}

.visualize-color.tab.active .image-holder {
  flex-shrink: 0;
  height: 100%;
  width: auto;
  scroll-snap-align: start;
  background-color: var(--clr-light-grey);
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}
.image-switch {
  width: 0.2rem;
  height: 2rem;
  cursor: pointer;
  background-color: rgba(var(--clr-mid-grey-triple), var(--opacity-mid));
}
.image-switch.selected {
  background-color: rgba(var(--clr-mid-grey-triple), var(--opacity-full));
}
.vis-thumbnails {
  display: none;
}
.visualize-color.tab.active .vis-thumbnails {
  display: flex;
}
.product-pics img {
  display: block;
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
}
@media (orientation: portrait) {
  .vis-thumbnails {
    left: 50%;
    top: 7rem;
    transform: translateX(-50%);
    z-index: 5;
    flex-direction: row;
  }
  .image-switch {
    width: 2rem;
    height: 0.2rem;
  }
  .visualize-color.tab.active {
    aspect-ratio: 2/3;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 90vw;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    margin: auto;

    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  }
}

.product-frame {
  display: flex;
  flex-direction: row;
  margin: 1rem 10rem 1rem 2rem;
  font-size: 0.85rem;
  font-weight: 300;
  gap: 2rem;
}
.product-frame ul {
  list-style: none;
}
.colortab {
  display: flex;
  gap: 0.3rem;
}
.colortab .color-switch {
  border: solid transparent 0.2rem;
  outline: solid transparent 0.5px;
  /*outline-offset: 0.2rem;*/
  border-radius: 50%;
  box-sizing: content-box;
}
.colortab .color-switch:hover {
  outline: solid #666666 0.5px;
}
.colortab .color-switch img {
  border-radius: 50%;
  height: 0.9rem;
  width: 0.9rem;
  display: block;
}
.colortab .color-switch.highlighted {
  outline: solid #333333 0.5px;
}
.tab {
  /* display: none; */
  height: 0;
  /* scale: 0; */
  overflow: hidden;
  transition: all ease-out 0s;
}

.tab.active {
  height: auto;
}
.hidden {
  height: 0;
  overflow: hidden;
  /* display: none; */
}
.product-description {
  position: static;
  top: 6rem;
  align-self: flex-start;
  flex-grow: 1;
  max-width: 40%;
  flex-basis: 0;
  display: flex;
  flex-direction: column;
  /* gap: 1.5rem; */
  padding: 1rem 0.5rem;
}
.product-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.product-care li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.product-name {
  font-size: 0.9rem;
  font-weight: 400;
}

.product-pics {
  overflow-x: hidden;
  overflow-y: auto;
  flex-grow: 1;
  flex-basis: 0;
  max-width: 60%;
  /* overflow-y: scroll; */
}

.product-buy {
  display: flex;
  flex-direction: column;
  /* gap: 1rem; */
}
.active {
  /* display: block; */
  height: auto;
}

.fabric-detail.active,
.product-shipment.active,
.product-return.active {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
/* .size-choice {
  position: absolute;
} */

/*.size-choice .size-detail:hover {
  color: #f8f8f8;
  background-color: grey;
}*/
.size-selector {
  width: 100%;
}
.size-choice {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.size-choice.portrait {
  display: none;
}
.size-choice.portrait.active {
  display: flex;
}
.size-select-btn {
  width: 4rem;
  height: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-end;
  background-color: var(--clr-bg-light);
  border: 1px solid var(--clr-light-grey);
}
span.warning {
  color: #b85c38;
}
.size-select-btn.item-sold {
  position: relative;
  overflow: hidden;
}
.size-select-btn.item-sold::after {
  content: ""; /* Text to display */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--clr-light-grey);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  opacity: 0.8;
  visibility: visible;
  pointer-events: none;
}
.size-select-btn.item-in-stock:hover {
  border-color: var(--clr-mid-grey);
}

.drop-header {
  display: flex;
  width: 100%;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  /* line-height: 4rem; */
}
.drop-header:hover {
  background-color: #f0f0f0;
}

.drop-header .drop-pointer {
  height: 10px;
  width: 10px;
  min-width: 10px;
  margin-right: 10px;
  transition: 0.5s ease-in-out;
}
.drop-header.dropped .drop-pointer {
  transform: rotate(180deg);
}
.price strong {
  font-size: 150%;
  font-weight: 400;
}
.size-choice-main,
.garment-detail-main,
.fabric-detail-main,
.product-shipment-main,
.product-return-main {
  border-top: 1px solid rgba(100, 100, 100, 0.3);
}
.product-shipment p,
.product-return p,
.product-return li {
  line-height: 2rem;
}
.product-return ul {
  list-style: disc;
}
.hidden.active,
.drop-header.dropped {
  border-top: 1px solid rgba(100, 100, 100, 0.5);
}
.product-info-container {
  width: 100%;
}
.size-choice-main button {
  height: 100%;
  width: 100%;
  color: #f8f8f8;
  background-color: black;
  cursor: pointer;
  text-align: left;
}
.care-label {
  height: 2.5rem;
  width: 2.5rem;
  padding: 2px;
  margin-right: 1rem;
}

.product-description #size-detail-builder {
  display: none;
}
#size-detail-general {
  width: 100%;
}
#size-detail-info {
  width: 100%;
}
#size-detail-builder {
  width: 100%;
}
#size-detail-table {
  width: 100%;
}
#close-size-detail {
  position: absolute;
  top: 1rem;
  right: 1rem;
  height: 1rem;
  width: 1rem;
  cursor: pointer;
}

#size-detail-table th,
#size-detail-table td {
  padding: 0.5rem;
  text-align: center;
}
#svg-close-size-detail {
  box-sizing: content-box;
  width: 0.5rem;
  height: 0.5rem;
  padding: 0.2rem;
}
@media (orientation: landscape) {
  .portrait {
    display: none;
  }
}
@media (orientation: portrait) {
  dialog#portrait-selector-anchor {
    position: fixed;
    border: none;
    padding: 2rem;
    margin: 0;
    padding-bottom: 2rem;
    left: 0;
    top: auto;
    bottom: 0;
    width: 100%;
  }
  dialog#size-detail,
  dialog#floating-cart {
    margin-top: 4rem;
    height: 100%;
    bottom: 0;
    width: 100%;
  }
  #cart {
    padding-right: 2rem;
    padding-left: 2rem;
  }

  .product-frame {
    flex-direction: column;
    margin: 1rem 1.5rem;
    gap: 1rem;
    font-size: 1rem;
  }
  #portrait-anchor {
    position: sticky;
    bottom: 0;
    z-index: 10;
    width: 100%;
    background-color: var(--clr-bg-light);
  }
  .size-choice-main {
    padding-bottom: 1rem;
  }

  .product-info-container {
    padding: 1rem 0 0 0;
  }

  .product-description {
    margin-top: 0;
    padding-top: 0;
    flex-basis: auto;
    max-width: 100%;
  }
  .product-pics {
    flex-basis: auto;
    max-width: 100%;
  }
  .size-choice-main.portrait {
    margin-top: 0.5rem;
  }
}
