/* ----------------- product detail page styles ---------------- */
.product-detail-page {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  padding: 5%;
}

.product-detail-page h4 {
  margin: 0 0 1%;
}

/* ----------------- product detail image gallery ---------------- */
.product-images {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2%;
}

.gallery-container {
  position: relative;
  flex-grow: 1;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  display: none;
}

#mainImage {
  display: block;
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 50%;
  user-select: none;
}

.arrow:hover {
  background: rgba(255, 255, 255, 0.3);
  color: black;
}

.arrow.left {
  left: 10px;
}

.arrow.right {
  right: 10px;
}

.thumbnails {
  display: flex;
  gap: 10px;
  width: 12%;
}

.thumbnails img {
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.5;
  /* border: 2px solid transparent; */
}

.thumbnails img.active {
  opacity: 1;
  /* border-color: #fff; */
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
}

.lightbox .close-btn {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 16px;
  background: #444;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}

.lightbox .close-btn:hover {
  background: #666;
}

@media (min-width:1200px) {
  .product-images {
    width: 50%;
  }
}

/* ------ end gallery ------ */
.dropdown-details {
  position: relative;
  display: inline-block;
  /* Allows the details element to size to its content */
  /* padding: 10px; */
}

.dropdown-details summary {
  /* padding: 10px; */
  list-style-type: none;
}

.dropdown-details summary::after {
  margin-left: 5px;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  z-index: 1;
  min-width: 220px;
  width: auto;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
}

.dropdown-content ul {
  padding: 0;
  margin: 0;
}

.dropdown-content ul li {
  list-style-type: none;
  padding: 4% 0;
}

.dropdown-content ul li:not(:last-of-type) {
  border-bottom: 1px solid black;
}

.dropdown-content ul li a {
  text-decoration: none;
  color: black;
  white-space: nowrap;
}

.dropdown-content ul li a:hover {
  text-decoration: underline;
}

.product-info {
  margin-top: 10%;
}

.product-info hr {
  width: 100vw;
}

.description .back-to-products {
  margin-right: 2%;
}

@media (min-width:1200px) {
  .product-info {
    width: 45%;
    margin-top: 0;
  }
}

/* ------------------ nutrition & specs------------------ */
.nutrition, .specs {
  display: flex;
  flex-flow: column nowrap;
}

.nutrition {
  margin: 2.5% 0;
  max-width: 100%;
}

.nutrition .title, .specs .title {
  width: 100%;
  display: flex;
  margin-bottom: 1%;
}

.nutrition .title h2, .specs .title h2 {
  padding: 2%;
  margin: 0;
}

.nutrition .title hr, .specs .title hr {
  width: 100%;
  height: 1px;
  align-self: center;
}

@media (min-width:800px) {
  .nutrition {
    gap: 5%;
  }

  .nutrition, .specs {
    flex-flow: row wrap;
    justify-content: space-between;
  }
}

.k12-specific-nutrition {
  display: flex;
  gap: 4%;
  margin: 2% 0;
  align-items: flex-start;
}

/* ---wg badge ---*/
.wg-badge {
  background-color: black;
  color: white;
  padding: 5px 12px 12px;
  width: 125px;
  border-radius: 4px;
}

.wg-badge h3 {
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
}

.wg-badge h3 span {
  font-size: 3rem;
}

/* ------------------ nutrition only ------------------ */
.nfp {
  width: 375px;
  max-width: 100%;
}

.allergens {
  border: 1px dashed darkgray;
  background-color: whitesmoke;
  padding: 2%;
  margin-top: 5%;
}

.allergens ul {
  padding-left: 20px;
}

.allergens ul li {
  line-height: 1.2;
  margin-bottom: 5px;
}

@media (min-width:800px) {
  .ingredients {
    flex: 1;
  }
}

/* -------------------- specs only -------------------- */
.specs {
  margin-bottom: 2%;
}

.specs hr {
  margin: 2% 0;
}

.specs h4 {
  text-decoration: underline;
  text-underline-offset: 10%;
  text-align: center;
  width: 100%;
}

.specs ul {
  list-style-type: none;
}

.spec-info {
  margin: 2% 0;
  padding: 2%;
  border: .25px solid black;
}

.spec-info ul {
  padding: 0;
  margin: 20px 0 0;
}

.spec-info ul li {
  margin-bottom: 1%;
  /* keep from becoming links on mobile & tablet */
  pointer-events: none;
  color: black;
  text-decoration: none;
}

@media (min-width:800px) {
  .spec-info {
    width: 41%;
    margin: 2% 0;
  }
}

@media (min-width:1200px) {
  .spec-info {
    width: 20%;
    margin: 0;
  }
}