/* ===== Marca (UX PRO) ===== */

.ce-page-marca .ce-marca-logo{
  width:72px;height:72px;border-radius:16px;
  display:flex;align-items:center;justify-content:center;
  border:1px solid rgba(17,17,17,.08);
  background:#fff;
  overflow:hidden;
}
.ce-page-marca .ce-marca-logo.is-empty{
  background:linear-gradient(180deg,var(--brand-amber-soft,#FFF3CD),#fff);
  color:#7a5a00;
}
.ce-page-marca .ce-marca-logo i{ font-size:26px; opacity:.8; }

.ce-page-marca .ce-marca-desc{
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;
  overflow:hidden;
}

.ce-page-marca .ce-marca-box{
  border:1px solid rgba(17,17,17,.08);
  background:#fff;
  border-radius:14px;
  padding:.85rem .95rem;
  color:#333;
  line-height:1.6;
  max-height:260px;
  overflow:auto;
}

/* Titular avatar */
.ce-page-marca .ce-marca-avatar{
  width:52px;height:52px;border-radius:14px;
  border:1px solid rgba(17,17,17,.08);
  background:linear-gradient(180deg,var(--brand-amber-soft,#FFF3CD),#fff);
  display:flex;align-items:center;justify-content:center;
  flex:0 0 auto;
}
.ce-page-marca .ce-marca-avatar i{ font-size:22px; color:#7a5a00; }

/* Expediente card */
.ce-exp-card{
  border:1px solid rgba(17,17,17,.08);
  background:#fff;
  border-radius:16px;
  overflow:hidden;
}
.ce-exp-head{
  padding:1rem 1rem .65rem;
  display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem;
}
.ce-exp-grid{
  padding:.85rem 1rem 1rem;
  display:grid;
  grid-template-columns: 1fr;
  gap:1rem;
}
@media (min-width: 992px){
  .ce-exp-grid{ grid-template-columns: 340px 1fr; }
}

/* Timeline */
.ce-exp-timeline{
  border:1px solid rgba(17,17,17,.08);
  background:linear-gradient(180deg,#fff,var(--bs-body-bg,#FAFAFA));
  border-radius:14px;
  padding:.9rem .9rem .7rem;
}
.ce-exp-tl-item{
  position:relative;
  padding-left:28px;
  margin:0 0 .85rem 0;
}
.ce-exp-tl-item:last-child{ margin-bottom:0; }
.ce-exp-tl-dot{
  position:absolute;left:8px;top:.2rem;
  width:10px;height:10px;border-radius:999px;
  border:2px solid rgba(17,17,17,.18);
  background:#fff;
}
.ce-exp-tl-dot.is-ok{
  width:22px;height:22px;left:2px;top:.05rem;
  border:none;
  background:#16A34A;
  color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:12px;
}
.ce-exp-tl-dot.is-warn{ border-color: rgba(211,158,0,.75); }
.ce-exp-tl-k{ font-weight:700; font-size:.83rem; color:#111; }
.ce-exp-tl-v{ font-weight:600; color:#333; }
.ce-exp-warn{
  margin-top:.35rem;
  display:inline-flex;gap:.35rem;align-items:center;
  padding:.2rem .5rem;
  border-radius:999px;
  border:1px solid rgba(211,158,0,.35);
  background:var(--brand-amber-soft,#FFF3CD);
  font-size:.78rem;
  color:#7a5a00;
}

/* Detail kv */
.ce-kv-k{ font-size:.75rem; color:#6b7280; text-transform:uppercase; letter-spacing:.04em; }
.ce-kv-v{ font-weight:500; font-size:.875rem; color:#111; margin-top:.1rem; }
.ce-exp-desc{
  margin-top:.35rem;
  border:1px solid rgba(17,17,17,.08);
  border-radius:14px;
  padding:.75rem .85rem;
  background:#fff;
  color:#333;
  line-height:1.55;
}

.ce-exp-conc{
  border:1px solid rgba(17,17,17,.08);
  border-radius:14px;
  padding:.75rem .85rem;
  /*background:linear-gradient(180deg,var(--brand-amber-soft,#FFF3CD),#fff);*/
}

.ce-exp-media{
  display:flex;gap:.85rem;align-items:flex-start;
  border:1px solid rgba(17,17,17,.08);
  border-radius:14px;
  padding:.75rem .85rem;
  background:#fff;
}
.ce-exp-media-img{
  width:74px;height:74px;border-radius:14px;
  border:1px solid rgba(17,17,17,.08);
  background:#fff;
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
  flex:0 0 auto;
}
.ce-exp-media-img img{ width:100%;height:100%;object-fit:contain; }

.ce-exp-foot{
  padding:.65rem 1rem 1rem;
  display:flex;justify-content:space-between;gap:.75rem;flex-wrap:wrap;
  border-top:1px dashed rgba(17,17,17,.10);
}

/* Related cards */
/*
.ce-rel-card{
  position:relative;
  border:1px solid rgba(17,17,17,.08);
  background:#fff;
  border-radius:16px;
  padding:1rem;              
  display:flex;
  gap:.85rem;
  align-items:flex-start;
  min-height:112px;         
}

.ce-rel-ico{
  width:56px;height:56px;  
  border-radius:14px;
  border:1px solid rgba(17,17,17,.08);
  background:#fff;
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
  flex:0 0 auto;
}

.ce-rel-name{
  font-size:.95rem;
  line-height:1.25;
  margin:0;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.ce-rel-sub{
  margin-top:.15rem;
  display:-webkit-box;
  -webkit-line-clamp:1;
  -webkit-box-orient:vertical;
  overflow:hidden;
}*/


/* ===== Marcas relacionadas (v2) ===== */
.ce-page-marca .ce-rel-card{
  position:relative;
  border:1px solid rgba(17,17,17,.08);
  background:#fff;
  border-radius:16px;
  padding:0.5rem 0.5rem;
  display:flex;
  gap:.5rem;
  align-items:flex-start;
  min-height:110px;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.ce-page-marca .ce-rel-card:hover{
  border-color: rgba(211,158,0,.25);
  box-shadow: 0 10px 28px rgba(17,17,17,.08);
  transform: translateY(-1px);
}

.ce-page-marca .ce-rel-ico{
  width:72px;height:72px;
  border-radius:16px;
  border:1px solid rgba(17,17,17,.08);
  background:#fff;
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
  flex:0 0 auto;
}
.ce-page-marca .ce-rel-ico img{ width:100%;height:100%;object-fit:contain; }
.ce-page-marca .ce-rel-ico.is-empty{
  /*background:linear-gradient(180deg,var(--brand-amber-soft,#FFF3CD),#fff);*/
  color:rgba(17,17,17,.45);
}
.ce-page-marca .ce-rel-ico.is-empty i{ font-size:20px; opacity:.85; }

.ce-page-marca .ce-rel-body{
  display:flex;
  flex-direction:column;
  min-width:0;
  width:100%;
}

.ce-page-marca .ce-rel-title{
  font-weight:600;          /* antes 800 */
  font-size: .98rem;        /* un poco más grande y estándar */
  line-height:1.18;
  letter-spacing: -0.01em;
}

.ce-page-marca .ce-rel-sub{
  margin-top:.2rem;
  color:#6b7280;
  font-size:.82rem;
  display:-webkit-box;
  -webkit-line-clamp:1;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.ce-page-marca .ce-rel-sub--empty{ opacity:.7; }

.ce-page-marca .ce-rel-meta{
  margin-top:auto;
  padding-top:.6rem;
  display:flex;
  align-items:flex-end;               /* mejor con chip de 2 líneas */
  justify-content:space-between;
  gap:.75rem;
}

/* Chip tipo_solicitud (tal cual, sin truncar feo) */
.ce-page-marca .ce-rel-chip{
  display:inline-block;          /* importante para ellipsis */
  max-width: 100%;              /* ajusta: 140–200 según tu card */
  padding:.28rem .60rem;
  border-radius:999px;
  border:1px solid rgba(17,17,17,.10);
  background: var(--brand-amber-soft,#FFF3CD);
  color:#7a5a00;
  font-weight:700;
  font-size:.72rem;
  line-height:1.1;

  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  vertical-align:middle;
}

.ce-page-marca .ce-rel-year{
  color:#6b7280;
  font-size:.78rem;
  white-space:nowrap;
}

/* Sidebar rows */
.ce-side-row{
  display:flex;align-items:center;gap:.75rem;
  padding:.65rem 0;
  text-decoration:none;
  border-bottom:1px solid rgba(17,17,17,.06);
}
.ce-side-row:last-child{ border-bottom:none; }
.ce-side-ico{
  width:52px;height:52px;border-radius:14px;
  border:1px solid rgba(17,17,17,.08);
  background:#fff;
  display:flex;align-items:center;justify-content:center;
  position:relative;
  overflow:hidden;
  flex:0 0 auto;
}
.ce-side-ico.is-empty{
  background:linear-gradient(180deg,var(--brand-amber-soft,#FFF3CD),#fff);
  color:#7a5a00;
}
.ce-side-ico img{ width:100%;height:100%;object-fit:contain; }
.ce-side-pill{
  position:absolute;right:6px;bottom:6px;
  padding:.1rem .35rem;
  border-radius:999px;
  background:rgba(11,11,12,.9);
  color:#fff;
  font-size:.66rem;
  border:1px solid rgba(255,255,255,.25);
}

/* CTA box */
.ce-marca-cta .ce-cta-ico{
  width:42px;height:42px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  border:1px solid rgba(17,17,17,.08);
  background:linear-gradient(180deg,var(--brand-amber-soft,#FFF3CD),#fff);
  color:#7a5a00;
  flex:0 0 auto;
}
/* Sticky sidebar (desktop) */
@media (min-width: 992px){
  .panel-rel-sticky{
    position: sticky;
    top: 10px;            /* ajusta según tu navbar */
    z-index: 2;
  }
}
.ce-side-list{ width:100%; }

/* Zoom overlay en la miniatura */
.ce-page-marca .ce-zoom{ position: relative; }

.ce-page-marca .ce-zoom-btn{
  position:relative;
  border:0;
  padding:0;
  background:transparent;
  width:100%;
  height:100%;
  display:block;
  cursor: zoom-in;
}

.ce-page-marca .ce-zoom-btn img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.ce-page-marca .ce-zoom-ico{
  position:absolute;
  top:6px;
  right:6px;
  width:28px;
  height:28px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(11,11,12,.78);
  color:#fff;
  border: 1px solid rgba(255,255,255,.22);
  pointer-events:none;
}

.ce-page-marca .ce-zoom-btn:hover .ce-zoom-ico{
  background: rgba(11,11,12,.92);
}

/* Modal: imagen fija 300x300 (sin estirar) */
.ce-imgmodal-stage{
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 1rem;
  background:#000;          /* fondo pro */
  min-height: 340px;        /* da aire visual */
}

#ceImgModalImg{
  width:300px;
  height:300px;
  object-fit:contain;       /* no deforma */
  background:#fff;          /* para png transparente */
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.15);
}

/* Sidebar: nombre en 2 líneas con ellipsis */
.ce-page-marca .ce-side-name{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;   /* 2 líneas */
  overflow: hidden;
  line-height: 1.2;
  max-height: calc(1.2em * 2);
  word-break: break-word;
    font-weight: 500;
    line-height: 1.15;
    color: #111;
    text-decoration: none;
    min-width: 0;

}

/* opcional: alinear mejor verticalmente el chevron */
.ce-page-marca .ce-side-row{
  align-items: flex-start; /* en vez de center */
}
.ce-page-marca .ce-side-row{ align-items:center; }
.ce-page-marca .ce-side-name{ margin-right:.25rem; }