/*
 * Furniflexi visuaalne pikk tootekirjeldus.
 * Laadida üks kord üksiktoote vaates. Kõik reeglid on piiratud .ffx-desc alla.
 */
.ffx-desc,
.ffx-desc * {
  box-sizing: border-box;
}

.ffx-desc {
  --ffx-brand: var(--ff-color-brand, #e31837);
  --ffx-brand-hover: var(--ff-color-brand-hover, #b9112a);
  --ffx-text: var(--ff-color-text, #1f1f1f);
  --ffx-muted: var(--ff-color-text-muted, #626262);
  --ffx-border: var(--ff-color-border, #dedede);
  --ffx-panel: var(--ff-color-panel, #f6f5f3);
  --ffx-info: var(--ff-color-info, #1769a0);
  --ffx-info-bg: var(--ff-color-info-bg, #eef6fb);
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  color: var(--ffx-text);
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
}

.ffx-desc img {
  display: block;
  max-width: 100%;
  height: auto;
}

.ffx-desc figure,
.ffx-desc p,
.ffx-desc dl {
  margin: 0;
}

.ffx-desc h2,
.ffx-desc h3 {
  margin: 0;
  color: var(--ffx-text);
  font-family: inherit;
  letter-spacing: -0.02em;
}

.ffx-desc h2 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.18;
}

.ffx-desc h3 {
  font-size: clamp(1.08rem, 1.8vw, 1.28rem);
  line-height: 1.25;
}

.ffx-desc__section {
  margin-block: clamp(36px, 6vw, 62px);
}

.ffx-desc__section:first-child {
  margin-top: 0;
}

.ffx-desc__section:last-child {
  margin-bottom: 0;
}

.ffx-desc__kicker {
  display: flex;
  margin-bottom: 10px !important;
  align-items: center;
  gap: 9px;
  color: var(--ffx-brand-hover);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ffx-desc__kicker::before {
  width: 24px;
  height: 2px;
  flex: 0 0 auto;
  background: var(--ffx-brand);
  content: "";
}

.ffx-desc__lead {
  max-width: 760px;
  margin-top: 12px !important;
  color: var(--ffx-muted);
  font-size: 1.05rem;
}

.ffx-desc__tech {
  padding: clamp(20px, 4vw, 32px);
  background: var(--ffx-panel);
  border: 1px solid var(--ffx-border);
  border-top: 4px solid var(--ffx-brand);
  border-radius: 12px;
}

.ffx-desc__facts {
  display: grid;
  margin-top: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}

.ffx-desc__fact {
  display: grid;
  padding: 11px 0;
  grid-template-columns: minmax(130px, 0.75fr) minmax(0, 1fr);
  gap: 16px;
  border-bottom: 1px solid var(--ffx-border);
}

.ffx-desc__fact dt {
  color: var(--ffx-muted);
  font-weight: 650;
}

.ffx-desc__fact dd {
  margin: 0;
  font-weight: 750;
}

.ffx-desc__badges {
  display: flex;
  margin-top: 18px;
  padding: 0;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.ffx-desc__badge {
  padding: 6px 9px;
  color: var(--ffx-brand-hover);
  background: #fff;
  border: 1px solid #ebc8ce;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 750;
}

.ffx-desc__split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(26px, 5vw, 56px);
}

.ffx-desc__split--reverse .ffx-desc__media {
  order: 2;
}

.ffx-desc__copy > p:not(.ffx-desc__kicker) {
  margin-top: 13px;
  color: var(--ffx-muted);
}

.ffx-desc__lead,
.ffx-desc__copy > p:not(.ffx-desc__kicker),
.ffx-desc__side p,
.ffx-desc__note,
.ffx-desc__faq details p {
  text-wrap: balance;
}

.ffx-desc__media {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ffx-border);
  border-radius: 12px;
}

.ffx-desc__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
}

.ffx-desc__media--wide img {
  aspect-ratio: 16 / 9;
}

.ffx-desc__media--square img {
  aspect-ratio: 1;
}

.ffx-desc__caption {
  padding: 10px 13px;
  color: var(--ffx-muted);
  border-top: 1px solid var(--ffx-border);
  font-size: 0.76rem;
  text-align: center;
}

.ffx-desc__side-panel {
  padding: clamp(20px, 4vw, 32px);
  background: var(--ffx-panel);
  border: 1px solid var(--ffx-border);
  border-radius: 12px;
}

.ffx-desc__side-grid {
  display: grid;
  margin-top: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ffx-desc__side {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--ffx-border);
  border-radius: 9px;
}

.ffx-desc__side-tag {
  display: block;
  margin-bottom: 7px;
  color: var(--ffx-brand-hover);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ffx-desc__side p {
  margin-top: 8px;
  color: var(--ffx-muted);
}

.ffx-desc__tables {
  padding: clamp(20px, 4vw, 32px);
  background: var(--ffx-panel);
  border: 1px solid var(--ffx-border);
  border-radius: 12px;
}

.ffx-desc__table-wrap {
  width: 100%;
  margin-top: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ffx-border);
  border-radius: 8px;
}

.ffx-desc__table-wrap + .ffx-desc__table-wrap {
  margin-top: 14px;
}

.ffx-desc__table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.9rem;
}

.ffx-desc__table caption {
  padding: 12px 14px;
  color: var(--ffx-text);
  background: #fff;
  border-bottom: 1px solid var(--ffx-border);
  font-weight: 800;
  text-align: left;
}

.ffx-desc__table th,
.ffx-desc__table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--ffx-border);
  text-align: left;
  vertical-align: top;
}

.ffx-desc__table th {
  background: #f9f8f7;
  font-weight: 800;
}

.ffx-desc__table tbody tr:last-child td {
  border-bottom: 0;
}

.ffx-desc__table--sides .ffx-desc__col-primary {
  width: 55%;
}

.ffx-desc__table--sides .ffx-desc__col-firmness {
  width: 15%;
}

.ffx-desc__table--sides .ffx-desc__col-weight {
  width: 30%;
}

.ffx-desc__table--guide .ffx-desc__col-firmness {
  width: 18%;
}

.ffx-desc__table--guide .ffx-desc__col-description {
  width: 34%;
}

.ffx-desc__table--guide .ffx-desc__col-weight {
  width: 48%;
}

.ffx-desc__table--sides th:nth-child(2),
.ffx-desc__table--sides td:nth-child(2),
.ffx-desc__table--guide th:first-child,
.ffx-desc__table--guide td:first-child {
  text-align: center;
}

.ffx-desc__note {
  margin-top: 15px !important;
  padding: 14px 16px;
  color: var(--ffx-muted);
  background: var(--ffx-info-bg);
  border-left: 3px solid var(--ffx-info);
  border-radius: 6px;
  font-size: 0.88rem;
}

.ffx-desc__layers {
  display: grid;
  margin: 18px 0 0;
  padding: 0;
  gap: 10px;
  list-style: none;
  counter-reset: layer;
}

.ffx-desc__layers li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--ffx-muted);
  counter-increment: layer;
}

.ffx-desc__layers li::before {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--ffx-brand-hover);
  background: #fff1f3;
  border-radius: 50%;
  content: counter(layer);
  font-size: 0.78rem;
  font-weight: 800;
}

