@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

:root {
  --header-height: 3.5rem;
  --first-color: hsl(220, 68%, 54%);
  --first-color-alt: hsl(220, 68%, 50%);
  --first-color-lighten: hsl(220, 68%, 97%);
  --title-color: hsl(220, 48%, 28%);
  --text-color: hsl(220, 12%, 45%);
  --body-color: hsl(220, 100%, 99%);
  --card-bg-color: #f7f8fa;
  --white-color: #fff;
  --body-font: "Poppins", sans-serif;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;
  --font-medium: 500;
  --font-semi-bold: 600;
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;
}
html{
  scroll-behavior: smooth;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--body-font);
  background-color: #ffffff;
  color: var(--text-color);
  font-size: var(--normal-font-size);
}


.page-hero {
  background-image: url("https://www.imf.org/-/media/Images/IMF/About/Factsheets/2022/sdgs-header-01.ashx?h=1379&w=5534&la=en");
  background-repeat: no-repeat;
  height: auto;
  aspect-ratio: 20 / 5;
  width: 100%;
  background-position: center;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 2rem;
}

.page-hero h1 {
  color: #ffffff;
  font-size: 2rem;
  text-align: center;
  padding: 15px 20px;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  font-weight: var(--font-semi-bold);
  margin: 0;
  line-height: 1.2;
}

.intro-section {
  text-align: left;
  padding: 1rem 2rem 2rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.intro-section h2 {
  color: var(--title-color);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  font-weight: normal;
}

.intro-section p {
  color: var(--text-color);
  line-height: 1.6;
  font-size: 0.9rem;
  max-width: 600px;
}

.products-section {
  padding: 1rem 1rem 2rem 1rem;
  background-color: #ffffff;
}

.products-container-page {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  justify-items: center;
}

@media screen and (min-width: 768px) {
  .products-container-page {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-section {
    padding: 1rem 1rem 2rem 1rem;
  }
}

.product-card {
  background-color: var(--card-bg-color);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  transition: none;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: none;
  box-shadow: none;
}

.product-image-container {
  position: relative;
  background-color: var(--card-bg-color);
  padding: 10px;
}

.product-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: fill;
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: white;
  color: black;
  padding: 4px 8px;
  font-size: 0.65rem;
  font-weight: var(--font-medium);
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid #eee;
}

.product-details {
  padding: 0.8rem 1rem 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background-color: var(--card-bg-color);
}

.product-name {
  font-size: 0.95rem;
  font-weight: var(--font-medium);
  color: #333;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}


.button.product-button {
  display: inline-block;
  font-size: var(--small-font-size);
  padding: 8px 15px;
  color: var(--first-color);
  background-color: transparent;
  border: 1px solid var(--first-color);
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease-out;
  text-align: center;
  margin-bottom: 1rem;
  align-self: flex-start;
}

.button.product-button:hover {
  background: var(--first-color);
  color: var(--white-color);
}

.overlay {
  position: fixed;
  z-index: var(--z-modal);
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.75);
  transition: opacity 300ms ease-in-out;
  visibility: hidden;
  opacity: 0;
  overflow-y: auto;
  padding: 30px 15px;
  /* Adjust padding */
  pointer-events: none;
}

.overlay:target {
  visibility: visible;
  opacity: 1;
  pointer-events: all;
}

.popup {
  margin: 0 auto;
  background: transparent;
  border-radius: 8px;
  width: 100%;
  max-width: 1150px;
  position: relative;
  transition: all 0.3s ease-in-out;
  box-shadow: none;
  padding: 0;
}

.popup .close {
  position: absolute;
  top: 10px;
  right: 30px;
  transition: all 200ms;
  font-size: 25px;
  line-height: 1;
  font-weight: normal;
  text-decoration: none;
  color: #ccc;
  z-index: 10;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup .close:hover {
  color: var(--white-color);
  background: rgba(0, 0, 0, 0.5);
}

/* New Popup Content Styles */
.product-container-popup {
  display: flex;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  background-color: #fff;
  padding: 30px 40px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  align-items: flex-start;
}

.product-description {
  flex: 1;
  min-width: 300px;
}

.product-description h2 {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #111;
}

.product-description h3 {
  font-size: 1.05em;
  font-weight: 600;
  margin-top: 18px;
  margin-bottom: 8px;
  color: #222;
}

.product-description p {
  font-size: 0.9em;
  line-height: 1.6;
  margin-bottom: 15px;
  color: #555;
}

.spec-list {
  list-style: none;
  padding: 0;
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
}

.spec-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85em;
  color: #444;
}

.spec-list li i {
  /* Icon color */
  color: var(--first-color);
  /* Use theme color for check */
}

.product-slider-area {
  flex-basis: 450px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  /* Keep sticky */
  top: 20px;
}

.slider-container {
  position: relative;
  width: 100%;
  max-width: 450px;
  background: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 15px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.products-popup-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
}

.products-popup-slider.active {
  opacity: 1;
  position: relative;
  z-index: 1;
  visibility: visible;
}

.image-box {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
}

.image-box img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  /* object-fit: cover; */
  position: relative;
}

.thumbnails {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  width: 100%;
  padding: 0 10px;
}

.thumb {
  width: 75px;
  height: 75px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease, border 0.3s ease;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  background-color: #eee;
}

.thumb.active {
  opacity: 1;
  border: 2px solid var(--first-color);
  /* Use theme color */
}

.thumb img {
  width: 100%;
  height: 100%;
  /* object-fit: cover; */
  display: block;
}

/* Responsive adjustments from example */
@media (max-width: 900px) {
  .product-container-popup {
    flex-direction: column;
    padding: 20px;
    gap: 30px;
  }

  .product-description {
    min-width: unset;
    width: 100%;
  }

  .product-slider-area {
    flex-basis: auto;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    position: relative;
    top: auto;
  }

  .slider-container {
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 600px) {
  .overlay {
    padding: 20px 10px;
  }

  .popup .close {
    top: 5px;
    right: 5px;
    font-size: 30px;
    width: 30px;
    height: 30px;
  }

  .product-container-popup {
    padding: 15px;
    gap: 20px;
  }

  .product-description h2 {
    font-size: 1.2em;
  }

  .product-description h3 {
    font-size: 1.0em;
  }

  .product-description p,
  .spec-list li {
    font-size: 0.85em;
  }

  .spec-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .product-slider-area {
    max-width: 100%;
  }

  .slider-container {
    aspect-ratio: 1 / 1;
  }

  .image-box {
    padding: 10px;
  }

  .image-box img {
    border-radius: 8px;
  }

  .thumbnails {
    gap: 8px;
  }

  .thumb {
    width: 65px;
    height: 65px;
  }
}

/* Keep general theme responsive adjustments */
@media screen and (max-width: 767px) {
  .page-hero h1 {
    font-size: 1.6rem;
  }

  .intro-section h2 {
    font-size: 1.3rem;
  }

  .intro-section p {
    font-size: 0.85rem;
  }

  .product-name {
    font-size: 0.9rem;
  }

  .button.product-button {
    font-size: var(--smaller-font-size);
    padding: 6px 12px;
  }
}

@media screen and (max-width: 480px) {


  .spec-list li {
    font-size: 0.8em;
  }

  .thumb {
    width: 55px;
    height: 55px;
  }
}