/* ===============================
   SINGLE DOWNLOAD PAGE
================================= */

body.single-post .site {
  overflow-x: hidden;
}

body.single-post .site-content {
  display: block !important;
}

body.single-post .content-area {
  width: 100% !important;
  float: none !important;
  margin: 0 auto !important;
}

body.single-post .widget-area {
  display: none !important;
}

body.single-post .site-main {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.single-post .inside-article,
body.single-post .inside-right-sidebar,
body.single-post .inside-left-sidebar,
body.single-post article {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

body.single-post .sd-front {
  width: 100%;
  padding-bottom: 40px;
}

body.single-post .sd-front .sd-wrap {
  width: min(1160px, calc(100% - 48px));
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.sd-single-page {
  padding: 18px 0 24px;
}

/* ===============================
   CABECERA
================================= */

.sd-single-header {
  margin: 12px 0 28px;
}

.sd-single-h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.06;
  font-weight: 700;
  color: #2f2f33;
  letter-spacing: -0.02em;
}

.sd-single-h2 {
  margin: 0;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.28;
  font-weight: 400;
  color: #3d3d42;
  padding-bottom: 14px;
  border-bottom: 1px solid #d7d7dc;
}

/* ===============================
   LAYOUT PRINCIPAL
================================= */

.sd-single-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.sd-single-content {
  min-width: 0;
}

.sd-single-main-box {
  border: 1px solid #d8d9de;
  background: #fff;
  padding: 18px 18px 40px;
  border-radius: 8px;
}

/* ===============================
   IMAGEN
================================= */

.sd-single-image-wrap {
  padding: 0;
}

.sd-single-image-panel {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sd-single-image-panel img {
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  display: block;
}

.sd-single-image-panel__ph {
  width: 100%;
  min-height: 400px;
  background: #ececef;
  border-radius: 8px;
}

/* ===============================
   FICHA TÉCNICA
================================= */

.sd-single-tech-card {
  margin-top: 18px;
}

.sd-single-tech-card__layout {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.sd-single-tech-card__badge {
  width: 62px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.sd-single-tech-card__badge img {
  display: block;
  width: 100%;
  height: auto;
}

.sd-single-tech-card__content {
  min-width: 0;
}

.sd-single-tech-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.sd-single-tech-card__row + .sd-single-tech-card__row {
  margin-top: 10px;
}

.sd-single-tech-card__title,
.sd-single-tech-card__name {
  font-size: 18px;
  line-height: 1.28;
}

.sd-single-tech-card__title {
  font-weight: 700;
  color: #2f2f33;
}

.sd-single-tech-card__name {
  font-weight: 700;
  color: #1d5fa7;
}

.sd-single-tech-card__meta-item,
.sd-single-tech-card__extra-item,
.sd-single-tech-card__downloads {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  font-size: 14px;
  line-height: 1.5;
  color: #2f2f33;
}

.sd-single-tech-card__meta-label,
.sd-single-tech-card__extra-label {
  font-weight: 700;
}

.sd-single-tech-card__meta-value,
.sd-single-tech-card__extra-value {
  font-weight: 400;
}

.sd-single-tech-card__downloads {
  gap: 6px;
  font-weight: 700;
  color: #1f2733;
}

.sd-single-tech-card__downloads-icon {
  font-size: 18px;
  line-height: 1;
  color: #9aa3af;
  transform: translateY(-1px);
}

.sd-single-tech-card__downloads-value {
  font-weight: 700;
}

.sd-single-tech-card__sep {
  width: 1px;
  height: 18px;
  background: #d5d8de;
  display: inline-block;
  flex: 0 0 auto;
}

.sd-single-divider {
  margin: 18px 0;
  border-top: 1px solid #d9d9de;
}

/* ===============================
   DESCRIPCIÓN Y BOTÓN
================================= */

.sd-single-description-box {
  padding: 0;
}

.sd-single-description-toggle {
  border: 0;
  margin: 0;
}

.sd-single-description-toggle__summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 0 28px 0 0;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}

.sd-single-description-toggle__summary::-webkit-details-marker {
  display: none;
}

.sd-single-description-toggle__summary::after {
  content: "⌄";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-52%);
  font-size: 18px;
  color: #5b5b61;
}

.sd-single-description-toggle[open] .sd-single-description-toggle__summary::after {
  content: "⌃";
}

.sd-single-description-toggle__title {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  color: #2f2f33;
}

.sd-single-description-toggle__content {
  margin-top: 16px;
  max-width: 720px;
}

.sd-single-description-toggle__content p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.75;
  color: #404753;
}

.sd-single-description-toggle__content p:last-child {
  margin-bottom: 0;
}

.sd-single-download-row {
  margin-top: 32px;
}

.sd-single-download-row--inside {
  display: flex;
  justify-content: center;
}

.sd-single-download-cta {
  margin: 0;
  display: inline-block;
}

.sd-single-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  width: fit-content;
  padding: 13px 26px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f3f3f4 0%, #e7e7e9 100%);
  color: #7b7f86;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .01em;
  text-transform: lowercase;
  border: 1px solid #dbdde2;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
  text-align: center;
}

.sd-single-download-btn:hover,
.sd-single-download-btn:focus,
.sd-single-download-btn:active {
  background: linear-gradient(180deg, #f1f1f2 0%, #e3e3e5 100%);
  color: #6f737a;
  opacity: 1;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}

.sd-single-download-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b0b4bb;
  flex: 0 0 auto;
}

.sd-single-download-btn__text {
  display: inline-block;
}

/* ===============================
   SIDEBAR
================================= */

.sd-single-sidepanel {
  min-width: 0;
}

.sd-single-sidepanel__box {
  position: sticky;
  top: 20px;
  background: #f2f2f2;
  border: 1px solid #dbdbdb;
  border-radius: 14px;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
  margin-bottom: 40px;
}

.sd-single-sidepanel__top {
  width: 100%;
  height: 36px;
  min-height: 36px;
  margin: 0 0 10px;
  padding: 0 36px 0 12px;
  border: 1px solid #dddddd;
  border-radius: 4px;
  background: #ffffff;
  text-align: left;
  font-size: 1rem;
  line-height: 1.15;
  font-weight: 700;
  color: #666666;
  cursor: pointer;
  position: relative;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.sd-single-sidepanel__top:hover,
.sd-single-sidepanel__box.is-expanded .sd-single-sidepanel__top,
.sd-single-sidepanel__box.is-showing-all .sd-single-sidepanel__top {
  background: #ffffff;
  border-color: #d6d6d6;
  color: #666666;
}

.sd-single-sidepanel__top::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid #777777;
  border-bottom: 2px solid #777777;
  transform: translateY(-62%) rotate(45deg);
  transition: transform .18s ease;
}

.sd-single-sidepanel__box.is-showing-all .sd-single-sidepanel__top::after,
.sd-single-sidepanel__box.is-expanded .sd-single-sidepanel__top::after {
  transform: translateY(-34%) rotate(225deg);
}

.sd-single-sidebar__outer {
  background: transparent;
}

.sd-single-sidebar__view--all {
  display: none;
}

.sd-single-sidepanel__box.is-showing-all .sd-single-sidebar__view--featured {
  display: none;
}

.sd-single-sidepanel__box.is-showing-all .sd-single-sidebar__view--all {
  display: block;
}

.sd-single-sidebar__inner {
  background: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 4px;
  overflow: hidden;
}

.sd-single-sidebar__accordion,
.sd-single-sidebar__all-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sd-single-sidebar__item,
.sd-single-sidebar__all-item {
  margin: 0;
  border-top: 1px solid #dddddd;
  background: #ffffff;
}

.sd-single-sidebar__item:first-child,
.sd-single-sidebar__all-item:first-child {
  border-top: 0;
}

.sd-single-sidebar__item > a,
.sd-single-sidebar__summary{
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  box-sizing: border-box;
  background: #ffffff;
  color: #666666;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.15;
  font-weight: 700;
}


.sd-single-sidebar__all-item > a {
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  margin-top: 4px;
  margin-bottom: 4px;
  box-sizing: border-box;
  background: #ffffff;
  color: #666666;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.15;
  font-weight: 700;
}


.sd-single-sidebar__details {
  margin: 0;
}

.sd-single-sidebar__summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding-right: 34px;
}

