/* ═══════════════════════════════════════════════════════════════════════
   Angoli d'accento su titoli e schede (Configurazione → Catalogo, chiave
   catalogo_angoli, dalla 1.3.310). Il file si carica SOLO con l'opzione
   accesa (categoria, ricerca, scheda prodotto): spenta = pagine identiche.
   Gli angoli sono linee a L nel colore d'accento del Template, disegnate
   con ::before/::after: nessun markup in più.
   - Categoria: titolo (┌ in alto a sinistra, ┘ in basso a destra), colonna
     dei filtri (┌), ogni scheda della griglia (┌ nell'angolo della scheda,
     anche in ricerca e nei correlati).
   - Scheda prodotto: titolo (┌: va spesso su due righe e un ┘ resterebbe
     sospeso a destra), «Tutto ciò che devi sapere» e
     «Potrebbero interessarti» (┌), riquadro delle specifiche (┐).
   Le regole partono da body per vincere sugli stili delle pagine, che a
   volte si caricano dopo questo file.
   ═══════════════════════════════════════════════════════════════════════ */

body .ke-cat-testata-testo > h1,
body .ke-sch-titolo,
body .ke-sch-panoramica-titolo,
body .ke-sch-correlati-testa h2,
body .ke-cat-filters .ke-cat-js,
body .ke-cat-card,
body .ke-sch-specifiche {
    --ke-ang: var(--color-accent, #f97316);
    --ke-ang-spessore: clamp(3px, .11em, 6px);
    position: relative;
}

/* ─── Titoli: ┌ in alto a sinistra (e ┘ in basso a destra sulla categoria) ─── */
body .ke-cat-testata-testo > h1,
body .ke-sch-titolo {
    width: fit-content;
    max-width: 100%;
    /* gli angoli stretti attorno alle lettere, come il mockup */
    padding: .16em .5em .12em .58em;
}
body .ke-sch-titolo { padding-right: 0; }
body .ke-cat-testata-testo > h1::before,
body .ke-sch-titolo::before,
body .ke-cat-testata-testo > h1::after {
    content: "";
    position: absolute;
    width: .48em;
    height: .48em;
    border: 0 solid var(--ke-ang);
    pointer-events: none;
}
body .ke-cat-testata-testo > h1::before,
body .ke-sch-titolo::before {
    top: 0;
    left: 0;
    border-top-width: var(--ke-ang-spessore);
    border-left-width: var(--ke-ang-spessore);
}
body .ke-cat-testata-testo > h1::after {
    right: 0;
    bottom: 0;
    border-right-width: var(--ke-ang-spessore);
    border-bottom-width: var(--ke-ang-spessore);
}

/* ─── Titoli delle sezioni: solo ┌ ─── */
body .ke-sch-panoramica-titolo,
body .ke-sch-correlati-testa h2 {
    padding-left: .55em;
}
body .ke-sch-panoramica-titolo::before,
body .ke-sch-correlati-testa h2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: .42em;
    height: .42em;
    border: 0 solid var(--ke-ang);
    border-top-width: var(--ke-ang-spessore);
    border-left-width: var(--ke-ang-spessore);
    pointer-events: none;
}

/* ─── Colonna dei filtri: ┌ appena fuori, in alto a sinistra ─── */
body .ke-cat-filters .ke-cat-js::before {
    content: "";
    position: absolute;
    top: -6px;
    left: -10px;
    width: 14px;
    height: 14px;
    border: 0 solid var(--ke-ang);
    border-top-width: 3px;
    border-left-width: 3px;
    pointer-events: none;
}

/* ─── Schede della griglia: ┌ dentro l'angolo della scheda (il cartellino
   «Disponibile» sta più in dentro, a 10 px) ─── */
body .ke-cat-card::after {
    content: "";
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    border: 0 solid var(--ke-ang);
    border-top-width: 3px;
    border-left-width: 3px;
    border-top-left-radius: max(0px, calc(var(--ke-ang-raggio, 8px) - 1px));
    pointer-events: none;
}

/* ─── Riquadro delle specifiche: ┐ in alto a destra ─── */
body .ke-sch-specifiche::after {
    content: "";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 16px;
    height: 16px;
    border: 0 solid var(--ke-ang);
    border-top-width: 3px;
    border-right-width: 3px;
    pointer-events: none;
}
