/*
 * Estilos exclusivos de proyecto-detalle.html.
 * Los estilos globales, header, menú, footer, tipografía y componentes
 * compartidos se heredan de assets/css/styles.css.
 */

main {
  --pd-line: #e4e4e7;
  --pd-muted: #71717a;
  --pd-soft: #f4f4f5;
  --pd-green: #25d366;
}

#siteHeader {
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .08);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid #e4e4e7;
}

.burger {
  border-color: #e4e4e7;
  background: #111;
  color: #fff;
}

.pd-shell {
  width: min(100% - 40px, 1344px);
  margin-inline: auto;
}

.pd-hero {
  padding: 150px 0 25px;
}

.pd-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 36px;
  color: #52525b;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .25s, transform .25s;
}

.pd-back-link:hover {
  color: var(--brand);
  transform: translateX(-4px);
}

.pd-back-link .material-symbols-rounded {
  font-size: 19px;
}

.pd-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 34px;
}

.pd-heading .eyebrow {
  margin-top: 20px;
}

.pd-heading h1 {
  max-width: 980px;
  margin-top: 10px;
  font-size: clamp(1.5rem, 3vw, 3rem);
  font-weight: 700;
  line-height: .94;
  letter-spacing: -.065em;
}

.pd-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid rgba(254, 0, 0, .2);
  background: rgba(254, 0, 0, .055);
  color: var(--brand);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.pd-status>span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(254, 0, 0, .1);
}

.pd-heading-actions {
  display: flex;
  gap: 10px;
  padding-bottom: 8px;
}

.pd-icon-button {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  flex: none;
  border: 1px solid #d4d4d8;
  background: #fff;
  color: #18181b;
  cursor: pointer;
  transition: color .25s, border-color .25s, background .25s, transform .25s;
}

.pd-icon-button:hover,
.pd-icon-button.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  transform: translateY(-3px);
}

.pd-spec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
  border: 1px solid var(--pd-line);
  background: #fff;
}

.pd-spec-grid article {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 128px;
  padding: 25px 28px;
  border-right: 1px solid var(--pd-line);
  transition: background .25s;
}

.pd-spec-grid article:last-child {
  border-right: 0;
}

.pd-spec-grid article:hover {
  background: #fafafa;
}

.pd-spec-grid article>.material-symbols-rounded {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  flex: none;
  background: rgba(254, 0, 0, .075);
  color: var(--brand);
  font-size: 27px;
}

.pd-spec-grid strong,
.pd-spec-grid small {
  display: block;
}

.pd-spec-grid strong {
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: -.04em;
}

.pd-spec-grid small {
  margin-top: 7px;
  color: var(--pd-muted);
  font-size: .74rem;
  font-weight: 600;
}

.pd-media-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

.pd-gallery,
.pd-summary-card,
.pd-budget-card {
  border: 1px solid var(--pd-line);
  background: #fff;
  box-shadow: 0 15px 15px rgba(17, 17, 17, .08);
}

.pd-media-filters {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--pd-line);
  scrollbar-width: none;
}

.pd-media-filters::-webkit-scrollbar {
  display: none;
}

.pd-media-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 145px;
  padding: 17px 20px;
  border: 0;
  border-right: 1px solid var(--pd-line);
  background: #fff;
  color: #71717a;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .25s, background .25s;
}

.pd-media-filter .material-symbols-rounded {
  font-size: 20px;
}

.pd-media-filter:hover,
.pd-media-filter.is-active {
  background: var(--brand);
  color: #fff;
}

.pd-gallery-stage {
  position: relative;
  height: min(66vw, 690px);
  min-height: 520px;
  overflow: hidden;
  background: #18181b;
}

.pd-gallery-media,
.pd-gallery-media img,
.pd-gallery-media video {
  width: 100%;
  height: 100%;
}

.pd-gallery-media img,
.pd-gallery-media video {
  display: block;
  object-fit: cover;
}

.pd-gallery-media img {
  animation: pdMediaIn .45s var(--ease);
}

@keyframes pdMediaIn {
  from {
    opacity: .35;
    transform: scale(1.015);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.pd-gallery-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .5);
  background: rgba(17, 17, 17, .45);
  color: #fff;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transform: translateY(-50%);
  transition: border-color .25s, background .25s, transform .25s;
}