.ffx-desc__layers strong {
  color: var(--ffx-text);
}

.ffx-desc__care-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ffx-desc__care {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--ffx-border);
  border-radius: 9px;
}

.ffx-desc__care img {
  width: 88px;
  height: 88px;
  margin-bottom: 14px;
  object-fit: contain;
  background: #fff;
}

.ffx-desc__care p {
  margin-top: 8px;
  color: var(--ffx-muted);
}

.ffx-desc__steps {
  display: grid;
  margin: 20px 0 0;
  padding: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  counter-reset: step;
}

.ffx-desc__steps li {
  min-height: 142px;
  padding: 18px;
  color: var(--ffx-muted);
  background: #fff;
  border: 1px solid var(--ffx-border);
  border-radius: 9px;
  counter-increment: step;
}

.ffx-desc__steps li::before {
  display: grid;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  place-items: center;
  color: #fff;
  background: var(--ffx-brand);
  border-radius: 50%;
  content: counter(step);
  font-weight: 800;
}

.ffx-desc__faq {
  margin-top: 18px;
  border-top: 1px solid var(--ffx-border);
}

.ffx-desc__faq details {
  border-bottom: 1px solid var(--ffx-border);
}

.ffx-desc__faq summary {
  position: relative;
  padding: 16px 40px 16px 0;
  color: var(--ffx-text);
  cursor: pointer;
  font-weight: 750;
  list-style: none;
}

.ffx-desc__faq summary::-webkit-details-marker {
  display: none;
}

.ffx-desc__faq summary::after {
  position: absolute;
  top: 14px;
  right: 6px;
  color: var(--ffx-brand);
  content: "+";
  font-size: 1.35rem;
  line-height: 1;
}

.ffx-desc__faq details[open] summary::after {
  content: "−";
}

.ffx-desc__faq details p {
  padding: 0 40px 16px 0;
  color: var(--ffx-muted);
}

.ffx-desc__back {
  display: flex;
  margin-top: 32px;
  padding: 18px 20px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: #fff4f6;
  border: 1px solid #efcbd1;
  border-radius: 9px;
}

.ffx-desc__back p {
  color: var(--ffx-muted);
}

.ffx-desc__back a {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 16px;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  background: var(--ffx-brand);
  border-radius: 7px;
  font-weight: 800;
  text-decoration: none !important;
}

.ffx-desc__back a:hover {
  background: var(--ffx-brand-hover);
}

.ffx-desc__back a:focus-visible,
.ffx-desc__faq summary:focus-visible {
  outline: 3px solid var(--ffx-brand);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  .ffx-desc__split,
  .ffx-desc__care-grid {
    grid-template-columns: 1fr;
  }

  .ffx-desc__split--reverse .ffx-desc__media {
    order: 0;
  }

  .ffx-desc__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .ffx-desc {
    font-size: 15px;
  }

  .ffx-desc__section {
    margin-block: 36px;
  }

  .ffx-desc__facts,
  .ffx-desc__side-grid {
    grid-template-columns: 1fr;
  }

  .ffx-desc__fact {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .ffx-desc__table {
    font-size: 13px;
  }

  .ffx-desc__table th,
  .ffx-desc__table td {
    padding: 8px 6px;
    hyphens: none;
    overflow-wrap: normal;
    word-break: normal;
  }

  .ffx-desc__table--sides .ffx-desc__col-primary {
    width: 39%;
  }

  .ffx-desc__table--sides .ffx-desc__col-firmness {
    width: 22%;
  }

  .ffx-desc__table--sides .ffx-desc__col-weight {
    width: 39%;
  }

  .ffx-desc__table--guide .ffx-desc__col-firmness {
    width: 23%;
  }

  .ffx-desc__table--guide .ffx-desc__col-description {
    width: 31%;
  }

  .ffx-desc__table--guide .ffx-desc__col-weight {
    width: 46%;
  }

  .ffx-desc__steps {
    grid-template-columns: 1fr;
  }

  .ffx-desc__steps li {
    min-height: 0;
  }

  .ffx-desc__back {
    align-items: stretch;
  }

  .ffx-desc__back a {
    width: 100%;
  }
}
