/*
 * PideTuRótulo — integrated page endings, V5.
 * Load after each storefront's own CSS. The body declares data-ns-site.
 *
 * These rules paint the existing ending and its existing trailing space.
 * They do not add a wrapper, move a DOM node, or change width, height,
 * padding, margin, display, typography, links, or button styling.
 * A zero-blur shadow extends the surface; clip-path bounds it precisely.
 */

/* The five card endings use different existing bottom margins. */
body[data-ns-site="accesibilidad"] main > .contact-band:last-child,
body[data-ns-site="accesorios"] main > .contact-band:last-child,
body[data-ns-site="led"] main > .contact-band:last-child {
  --ns-close-tail: 50px;
}

/* shop.css is loaded after storefront.css: 24px wins at every width. */
body[data-ns-site="detalles"] main > .contact-band:last-child {
  --ns-close-tail: 24px;
}

/* Neither of these two endings has a bottom margin or a parent tail. */
body[data-ns-site="presencia"] main > .contact-band:last-child,
body[data-ns-site="textiles"] main > .contact-section:last-child {
  --ns-close-tail: 0px;
}

body[data-ns-site="accesibilidad"] main > .contact-band:last-child,
body[data-ns-site="accesorios"] main > .contact-band:last-child,
body[data-ns-site="detalles"] main > .contact-band:last-child,
body[data-ns-site="led"] main > .contact-band:last-child,
body[data-ns-site="presencia"] main > .contact-band:last-child,
body[data-ns-site="textiles"] main > .contact-section:last-child {
  background: #202020;
  color: #f6f2eb;
  border-color: transparent;
  border-radius: 0;
  box-shadow: 0 0 0 100vmax #202020;
  clip-path: inset(0 -100vmax calc(0px - var(--ns-close-tail)) -100vmax);
}

/* Explicit title rules preserve each existing em/accent colour. */
body[data-ns-site="accesibilidad"] main > .contact-band:last-child h2,
body[data-ns-site="accesorios"] main > .contact-band:last-child h2,
body[data-ns-site="detalles"] main > .contact-band:last-child h2,
body[data-ns-site="led"] main > .contact-band:last-child h2,
body[data-ns-site="presencia"] main > .contact-band:last-child h2,
body[data-ns-site="textiles"] main > .contact-section:last-child h2 {
  color: #f6f2eb;
}

body[data-ns-site="accesibilidad"] main > .contact-band:last-child .eyebrow,
body[data-ns-site="accesorios"] main > .contact-band:last-child .eyebrow,
body[data-ns-site="detalles"] main > .contact-band:last-child .eyebrow,
body[data-ns-site="led"] main > .contact-band:last-child .eyebrow,
body[data-ns-site="presencia"] main > .contact-band:last-child .eyebrow,
body[data-ns-site="textiles"] main > .contact-section:last-child .eyebrow {
  color: #7d8be1;
}

/* Only plain contact links; button colours and interactions stay intact. */
body[data-ns-site="accesibilidad"] main > .contact-band:last-child a:not(.button),
body[data-ns-site="accesorios"] main > .contact-band:last-child a:not(.button),
body[data-ns-site="led"] main > .contact-band:last-child a:not(.button),
body[data-ns-site="textiles"] main > .contact-section:last-child .contact-mail {
  color: #e3dfd7;
}

body[data-ns-site="textiles"] main > .contact-section:last-child > div > p:not(.eyebrow) {
  color: #d5d2cb;
}

/*
 * Planos: the catalogue follows its CTA. Paint only the final order row
 * and the catalogue's existing bottom padding, never the product cards.
 * Base .section padding-bottom is 100px; see breakpoints below.
 */
body[data-ns-site="planos"] main > #senales.catalog-section:last-child > .catalog-end:last-child {
  --ns-close-tail: 100px;
  background: #202020;
  color: #f6f2eb;
  border-color: transparent;
  box-shadow: 0 0 0 100vmax #202020;
  clip-path: inset(0 -100vmax calc(0px - var(--ns-close-tail)) -100vmax);
}

body[data-ns-site="planos"] main > #senales.catalog-section:last-child > .catalog-end:last-child > p {
  color: #d5d2cb;
}

@media (max-width: 1100px) {
  body[data-ns-site="accesibilidad"] main > .contact-band:last-child,
  body[data-ns-site="accesorios"] main > .contact-band:last-child,
  body[data-ns-site="led"] main > .contact-band:last-child {
    --ns-close-tail: 35px;
  }

  body[data-ns-site="planos"] main > #senales.catalog-section:last-child > .catalog-end:last-child {
    --ns-close-tail: 80px;
  }
}

@media (max-width: 800px) {
  body[data-ns-site="planos"] main > #senales.catalog-section:last-child > .catalog-end:last-child {
    --ns-close-tail: 68px;
  }
}

@media (max-width: 780px) {
  /* elegance.css overrides Accesibilidad's base 25px with 28px. */
  body[data-ns-site="accesibilidad"] main > .contact-band:last-child {
    --ns-close-tail: 28px;
  }

  body[data-ns-site="accesorios"] main > .contact-band:last-child,
  body[data-ns-site="led"] main > .contact-band:last-child {
    --ns-close-tail: 25px;
  }
}

@media (max-width: 540px) {
  /* catalog.css overrides the base .section's 58px with 45px. */
  body[data-ns-site="planos"] main > #senales.catalog-section:last-child > .catalog-end:last-child {
    --ns-close-tail: 45px;
  }
}