.pd-gallery-arrow:hover {
  border-color: var(--brand);
  background: var(--brand);
  transform: translateY(-50%) scale(1.04);
}

.pd-gallery-prev {
  left: 18px;
}

.pd-gallery-next {
  right: 18px;
}

.pd-gallery-ai-action {
  position: absolute;
  z-index: 5;
  left: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;

  border-radius: 999px;
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 18px 42px rgba(254, 0, 0, .28);

  color: #fff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .28);
  backdrop-filter: blur(14px);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .035em;
  cursor: pointer;
  transition: transform .25s, background .25s, border-color .25s, box-shadow .25s;
}

.pd-gallery-ai-action:hover {
  border: 1px solid rgba(255, 255, 255, .62);
  background: rgba(17, 17, 17, .82);
  transform: translateY(-3px);
}

.pd-gallery-ai-action .material-symbols-rounded {
  font-size: 21px;
}

.pd-gallery-ai-action[hidden] {
  display: none !important;
}

.pd-media-counter {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 18px;
  padding: 9px 12px;
  background: rgba(17, 17, 17, .68);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  backdrop-filter: blur(9px);
}

.pd-thumbnail-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px;
  background: #fff;
  scrollbar-width: thin;
}

.pd-thumbnail {
  position: relative;
  flex: 0 0 112px;
  height: 74px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  background: #e4e4e7;
  cursor: pointer;
  opacity: .58;
  transition: opacity .25s, border-color .25s;
}

.pd-thumbnail:hover,
.pd-thumbnail.is-active {
  border-color: var(--brand);
  opacity: 1;
}

.pd-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-thumbnail .material-symbols-rounded {
  position: absolute;
  top: 50%;
  left: 50%;
  color: #fff;
  font-size: 30px;
  text-shadow: 0 3px 14px #000;
  transform: translate(-50%, -50%);
}

.pd-summary-card {
  position: sticky;
  top: 132px;
  padding: 31px;
}

.pd-summary-price {
  margin-top: 20px;
}

.pd-summary-price span,
.pd-summary-price small {
  display: block;
}

.pd-summary-price span {
  color: var(--pd-muted);
  font-size: .74rem;
  font-weight: 700;
}

.pd-summary-price strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.75rem, 2.3vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.pd-summary-price small {
  margin-top: 13px;
  color: #85858b;
  font-size: .72rem;
  line-height: 1.65;
}

.pd-summary-divider {
  height: 1px;
  margin: 26px 0;
  background: var(--pd-line);
}

.pd-summary-copy {
  margin-bottom: 24px;
  color: #626268;
  font-size: .84rem;
  line-height: 1.7;
}

.pd-button {
  display: inline-flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border: 1px solid transparent;
  background: transparent;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s;
}

.pd-button:hover {
  transform: translateY(-3px);
}

.pd-button+.pd-button {
  margin-top: 10px;
}

.pd-button-whatsapp {
  background: var(--pd-green);
  color: #fff;
}

.pd-button-whatsapp:hover {
  background: #1dbb58;
}

.pd-button-whatsapp i {
  font-size: 20px;
}

.pd-button-dark {
  background: #18181b;
  color: #fff;
}

.pd-button-dark:hover {
  background: var(--brand);
}

.pd-button-primary {
  background: var(--brand);
  color: #fff;
}

.pd-button-primary:hover {
  background: #c90000;
}

.pd-button-light {
  width: auto;
  min-width: 230px;
  border-color: #fff;
  background: #fff;
  color: #18181b;
}

.pd-button-light:hover {
  background: #18181b;
  color: #fff;
}

.pd-content-section {
  padding-bottom: 100px;
  background: #fff;
}

.pd-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 76px;
  align-items: start;
}

.pd-description .section-title {
  max-width: 850px;
  margin-top: 12px;
}

.pd-description>p:not(.eyebrow) {
  max-width: 810px;
  margin-top: 24px;
  color: #5f5f64;
  font-size: 1rem;
  line-height: 1.86;
}

.pd-feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
  margin-top: 40px;
  padding-top: 31px;
  border-top: 1px solid var(--pd-line);
}

