/* ------------------detail-pagina-------------- */
body {
  margin: 0;
  padding: 0;
  background-color: var(--background-color-secondary);
}

/* ------------------tablet-------------- */
@media (min-width: 768px) {
  main {
    display: grid;
    grid-template-columns: 1.8fr 1.1fr 1.1fr;
    grid-template-areas:
      "back back back"
      "gallery info info"
      "gallery details details"
      "description details details"
      "description reviews reviews"
      "map reviews reviews"
      "map reviews reviews"
      "map shopOnline shopInPerson"
      "recommendations recommendations recommendations";
    max-width: 1400px;
    margin: 0 auto;
    gap: 1rem;
    overflow-x: hidden;

  .gallery-main {
    aspect-ratio: auto; 
    height: 100%;
  }

  }
}


.back-button {
  display: inline-flex;
  grid-area: back;
}

.product-description {
  grid-area: description;
}

.product-gallery {
  grid-area: gallery;
}

.product-details {
  grid-area: details;
}

.reviews-section {
  grid-area: reviews;
}

.product-info {
  grid-area: info;
}

.shop-online {
  grid-area: shopOnline;
}

.shop-in-person {
  grid-area: shopInPerson;
}

.map-section {
  grid-area: map;
}

.recommendations {
  grid-area: recommendations;
}

.gallery-main {
  padding: 0;
  border-radius: 1rem;
  overflow: hidden;
}

.gallery-thumbs {
  padding: 0;
  gap: 0.5rem;
}

.gallery-thumbs .thumb {
  width: 80px;
  height: 80px;
}


/* ------------------desktop-------------- */

@media (min-width: 1024px) {
  main {
    grid-template-columns: 2fr 1fr 1fr;
        grid-template-areas:
      "back back back"
      "gallery info info"
      "gallery details details"
      "description reviews reviews"
      "map shopOnline shopInPerson"
      "map shopOnline shopInPerson"
      "recommendations recommendations recommendations";
      

  .gallery-main {
    aspect-ratio: auto; 
    height: 100%;
  }

  }

  .gallery-thumbs .thumb {
    width: 100px;
    height: 100px;
  }



}

/* ------------------popup styling voor js-------------- */

.popup {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  transition: 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

.popup.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}


.detail-pagina-header {
  display: flex;
  justify-content: space-between;

  .nav-icons {
    padding-top: .5em;
  }
}

.logo img {
  padding-left: 1em;
  height: 5rem;

  @media (min-width: 770px) {
    height: 5.5rem;
    padding: 1em;
  }
}

.title {
  line-height: 26px;
}

.product-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

details[open] summary::after {
  content: " ▲";
}

details:not([open]) summary::after {
  content: " ▼";
}

summary {
  list-style: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

summary:hover {
  color: var(--accentcolor);
}

.button-wrapper{
  display: flex;
  gap: 2em;
}

.shareButton {
  background-color: var(--background-color);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);

}

.addbutton {
  border-color: transparent;
  color: var(--textcolor);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}

.addbutton.added {
  animation: confetti-pop 0.6s ease;
}

.addbutton.added .listButton-icon {
  animation: icon-spin-in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes confetti-pop {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

@keyframes icon-spin-in {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }

  70% {
    transform: scale(1.2) rotate(20deg);
    opacity: 1;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.addbutton.ready:not(.added) {
  animation: confetti-reverse 0.5s ease;
}

.addbutton.ready:not(.added) .listButton-icon {
  animation: icon-spin-out 0.5s ease;
}

@keyframes confetti-reverse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.95) rotate(-3deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes icon-spin-out {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }

  50% {
    transform: scale(0.85) rotate(-10deg);
    opacity: 0.7;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.back-button {
  margin: 1rem;
  gap: 0.5rem;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--textcolor);
}

.product-info>* {
  margin: 0;
}

.saves-icon {
  width: 75%;
}

.product-gallery {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}


.gallery-main {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  padding: 0 1rem;
}

.main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.gallery-main .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--background-color);
  border-radius: 50%;
  font-size: var(--h1-size);
  cursor: pointer;
}

.gallery-main .prev {
  left: 20px;
}

.gallery-main .next {
  right: 20px;
}


.gallery-thumbs {
  display: flex;
  gap: 10px;
  padding-left: 1rem;
}

.gallery-thumbs .thumb {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
}

.gallery-thumbs .thumb:hover {
  border-color: var(--accentcolor);
}

.shop-online,
.shop-in-person {
  background: var(--background-color-secondary);
  padding: 1.5rem;
  border-radius: 1rem;
  max-width: 22rem;
  margin: 0 auto;
  font-family: var(--font-family);
}

.shop-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--background-color);
  border-radius: 0.8rem;
  margin-bottom: 1rem;
}

.shop-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.shop-header p {
  margin: 0;
  color: var(--secondary-text-color);
  font-size: var(--p-size);
}

.shop-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.shop-list li a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  background: var(--background-color);
  padding: 1rem;
  border-radius: 0.8rem;
  text-decoration: none;
  color: var(--secondary-text--color);
  font-weight: 600;
  border: 1px solid #eee;
}

.shop-list li a:hover {
  background: #f2f2f2;
}

.shop-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.shop-name {
  font-weight: 600;
}

.shop-distance {
  font-size: 0.85rem;
  font-weight: 400;
  text-decoration: underline;
}

.shop-external {
  opacity: 0.6;
  font-size: 1rem;
}

.product-description {
  padding-left: 1em;
}