/* The storefronts retain their existing print visibility rules. */
@media print {
  body[data-ns-site="accesibilidad"] main > .contact-band:last-child,
  body[data-ns-site="accesorios"] main > .contact-band:last-child,
  body[data-ns-site="detalles"] main > .contact-band:last-child,
  body[data-ns-site="led"] main > .contact-band:last-child,
  body[data-ns-site="presencia"] main > .contact-band:last-child,
  body[data-ns-site="textiles"] main > .contact-section:last-child,
  body[data-ns-site="planos"] main > #senales.catalog-section:last-child > .catalog-end:last-child {
    box-shadow: none;
    clip-path: none;
  }
}

/*
 * PideTuRótulo — compact static endings, V6.
 * Append after V5. Scope: the existing final CTA, never the product catalogue.
 * The actual lower margin/padding and the painted tail share one token.
 * Screen-only rules preserve the storefronts' existing print behaviour.
 */
@media screen {
  body:is(
    [data-ns-site="accesibilidad"],
    [data-ns-site="accesorios"],
    [data-ns-site="detalles"],
    [data-ns-site="led"],
    [data-ns-site="presencia"],
    [data-ns-site="textiles"],
    [data-ns-site="planos"]
  ) {
    --ns-ending-max: 1360px;
    --ns-ending-gutter: clamp(20px, 4vw, 56px);
    --ns-ending-width: min(var(--ns-ending-max), calc(100% - 2 * var(--ns-ending-gutter)));
    --ns-ending-pad: 28px;
    --ns-ending-tail: 24px;
    --ns-ending-gap: 28px;
    --ns-ending-title: clamp(28px, 3vw, 36px);
  }

  /* Same content alignment and rhythm for the six existing closing cards. */
  body:is(
    [data-ns-site="accesibilidad"],
    [data-ns-site="accesorios"],
    [data-ns-site="detalles"],
    [data-ns-site="led"],
    [data-ns-site="presencia"]
  ) main > .contact-band:last-child,
  body[data-ns-site="textiles"] main > .contact-section:last-child {
    --ns-close-tail: var(--ns-ending-tail);
    box-sizing: border-box;
    width: var(--ns-ending-width);
    max-width: var(--ns-ending-max);
    margin: 0 auto var(--ns-ending-tail);
    padding: var(--ns-ending-pad) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ns-ending-gap);
    border: 0;
    border-radius: 0;
    background: #202020;
    color: #f6f2eb;
    box-shadow: 0 0 0 100vmax #202020;
    clip-path: inset(0 -100vmax calc(0px - var(--ns-close-tail)) -100vmax);
  }

  body:is(
    [data-ns-site="accesibilidad"],
    [data-ns-site="accesorios"],
    [data-ns-site="detalles"],
    [data-ns-site="led"],
    [data-ns-site="presencia"]
  ) main > .contact-band:last-child h2,
  body[data-ns-site="textiles"] main > .contact-section:last-child h2 {
    margin: 0;
    font-size: var(--ns-ending-title);
    line-height: 1.14;
    color: #f6f2eb;
  }

  /* Existing typefaces and em colours remain part of each storefront's voice. */
  body:is(
    [data-ns-site="accesibilidad"],
    [data-ns-site="accesorios"],
    [data-ns-site="detalles"],
    [data-ns-site="led"],
    [data-ns-site="presencia"]
  ) main > .contact-band:last-child .eyebrow,
  body[data-ns-site="textiles"] main > .contact-section:last-child .eyebrow {
    margin: 0 0 10px;
    font-size: 10px;
    line-height: 1.5;
    letter-spacing: .14em;
    color: #7d8be1;
  }

  /* The two existing CTA/email columns keep their HTML and all actions. */
  body:is([data-ns-site="accesibilidad"], [data-ns-site="led"])
    main > .contact-band:last-child > div:last-child {
    align-items: flex-start;
    gap: 12px;
  }

  body:is(
    [data-ns-site="accesibilidad"],
    [data-ns-site="detalles"],
    [data-ns-site="led"],
    [data-ns-site="presencia"]
  ) main > .contact-band:last-child .button,
  body[data-ns-site="textiles"] main > .contact-section:last-child .button,
  body[data-ns-site="planos"] main > #senales.catalog-section:last-child > .catalog-end:last-child .button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 0;
    padding: 10px 20px;
    gap: 16px;
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Accesorios uses a direct email link as its primary closing action. */
  body[data-ns-site="accesorios"] main > .contact-band:last-child > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  body:is([data-ns-site="accesibilidad"], [data-ns-site="led"])
    main > .contact-band:last-child a:not(.button),
  body[data-ns-site="textiles"] main > .contact-section:last-child .contact-mail {
    font-size: 12px;
    line-height: 1.5;
    color: #e3dfd7;
  }

  /* Textiles has a useful short description alongside its heading. */
  body[data-ns-site="textiles"] main > .contact-section:last-child > div:last-child {
    max-width: 430px;
  }
  body[data-ns-site="textiles"] main > .contact-section:last-child > div > p:not(.eyebrow) {
    max-width: 430px;
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: #d5d2cb;
  }
  body[data-ns-site="textiles"] main > .contact-section:last-child .button {
    margin-top: 14px;
  }
  body[data-ns-site="textiles"] main > .contact-section:last-child .contact-mail {
    margin-top: 8px;
  }

  /* Planos: shorten only the trailing catalogue padding and final order row.
   * Product grid, filters, image note, card widths and prices are untouched.
   * The row stays within the catalogue's original horizontal content bounds.
   */
  body[data-ns-site="planos"] main > #senales.catalog-section:last-child {
    padding-bottom: var(--ns-ending-tail);
  }
  body[data-ns-site="planos"] main > #senales.catalog-section:last-child > .catalog-end:last-child {
    --ns-close-tail: var(--ns-ending-tail);
    box-sizing: border-box;
    width: min(100%, var(--ns-ending-max));
    margin: 24px auto 0;
    padding-top: 24px;
    gap: 24px;
    align-items: center;
    background: #202020;
    color: #f6f2eb;
    border-color: transparent;
    box-shadow: 0 0 0 100vmax #202020;
    clip-path: inset(0 -100vmax calc(0px - var(--ns-close-tail)) -100vmax);
  }
  body[data-ns-site="planos"] main > #senales.catalog-section:last-child > .catalog-end:last-child > p {
    margin: 0;
    max-width: none;
    font-size: 13px;
    line-height: 1.6;
    color: #d5d2cb;
  }

  @media (max-width: 780px) {
    body:is(
      [data-ns-site="accesibilidad"],
      [data-ns-site="accesorios"],
      [data-ns-site="detalles"],
      [data-ns-site="led"],
      [data-ns-site="presencia"],
      [data-ns-site="textiles"],
      [data-ns-site="planos"]
    ) {
      --ns-ending-pad: 24px;
      --ns-ending-gap: 20px;
    }

    body:is(
      [data-ns-site="accesibilidad"],
      [data-ns-site="accesorios"],
      [data-ns-site="detalles"],
      [data-ns-site="led"],
      [data-ns-site="presencia"]
    ) main > .contact-band:last-child,
    body[data-ns-site="textiles"] main > .contact-section:last-child {
      flex-direction: column;
      align-items: flex-start;
    }
    body[data-ns-site="textiles"] main > .contact-section:last-child > div:last-child {
      max-width: none;
    }
  }

  @media (max-width: 540px) {
    body[data-ns-site="planos"] main > #senales.catalog-section:last-child > .catalog-end:last-child {
      flex-direction: column;
      align-items: flex-start;
      gap: 14px;
    }
  }
}