.sd-single-sidebar__summary::-webkit-details-marker {
  display: none;
}

.sd-single-sidebar__summary::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #777777;
  border-bottom: 2px solid #777777;
  transform: translateY(-62%) rotate(45deg);
}

.sd-single-sidebar__details[open] > .sd-single-sidebar__summary::after {
  transform: translateY(-34%) rotate(225deg);
}

.sd-single-sidebar__children {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #ffffff;
  border-top: 1px solid #dddddd;
}

.sd-single-sidebar__children li {
  margin: 0;
}

.sd-single-sidebar__children a {
  display: flex;
  align-items: center;
  height: 30px;
  min-height: 30px;
  padding: 0 12px 0 22px;
  box-sizing: border-box;
  background: #ffffff;
  color: #727272;
  text-decoration: none;
  font-size: 0.90rem;
  line-height: 1.15;
  font-weight: 600;
  border-top: 1px solid #e7e7e7;
}

.sd-single-sidebar__children li:first-child a {
  border-top: 0;
}

.sd-single-sidebar__item > a:hover,
.sd-single-sidebar__summary:hover,
.sd-single-sidebar__children a:hover,
.sd-single-sidebar__all-item > a:hover {
  background: #fafafa;
}

.sd-single-sidebar__item.is-active > a,
.sd-single-sidebar__details.is-active > .sd-single-sidebar__summary,
.sd-single-sidebar__children li.is-active > a,
.sd-single-sidebar__all-item.is-active > a {
  background: #f1f2f4;
  color: #3f3f3f;
  font-weight: 700;
}

