.wpcatalog-form,.wpcatalog-browser{border:1px solid #e5e7eb;padding:16px;border-radius:0;background:#fff}
.wpcatalog-row{display:flex;gap:8px;margin-bottom:8px}
.wpcatalog-form label{display:block;margin:8px 0 4px;font-weight:600}
.wpcatalog-form input[type=text],.wpcatalog-form input[type=number],.wpcatalog-form select{width:100%;padding:8px;border:1px solid #ddd;border-radius:0}
.wpcatalog-btn{background:#111;color:#fff;border:1px solid #111;border-radius:0;padding:10px 16px;cursor:pointer}
.wpcatalog-status{margin-top:12px}
.wpc-progress{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.wpc-progress .name{flex:0 1 40%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wpc-progress .bar{flex:1 1 auto;height:6px;border:1px solid #ddd;background:#f5f5f5}
.wpc-progress .bar i{display:block;height:100%;width:0%;background:#111}
.wpc-progress .perc{width:48px;text-align:right;font-variant-numeric:tabular-nums}
.wpc-progress.ok .bar i{background:#0a0}
.wpc-progress.err .bar i{background:#a00}

/* Layout cu sidebar (desktop) */
.wpcatalog-browser.layout{display:grid;grid-template-columns:280px 1fr;gap:16px}
.wpcatalog-sidebar{position:sticky;top:16px;align-self:start;border:1px solid #eee;padding:12px}
.wpcatalog-tabs{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.wpcatalog-tabs .tab{border:1px solid #111;background:#fff;color:#111;padding:8px 10px;text-align:left;border-radius:0;cursor:pointer}
.wpcatalog-tabs .tab.active{background:#111;color:#fff}
.wpcatalog-main{min-height:200px}
.wpcatalog-results{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;margin-top:12px}
.wpcatalog-card{border:1px solid #eee;border-radius:0;overflow:hidden;background:#fafafa}
.wpcatalog-card a{display:block;text-decoration:none;color:#111;cursor:zoom-in}
.wpcatalog-card .thumb{aspect-ratio:4/3;background:#f0f0f0;display:flex;align-items:center;justify-content:center}
.wpcatalog-card .thumb img{max-width:100%;max-height:100%;object-fit:cover}
.wpcatalog-card .title{padding:8px;font-size:14px}
.wpcatalog-pagination{margin-top:12px}

/* Modal — full overlay, conținut „strâns”, z-index mare */
.wpcatalog-modal{
  position:fixed;inset:0;display:none;
  z-index:999999; /* deasupra oricărui header/footer */
  justify-content:center;align-items:center;
  background:rgba(0,0,0,.85);
}
.wpcatalog-modal.open{display:flex}
.wpcatalog-modal .modal-backdrop{display:none}
.wpcatalog-modal .modal-content{
  background:#000;border:none;border-radius:0;
  max-width:95%;max-height:95vh;width:auto;height:auto;
  display:flex;flex-direction:column;align-items:center;
  box-shadow:0 0 40px rgba(0,0,0,.8);position:relative;
}
.wpcatalog-modal .modal-close{
  position:absolute;top:12px;right:12px;background:#fff;color:#000;
  border:1px solid #000;border-radius:0;width:32px;height:32px;
  line-height:30px;text-align:center;cursor:pointer;z-index:9999999;
}
.wpcatalog-modal .modal-body{
  display:flex;justify-content:center;align-items:center;
  max-height:85vh;overflow:hidden;padding:0;
}
.wpcatalog-modal .modal-body img,
.wpcatalog-modal .modal-body video{
  max-width:100%;max-height:85vh;object-fit:contain;background:#000;
}
.wpcatalog-modal .modal-body iframe{
  width:90vw;height:85vh;border:none;background:#222; /* PDF */
}

/* Manage (DE) – grid cu thumbnails */
.wpcatalog-files-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
  gap:16px;margin-top:12px
}
.file-item{border:1px solid #ccc;background:#fafafa;display:flex;flex-direction:column;align-items:center;padding:8px}
.file-item img{max-width:100%;max-height:160px;object-fit:cover}
.file-caption{margin:6px 0;font-weight:600;text-align:center}
.file-placeholder{width:100%;height:160px;display:flex;align-items:center;justify-content:center;font-size:24px;background:#e5e5e5;color:#333}
.wpcatalog-manage .wpc-del{border:1px solid #b00;background:#b00;color:#fff;border-radius:0;padding:6px 12px;cursor:pointer}
.wpcatalog-manage .wpc-del:hover{background:#900}

/* Responsive */
@media(max-width: 900px){
  .wpcatalog-browser.layout{grid-template-columns:1fr}
  .wpcatalog-sidebar{position:relative;top:auto}
  .wpcatalog-tabs{flex-direction:row;flex-wrap:wrap}
}