/* ==========================================================================
   CBD Custom Product Detail – Frontend CSS
   ========================================================================== */

/* --- Base --- */

.cd-sec {
  margin: 32px 0;
}

/* --- Intro + Aroma --- */

.cd-sec-intro h2 {
  max-width: 50%;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  font-weight: 600;
  font-size: 30px;
}

.cd-sec-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: flex-start;
}

.cd-sec-intro-grid.cd-has-aroma {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr);
}

.cd-sec-intro-grid.cd-no-aroma {
  grid-template-columns: minmax(0, 1fr);
}

.cd-intro-left {
  font-size: 16px;
  line-height: 1.7;
  color: #394941;
  max-width: 650px;
}

.cd-intro-left ul {
  list-style: none;
  padding: 0;
  margin: 18px 0;
}

.cd-intro-left li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 16px;
  color: #21352c;
  font-size: 16px;
  line-height: 1.6;
}

.cd-intro-left li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #ffc107;
  background-image: url("https://cbddiscounter.de/wp-content/uploads/2025/11/check-icon.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}

/* Aroma */

.aroma-header {
  font-weight: 600;
  font-size: 20px;
  padding-bottom: 20px;
  text-decoration: underline;
}

.cd-intro-aroma {
  text-align: center;
}

.cd-aroma-circles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.cd-aroma-circle {
  background: #f7f7f7;
  border-radius: 14px;
  border: solid #f5f5f5 1px;
  padding: 20px 15px;
}

.cd-aroma-circle img {
  width: 100%;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 45px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.cd-aroma-circle span {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #21352c;
}

/* --- Ueberblick --- */

.cd-sec-overview {
  background: #eef3ef;
  border-radius: 16px;
  padding: 20px 24px;
  margin-top: 80px;
  margin-bottom: 80px;
}

.cd-sec-overview h2 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0 0 16px;
  padding-top: 15px !important;
}

.cd-overview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  color: #555;
}

.cd-overview-table th {
  text-align: left;
  padding: 8px 12px;
  font-weight: 600;
  color: #333;
}

.cd-overview-table td {
  padding: 8px 12px;
  vertical-align: top;
}

.cd-overview-table tr:last-child td {
  border-bottom: none;
}

.cd-overview-table td:first-child {
  color: #333;
}

.cd-overview-table .cd-star {
  color: #ffd700;
  font-size: 18px;
  margin-right: 4px;
}

.cd-overview-table .cd-check {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: #4caf50;
  border-radius: 50%;
  text-align: center;
  line-height: 20px;
  color: #fff;
  font-weight: bold;
  margin-right: 8px;
  vertical-align: middle;
}

.cd-overview-table .cd-info {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: #2196f3;
  border-radius: 50%;
  text-align: center;
  line-height: 20px;
  color: #fff;
  font-weight: bold;
  margin-right: 8px;
  vertical-align: middle;
}

.cd-overview-table .cd-leaf {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: #4caf50;
  border-radius: 50%;
  text-align: center;
  line-height: 20px;
  color: #fff;
  font-weight: bold;
  margin-right: 8px;
  vertical-align: middle;
}

/* --- Bild + Text + Fun Fact --- */

.cd-special-text h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 16px;
}

.cd-special-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 3.5fr);
  align-items: start;
}

.cd-special-image {
  max-width: 350px;
  margin: 0;
}

.cd-special-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.cd-special-text {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
}

.cd-special-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  counter-reset: special-counter;
}

.cd-special-list li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 12px;
  font-size: 15px;
  color: #555;
  line-height: 1.5;
}

.cd-special-list li::before {
  counter-increment: special-counter;
  content: counter(special-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  background: #ffc107;
  color: #333;
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.cd-special-funfact {
  margin-top: 24px;
  background: #fff4d7;
  border-radius: 12px;
  padding: 16px 20px 5px 16px;
  font-size: 15px;
  color: #555;
}

/* --- Anwendungstipps --- */

.cd-sec-usage h2 {
  font-size: 25px;
  font-weight: 600;
  color: #333;
  margin: 0 0 20px;
}

.cd-usage-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr);
  gap: 40px;
}