/* ===============================
   BLOQUES A ANCHO COMPLETO
================================= */

.sd-single-wide {
  margin-top: 52px;
}

.sd-single-ad {
  margin: 0;
}

.sd-single-ad__inner {
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.sd-single-faq {
  margin-top: 56px;
}

.sd-single-faq .faq-container {
  background: #fff;
}

.sd-single-share {
  margin-top: 52px;
}

.sd-single-share__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px 24px;
  flex-wrap: wrap;
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 22px 24px;
}

.sd-single-social {
  display: flex;
  gap: 16px;
  align-items: center;
  flex: 0 0 auto;
}

.sd-social {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #a8a8a8;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: opacity .15s ease;
}

.sd-social:hover {
  opacity: .9;
  color: #fff;
}

.sd-single-share__copy {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1 1 620px;
  min-width: min(100%, 620px);
  max-width: 760px;
}

.sd-single-share__url {
  flex: 1 1 auto;
  min-width: 220px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #d9dde3;
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: #fff;
  color: #8b919b;
  font-size: 14px;
}

.sd-single-share__copybtn {
  height: 42px;
  min-width: 96px;
  padding: 0 16px;
  border: 1px solid #d9dde3;
  border-radius: 0 8px 8px 0;
  background: #f1f1f1;
  color: #253041;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.sd-single-share__copybtn:hover {
  background: #ececec;
}

.sd-single-tags {
  margin-top: 48px;
}

.sd-single-tags .sd-home-panel__title {
  margin: 0 0 22px;
  font-size: 18px;
  font-weight: 700;
}

.sd-pills--single {
  justify-content: flex-start;
  margin-top: 0;
  gap: 10px;
  padding-top: 6px;
}

.sd-pills--single .sd-pill {
  background: #fff;
  color: var(--sd-color-text);
  padding: .72rem 1.15rem;
  border-radius: 12px;
  font-size: 1.08rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid rgba(0,0,0,0.10);
  box-shadow: 0 6px 16px rgba(0,0,0,0.05);
  transition: transform .12s ease, border-color .12s ease;
}

.sd-pills--single .sd-pill:hover {
  transform: translateY(-2px);
  border-color: var(--sd-color-accent);
  color: var(--sd-color-text-2);
}

.sd-carousel-block {
  margin-top: 56px;
}

.sd-carousel-block__title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  color: #2f2f33;
}

.sd-carousel-block__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e3e3e3;
}

.sd-carousel {
  position: relative;
}

.sd-carousel__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}

.sd-carousel__viewport::-webkit-scrollbar {
  display: none;
}

.sd-carousel__viewport.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.sd-carousel-track {
  display: flex;
  gap: 16px;
  min-width: max-content;
}

.sd-postcard--carousel {
  width: 190px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.sd-postcard,
.sd-postcard--carousel {
  border: 1px solid #dddddf;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.sd-postcard {
  height: 100%;
}

.sd-postcard__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.sd-postcard__media {
  position: relative;
  padding: 12px;
  background: transparent;
  overflow: visible;
}

.sd-postcard__img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  background: #fff;
  display: block;
  border-radius: 8px;
}