.pd-feature-list div {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .84rem;
  font-weight: 650;
}

.pd-feature-list .material-symbols-rounded {
  color: var(--brand);
  font-size: 20px;
}

.pd-budget-card {
  padding: 32px;
  background: #fafafa;
}

.pd-budget-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pd-budget-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  flex: none;
  background: #18181b;
  color: #fff;
  font-size: 28px;
}

.pd-summary-card h2 {
  margin-top: 5px;
  font-size: 1.3rem;
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.pd-budget-intro {
  margin: 20px 0 25px;
  color: var(--pd-muted);
  font-size: .84rem;
  line-height: 1.68;
}

.pd-summary-card label,
.pd-loan-form label {
  display: block;
  margin: 17px 0 8px;
  font-size: .71rem;
  font-weight: 800;
  letter-spacing: .035em;
}

.pd-select-wrap,
.pd-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--pd-line);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}

.pd-select-wrap:focus-within,
.pd-input-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(254, 0, 0, .08);
}

.pd-select-wrap>.material-symbols-rounded:first-child {
  position: absolute;
  left: 14px;
  color: #8d8d93;
  font-size: 21px;
  pointer-events: none;
}

.pd-select-wrap select {
  width: 100%;
  height: 54px;
  padding: 0 43px 0 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #18181b;
  font-size: .82rem;
  appearance: none;
  cursor: pointer;
}

.pd-select-arrow {
  position: absolute;
  right: 12px;
  color: #8d8d93;
  pointer-events: none;
}

.pd-summary-card form .pd-button,
.pd-loan-form .pd-button {
  margin-top: 24px;
}

.pd-budget-result {
  margin-top: 22px;
  padding: 20px;
  border-left: 3px solid var(--brand);
  background: #fff;
  animation: pdResultIn .4s var(--ease);
}

@keyframes pdResultIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.pd-budget-result span,
.pd-budget-result strong {
  display: block;
}

.pd-budget-result span {
  color: var(--pd-muted);
  font-size: .71rem;
}

.pd-budget-result strong {
  margin-top: 5px;
  color: var(--brand);
  font-size: 1.52rem;
  letter-spacing: -.035em;
}

.pd-budget-result p {
  margin: 13px 0;
  color: #737378;
  font-size: .69rem;
  line-height: 1.6;
}

.pd-text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #18181b;
  font-size: .73rem;
  font-weight: 800;
  cursor: pointer;
}

.pd-text-button:hover {
  color: var(--brand);
}

.pd-text-button .material-symbols-rounded {
  font-size: 17px;
}

.pd-cta {
  padding: 78px 0;
  background: var(--brand);
  color: #fff;
}

.pd-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.pd-cta .eyebrow {
  color: rgba(255, 255, 255, .7);
}

.pd-cta h2 {
  max-width: 850px;
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 720;
  line-height: 1.04;
  letter-spacing: -.055em;
}

.pd-modal {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}

.pd-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.pd-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(8px);
}

.pd-modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 39px;
  background: #fff;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .28);
  transform: translateY(20px) scale(.98);
  transition: transform .35s var(--ease);
}

.pd-modal.is-open .pd-modal-panel {
  transform: none;
}

.pd-modal h2 {
  margin-top: 8px;
  font-size: 2.5rem;
  font-weight: 750;
  line-height: 1.06;
  letter-spacing: -.05em;
}

.pd-modal-intro {
  margin: 15px 0 22px;
  color: var(--pd-muted);
  font-size: .83rem;
  line-height: 1.65;
}

.pd-modal-close {
  position: absolute;
  top: 17px;
  right: 17px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--pd-line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: color .25s, border-color .25s;
}

.pd-modal-close:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.pd-input-wrap {
  height: 54px;
  padding: 0 14px;
}

.pd-input-wrap>span {
  color: #85858b;
  font-size: .78rem;
  font-weight: 700;
}

.pd-input-wrap input {
  width: 100%;
  height: 100%;
  padding: 0 10px;
  border: 0;
  outline: 0;
  background: transparent;
}

.pd-input-suffix input {
  padding-left: 0;
}