/* NS_CLOSING_DYNAMIC_V6_START
 * Retains the V5 dark join, with the compact geometry overrides below.
 * Load the complete file after the storefront styles.
 * Only established ending sections and their lower spacing are adapted.
 */

/* LETRAS: the existing full-width Questions composition already has light text. */
body[data-ns-site="letras"] [data-ns-closing="questions"] {
  background: #202020;
}
/* Catalogue/studio have no independent full-width closing CTA. Paint only the
 * existing empty bottom padding, without touching the product grid or controls. */
body[data-ns-site="letras"] main:has(> .catalog) {
  background: linear-gradient(to bottom, transparent calc(100% - 100px), #202020 0);
}
body[data-ns-site="letras"] main:has(> .studio-page) {
  background: linear-gradient(to bottom, transparent calc(100% - 65px), #202020 0);
}
@media (max-width: 760px) {
  body[data-ns-site="letras"] main:has(> .catalog) {
    background: linear-gradient(to bottom, transparent calc(100% - 60px), #202020 0);
  }
  body[data-ns-site="letras"] main:has(> .studio-page) {
    background: linear-gradient(to bottom, transparent calc(100% - 55px), #202020 0);
  }
}

/* ESTUDIO 3D: each public route keeps its own existing closing content. */
body[data-ns-site="3d"] main > .faq,
body[data-ns-site="3d"] main > .page-intro > .custom-project-invite:last-child,
body[data-ns-site="3d"] .studio-page > .studio-guidance,
body[data-ns-site="3d"] .materials-page > .materials-faq,
body[data-ns-site="3d"] .decor-page > .decor-custom,
body[data-ns-site="3d"] .trophies-page > .custom-project-invite,
body[data-ns-site="3d"] .trophies-page > .visual-disclaimer:last-child {
  --ns-closing-tail: 0px;
  background: #202020;
  color: #f5f3ed;
  border-color: #535351;
  border-radius: 0;
  box-shadow: 0 0 0 100vmax #202020;
  clip-path: inset(0 -100vmax calc(-1 * var(--ns-closing-tail)) -100vmax);
}
body[data-ns-site="3d"] main > .faq :is(h2, summary),
body[data-ns-site="3d"] .materials-faq > summary,
body[data-ns-site="3d"] .materials-faq .faq :is(h2, summary),
body[data-ns-site="3d"] .studio-page > .studio-guidance > summary {
  color: #f5f3ed;
}
body[data-ns-site="3d"] main > .faq .eyebrow,
body[data-ns-site="3d"] main > .faq h2 em,
body[data-ns-site="3d"] .materials-faq .faq :is(.eyebrow, h2 em),
body[data-ns-site="3d"] .materials-faq > summary svg,
body[data-ns-site="3d"] main > .page-intro > .custom-project-invite .eyebrow,
body[data-ns-site="3d"] .trophies-page > .custom-project-invite .eyebrow,
body[data-ns-site="3d"] .decor-page > .decor-custom .eyebrow {
  color: #7687ee;
}
body[data-ns-site="3d"] main > .faq details,
body[data-ns-site="3d"] .materials-faq .faq details {
  border-color: #535351;
}
body[data-ns-site="3d"] main > .faq details p,
body[data-ns-site="3d"] .materials-faq .faq details p,
body[data-ns-site="3d"] .studio-page > .studio-guidance p,
body[data-ns-site="3d"] .decor-page > .decor-custom p:not(.eyebrow),
body[data-ns-site="3d"] main > .page-intro > .custom-project-invite :is(.custom-invite-copy > p:last-child, .custom-invite-action > small),
body[data-ns-site="3d"] .trophies-page > .custom-project-invite :is(.custom-invite-copy > p:last-child, .custom-invite-action > small),
body[data-ns-site="3d"] .trophies-page > .visual-disclaimer:last-child {
  color: #b7c7ef;
}
body[data-ns-site="3d"] main > .page-intro > .custom-project-invite h2 em,
body[data-ns-site="3d"] .trophies-page > .custom-project-invite h2 em {
  color: #d9bfaa;
}
body[data-ns-site="3d"] main > .page-intro > .custom-project-invite:last-child {
  --ns-closing-tail: 75px;
}
body[data-ns-site="3d"] .studio-page > .studio-guidance {
  --ns-closing-tail: 60px;
}
body[data-ns-site="3d"] .studio-page.lighting-page > .studio-guidance {
  --ns-closing-tail: 75px;
}
body[data-ns-site="3d"] .materials-page > .materials-faq {
  --ns-closing-tail: 95px; /* 20px own margin + 75px section padding */
}
body[data-ns-site="3d"] .decor-page > .decor-custom {
  --ns-closing-tail: 70px;
}
body[data-ns-site="3d"] .decor-page > .decor-custom .button.dark {
  box-shadow: inset 0 0 0 1px #677dc8;
}
body[data-ns-site="3d"] .trophies-page > .custom-project-invite {
  --ns-closing-tail: 13px; /* space before the existing final disclaimer */
}
body[data-ns-site="3d"] .trophies-page > .visual-disclaimer:last-child {
  --ns-closing-tail: 90px;
}
/* The creation studio ends in a two-column workspace. Its controls are not
 * recolored or overpainted; the existing 80/55px lower padding joins the footer. */
body[data-ns-site="3d"] main:has(> .design-page) {
  background: linear-gradient(to bottom, transparent calc(100% - 80px), #202020 0);
}
/* Empty catalogue results have no CustomProjectInvite. */
body[data-ns-site="3d"] main:has(> .page-intro:not(.materials-page)):not(:has(> .page-intro > .custom-project-invite)) {
  background: linear-gradient(to bottom, transparent calc(100% - 75px), #202020 0);
}
@media (max-width: 800px) {
  body[data-ns-site="3d"] .studio-page.lighting-page > .studio-guidance { --ns-closing-tail: 45px; }
  body[data-ns-site="3d"] main:has(> .design-page) {
    background: linear-gradient(to bottom, transparent calc(100% - 55px), #202020 0);
  }
}
@media (max-width: 550px) {
  body[data-ns-site="3d"] main > .page-intro > .custom-project-invite:last-child { --ns-closing-tail: 49px; }
  body[data-ns-site="3d"] .materials-page > .materials-faq { --ns-closing-tail: 69px; }
  body[data-ns-site="3d"] .trophies-page > .custom-project-invite { --ns-closing-tail: 11px; }
  body[data-ns-site="3d"] main:has(> .page-intro:not(.materials-page)):not(:has(> .page-intro > .custom-project-invite)) {
    background: linear-gradient(to bottom, transparent calc(100% - 49px), #202020 0);
  }
}

/* TECHO VIVO: FAQ on the storefront and final reference links in development. */
body[data-ns-site="techo"] main > .faq-refined,
body[data-ns-site="techo"] .development-page > .source-links {
  --ns-closing-tail: 0px;
  background: #202020;
  color: #f5f3ed;
  box-shadow: 0 0 0 100vmax #202020;
  clip-path: inset(0 -100vmax calc(-1 * var(--ns-closing-tail)) -100vmax);
}
body[data-ns-site="techo"] main > .faq-refined { border-top-color: #202020; }
body[data-ns-site="techo"] main > .faq-refined :is(h2, summary) { color: #f5f3ed; }
body[data-ns-site="techo"] main > .faq-refined h2 em,
body[data-ns-site="techo"] main > .faq-refined summary svg { color: #7687ee; }
body[data-ns-site="techo"] main > .faq-refined .faqs p { color: #b7c7ef; }
body[data-ns-site="techo"] main > .faq-refined .faqs details { border-color: #535351; }
body[data-ns-site="techo"] .development-page > .source-links { --ns-closing-tail: 90px; }
/* Projects and control are work areas: keep their contents on their established
 * surface and use their existing lower padding for the direct dark join. */
body[data-ns-site="techo"] main:has(> :is(.projects-page, .control-page)) {
  background: linear-gradient(to bottom, transparent calc(100% - 90px), #202020 0);
}
@media (max-width: 850px) {
  body[data-ns-site="techo"] .development-page > .source-links { --ns-closing-tail: 70px; }
  body[data-ns-site="techo"] main:has(> :is(.projects-page, .control-page)) {
    background: linear-gradient(to bottom, transparent calc(100% - 70px), #202020 0);
  }
}
@media (max-width: 560px) {
  body[data-ns-site="techo"] .development-page > .source-links { --ns-closing-tail: 57px; }
  body[data-ns-site="techo"] main:has(> :is(.projects-page, .control-page)) {
    background: linear-gradient(to bottom, transparent calc(100% - 57px), #202020 0);
  }
}

/* TIENDA GLOBAL: the complete directory is the home page's actual ending. */
body[data-ns-site="global"] #content > .ns-seo-directory {
  background: #202020;
  color: #f5f3ed;
  border-top-color: #202020;
}
body[data-ns-site="global"] #content > .ns-seo-directory nav a { border-bottom-color: #535351; }
body[data-ns-site="global"] #content > .ns-seo-directory a:hover { color: #7687ee; }
body[data-ns-site="global"] #content > .ns-seo-directory a:focus-visible { outline-color: #7687ee; }
/* Catalogue/sidebar and request forms keep their own text and input colors. */
body[data-ns-site="global"] #content:has(> .ns-unified-catalogue) {
  background: linear-gradient(to bottom, transparent calc(100% - 74px), #202020 0);
}
body[data-ns-site="global"] #content:has(> :is(.cart-layout, .checkout)) {
  background: linear-gradient(to bottom, transparent calc(100% - 65px), #202020 0);
}
/* These endings use bottom margins rather than padding. A paint-only extension
 * fills those existing margins; its box-shadow cannot create horizontal scroll. */
body[data-ns-site="global"] #content > .confirmation,
body[data-ns-site="global"] #content > .legal,
body[data-ns-site="global"] #content > .product-page > .ns-product-shelves:last-child {
  position: relative;
}
body[data-ns-site="global"] #content > .confirmation { --ns-closing-margin: 100px; }
body[data-ns-site="global"] #content > .legal { --ns-closing-margin: 80px; }
body[data-ns-site="global"] #content > .product-page > .ns-product-shelves:last-child {
  --ns-closing-margin: clamp(34px, 4vw, 64px);
}
body[data-ns-site="global"] #content > .confirmation::after,
body[data-ns-site="global"] #content > .legal::after,
body[data-ns-site="global"] #content > .product-page > .ns-product-shelves:last-child::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: var(--ns-closing-margin);
  background: #202020;
  box-shadow: 0 0 0 100vmax #202020;
  clip-path: inset(0 -100vmax);
  pointer-events: none;
}


/* Compact shared rhythm. A single variable drives the real lower spacing and
 * the dark surface painted through it; the two cannot drift at breakpoints. */
body:is([data-ns-site="letras"], [data-ns-site="3d"], [data-ns-site="techo"], [data-ns-site="global"]) {
  --ns-ending-max: 1360px;
  --ns-ending-gutter: clamp(20px, 4vw, 56px);
  --ns-ending-title: clamp(28px, 3vw, 36px);
  --ns-work-tail: 40px;
}

/* LETRAS. Keep the full-width background and the FAQ's own visual composition. */
body[data-ns-site="letras"] [data-ns-closing="questions"] {
  padding-block: 32px;
}
body[data-ns-site="letras"] [data-ns-closing="questions"] > div {
  width: calc(100% - 2 * var(--ns-ending-gutter));
  max-width: var(--ns-ending-max);
  margin-inline: auto;
  padding-inline: 0;
  gap: clamp(28px, 4vw, 56px);
}
body[data-ns-site="letras"] [data-ns-closing="questions"] h2 {
  font-size: var(--ns-ending-title);
  line-height: 1.14;
  margin-top: 18px;
}
body[data-ns-site="letras"] [data-ns-closing="questions"] details > summary {
  min-height: 54px;
  padding-block: 14px;
}
body[data-ns-site="letras"] [data-ns-closing="questions"] details > p {
  padding-bottom: 18px;
}
body[data-ns-site="letras"] [data-ns-closing="questions"] button {
  min-height: 44px;
}
body[data-ns-site="letras"] main > :is(.catalog, .studio-page) {
  padding-bottom: var(--ns-work-tail);
}
body[data-ns-site="letras"] main:has(> :is(.catalog, .studio-page)) {
  background: linear-gradient(to bottom, transparent calc(100% - var(--ns-work-tail)), #202020 0);
}

/* Shared FAQ proportions for Estudio 3D and Techo Vivo. */
body[data-ns-site="3d"] main > .faq,
body[data-ns-site="techo"] main > .faq-refined {
  width: calc(100% - 2 * var(--ns-ending-gutter));
  max-width: var(--ns-ending-max);
  margin-inline: auto;
  padding: 32px 0;
  gap: clamp(24px, 4vw, 56px);
}
body[data-ns-site="3d"] main > .faq h2,
body[data-ns-site="techo"] main > .faq-refined h2 {
  font-size: var(--ns-ending-title);
  line-height: 1.15;
}
body[data-ns-site="3d"] main > .faq .eyebrow { margin-bottom: 16px; }
body[data-ns-site="3d"] main > .faq details,
body[data-ns-site="3d"] .materials-faq .faq details,
body[data-ns-site="techo"] main > .faq-refined .faqs details {
  padding: 0;
}
body[data-ns-site="3d"] main > .faq summary,
body[data-ns-site="3d"] .materials-faq .faq summary,
body[data-ns-site="techo"] main > .faq-refined .faqs summary {
  min-height: 54px;
  padding: 14px 0;
  line-height: 1.6;
}
body[data-ns-site="3d"] main > .faq details p,
body[data-ns-site="3d"] .materials-faq .faq details p,
body[data-ns-site="techo"] main > .faq-refined .faqs details > p {
  margin: 0;
  padding: 0 0 18px;
  line-height: 1.8;
}

/* ESTUDIO 3D: every route gets the same lower spacing. Existing .wrap parents
 * retain their width, so nested closings do not acquire a second gutter. */
body[data-ns-site="3d"] main > :is(.page-intro, .trophies-page, .decor-page, .studio-page, .design-page),
body[data-ns-site="3d"] main > .studio-page.wrap.lighting-page {
  padding-bottom: var(--ns-work-tail);
}
body[data-ns-site="3d"] main > .page-intro > .custom-project-invite:last-child,
body[data-ns-site="3d"] .trophies-page > .custom-project-invite,
body[data-ns-site="3d"] .decor-page > .decor-custom {
  width: 100%;
  max-width: var(--ns-ending-max);
  margin-inline: auto;
  padding: 30px 0;
  gap: 28px;
}
body[data-ns-site="3d"] main > .page-intro > .custom-project-invite:last-child,
body[data-ns-site="3d"] .trophies-page > .custom-project-invite {
  margin-top: 44px;
}
body[data-ns-site="3d"] .decor-page > .decor-custom {
  margin-top: 52px;
}
body[data-ns-site="3d"] main > .page-intro > .custom-project-invite h2,
body[data-ns-site="3d"] .trophies-page > .custom-project-invite h2,
body[data-ns-site="3d"] .decor-page > .decor-custom h2 {
  font-size: var(--ns-ending-title);
  line-height: 1.15;
  margin-block: 14px 12px;
}
body[data-ns-site="3d"] main > .page-intro > .custom-project-invite .button,
body[data-ns-site="3d"] .trophies-page > .custom-project-invite .button,
body[data-ns-site="3d"] .decor-page > .decor-custom .button {
  min-height: 44px;
  padding: 12px 18px;
}
body[data-ns-site="3d"] .studio-page > .studio-guidance {
  width: 100%;
  max-width: var(--ns-ending-max);
  margin-top: 20px;
  padding-block: 8px;
  text-align: left;
}
body[data-ns-site="3d"] .studio-page > .studio-guidance > summary {
  min-height: 44px;
  padding-block: 12px;
}
body[data-ns-site="3d"] .materials-page > .materials-faq {
  margin-bottom: 16px;
}
body[data-ns-site="3d"] .materials-page > .materials-faq > summary {
  min-height: 54px;
  padding-block: 14px;
}
body[data-ns-site="3d"] .trophies-page > .visual-disclaimer:last-child {
  margin-top: 10px;
}
body[data-ns-site="3d"] main > .page-intro > .custom-project-invite:last-child,
body[data-ns-site="3d"] .studio-page > .studio-guidance,
body[data-ns-site="3d"] .studio-page.lighting-page > .studio-guidance,
body[data-ns-site="3d"] .decor-page > .decor-custom,
body[data-ns-site="3d"] .trophies-page > .visual-disclaimer:last-child {
  --ns-closing-tail: var(--ns-work-tail);
}
body[data-ns-site="3d"] .materials-page > .materials-faq {
  --ns-closing-tail: calc(var(--ns-work-tail) + 16px);
}
body[data-ns-site="3d"] .trophies-page > .custom-project-invite {
  --ns-closing-tail: 10px;
}
body[data-ns-site="3d"] main:has(> .design-page),
body[data-ns-site="3d"] main:has(> .page-intro:not(.materials-page)):not(:has(> .page-intro > .custom-project-invite)) {
  background: linear-gradient(to bottom, transparent calc(100% - var(--ns-work-tail)), #202020 0);
}

/* TECHO VIVO. Only the end of work views is compacted; their controls keep their
 * original surface, colors, hierarchy and action behavior. */
body[data-ns-site="techo"] main > :is(.control-page, .projects-page, .development-page) {
  padding-bottom: var(--ns-work-tail);
}
body[data-ns-site="techo"] .development-page > .source-links {
  --ns-closing-tail: var(--ns-work-tail);
  margin-top: 28px;
  gap: 12px 20px;
}
body[data-ns-site="techo"] .development-page > .source-links > a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
body[data-ns-site="techo"] main:has(> :is(.projects-page, .control-page)) {
  background: linear-gradient(to bottom, transparent calc(100% - var(--ns-work-tail)), #202020 0);
}

/* TIENDA GLOBAL. The directory remains a genuine navigation section. */
body[data-ns-site="global"] #content > .ns-seo-directory {
  width: calc(100% - 2 * var(--ns-ending-gutter));
  max-width: var(--ns-ending-max);
  margin: 24px auto 0;
  padding: 32px 0;
  box-shadow: 0 0 0 100vmax #202020;
  clip-path: inset(0 -100vmax);
}
body[data-ns-site="global"] #content > .ns-seo-directory h2 {
  font-size: var(--ns-ending-title);
  line-height: 1.15;
  margin-bottom: 18px;
}
body[data-ns-site="global"] #content > .ns-seo-directory nav {
  gap: 6px 24px;
  margin-bottom: 18px;
}
body[data-ns-site="global"] #content > .ns-seo-directory nav a {
  min-height: 44px;
  align-items: center;
  padding-block: 10px;
}
body[data-ns-site="global"] #content > .ns-seo-directory > .text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
body[data-ns-site="global"] #content > :is(.ns-unified-catalogue, .cart-layout, .checkout) {
  padding-bottom: var(--ns-work-tail);
}
body[data-ns-site="global"] #content:has(> :is(.ns-unified-catalogue, .cart-layout, .checkout)) {
  background: linear-gradient(to bottom, transparent calc(100% - var(--ns-work-tail)), #202020 0);
}
body[data-ns-site="global"] #content > .confirmation,
body[data-ns-site="global"] #content > .legal,
body[data-ns-site="global"] #content > .product-page > .ns-product-shelves:last-child {
  --ns-closing-margin: var(--ns-work-tail);
  margin-bottom: var(--ns-work-tail);
}

@media (max-width: 760px) {
  body:is([data-ns-site="letras"], [data-ns-site="3d"], [data-ns-site="techo"], [data-ns-site="global"]) {
    --ns-work-tail: 32px;
  }
  body[data-ns-site="letras"] [data-ns-closing="questions"] {
    padding-block: 24px;
  }
  body[data-ns-site="letras"] [data-ns-closing="questions"] > div {
    gap: 24px;
  }
  body[data-ns-site="3d"] main > .faq,
  body[data-ns-site="techo"] main > .faq-refined,
  body[data-ns-site="global"] #content > .ns-seo-directory {
    padding-block: 24px;
  }
  body[data-ns-site="letras"] [data-ns-closing="questions"] details > summary,
  body[data-ns-site="3d"] main > .faq summary,
  body[data-ns-site="3d"] .materials-faq .faq summary,
  body[data-ns-site="3d"] .materials-page > .materials-faq > summary,
  body[data-ns-site="techo"] main > .faq-refined .faqs summary {
    min-height: 44px;
    padding-block: 12px;
  }
  body[data-ns-site="3d"] main > .faq > div:first-child { margin-bottom: 24px; }
  body[data-ns-site="3d"] main > .page-intro > .custom-project-invite:last-child,
  body[data-ns-site="3d"] .trophies-page > .custom-project-invite,
  body[data-ns-site="3d"] .decor-page > .decor-custom {
    padding-block: 24px;
    gap: 24px;
    margin-top: 32px;
  }
}
/* NS_CLOSING_DYNAMIC_V6_END */

/* Visible edges for dark controls on the continuous closing surface. */
body[data-ns-site="led"] main > .contact-band:last-child .button.dark,
body[data-ns-site="textiles"] main > .contact-section:last-child .button.dark,
body[data-ns-site="planos"] .catalog-end #catalog-cart {
  outline: 1px solid #677ec8;
  outline-offset: -1px;
}

/* NS_CLOSING_MOTIF_V7_START
 * Shared fine-line motif derived from Detalles' approved concentric arcs.
 * Append after the complete V6 integration rules. This file is paint-only:
 * no dimensions, spacing, typography, controls or existing joins are replaced.
 * The 3D one-pixel clip-path overscan must remain in its existing V6 rule.
 * Work views without a closing section use the common banner's own motif.
 */
@media screen {
  body:is(
    [data-ns-site="letras"],
    [data-ns-site="accesibilidad"],
    [data-ns-site="global"],
    [data-ns-site="3d"],
    [data-ns-site="presencia"],
    [data-ns-site="planos"],
    [data-ns-site="textiles"],
    [data-ns-site="led"],
    [data-ns-site="techo"],
    [data-ns-site="detalles"],
    [data-ns-site="accesorios"]
  ) {
    --ns-motif-inner-radius: 150px;
    --ns-motif-outer-radius: 215px;
    --ns-motif-center-x: calc(100% - 128px);
    --ns-motif-center-y: 25px;
    --ns-motif-inner-stroke: #e95c0c66;
    --ns-motif-outer-stroke: #e95c0c42;
    --ns-motif-margin-stroke: #e95c0c30;
    --ns-motif-margin-soft: #e95c0c22;
    --ns-motif-margin-width: clamp(10px, calc(var(--ns-ending-gutter, 20px) - 8px), 28px);
    --ns-closing-rule: #535351;
  }

  /* Full closing CTAs: the same two arcs sit behind the action area.
   * A background cannot enlarge the scrollable area or intercept a click.
   * Preserve background-color, box-shadow and clip-path from V6.
   */
  body:is(
    [data-ns-site="accesibilidad"],
    [data-ns-site="accesorios"],
    [data-ns-site="detalles"],
    [data-ns-site="led"],
    [data-ns-site="presencia"]
  ) main > .contact-band:last-child,
  body[data-ns-site="textiles"] main > .contact-section:last-child,
  body[data-ns-site="planos"] main > #senales.catalog-section:last-child > .catalog-end:last-child,
  body[data-ns-site="3d"] main > .page-intro > .custom-project-invite:last-child,
  body[data-ns-site="3d"] .trophies-page > .custom-project-invite,
  body[data-ns-site="3d"] .decor-page > .decor-custom {
    background-image:
      radial-gradient(
        circle at var(--ns-motif-center-x) var(--ns-motif-center-y),
        transparent calc(var(--ns-motif-inner-radius) - 1px),
        var(--ns-motif-inner-stroke) calc(var(--ns-motif-inner-radius) - .5px),
        var(--ns-motif-inner-stroke) calc(var(--ns-motif-inner-radius) + .5px),
        transparent calc(var(--ns-motif-inner-radius) + 1px)
      ),
      radial-gradient(
        circle at var(--ns-motif-center-x) var(--ns-motif-center-y),
        transparent calc(var(--ns-motif-outer-radius) - 1px),
        var(--ns-motif-outer-stroke) calc(var(--ns-motif-outer-radius) - .5px),
        var(--ns-motif-outer-stroke) calc(var(--ns-motif-outer-radius) + .5px),
        transparent calc(var(--ns-motif-outer-radius) + 1px)
      );
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
  }

  /* Detalles originally owns two absolute circles. Replace those only on
   * its final CTA, where the shared background above now draws the motif.
   */
  body[data-ns-site="detalles"] main > .contact-band:last-child::before,
  body[data-ns-site="detalles"] main > .contact-band:last-child::after {
    content: none;
  }

  /* FAQ, SEO and compact guidance: keep lines entirely outside the text.
   * The decorative strip occupies at most 28px of the existing left gutter,
   * ending 6px before the content. It does not take part in the layout.
   * Never use ::after here: Global uses it to paint its trailing dark join.
   */
  body[data-ns-site="letras"] [data-ns-closing="questions"] > div > div:first-child,
  body[data-ns-site="3d"] main > .faq > div:first-child,
  body[data-ns-site="3d"] .materials-page > .materials-faq,
  body[data-ns-site="3d"] .studio-page > .studio-guidance,
  body[data-ns-site="techo"] main > .faq-refined > h2,
  body[data-ns-site="techo"] .development-page > .source-links,
  body[data-ns-site="global"] #content > .ns-seo-directory > h2 {
    position: relative;
  }

  body[data-ns-site="letras"] [data-ns-closing="questions"] > div > div:first-child::before,
  body[data-ns-site="3d"] main > .faq > div:first-child::before,
  body[data-ns-site="3d"] .materials-page > .materials-faq::before,
  body[data-ns-site="3d"] .studio-page > .studio-guidance::before,
  body[data-ns-site="techo"] main > .faq-refined > h2::before,
  body[data-ns-site="techo"] .development-page > .source-links::before,
  body[data-ns-site="global"] #content > .ns-seo-directory > h2::before {
    content: "";
    position: absolute;
    top: 0;
    right: calc(100% + 6px);
    width: var(--ns-motif-margin-width);
    height: 100%;
    max-height: 140px;
    pointer-events: none;
    background-image:
      radial-gradient(
        circle at -124px 70px,
        transparent 138px,
        var(--ns-motif-margin-stroke) 138.5px,
        var(--ns-motif-margin-stroke) 139.5px,
        transparent 140px
      ),
      radial-gradient(
        circle at -147px 70px,
        transparent 170px,
        var(--ns-motif-margin-soft) 170.5px,
        var(--ns-motif-margin-soft) 171.5px,
        transparent 172px
      );
    background-repeat: no-repeat;
    background-size: 100% 140px;
    background-position: left top;
  }

  /* Restore the existing structural rules, using the same muted grey as
   * the dark FAQs. Only colour changes; existing border widths remain.
   */
  body[data-ns-site="planos"] main > #senales.catalog-section:last-child > .catalog-end:last-child,
  body[data-ns-site="techo"] main > .faq-refined,
  body[data-ns-site="global"] #content > .ns-seo-directory {
    border-top-color: var(--ns-closing-rule);
  }

  @media (max-width: 780px) {
    body:is(
      [data-ns-site="accesibilidad"],
      [data-ns-site="accesorios"],
      [data-ns-site="detalles"],
      [data-ns-site="led"],
      [data-ns-site="presencia"]
    ) main > .contact-band:last-child,
    body[data-ns-site="textiles"] main > .contact-section:last-child,
    body[data-ns-site="planos"] main > #senales.catalog-section:last-child > .catalog-end:last-child,
    body[data-ns-site="3d"] main > .page-intro > .custom-project-invite:last-child,
    body[data-ns-site="3d"] .trophies-page > .custom-project-invite,
    body[data-ns-site="3d"] .decor-page > .decor-custom {
      /* A cropped pair at the right edge leaves stacked copy and buttons
       * visually calm. No breakpoint changes the CTA's size or alignment.
       */
      --ns-motif-inner-radius: 112px;
      --ns-motif-outer-radius: 160px;
      --ns-motif-center-x: calc(100% + 58px);
      --ns-motif-center-y: 28px;
      --ns-motif-inner-stroke: #e95c0c4a;
      --ns-motif-outer-stroke: #e95c0c30;
    }
  }
}
/* The shared banner carries the arcs only when the current view has no
 * closing motif of its own. Keep one deliberate motif per ending. */
body:is([data-ns-site="accesibilidad"], [data-ns-site="accesorios"], [data-ns-site="detalles"], [data-ns-site="led"], [data-ns-site="presencia"]):has(main > .contact-band:last-child) nou-signe-footer,
body[data-ns-site="textiles"]:has(main > .contact-section:last-child) nou-signe-footer,
body[data-ns-site="planos"]:has(main > #senales.catalog-section:last-child > .catalog-end:last-child) nou-signe-footer,
body[data-ns-site="letras"]:has([data-ns-closing="questions"]) nou-signe-footer,
body[data-ns-site="3d"]:has(main > .faq, main > .page-intro > .custom-project-invite:last-child, .trophies-page > .custom-project-invite, .decor-page > .decor-custom, .materials-page > .materials-faq, .studio-page > .studio-guidance) nou-signe-footer,
body[data-ns-site="techo"]:has(main > .faq-refined, .development-page > .source-links) nou-signe-footer,
body[data-ns-site="global"]:has(#content > .ns-seo-directory) nou-signe-footer { --ns-footer-lines: none; }
/* NS_CLOSING_MOTIF_V7_END */

/* Mobile closing compatibility, 2026-12-02.
 * Mobile Textiles closing: paint the actual box, keeping the previous
 * content alignment and total vertical space. Desktop is unchanged.
 */
@media screen and (max-width: 780px) {
  body[data-ns-site="textiles"] main > .contact-section:last-child {
    --ns-close-tail: 0px;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0;
    padding-block-start: var(--ns-ending-pad, 24px);
    padding-block-end: calc(var(--ns-ending-pad, 24px) + var(--ns-ending-tail, 24px));
    padding-inline: var(--ns-ending-gutter, 20px);
    background-color: #202020;
    box-shadow: none;
    clip-path: none;
    border-radius: 0;
  }

  body[data-ns-site="textiles"] main > .contact-section:last-child > div {
    min-width: 0;
    max-width: 100%;
  }

  body[data-ns-site="textiles"] main > .contact-section:last-child .button {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
    flex-shrink: 1;
  }

  body[data-ns-site="textiles"] main > .contact-section:last-child .contact-mail {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}