.cd-usage-left {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
}

.cd-usage-tips {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.cd-usage-tips li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 12px;
  font-size: 15px;
  color: #555;
  line-height: 1.5;
}

.cd-usage-tips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background-color: #ffc107;
  background-image: url("https://cbddiscounter.de/wp-content/uploads/2025/11/check-icon.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 15px 15px;
}

.cd-usage-right {
  overflow-x: auto;
}

.cd-usage-table {
  width: 100%;
  border-collapse: collapse;
  background: #f9f9f9;
  font-size: 15px;
  border-radius: 12px;
}

.cd-usage-table th {
  background: #eef3ef;
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #ddd;
}

.cd-usage-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #ddd;
  color: #555;
}

.cd-usage-table tr:last-child td {
  border-bottom: none;
}

.cd-usage-table th:first-child,
.cd-usage-table td:first-child {
  font-weight: 600;
  color: #333;
}

/* Vergleich */

.cd-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.cd-compare-card {
  border-radius: 5px;
  border: 1px solid #dfe5df;
  background: #fff;
  overflow: hidden;
}

.cd-highlight {
  background: #f5f9f3;
  border-color: #b8c7b4;
}

.cd-compare-head {
  background: #eef3ef;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  border-bottom: 1px solid #d0d6d0;
  color: #333;
}

.cd-compare-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-rows: repeat(7, auto);
}

.cd-compare-card li {
  padding: 3px 17px;
  font-size: 14px;
  display: flex;
  align-items: center;
  min-height: 60px;
  border-bottom: none;
}

.cd-compare-col:first-child li,
.cd-compare-col:first-child .cd-compare-head {
  font-weight: 700;
}

/* --- Kauftipps --- */

.cd-sec-buy h2 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0 0 16px;
}

.cd-buy-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2.2fr);
  gap: 32px;
}

.cd-buy-left {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
}

.cd-buy-right {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.cd-buy-tile {
  background: #f0f7f4;
  border-radius: 12px;
  padding: 16px;
}

.cd-buy-tile h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 12px;
}

.cd-buy-tile ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cd-buy-tile li {
  position: relative;
  font-size: 15px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 8px;
  padding-left: 20px;
}

.cd-buy-tile li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  background: #ffd700;
  border-radius: 50%;
}

/* --- FAQ --- */

.cd-sec-faq {
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  margin-top: 80px;
}

.cd-sec-faq h2 {
  padding-top: 15px !important;
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0 0 12px;
}

.cd-sec-faq details {
  margin-bottom: 12px;
}

.cd-sec-faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  list-style: none;
}

.cd-sec-faq summary::-webkit-details-marker {
  display: none;
}

.cd-sec-faq summary::after {
  content: "";
  background-image: url('data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23333" width="18px" height="18px"%3E%3Cpath d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/%3E%3C/svg%3E');
  background-size: contain;
  background-repeat: no-repeat;
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.cd-sec-faq details[open] summary::after {
  transform: rotate(90deg);
}

.cd-sec-faq details > :not(summary) {
  padding: 4px 0 12px;
  color: #555;
  font-size: 15px;
}

/* --- Trustpilot --- */

.cd-sec-trustpilot,
.cd-trustpilot-wrapper,
.cd-trustpilot-wrapper .trustpilot-widget {
  max-width: 100%;
  box-sizing: border-box;
}

.cd-trustpilot-wrapper iframe {
  width: 100% !important;
  max-width: 100% !important;
  display: block;
}

/* --- Extra-Sektionen --- */

.cd-sec-extra {
  margin: 32px 0;
}

.cd-sec-extra ul {
  list-style: none;
  padding: 0;
  margin: 18px 0;
}

.cd-sec-extra li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 12px;
  font-size: 15px;
  color: #555;
  line-height: 1.5;
}