.pd-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pd-loan-result {
  margin-top: 22px;
  padding: 23px;
  background: #18181b;
  color: #fff;
  text-align: center;
}

.pd-loan-result span,
.pd-loan-result small {
  display: block;
  color: rgba(255, 255, 255, .55);
  font-size: .71rem;
}

.pd-loan-result strong {
  display: block;
  margin: 6px 0;
  font-size: 1.85rem;
}

.pd-toast {
  position: fixed;
  z-index: 300;
  left: 50%;
  bottom: 28px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #18181b;
  color: #fff;
  font-size: .77rem;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .3s, transform .3s;
}

.pd-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1100px) {
  .pd-spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pd-spec-grid article:nth-child(2) {
    border-right: 0;
  }

  .pd-spec-grid article:nth-child(-n+2) {
    border-bottom: 1px solid var(--pd-line);
  }

  .pd-media-layout {
    grid-template-columns: 1fr;
  }

  .pd-summary-card {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, .65fr);
    gap: 18px 28px;
    align-items: end;
  }

  .pd-summary-card .eyebrow,
  .pd-summary-price,
  .pd-summary-divider,
  .pd-summary-copy {
    grid-column: 1;
  }

  .pd-summary-divider {
    display: none;
  }

  .pd-summary-card .pd-button {
    grid-column: 2;
  }

  .pd-summary-card .pd-button-whatsapp {
    grid-row: 1 / span 2;
    align-self: end;
  }

  .pd-summary-card .pd-button-dark {
    margin-top: 0;
  }

  .pd-content-grid {
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .pd-budget-card {
    max-width: 680px;
  }
}

@media (max-width: 767px) {
  .pd-shell {
    width: min(100% - 30px, 1344px);
  }

  .pd-hero {
    padding: 142px 0 58px;
  }

  .pd-back-link {
    margin-bottom: 26px;
  }

  .pd-heading {
    align-items: flex-start;
  }

  .pd-heading h1 {
    font-size: clamp(2.85rem, 13vw, 4.8rem);
  }

  .pd-heading-actions {
    padding-top: 43px;
  }

  .pd-icon-button {
    width: 46px;
    height: 46px;
  }

  .pd-spec-grid article {
    min-height: 108px;
    padding: 20px;
  }

  .pd-spec-grid article>.material-symbols-rounded {
    width: 43px;
    height: 43px;
    font-size: 23px;
  }

  .pd-spec-grid strong {
    font-size: 1.5rem;
  }

  .pd-media-filter {
    min-width: 128px;
    padding: 14px 16px;
  }

  .pd-gallery-stage {
    height: 60vh;
    min-height: 390px;
    max-height: 570px;
  }

  .pd-gallery-arrow {
    width: 44px;
    height: 44px;
  }

  .pd-gallery-prev {
    left: 10px;
  }

  .pd-gallery-next {
    right: 10px;
  }

  .pd-media-counter {
    right: 10px;
    bottom: 10px;
  }

  .pd-thumbnail {
    flex-basis: 90px;
    height: 61px;
  }

  .pd-summary-card {
    display: block;
    padding: 25px;
  }

  .pd-summary-divider {
    display: block;
  }

  .pd-summary-card .pd-button-dark {
    margin-top: 10px;
  }

  .pd-content-section {
    padding: 70px 0;
  }

  .pd-description .section-title {
    font-size: 2.35rem;
  }

  .pd-feature-list {
    grid-template-columns: 1fr;
  }

  .pd-budget-card {
    padding: 25px;
  }

  .pd-cta-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .pd-button-light {
    width: 100%;
  }

  .pd-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .pd-modal-panel {
    padding: 34px 22px 25px;
  }

  .pd-modal h2 {
    padding-right: 42px;
    font-size: 2rem;
  }
}