.product-details {
  background: var(--background-color-secondary);
  font-family: var(--font-family);
  max-width: 40ch;
  padding-left: 1em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.detail-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}


.detail-icon {
  width: 3rem;
  height: 3rem;
  align-self: start;
}

.detail-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.detail-content p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--textcolor);
}

/* ================= Reviews================= */

.reviews-section {
  background: var(--background-color);
  border-radius: 24px;
  padding: 1rem 2rem 3rem;
  max-width: auto;
  margin-bottom: 1em;

  @media(max-width:768px) {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
}

.review-item {
  margin-bottom: 2.5rem;
}

.review-item:last-child {
  margin-bottom: 0;
}

.review-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
}

.review-scale {
  position: relative;
}

.review-scale>span {
  font-size: 1rem;
  color: var(--textcolor);
  position: absolute;
  top: 2.5rem;
}

.review-scale>span:last-of-type {
  right: 0;
}

input[type="range"] {
  width: 100%;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--background-color);
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 40px;
  height: 40px;
  cursor: pointer;

}

input[type="range"]::-moz-range-thumb {
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.review-item:nth-child(1) input::-webkit-slider-thumb {
  background: url('assets/range1.svg') center/contain no-repeat;
  transform: translateY(-10px);
}

.review-item:nth-child(1) input::-moz-range-thumb {
  background: url('assets/range1.svg') center/contain no-repeat;
  transform: translateY(-10px);
}

.review-item:nth-child(2) input::-webkit-slider-thumb {
  background: url('assets/range2.svg') center/contain no-repeat;
  transform: translateY(-10px);
}

.review-item:nth-child(2) input::-moz-range-thumb {
  background: url('assets/range2.svg') center/contain no-repeat;
  transform: translateY(-10px);
}

.review-item:nth-child(3) input::-webkit-slider-thumb {
  background: url('assets/range3.svg') center/contain no-repeat;
  transform: translateY(-10px);
}

.review-item:nth-child(3) input::-moz-range-thumb {
  background: url('assets/range3.svg') center/contain no-repeat;
  transform: translateY(-10px);
}



/* ================================== */


.map-section {
  display: flex;
  flex-direction: column;
  height: 100%;
}


.map-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  font-family: var(--font-family);
}

.map-figure {
  flex: 1;
  display: flex;
}

.map-figure img,
.map-figure iframe {
  border-radius: 15px;
  width: 100%;
  border: none;
}

.recommendations {
  max-width: 1200px;
  margin: 0 auto;
}

.recommendations h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  font-family: var(--font-family);
}

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);

  @media (min-width: 728px) {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  @media (min-width: 1024px) {
    grid-template-columns: repeat(4, 1fr);
    gap: 4rem;
  }
}


.article-product {
  position: relative;
  background-color: var(--secondary-background-color);
  width: 100%;
  max-width: 200px;
  height: 355px;
  font-family: var(--font-family);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);

  &:hover {
    transform: translateY(-3px);
  }

  .gift-listing {
    text-decoration: none;
    color: var(--textcolor);
    height: 100%;
  }

  .article-product-img {
    position: relative;

    img {
      width: 100%;
      aspect-ratio: 1/0.9;
      object-fit: cover;
      display: block;
    }

    .article-tags {
      position: absolute;
      bottom: 0;
      left: 10px;
      display: flex;
      gap: 8px;

      img {
        width: 60px;
        height: 50px;
        object-fit: contain;
      }
    }
  }

  .add-list {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    cursor: pointer;
    width: 40px;
    border: none;
    z-index: 10;
    padding: 0;

    &:hover {
      transform: scale(1.15);
    }

    img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
  }

  .product-info {
    p:hover {
      text-decoration: underline;
    }

    .product-title {
      padding-left: 5px;
    }
  }

  .listing-footer {
    display: flex;

    img {
      height: 2rem;
    }

    span {
      font-size: 16px;
    }
  }
}

/* --------------------------- */
/* FOOTER detail pagina        */
/* --------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer-detail {
  background-image: url('assets/3.png');
  background-color: var(--footercolor);
}

.newsletter-form {
  background-color: #466EBF;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  font-size: 18px;
}

@media (min-width: 600px) {
  .newsletter-form {
    flex-direction: row;
  }
}

.newsletter-form h2 {
  padding-left: 0.5em;
  margin: 0;
  display: none;
}

@media (min-width: 1000px) {
  .newsletter-form h2 {
    display: block;
    padding-left: 0.5em;
    margin: 0;
  }
}

.newsletter-form p {
  margin: 0;
}

.newsletter-form>div:first-child {
  display: flex;
  flex-direction: column;
  align-items: start;
  color: #F6F5F5;
}

.newsletter-form>div {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.newsletter-form input {
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 2em;
  font-size: 1rem;
  flex: 1;
}

.newsletter-form button {
  position: absolute;
  right: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
}

.newsletter-form button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.footer-logo-wrapper {
  display: none;
}

@media (min-width: 1000px) {
  .footer-logo-wrapper {
    display: block;
  }
}

.footer-detail ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-detail a {
  color: black;
  text-decoration: none;
}

.footer-links {
  padding-left: 1em;
  padding-right: 1em;
  display: grid;
  justify-content: space-evenly;
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 700px) {
  .footer-links {
    display: flex;
    flex-direction: row;
  }
}

.legal ul {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  margin-bottom: 0%;
  padding-left: 1em;
}

@media (min-width: 600px) {
  .legal ul {
    flex-direction: row;
  }
}

.legal p {
  padding: 0.5rem;
  margin: 0;
}