/* =========================================================
   PRODUCT DETAIL PAGE
   ========================================================= */

.product-detail-page {
  background: #f7f9fc;
  padding: 45px 0 55px;
}

/* =========================================================
   MAIN PRODUCT CONTAINER
   ========================================================= */

.product-detail-page > .container {
  max-width: 1220px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 35px 45px;

  box-shadow:
    0 4px 15px rgba(15, 23, 42, 0.06),
    0 12px 35px rgba(15, 23, 42, 0.04);
}

/* =========================================================
   INTRODUCTORY TEXT
   ========================================================= */

.product-detail-page .nighochem-text {
  color: #1f2937;
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 18px;
}

/* =========================================================
   PRODUCT GRADIENT HEADING
   ========================================================= */

.product-detail-page .gradient-heading-inner {
  margin: 0 0 28px;
  padding: 8px 15px;

  border-radius: 10px;

  font-size: 21px;
  line-height: 1.4;
  font-weight: 700;
  text-align: center;

  box-shadow: 0 6px 12px rgba(6, 182, 212, 0.18);
}

/* =========================================================
   PRODUCT IMAGE + DETAILS
   ========================================================= */

.product-detail-page .col-lg-6 {
  position: relative;
}

/* =========================================================
   PRODUCT IMAGE AREA
   ========================================================= */

.product-detail-page .col-lg-6:first-of-type {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 270px;
  padding: 25px;

  background: #fbfdff;

  border: 1px solid #e5eaf0;
  border-radius: 12px;
}

/* Product image */

.product-detail-page .col-lg-6:first-of-type img {
  max-height: 230px;
  object-fit: contain;
}

/* =========================================================
   PRODUCT DETAILS CARD
   ========================================================= */

.product-detail-page .mtDetailTable {
  margin-top: 0 !important;
  padding: 20px 25px;

  background: #ffffff;

  border: 1px solid #e5eaf0;
  border-radius: 12px;

  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.03);
}

/* Details table */

.product-detail-page .mtDetailTable table {
  margin: 0 !important;
}

/* Detail rows */

.product-detail-page .mtDetailTable tr {
  border-bottom: 1px solid #eef1f5;
}

.product-detail-page .mtDetailTable tr:last-child {
  border-bottom: none;
}

/* Detail labels */

.product-detail-page .mtDetailTable th {
  width: 42%;
  padding: 6px 10px 6px 0;

  color: #111827;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;

  white-space: nowrap;
}

/* Detail values */

.product-detail-page .mtDetailTable td {
  padding: 6px 0;

  color: #334155;
  font-size: 15px;
  line-height: 1.5;
}

/* =========================================================
   PRODUCT DESCRIPTION
   ========================================================= */