@media (max-width: 520px) {
  .pd-heading {
    display: block;
  }

  .pd-heading-actions {
    padding-top: 22px;
  }

  .pd-spec-grid {
    grid-template-columns: 1fr;
  }

  .pd-spec-grid article,
  .pd-spec-grid article:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--pd-line);
  }

  .pd-spec-grid article:last-child {
    border-bottom: 0;
  }

  .pd-gallery-stage {
    height: 50vh;
    min-height: 335px;
  }

  .pd-summary-price strong {
    font-size: 1.75rem;
  }

  .pd-summary-card h2 {
    font-size: 1.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {

  .pd-gallery-media img,
  .pd-budget-result {
    animation: none;
  }
}

/* ========================================================================
   Remodelador de fachadas con IA
   ======================================================================== */

[hidden] {
  display: none !important;
}

body.pd-modal-open {
  overflow: hidden;
}

.pd-not-found {
  min-height: 70vh;
  padding: 190px 0 100px;
}

.pd-not-found h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  letter-spacing: -.06em;
}

.pd-not-found p {
  margin-top: 18px;
  color: var(--pd-muted);
}

.pd-gallery-empty {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgba(255, 255, 255, .65);
  font-size: .85rem;
}

.pd-ai-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  min-height: 390px;
  margin: 28px 0;
  overflow: hidden;
  background: #111114;
  color: #fff;
  box-shadow: 0 24px 60px rgba(17, 17, 17, .16);
}

.pd-ai-entry::before {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--brand);
  content: "";
}

.pd-ai-entry-copy {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: 48px clamp(34px, 5vw, 70px);
}

.pd-ai-entry-copy::after {
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 50%;
  content: "";
}

.pd-ai-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--brand);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.pd-ai-pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(254, 0, 0, .12);
}

.pd-ai-pulse::after {
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(254, 0, 0, .5);
  border-radius: 50%;
  content: "";
  animation: pdAiPulse 2s infinite;
}

@keyframes pdAiPulse {
  0% {
    opacity: .8;
    transform: scale(.55);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(1.25);
  }
}

.pd-ai-entry h2 {
  max-width: 610px;
  margin-top: 17px;
  font-size: clamp(2rem, 3.5vw, 3.7rem);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -.06em;
}

.pd-ai-entry-copy>p {
  max-width: 590px;
  margin-top: 20px;
  color: rgba(255, 255, 255, .63);
  font-size: .91rem;
  line-height: 1.75;
}

.pd-ai-entry-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 24px;
}

.pd-ai-entry-points span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, .82);
  font-size: .72rem;
  font-weight: 700;
}

.pd-ai-entry-points i {
  color: var(--brand);
  font-size: 19px;
  font-style: normal;
}

.pd-button-ai {
  width: auto;
  min-width: 245px;
  margin-top: 29px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 14px 34px rgba(254, 0, 0, .22);
}

.pd-button-ai:hover {
  background: #d80000;
}

.pd-ai-entry-visual {
  position: relative;
  min-height: 390px;
  overflow: hidden;
}

.pd-ai-entry-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.72) contrast(1.04);
  transition: transform .8s var(--ease);
}

.pd-ai-entry:hover .pd-ai-entry-visual img {
  transform: scale(1.035);
}

.pd-ai-entry-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #111114 0%, rgba(17, 17, 20, .42) 30%, rgba(17, 17, 20, .05) 75%);
}

.pd-ai-entry-label {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(17, 17, 20, .55);
  color: #fff;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.pd-ai-entry-lines,
.pd-ai-entry-lines::before,
.pd-ai-entry-lines::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .17);
  content: "";
}

.pd-ai-entry-lines {
  top: 18%;
  right: 13%;
  width: 38%;
  height: 52%;
}

.pd-ai-entry-lines::before {
  top: -13px;
  left: 26%;
  width: 1px;
  height: calc(100% + 26px);
}

.pd-ai-entry-lines::after {
  top: 42%;
  left: -13px;
  width: calc(100% + 26px);
  height: 1px;
}

.pd-ai-modal {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .32s ease, visibility .32s ease;
}

.pd-ai-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.pd-ai-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 11, .82);
  backdrop-filter: blur(16px);
}

.pd-ai-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1160px, 100%);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .12);
  background: #f7f7f8;
  box-shadow: 0 45px 120px rgba(0, 0, 0, .44);
  transform: translateY(22px) scale(.985);
  transition: transform .4s var(--ease);
  scrollbar-width: thin;
}

.pd-ai-modal.is-open .pd-ai-modal-panel {
  transform: none;
}