.sd-postcard__img--ph {
  width: 100%;
  height: 110px;
  background: #f4f4f4;
  border-radius: 8px;
}

.sd-postcard__body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sd-postcard__title {
  font-weight: 700;
  color: #111;
  font-size: 14px;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.3em * 3);
}

.sd-postcard__meta {
  margin-top: auto;
  font-size: 12px;
  color: #7a7a7a;
  min-height: 16px;
  line-height: 16px;
}

.sd-postcard__meta:empty {
  visibility: hidden;
}

.sd-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #d8dade;
  background: rgba(255,255,255,.97);
  color: #7d828b;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.sd-carousel__nav--prev {
  left: -16px;
}

.sd-carousel__nav--next {
  right: -16px;
}

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

@media (max-width: 1024px) {
  .sd-single-main-layout {
    grid-template-columns: 1fr;
  }

  .sd-single-sidepanel {
    order: -1;
  }

  .sd-single-image-panel {
    min-height: 380px;
  }
}

@media (max-width: 900px) {
  .sd-pills--single .sd-pill {
    font-size: .98rem;
    padding: .6rem .95rem;
  }
}

@media (max-width: 767px) {
  .sd-single-page {
    padding: 14px 0 20px;
  }

  .sd-single-header {
    margin: 10px 0 22px;
  }

  .sd-single-h1 {
    font-size: 34px;
  }

  .sd-single-h2 {
    font-size: 24px;
  }

  .sd-single-main-box {
    padding: 14px;
  }

  .sd-single-image-panel {
    min-height: 280px;
  }

  .sd-single-tech-card__layout {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
  }

  .sd-single-tech-card__badge {
    width: 52px;
  }

  .sd-single-tech-card__title,
  .sd-single-tech-card__name,
  .sd-single-tech-card__meta-item,
  .sd-single-tech-card__extra-item,
  .sd-single-tech-card__downloads {
    font-size: 14px;
  }

  .sd-single-tech-card__sep {
    height: 14px;
  }

  .sd-single-description-toggle__title {
    font-size: 20px;
  }

  .sd-single-wide {
    margin-top: 40px;
  }

  .sd-single-faq {
    margin-top: 40px;
  }

  .sd-single-share {
    margin-top: 34px;
  }

  .sd-single-tags {
    margin-top: 34px;
  }

  .sd-carousel-block {
    margin-top: 40px;
  }

  .sd-single-share__row {
    width: 100%;
    padding: 18px 0;
    gap: 14px;
  }

  .sd-single-share__copy {
    min-width: 100%;
    flex-basis: 100%;
  }

  .sd-single-share__url {
    min-width: 0;
    height: 40px;
    font-size: 13px;
  }

  .sd-single-share__copybtn {
    height: 40px;
    min-width: 88px;
    font-size: 12px;
  }

  .sd-social {
    width: 34px;
    height: 34px;
  }

  .sd-carousel__nav {
    display: none;
  }

  .sd-postcard--carousel {
    width: 170px;
  }

  .sd-single-download-btn {
    width: 100%;
    justify-content: center;
    padding: 13px 18px;
  }

  .sd-single-sidepanel__box {
    position: static;
  }
}

/* ============================================================
   SINGLE - LIBRARY
   ============================================================ */

/* Hero: imagen a ancho completo */
.sd-single-library-hero {
  margin-bottom: 40px;
}

.sd-single-library-hero__image {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  background: #fafafa;
}

.sd-single-library-hero__image img {
  display: block;
  width: 100%;
  height: auto;
}

.sd-single-library-hero__image--ph {
  min-height: 300px;
}

.sd-single-library-hero__actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.sd-single-library-hero__desc {
  margin-top: 18px;
  color: #555;
  font-size: .95rem;
  line-height: 1.6;
}

/* Bloques de categoría dentro de la single library */
.sd-single-page--library .sd-home-lists {
  padding: 20px 0 24px;
}

.sd-single-page--library .sd-home-panel__title {
  text-transform: capitalize;
}

.sd-single-page--library .sd-home-panel__empty {
  border: 1px dashed #d7d7d7;
  border-radius: 6px;
  padding: 16px;
  color: #777;
  background: #fafafa;
}

.sd-single-page--library .sd-home-lists .sd-postgrid {
  grid-template-columns: repeat(3, 1fr);
}

.sd-single-page--library .sd-home-lists .sd-postcard:nth-child(n+4) {
  display: none;
}