.product-detail-page .col-12:last-child {
  margin-top: 38px;
  padding: 25px 30px;

  background: #fbfdff;

  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

/* Description heading */

.product-detail-page h3 {
  position: relative;

  margin-bottom: 20px;
  padding-left: 14px;

  color: #111827;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.4;
}

/* Description heading accent */

.product-detail-page h3::before {
  content: "";

  position: absolute;
  left: 0;
  top: 3px;

  width: 4px;
  height: 22px;

  border-radius: 4px;

  background: linear-gradient(180deg, #22c55e, #06b6d4, #1d4ed8);
}

/* Description table */

.product-detail-page .col-12:last-child table {
  margin-bottom: 0;
}

/* Description rows */

.product-detail-page .col-12:last-child tr {
  border-bottom: 1px solid #edf1f5;
}

.product-detail-page .col-12:last-child tr:last-child {
  border-bottom: none;
}

/* Description cells */

.product-detail-page .col-12:last-child td {
  padding: 9px 6px;

  color: #374151;
  font-size: 15px;
  line-height: 1.7;
}

/* Description labels */

.product-detail-page .col-12:last-child td b {
  font-weight: 700;
}

/* =========================================================
   STOCK STATUS
   ========================================================= */

.product-detail-page .text-success {
  color: #008f4c !important;
}

.product-detail-page .col-12:last-child .text-success {
  font-size: 15px;
}

/* =========================================================
   PRODUCT DETAIL RESPONSIVE
   ========================================================= */

@media (max-width: 991px) {
  .product-detail-page {
    padding: 25px 0 40px;
  }

  .product-detail-page > .container {
    margin: 0 15px;
    padding: 25px 20px;
  }

  .product-detail-page .col-lg-6:first-of-type {
    min-height: 220px;
    margin-bottom: 20px;
  }

  .product-detail-page .mtDetailTable {
    padding: 18px;
  }

  .product-detail-page .col-12:last-child {
    margin-top: 30px;
    padding: 20px;
  }
}

@media (max-width: 576px) {
  .product-detail-page > .container {
    margin: 0 10px;
    padding: 20px 15px;
    border-radius: 10px;
  }

  .product-detail-page .nighochem-text {
    font-size: 15px;
  }

  .product-detail-page .gradient-heading-inner {
    font-size: 18px;
  }

  .product-detail-page .mtDetailTable {
    padding: 15px;
  }

  .product-detail-page .mtDetailTable th,
  .product-detail-page .mtDetailTable td {
    font-size: 14px;
  }

  .product-detail-page .mtDetailTable th {
    width: 45%;
    white-space: normal;
  }

  .product-detail-page .col-12:last-child {
    padding: 18px;
  }

  .product-detail-page .col-12:last-child td {
    font-size: 14px;
  }
}

/* =========================================================
   NITROSAMINE CARDS
   ========================================================= */

.nitro-card {
  border: 1px solid #e1e5e8 !important;
  border-radius: 0 !important;
  overflow: hidden;

  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.nitro-card:hover {
  transform: translateY(-4px);

  border-color: #d5dce0 !important;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12) !important;
}

/* =========================================================
   READ MORE
   ========================================================= */

.nitro-read-more {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;

  color: inherit !important;
  text-decoration: none !important;
  line-height: 1;
  font-weight: 500;
}

.nitro-read-more:hover {
  text-decoration: none !important;
}

/* =========================================================
   READ MORE ICON
   ========================================================= */

.nitro-read-more .nitro-btn-icon {
  position: relative;

  width: 20px;
  height: 20px;
  min-width: 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  margin: 0;

  border: 0 !important;
  border-radius: 50% !important;

  background: linear-gradient(135deg, #22c55e, #06b6d4) !important;

  box-sizing: border-box;

  font-size: 0;
  color: #fff;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

/* Arrow */

.nitro-read-more .nitro-btn-icon::before {
  content: "→";

  display: block;

  color: #fff;

  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

/* Prevent duplicate arrow */

.nitro-read-more .nitro-btn-icon::after {
  content: none !important;
}

/* Read More hover */

.nitro-read-more:hover .nitro-btn-icon {
  transform: translateX(2px);

  box-shadow: 0 4px 10px rgba(6, 182, 212, 0.3);
}

/* =========================================================
   SQUARE CARD CORNERS
   ========================================================= */

.nitro-card,
.nitro-card .course_card,
.nitro-card .api-impurity-card {
  border-radius: 0 !important;
}

/* =========================================================
   TABLE HEADER — CHEMICAL CANVAS ANIMATION
   ========================================================= */

/* Header cell acts as canvas container */

.animated-th {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Chemical animation canvas */

.animated-th .th-chem-canvas {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  pointer-events: none;
  z-index: 0;
}

/* Header text above animation */

.animated-th span {
  position: relative;
  z-index: 2;
}

/* =========================================================
   API TABLE WRAPPER
   ========================================================= */

/*
 * Provides positioning context for:
 * - Nighochem watermarks
 * - API table
 * - Overflow clipping
 */

.api-table-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

/* =========================================================
   NIGHOCHEM WATERMARKS
   ========================================================= */

/*
 * Common styling for all three watermark logos.
 *
 * HTML expected:
 *
 * <img class="table-watermark watermark-1">
 * <img class="table-watermark watermark-2">
 * <img class="table-watermark watermark-3">
 */

.table-watermark {
  position: absolute;

  width: 420px;
  height: 420px;

  object-fit: contain;

  opacity: 0.25;

  pointer-events: none;

  z-index: 1;
}

/* Top watermark */

.watermark-1 {
  left: 50%;
  top: 18%;

  transform: translate(-50%, -50%);
}

/* Middle watermark */

.watermark-2 {
  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);
}

/* Bottom watermark */

.watermark-3 {
  left: 50%;
  top: 82%;

  transform: translate(-50%, -50%);
}

/* =========================================================
   API TABLE
   ========================================================= */

/* Table stays above watermark */

.api-table {
  position: relative;
  z-index: 2;

  width: 100%;
}

/* Semi-transparent cells reveal watermark */

.api-table tbody td {
  background: rgba(255, 255, 255, 0.9);
}

/* Table content above watermark */

.api-table th,
.api-table td {
  position: relative;
  z-index: 3;
}

/* =========================================================
   NIGHOCHEM HERO
   ========================================================= */

.nighochem-hero-title {
  font-weight: 700;
  line-height: 1.15;
}

/* =========================================================
   HERO — STATIC FIRST LINE
   ========================================================= */

.nighochem-hero-static {
  display: inline-block;
  color: #1e5bb8;
}

/* =========================================================
   HERO — SECOND LINE ROTATOR
   ========================================================= */

.nighochem-hero-second-rotator {
  display: inline-block;
  position: relative;

  min-width: 500px;
  height: 1.15em;

  perspective: 600px;
  vertical-align: bottom;
}

/* Rotating words */

.nighochem-hero-second-rotator > span {
  position: absolute;

  left: 0;
  top: 0;

  white-space: nowrap;

  opacity: 0;

  background: linear-gradient(90deg, #5be300, #27c7d9, #00aeef, #5be300);

  background-size: 300% 100%;

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  transform: rotateX(-90deg);
  transform-origin: 50% 100%;

  transition:
    opacity 0.3s ease,
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Active word */

.nighochem-hero-second-rotator > span.nighochem-second-active {
  opacity: 1;
  transform: rotateX(0deg);
}

/* Exiting word */

.nighochem-hero-second-rotator > span.nighochem-second-exit {
  opacity: 0;
  transform: rotateX(90deg);
}

/* =========================================================
   HERO RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
  .nighochem-hero-second-rotator {
    min-width: 350px;
  }
}

@media (max-width: 480px) {
  .nighochem-hero-second-rotator {
    min-width: 280px;
  }
}