.pd-ai-modal-close {
  position: absolute;
  z-index: 8;
  top: 20px;
  right: 20px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #dedee2;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #18181b;
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}

.pd-ai-modal-close:hover {
  background: var(--brand);
  color: #fff;
  transform: rotate(5deg);
}

.pd-ai-modal-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px 82px 26px 32px;
  border-bottom: 1px solid #dfdfe3;
  background: #fff;
}

.pd-ai-brand-mark {
  display: grid;
  width: 55px;
  height: 55px;
  place-items: center;
  flex: none;
  background: #18181b;
  color: #fff;
}

.pd-ai-brand-mark span {
  color: var(--brand);
  font-size: 27px;
}

.pd-ai-modal-head h2 {
  margin-top: 5px;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -.05em;
}

.pd-ai-modal-head>div:last-child>p:last-child {
  margin-top: 7px;
  color: #73737a;
  font-size: .78rem;
}

.pd-ai-view {
  padding: 30px 32px 34px;
}

.pd-ai-workspace {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 30px;
  align-items: stretch;
}

.pd-ai-source-card {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: #18181b;
}

.pd-ai-source-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 54%, rgba(0, 0, 0, .84));
  content: "";
  pointer-events: none;
}

.pd-ai-source-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-ai-source-card figcaption {
  position: absolute;
  z-index: 2;
  right: 26px;
  bottom: 24px;
  left: 26px;
  color: #fff;
}

.pd-ai-source-card figcaption span,
.pd-ai-source-card figcaption strong {
  display: block;
}

.pd-ai-source-card figcaption span {
  color: rgba(255, 255, 255, .58);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.pd-ai-source-card figcaption strong {
  margin-top: 7px;
  font-size: 1.08rem;
}

.pd-ai-form {
  position: relative;
  padding: 3px 0;
}

.pd-ai-form>label {
  display: block;
  margin-bottom: 10px;
  color: #18181b;
  font-size: .78rem;
  font-weight: 800;
}

.pd-ai-form textarea {
  display: block;
  width: 100%;
  min-height: 158px;
  resize: vertical;
  padding: 17px 18px 34px;
  border: 1px solid #d7d7dc;
  outline: 0;
  background: #fff;
  color: #18181b;
  font: inherit;
  font-size: .84rem;
  line-height: 1.7;
  transition: border-color .2s, box-shadow .2s;
}

.pd-ai-form textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(254, 0, 0, .07);
}

.pd-ai-form textarea::placeholder {
  color: #9b9ba2;
}

.pd-ai-counter {
  position: absolute;
  top: 144px;
  right: 13px;
  color: #9a9aa1;
  font-size: .65rem;
}

.pd-ai-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pd-ai-presets button {
  padding: 9px 12px;
  border: 1px solid #d8d8dd;
  border-radius: 999px;
  background: #fff;
  color: #5f5f66;
  font-size: .67rem;
  font-weight: 750;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}

.pd-ai-presets button:hover,
.pd-ai-presets button.is-selected {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  transform: translateY(-1px);
}

.pd-ai-note {
  display: flex;
  gap: 11px;
  margin-top: 23px;
  padding: 14px 15px;
  border-left: 3px solid var(--brand);
  background: #eeeeef;
}

.pd-ai-note span {
  flex: none;
  color: var(--brand);
  font-size: 20px;
}

.pd-ai-note p {
  color: #6c6c73;
  font-size: .68rem;
  line-height: 1.55;
}

.pd-ai-submit {
  width: 100%;
  margin-top: 22px;
}

.pd-ai-submit:disabled {
  cursor: wait;
  opacity: .7;
}

.pd-ai-limit-note {
  margin-top: 10px;
  color: #99999f;
  font-size: .62rem;
  text-align: center;
}

.pd-ai-generating {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  min-height: 565px;
  padding: 0;
  background: #111114;
  color: #fff;
}

.pd-ai-generation-visual {
  position: relative;
  min-height: 565px;
  overflow: hidden;
  background: #09090b;
}

.pd-ai-generation-visual>img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .42;
  filter: grayscale(.35) contrast(1.18);
  transform: scale(1.02);
}

