/* Panel compacto y tarjetas estables, compartidas con Colecciones. */
[hidden] { display: none !important; }
#grid, #collectionGrid { align-items: stretch; }
#grid > .card, #collectionGrid > .card { min-width: 0; display: flex; flex-direction: column; }
.card > .product-art { position: relative; width: 100%; height: auto !important; min-height: 0 !important; aspect-ratio: 1 / 1; flex: 0 0 auto !important; overflow: hidden; }
.card > .product-art > .product-image { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-height: none; object-fit: contain !important; }
.card > .product-color-images { flex: 0 0 96px; height: 96px; min-height: 96px; }
.card .meta { min-width: 0; display: flex; flex-direction: column; flex: 1; }
.card .name { min-height: 2.6em; max-height: 2.6em; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.card .row { min-width: 0; min-height: 48px; align-items: flex-start; flex-wrap: wrap; gap: 6px; }
.card .price { min-width: 0; min-height: 42px; line-height: 1.3; overflow-wrap: anywhere; }
.card .sale-price-line, .card .price > div { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.card .stock { white-space: normal; overflow-wrap: anywhere; }
.card .home-buy, .card .card-buy { margin-top: auto; }
.preview-product img, .mini-product-large { aspect-ratio: 1; min-height: 0; }
.mini-product-large img { display: block; width: 100%; height: 100%; object-fit: contain; }
#admin.open { display: block !important; padding: 0 !important; overflow: auto; scroll-behavior: auto; }
#admin .admin-wrap { max-width: 1240px; width: 100%; margin: 0 auto; padding: 20px !important; }
#admin .admin-head { position: sticky; top: 0; z-index: 6; background: #0b0b0b; padding: 8px 0 14px; margin: 0; }
#admin .dashboard-hero { padding: 16px 20px; margin: 0 0 12px; min-height: 0; }
#admin .dashboard-hero h1, #admin .dashboard-hero h2 { font-size: 26px; line-height: 1.15; margin: 0 0 8px; }
#admin .dashboard-hero p { font-size: 13px; line-height: 1.4; margin: 5px 0; }
.cm-dashboard-nav { display: flex; flex-wrap: wrap; gap: 7px; position: sticky; top: 59px; z-index: 5; padding: 10px 0 14px; background: #0b0b0b; }
.cm-dashboard-nav button, .cm-size-actions button, .cm-custom-size button { border: 1px solid #444; border-radius: 8px; background: #202020; color: #eee; padding: 9px 12px; font: 400 13px/1.2 Arial, sans-serif; }
.cm-dashboard-nav button[aria-pressed="true"] { background: #e2a13a; border-color: #e2a13a; color: #111; }
#admin .panel { width: 100%; margin: 0 0 10px; padding: 0 !important; min-width: 0; border-radius: 12px; overflow: visible; }
.cm-section-header { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
#admin .cm-section-header h3 { font: 400 17px/1.3 Arial, sans-serif; margin: 0 !important; }
.cm-section-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.cm-section-toggle { background: #e2a13a; color: #111; border: 0; padding: 9px 14px; border-radius: 8px; font: 400 13px/1.2 Arial, sans-serif; min-width: 65px; }
.cm-section-body { border-top: 1px solid #353535; padding: 16px; min-width: 0; }
.cm-section-body > .panel-head-row:empty { display: none; }
.cm-section-body > .panel-head-row { margin-bottom: 10px; }
.cm-product-context { padding: 5px 9px; border: 1px solid #6b552e; border-radius: 6px; color: #efbd6b; font: 400 12px/1.2 Arial, sans-serif; }
#admin .formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#admin .field { min-width: 0; }
#admin .field.full { grid-column: 1 / -1; }
#admin .field input:not([type="checkbox"]), #admin .field select, #admin .field textarea { width: 100%; min-width: 0; max-width: 100%; }
#admin input::placeholder, #admin textarea::placeholder { font-size: 13px; font-weight: 400; letter-spacing: normal; }
#admin textarea { font: 400 14px/1.5 Arial, sans-serif; min-height: 110px; resize: vertical; }
#admin label { line-height: 1.4; overflow-wrap: anywhere; }
#admin small { font-size: 12px; line-height: 1.4; }
#admin .visibility-options { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; }
#admin .visibility-options > label { display: flex; align-items: center; gap: 8px; }
#admin .visibility-options .sale-discount-field { flex: 1 1 100%; width: 100%; }
#admin .sale-discount-field input, #cmSaleDiscount { max-width: 150px; }
#admin .sale-discount-field { min-width: 0; }
.cm-size-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 8px; }
.cm-size-actions span { color: #aaa; font: 400 12px/1.3 Arial, sans-serif; }
.cm-size-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; max-height: 212px; overflow: auto; padding: 2px 4px 3px 0; }
#admin .cm-size-option { display: flex; align-items: center; gap: 5px; margin: 0; background: #171717; border: 1px solid #404040; border-radius: 7px; padding: 7px 6px; font: 400 13px/1 Arial, sans-serif; cursor: pointer; }
#admin .cm-size-option:has(input:checked) { border-color: #e2a13a; background: #302719; }
#admin .cm-size-option input { width: 15px; height: 15px; margin: 0; accent-color: #e2a13a; flex: 0 0 auto; }
.cm-custom-size { display: flex; gap: 8px; margin-top: 8px; max-width: 300px; }
#admin .color-size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; max-height: 245px; overflow: auto; }
#admin .color-size-cell { min-width: 0; }
#admin .color-size-cell label { font-size: 11px; }
.cm-inline-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cm-inline-status { margin: 0; color: #eac58c; min-height: 1.4em; font-size: 13px; }
#cmSaleEditor { display: grid; grid-template-columns: minmax(100px, 150px) auto; gap: 9px; align-items: end; }
#cmSaleEditor label { grid-column: 1 / -1; }
#cmSaleApply { justify-self: start; margin: 0; }
.cm-admin-table-wrap { width: 100%; max-height: 58vh; overflow: auto; border: 1px solid #383838; border-radius: 8px; }
.cm-admin-table-wrap .table { min-width: 760px; margin: 0; }
.cm-admin-table-wrap thead { position: sticky; top: 0; z-index: 2; background: #1b1b1b; }
.cm-order-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cm-order-toolbar span { font: 400 13px/1.3 Arial, sans-serif; color: #c9c3ba; }
.cm-order-toolbar .save { margin: 0; }
.cm-order-cell { width: 92px; min-width: 92px; }
#admin .cm-product-position { width: 66px; min-height: 34px; padding: 5px 7px; background: #111; border: 1px solid #555; color: #fff; border-radius: 6px; }
.cm-order-arrows { display: flex; gap: 4px; margin-top: 5px; }
.cm-order-arrows button { width: 29px; height: 28px; border: 1px solid #555; border-radius: 5px; background: #262626; color: #fff; }
#admin button:disabled { opacity: .45; cursor: default; }
.cm-admin-table-wrap td:last-child > button { margin: 3px; }
#cmDashboardToast { position: fixed; z-index: 1000; top: 18px; right: 18px; bottom: auto; left: auto; transform: none; width: max-content; max-width: min(440px, calc(100vw - 36px)); white-space: normal; line-height: 1.45; }
#admin #livePreview { position: fixed; top: 80px; right: 24px; width: min(440px, calc(100vw - 48px)); height: min(680px, calc(100vh - 110px)); margin: 0; display: block; z-index: 20; box-shadow: 0 16px 60px #000b; }
#livePreview[hidden] { display: none !important; }
#livePreview .preview-dot { display: none; }
.cm-draft-preview-image { aspect-ratio: 1; background: #111; display: grid; place-items: center; }
.cm-draft-preview-image img { width: 100%; height: 100%; object-fit: contain; }
#admin *, #admin *::before, #admin *::after { scroll-behavior: auto !important; }
@media (max-width: 700px) {
  #admin .admin-wrap { padding: 12px !important; }
  .cm-dashboard-nav { top: 55px; gap: 5px; }
  .cm-dashboard-nav button { font-size: 12px; padding: 8px; }
  .cm-section-header { padding: 12px; gap: 8px; }
  #admin .cm-section-header h3 { font-size: 15px; }
  .cm-product-context { font-size: 11px; }
  .cm-section-body { padding: 12px; }
  #admin .formgrid { grid-template-columns: minmax(0, 1fr); }
  #admin #livePreview { right: 12px; width: calc(100vw - 24px); }
}
.cm-catalog-retry{margin-top:16px;padding:10px 20px;border:0;border-radius:8px;background:#151515;color:#fff;font:inherit;cursor:pointer}
.cm-catalog-retry:focus-visible{outline:3px solid #c78b31;outline-offset:3px}