.cd-sec-extra li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #ffc107;
  background-image: url("https://cbddiscounter.de/wp-content/uploads/2025/11/check-icon.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  /* Intro */
  .cd-sec-intro h2 {
    font-size: 24px !important;
    line-height: 1.3 !important;
    max-width: 100% !important;
    padding-right: 12px;
    padding-left: 12px;
    word-break: break-word !important;
    hyphens: auto;
    white-space: normal;
  }

  .cd-sec-intro-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 12px;
  }

  .cd-aroma-circles {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .cd-aroma-circle img {
    width: 90px;
    height: 90px;
  }

  /* Grids einspaltig */
  .cd-sec-intro-grid.cd-has-aroma,
  .cd-special-grid,
  .cd-usage-grid,
  .cd-buy-grid {
    grid-template-columns: 1fr;
  }

  /* Ueberblick */
  .cd-sec-overview {
    padding: 10px 15px !important;
    margin: 0px 12px;
  }

  .cd-overview-table {
    display: flex;
    flex-direction: column;
  }

  .cd-overview-table tbody,
  .cd-overview-table tr {
    display: contents;
  }

  .cd-overview-table th,
  .cd-overview-table td {
    display: block;
    width: 100%;
    padding: 6px 8px;
    border: none;
    text-align: left;
    margin-top: 0px !important;
    order: 0;
  }

  .cd-overview-table tr:first-child th:nth-of-type(2),
  .cd-overview-table tr:first-child th:nth-of-type(4) {
    display: none;
  }

  .cd-overview-table tr:first-child th:nth-of-type(1),
  .cd-overview-table tr:first-child th:nth-of-type(3) {
    font-size: 18px;
    margin: 20px 0 8px 0;
  }

  .cd-overview-table tr:first-child th:nth-of-type(1) { order: 1; }
  .cd-overview-table tr:nth-of-type(2) td:nth-of-type(1) { order: 2; }
  .cd-overview-table tr:nth-of-type(3) td:nth-of-type(1) { order: 3; }
  .cd-overview-table tr:nth-of-type(4) td:nth-of-type(1) { order: 4; }
  .cd-overview-table tr:nth-of-type(2) td:nth-of-type(2) { order: 5; }
  .cd-overview-table tr:nth-of-type(3) td:nth-of-type(2) { order: 6; }
  .cd-overview-table tr:nth-of-type(4) td:nth-of-type(2) { order: 7; }
  .cd-overview-table tr:first-child th:nth-of-type(3) { order: 8; }
  .cd-overview-table tr:nth-of-type(2) td:nth-of-type(3) { order: 9; }
  .cd-overview-table tr:nth-of-type(4) td:nth-of-type(3) { order: 10; }
  .cd-overview-table tr:nth-of-type(3) td:nth-of-type(3) { order: 11; }
  .cd-overview-table tr:nth-of-type(2) td:nth-of-type(4) { order: 12; }
  .cd-overview-table tr:nth-of-type(3) td:nth-of-type(4) { order: 13; }
  .cd-overview-table tr:nth-of-type(4) td:nth-of-type(4) { order: 14; }

  /* Special */
  .cd-sec-special {
    padding: 0 16px;
  }

  /* Kauftipps */
  .cd-buy-right {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cd-sec-buy {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Anwendungstipps */
  .cd-sec-usage {
    padding: 0 16px;
  }

  /* FAQ */
  .cd-sec-faq {
    margin: 16px 16px;
  }

  .cd-sec-faq h2 {
    padding-top: 0px !important;
  }

  /* Vergleich */
  .cd-compare-col:nth-child(3) {
    display: none;
  }

  .cd-compare-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .cd-compare-card li {
    min-height: 48px;
    padding: 6px 10px;
  }

  .cd-compare-head {
    padding: 8px 12px;
    font-size: 12px;
  }

  /* Trustpilot */
  .cd-sec-trustpilot {
    margin-left: 0;
    margin-right: 0;
    padding-left: 16px;
    padding-right: 16px;
  }

  .cd-trustpilot-wrapper {
    margin-left: 0;
    margin-right: 0;
    overflow-x: hidden;
  }
}