.pd-ai-blueprint-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(rgba(254, 0, 0, .11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(254, 0, 0, .11) 1px, transparent 1px);
  background-position: center;
  background-size: 44px 44px, 44px 44px, 176px 176px, 176px 176px;
  mix-blend-mode: screen;
}

.pd-ai-scan-line {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--brand);
  box-shadow: 0 0 30px 9px rgba(254, 0, 0, .5);
  animation: pdAiScan 3.4s cubic-bezier(.65, 0, .35, 1) infinite;
}

@keyframes pdAiScan {
  0% {
    top: 0;
    opacity: 0;
  }

  8% {
    opacity: 1;
  }

  88% {
    opacity: 1;
  }

  100% {
    top: calc(100% - 3px);
    opacity: 0;
  }
}

.pd-ai-orbit {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pdAiOrbit 5s linear infinite;
}

.pd-ai-orbit::before,
.pd-ai-orbit::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  content: "";
}

.pd-ai-orbit::before {
  inset: 16px;
}

.pd-ai-orbit::after {
  inset: 38px;
  background: rgba(254, 0, 0, .18);
}

.pd-ai-orbit span {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 18px var(--brand);
}

@keyframes pdAiOrbit {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.pd-ai-generation-badge {
  position: absolute;
  z-index: 4;
  right: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .24);
  background: rgba(0, 0, 0, .55);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.pd-ai-generation-badge span {
  color: var(--brand);
  font-size: 18px;
}

.pd-ai-generation-copy {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 46px;
}

.pd-ai-generation-copy h3 {
  margin-top: 18px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 720;
  line-height: 1.02;
  letter-spacing: -.06em;
}

.pd-ai-generation-copy>p:not(.pd-ai-kicker) {
  margin-top: 18px;
  color: rgba(255, 255, 255, .59);
  font-size: .83rem;
  line-height: 1.72;
}

.pd-ai-progress {
  height: 3px;
  margin-top: 32px;
  overflow: hidden;
  background: rgba(255, 255, 255, .13);
}

.pd-ai-progress span {
  display: block;
  width: 42%;
  height: 100%;
  background: var(--brand);
  animation: pdAiProgress 2.1s ease-in-out infinite;
}

@keyframes pdAiProgress {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(350%);
  }
}

.pd-ai-generation-copy small {
  margin-top: 13px;
  color: rgba(255, 255, 255, .36);
  font-size: .65rem;
  line-height: 1.55;
}

.pd-ai-result {
  padding: 30px 32px 34px;
}

.pd-ai-result-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 22px;
}

.pd-ai-result-head h3 {
  margin-top: 7px;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -.05em;
}

.pd-ai-result-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid #d8d8dc;
  background: #fff;
  color: #5d5d64;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pd-ai-result-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #20b15a;
  box-shadow: 0 0 0 4px rgba(32, 177, 90, .12);
}

.pd-ai-comparison {
  --compare-position: 50%;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #18181b;
  user-select: none;
}

.pd-ai-comparison img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.pd-ai-before-wrap {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 calc(100% - var(--compare-position)) 0 0);
}

.pd-ai-before {
  max-width: none;
}

.pd-ai-compare-line {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  left: var(--compare-position);
  width: 2px;
  background: #fff;
  box-shadow: 0 0 20px rgba(0, 0, 0, .45);
  transform: translateX(-1px);
  pointer-events: none;
}

.pd-ai-compare-line span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  transform: translate(-50%, -50%);
}

