@import url("./root.css");

/* ========================
  Product Top Section
========================= */
.product-top {
  width: 100%;
  background-color: white;
  padding-bottom: 0;
}

.product-top__content {
  padding: 60px 0 100px;
  position: relative;
  z-index: 1;
}

.product-top__content::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65%;
  background-image: linear-gradient(white 1px, transparent 1px),
    linear-gradient(to right, white 1px, transparent 1px);
  background-size: 20px 20px;
  background-color: var(--color-light-yellow);
  background-position: -14px 14px;
  pointer-events: none;
  z-index: 0;
}

.product-top__image {
  margin-bottom: 60px;
}

.product-image-wrapper {
  text-align: center;
  border: 2px solid var(--color-dark-gray);
  line-height: 0;
  z-index: 1;
  position: relative;
  height: 28vw;
  max-height: 320px;
  overflow: hidden;
}

.product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
}

.description-content {
  text-align: center;
  margin: 0 auto;
  z-index: 1;
  position: relative;
}

.description-content h3 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ========================
  Cannula Section
========================= */
.cannula {
  padding: 80px 0;
  background-color: var(--color-bg-gray);
}

.cannula__content {
  margin-top: 60px;
}

.cannula-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
  margin-bottom: 40px;
}

.cannula-category {
  border: 2px solid var(--color-yellow);
  background-color: white;
  padding: 0 15px 50px;
}

.category-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.category-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-dark-gray);
  margin: 0;
  width: 100%;
}

.category-image {
  width: 100%;
  height: auto;
  overflow: hidden;
  margin-bottom: 20px;
}

.category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-description {
  color: var(--color-gray);
  margin: 0;
  text-align: left;
}

.cannula-additional {
  text-align: center;
  padding: 10px 0;
}

.cannula-additional p {
  line-height: 2.2;
  font-weight: 700;
  margin: 0;
}

/* ========================
  Processing Section
========================= */
.processing {
  padding: 80px 0;
}

.processing__content {
  margin-top: 60px;
}

.processing-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
  margin-bottom: 40px;
}

.processing-category {
  border: 2px solid var(--color-yellow);
  background-color: white;
  padding: 0 15px 50px;
}

.processing-category .category-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.processing-category .category-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-dark-gray);
  margin: 0;
  width: 100%;
}

.processing-category .category-image {
  width: 100%;
  height: auto;
  overflow: hidden;
  margin-bottom: 20px;
}

.processing-category .category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.processing-category .category-description {
  color: var(--color-gray);
  margin: 0;
  text-align: left;
  line-height: 2.2;
}

/* ========================
  Product Footer Section
========================= */
.product-footer {
  padding: 0;
}

.product-footer .container {
  padding: 50px 0 40px 0;
  border-top: 2px solid var(--color-yellow);
}

.product-footer__content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  align-items: center;
  gap: 60px;
}

.product-footer__left {
  flex: 1 1 45%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-footer__image img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--color-border-light-gray);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.product-footer__right {
  flex: 1 1 55%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-footer__title {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-dark-gray);
  margin-bottom: 1.5rem;
  letter-spacing: 0.08em;
}

.product-footer__contact-button .view-more-button {
  margin: 2rem 0 0;
}

.product-footer__certification {
  margin: 6em 0 2.5em 0;
  font-weight: 700;
  text-align: center;
}

.product-footer__download-button {
  text-align: center;
}

/* ========================
  Lightbox Styles
========================= */
.lightbox-trigger {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lightbox-trigger:hover {
  transform: scale(1.02) translateY(2px);
}

.lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

.lightbox-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10000;
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: -10px;
  background: none;
  border: none;
  color: white;
  font-size: 40px;
  cursor: pointer;
  z-index: 10001;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: #ff6b6b;
}

#lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  margin-top: 20px;
  text-align: center;
  color: white;
}

#lightbox-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  /* Product Top Responsive */
  .product-top__image {
    margin-bottom: 40px;
  }

  .product-image-wrapper {
    overflow: hidden;
    height: 36vw;
  }

  .product-image-wrapper img {
    width: 130%;
    margin-left: -15%;
  }

  .product-top__content::after {
    height: 77%;
  }

  .description-content h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 2.5;
  }

  .description-content p {
    text-align: left;
    white-space: nowrap;
  }

  /* Cannula Responsive */
  .cannula {
    padding: 40px 0;
  }

  .cannula__content {
    margin-top: 40px;
  }

  .cannula-categories {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cannula-category {
    padding: 0 10px 30px 15px;
  }

  .category-title {
    font-size: 1.2rem;
  }

  /* Processing Responsive */
  .processing {
    padding: 40px 0;
  }

  .processing__content {
    margin-top: 40px;
  }

  .processing-categories {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .processing-category {
    padding: 0 15px 30px;
  }

  .processing-category .category-title {
    font-size: 1.2rem;
  }

  /* Product Footer Responsive */
  .product-footer__content {
    flex-direction: column;
    gap: 30px;
    margin-bottom: 100px;
  }
  .product-footer__left,
  .product-footer__right {
    width: 100%;
    flex: none;
  }

  .product-footer {
    padding: 0 10px;
  }

  .product-footer .container {
    padding: 40px 5px 0;
  }

  .product-footer__title {
    font-size: 1.2rem;
  }

  .product-footer__description {
    font-size: 0.9rem;
  }

  .product-footer__download-button {
    margin-bottom: 100px;
  }
}

@media screen and (max-width: 380px) {
  .description-content p {
    letter-spacing: 0.1em;
  }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .lightbox-content {
    max-width: 95%;
    max-height: 95%;
  }
  
  .lightbox-close {
    top: -40px;
    right: 0;
    font-size: 30px;
  }
  
  #lightbox-image {
    max-height: 70vh;
  }
  
  #lightbox-title {
    font-size: 20px;
  }
}