/* ==========================================================================
   producttab.css – Q&A tab styles for PrestaShop 1.7 Classic-based themes
   ========================================================================== */

/* ------------------------------------------------------------------
   Container
------------------------------------------------------------------ */
.pt-qa-wrapper {
  padding: 1.75rem 0 2rem;
  max-width: 860px;
}

/* ------------------------------------------------------------------
   Q&A — H2  (main question)
------------------------------------------------------------------ */
.pt-qa-wrapper h2 {
  position: relative;
  font-size: 1.1rem;          /* ~17–18px — readable, not oversized */
  font-weight: 700;
  color: #2c2c2c;
  line-height: 1.45;
  margin: 2rem 0 0.6rem;
  padding: 0.65rem 1rem 0.65rem 3rem;
  background: #f7f9f4;        /* very light sage — neutral for any olive/green brand */
  border-left: 4px solid #5a8a3c;  /* accent – matches typical eco/food palette */
  border-radius: 0 6px 6px 0;
}

/* Question mark badge */
.pt-qa-wrapper h2::before {
  content: "?";
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.4rem;
  height: 1.4rem;
  line-height: 1.4rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  background: #5a8a3c;
  border-radius: 50%;
}

/* First h2 — no top margin */
.pt-qa-wrapper h2:first-child {
  margin-top: 0;
}

/* ------------------------------------------------------------------
   Q&A — H3  (sub-question / section heading)
------------------------------------------------------------------ */
.pt-qa-wrapper h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #3e5a28;
  margin: 1.5rem 0 0.4rem;
  padding: 0 0 0.35rem 0;
  border-bottom: 2px solid #d6e8c8;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* Arrow prefix */
.pt-qa-wrapper h3::before {
  content: "▸";
  font-size: 0.75rem;
  color: #5a8a3c;
  flex-shrink: 0;
}

/* ------------------------------------------------------------------
   Answer paragraphs
------------------------------------------------------------------ */
.pt-qa-wrapper p {
  font-size: 0.925rem;
  color: #444;
  line-height: 1.75;
  margin: 0 0 0.75rem;
}

/* ------------------------------------------------------------------
   Lists inside answers
------------------------------------------------------------------ */
.pt-qa-wrapper ul,
.pt-qa-wrapper ol {
  margin: 0.5rem 0 0.9rem 0;
  padding-left: 1.25rem;
}

.pt-qa-wrapper li {
  font-size: 0.925rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 0.25rem;
}

.pt-qa-wrapper ul li::marker {
  color: #5a8a3c;
}

/* ------------------------------------------------------------------
   Tables (e.g. wartości odżywcze inside the tab)
------------------------------------------------------------------ */
.pt-qa-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0.75rem 0 1rem;
}

.pt-qa-wrapper table th,
.pt-qa-wrapper table td {
  border: 1px solid #d9e8cc;
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.pt-qa-wrapper table th {
  background: #eef5e8;
  font-weight: 700;
  color: #2c2c2c;
}

.pt-qa-wrapper table tr:nth-child(even) td {
  background: #f7fbf3;
}

/* ------------------------------------------------------------------
   Links inside content
------------------------------------------------------------------ */
.pt-qa-wrapper a {
  color: #5a8a3c;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pt-qa-wrapper a:hover {
  color: #3e5a28;
}

/* ------------------------------------------------------------------
   Skeleton loader
------------------------------------------------------------------ */
@keyframes pt-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.pt-skeleton {
  padding: 1.5rem 0;
}

.pt-skel-line {
  border-radius: 4px;
  margin-bottom: 0.75rem;
  background: linear-gradient(90deg, #ececec 25%, #f5f5f5 50%, #ececec 75%);
  background-size: 600px 100%;
  animation: pt-shimmer 1.4s infinite linear;
}

.pt-skel-h2  { height: 2.2rem; width: 75%; border-radius: 6px; }
.pt-skel-h3  { height: 1.1rem; width: 50%; margin-top: 1.2rem; }
.pt-skel-p   { height: 0.875rem; width: 95%; }
.pt-skel-short { width: 60%; }

/* ------------------------------------------------------------------
   Fade-in after load
------------------------------------------------------------------ */
@keyframes pt-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pt-qa-wrapper.pt-fade-in {
  animation: pt-fade-in 0.28s ease-out both;
}

/* ------------------------------------------------------------------
   Error / empty states
------------------------------------------------------------------ */
.pt-error,
.pt-empty {
  color: #888;
  font-size: 0.9rem;
  padding: 1rem 0;
}

.pt-error { color: #c0392b; }

/* ------------------------------------------------------------------
   Responsive — mobile
------------------------------------------------------------------ */
@media (max-width: 575px) {
  .pt-qa-wrapper h2 {
    font-size: 1rem;
    padding: 0.6rem 0.75rem 0.6rem 2.6rem;
  }

  .pt-qa-wrapper h2::before {
    left: 0.6rem;
    width: 1.25rem;
    height: 1.25rem;
    line-height: 1.25rem;
    font-size: 0.75rem;
  }

  .pt-qa-wrapper h3 {
    font-size: 0.93rem;
  }

  .pt-qa-wrapper table {
    font-size: 0.82rem;
  }

  .pt-qa-wrapper table th,
  .pt-qa-wrapper table td {
    padding: 0.35rem 0.5rem;
  }
}