.pd-ai-comparison input[type="range"] {
  position: absolute;
  z-index: 6;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.pd-ai-compare-label {
  position: absolute;
  z-index: 5;
  top: 16px;
  padding: 8px 11px;
  background: rgba(17, 17, 20, .64);
  color: #fff;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(9px);
  pointer-events: none;
}

.pd-ai-label-before {
  left: 16px;
}

.pd-ai-label-after {
  right: 16px;
}

.pd-ai-result-prompt {
  margin-top: 15px;
  padding: 13px 15px;
  border-left: 3px solid var(--brand);
  background: #ececee;
  color: #68686f;
  font-size: .72rem;
  line-height: 1.55;
}

.pd-ai-result-actions {
  display: grid;
  grid-template-columns: .9fr .7fr 1.15fr;
  gap: 10px;
  margin-top: 20px;
}

.pd-ai-result-actions .pd-button {
  margin-top: 0;
}

.pd-button-outline {
  border-color: #cfcfd4;
  background: #fff;
  color: #18181b;
}

.pd-button-outline:hover {
  border-color: #18181b;
  background: #18181b;
  color: #fff;
}

.pd-ai-error {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 32px;
  padding: 24px;
  border-left: 4px solid var(--brand);
  background: #fff;
  box-shadow: 0 14px 40px rgba(17, 17, 17, .08);
}

.pd-ai-error>span {
  color: var(--brand);
  font-size: 35px;
}

.pd-ai-error strong,
.pd-ai-error p {
  display: block;
}

.pd-ai-error strong {
  font-size: .9rem;
}

.pd-ai-error p {
  margin-top: 4px;
  color: #74747b;
  font-size: .75rem;
}

.pd-ai-error button {
  margin-left: auto;
  padding: 10px 13px;
  border: 1px solid #18181b;
  background: #18181b;
  color: #fff;
  font-size: .67rem;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 960px) {
  .pd-ai-entry {
    grid-template-columns: 1fr;
  }

  .pd-ai-entry-visual {
    min-height: 330px;
  }

  .pd-ai-entry-overlay {
    background: linear-gradient(180deg, #111114 0%, rgba(17, 17, 20, .05) 30%);
  }

  .pd-ai-workspace {
    grid-template-columns: 1fr;
  }

  .pd-ai-source-card {
    min-height: 380px;
  }

  .pd-ai-generating {
    grid-template-columns: 1fr;
  }

  .pd-ai-generation-visual {
    min-height: 390px;
  }

  .pd-ai-generation-copy {
    padding: 36px;
  }
}

@media (max-width: 700px) {
  .pd-ai-entry-copy {
    padding: 38px 27px 42px;
  }

  .pd-ai-entry h2 {
    font-size: 2.25rem;
  }

  .pd-ai-entry-points {
    display: grid;
  }

  .pd-button-ai {
    width: 100%;
    min-width: 0;
  }

  /*.pd-ai-modal {
    padding: 0;
  }

  .pd-ai-modal-panel {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    overflow-y: scroll;
  }*/

  .pd-ai-modal {
    display: block;
    padding: 0;
    overflow-y: auto;
  }

  .pd-ai-modal-panel {
    width: 100%;
    height: 100dvh;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0;
  }

  .pd-ai-modal-head {
    align-items: flex-start;
    padding: 22px 70px 21px 20px;
  }

  .pd-ai-brand-mark {
    width: 45px;
    height: 45px;
  }

  .pd-ai-modal-head>div:last-child>p:last-child {
    display: none;
  }

  .pd-ai-modal-close {
    top: 16px;
    right: 15px;
  }

  .pd-ai-view,
  .pd-ai-result {
    padding: 20px;
  }

  .pd-ai-source-card {
    min-height: 280px;
  }

  .pd-ai-form textarea {
    min-height: 145px;
  }

  .pd-ai-counter {
    top: 131px;
  }

  .pd-ai-generating {
    min-height: calc(100vh - 99px);
    padding: 0;
  }

  .pd-ai-generation-visual {
    min-height: 42vh;
  }

  .pd-ai-generation-copy {
    padding: 31px 23px 38px;
  }

  .pd-ai-generation-copy h3 {
    font-size: 2.25rem;
  }

  .pd-ai-result-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .pd-ai-comparison {
    aspect-ratio: 4 / 3;
  }

  .pd-ai-result-actions {
    grid-template-columns: 1fr;
  }

  .pd-ai-error {
    align-items: flex-start;
    flex-wrap: wrap;
    margin: 20px;
  }

  .pd-ai-error button {
    width: 100%;
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {

  .pd-ai-pulse::after,
  .pd-ai-scan-line,
  .pd-ai-orbit,
  .pd-ai-progress span {
    animation: none;
  }
}

@media (max-width: 720px) {
  .pd-gallery-ai-action {
    left: 12px;
    bottom: 12px;
    min-height: 44px;
    max-width: calc(100% - 92px);
    padding: 0 14px;
    font-size: .7rem;
  }
}