.vdm-wc-manager,
.vdm-wc-manager * { box-sizing: border-box; }

.vdm-wc-manager {
    --vdm-primary: #1d4ed8;
    --vdm-primary-hover: #1e40af;
    --vdm-border: #e5e7eb;
    --vdm-bg: #f8fafc;
    --vdm-text: #111827;
    --vdm-muted: #6b7280;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    color: var(--vdm-text);
}

.vdm-wc-toolbar {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.vdm-wc-title { margin: 0 0 4px; font-size: clamp(24px, 4vw, 34px); line-height: 1.15; }
.vdm-wc-subtitle { margin: 0; color: var(--vdm-muted); }

.vdm-wc-btn,
.vdm-wc-manager button.vdm-wc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: .18s ease;
}

.vdm-wc-btn:hover { transform: translateY(-1px); border-color: #9ca3af; }
.vdm-wc-btn--primary,
.vdm-wc-manager button.vdm-wc-btn--primary { background: var(--vdm-primary); border-color: var(--vdm-primary); color: #fff; }
.vdm-wc-btn--primary:hover { background: var(--vdm-primary-hover); border-color: var(--vdm-primary-hover); color: #fff; }
.vdm-wc-btn--small { min-height: 36px; padding: 7px 12px; font-size: 14px; }

.vdm-wc-search { display: flex; gap: 10px; margin-bottom: 18px; }
.vdm-wc-search input { width: min(420px, 100%); min-height: 42px; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; color: var(--vdm-text); }

.vdm-wc-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--vdm-border); border-radius: 14px; background: #fff; }
.vdm-wc-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.vdm-wc-table th, .vdm-wc-table td { padding: 14px; border-bottom: 1px solid var(--vdm-border); vertical-align: middle; text-align: left; }
.vdm-wc-table th { background: var(--vdm-bg); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #4b5563; }
.vdm-wc-table tbody tr:last-child td { border-bottom: 0; }
.vdm-wc-table td strong { display: block; margin-bottom: 3px; }
.vdm-wc-table td small { display: block; color: var(--vdm-muted); }
.vdm-wc-thumb { width: 58px; height: 58px; border-radius: 10px; overflow: hidden; background: #f3f4f6; }
.vdm-wc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vdm-wc-empty { text-align: center !important; color: var(--vdm-muted); padding: 28px !important; }

.vdm-wc-status { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #f3f4f6; font-size: 12px; font-weight: 700; }
.vdm-wc-status--publish { background: #dcfce7; color: #166534; }
.vdm-wc-status--draft { background: #f3f4f6; color: #4b5563; }
.vdm-wc-status--pending { background: #fef3c7; color: #92400e; }
.vdm-wc-status--private { background: #ede9fe; color: #5b21b6; }

.vdm-wc-alert { padding: 13px 15px; border-radius: 10px; margin: 0 0 20px; border: 1px solid transparent; }
.vdm-wc-alert--success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.vdm-wc-alert--warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.vdm-wc-alert--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.vdm-wc-card { padding: 22px; margin-bottom: 18px; background: #fff; border: 1px solid var(--vdm-border); border-radius: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.vdm-wc-card h3 { margin: 0 0 18px; font-size: 20px; }
.vdm-wc-grid { display: grid; gap: 16px; }
.vdm-wc-grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.vdm-wc-field--wide { grid-column: 1/-1; }
.vdm-wc-field { display: block; margin-bottom: 14px; }
.vdm-wc-field:last-child { margin-bottom: 0; }
.vdm-wc-field > span { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 700; }
.vdm-wc-field input, .vdm-wc-field select, .vdm-wc-field textarea {
    width: 100%; max-width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 9px; background: #fff; color: var(--vdm-text); font: inherit;
}
.vdm-wc-field textarea { min-height: 110px; resize: vertical; }
.vdm-wc-field input:focus, .vdm-wc-field select:focus, .vdm-wc-field textarea:focus, .vdm-wc-search input:focus { outline: 2px solid rgba(29,78,216,.2); border-color: var(--vdm-primary); }
.vdm-wc-check { display: inline-flex; align-items: center; gap: 9px; margin: 4px 16px 8px 0; cursor: pointer; }
.vdm-wc-check input { width: 18px; height: 18px; margin: 0; }
.vdm-wc-help { color: var(--vdm-muted); font-size: 13px; margin: 10px 0 0; }
.vdm-stock-quantity.is-hidden { display: none; }

.vdm-wc-categories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; max-height: 280px; overflow: auto; padding: 12px; border: 1px solid var(--vdm-border); border-radius: 10px; background: var(--vdm-bg); }

.vdm-wc-media-box { min-width: 0; }
.vdm-wc-image-preview { width: 100%; aspect-ratio: 4/3; display: grid; place-items: center; margin: 10px 0; border: 1px dashed #cbd5e1; border-radius: 12px; background: var(--vdm-bg); overflow: hidden; color: var(--vdm-muted); }
.vdm-wc-image-preview img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.vdm-wc-gallery-preview { min-height: 120px; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; margin: 10px 0; padding: 10px; border: 1px dashed #cbd5e1; border-radius: 12px; background: var(--vdm-bg); color: var(--vdm-muted); }
.vdm-wc-gallery-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: #fff; }
.vdm-wc-media-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vdm-wc-link-btn { border: 0; background: transparent; padding: 6px 2px; color: #b91c1c; font: inherit; cursor: pointer; text-decoration: underline; }

.vdm-wc-form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 22px; }
.vdm-wc-pagination ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 18px 0 0; padding: 0; }
.vdm-wc-pagination a, .vdm-wc-pagination span { display: grid; place-items: center; min-width: 38px; min-height: 38px; border: 1px solid var(--vdm-border); border-radius: 9px; background: #fff; text-decoration: none; }
.vdm-wc-pagination .current { background: var(--vdm-primary); border-color: var(--vdm-primary); color: #fff; }

@media (max-width: 760px) {
    .vdm-wc-manager { width: 100%; max-width: 100%; overflow: hidden; }
    .vdm-wc-toolbar { align-items: stretch; flex-direction: column; }
    .vdm-wc-toolbar .vdm-wc-btn { width: 100%; }
    .vdm-wc-search { flex-direction: column; }
    .vdm-wc-search input, .vdm-wc-search .vdm-wc-btn { width: 100%; }
    .vdm-wc-grid--2 { grid-template-columns: 1fr; }
    .vdm-wc-categories { grid-template-columns: 1fr; }
    .vdm-wc-card { padding: 16px; }
    .vdm-wc-form-actions { flex-direction: column-reverse; }
    .vdm-wc-form-actions .vdm-wc-btn { width: 100%; }

    .vdm-wc-table-wrap { overflow: visible; border: 0; background: transparent; }
    .vdm-wc-table { min-width: 0; display: block; }
    .vdm-wc-table thead { display: none; }
    .vdm-wc-table tbody { display: grid; gap: 12px; }
    .vdm-wc-table tr { display: grid; grid-template-columns: 76px 1fr; gap: 0 12px; padding: 14px; border: 1px solid var(--vdm-border); border-radius: 12px; background: #fff; }
    .vdm-wc-table td { display: block; padding: 6px 0; border: 0; min-width: 0; }
    .vdm-wc-table td:first-child { grid-row: 1 / span 6; grid-column: 1; }
    .vdm-wc-table td:not(:first-child) { grid-column: 2; }
    .vdm-wc-table td::before { content: attr(data-label) ': '; color: var(--vdm-muted); font-size: 12px; font-weight: 700; }
    .vdm-wc-table td:first-child::before, .vdm-wc-table td:nth-child(2)::before { display: none; }
    .vdm-wc-thumb { width: 70px; height: 70px; }
}


.vdm-wc-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.vdm-wc-branch-info {
    border-left: 4px solid var(--vdm-primary);
}

.vdm-wc-branch-info p {
    margin: 8px 0 0;
    color: var(--vdm-muted);
}

.vdm-wc-branch-selector {
    display: flex;
    align-items: end;
    gap: 12px;
    margin: 0 0 18px;
}

.vdm-wc-branch-selector .vdm-wc-field {
    flex: 1 1 320px;
    margin: 0;
}

.vdm-wc-branch-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 14px;
}

.vdm-wc-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.vdm-wc-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vdm-wc-switch-ui {
    position: relative;
    width: 46px;
    height: 26px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #d1d5db;
    transition: .18s ease;
}

.vdm-wc-switch-ui::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.22);
    transition: .18s ease;
}

.vdm-wc-switch input:checked + .vdm-wc-switch-ui {
    background: #16a34a;
}

.vdm-wc-switch input:checked + .vdm-wc-switch-ui::after {
    transform: translateX(20px);
}

.vdm-wc-switch input:focus-visible + .vdm-wc-switch-ui {
    outline: 3px solid rgba(29,78,216,.25);
    outline-offset: 2px;
}

.vdm-wc-switch-label {
    min-width: 92px;
    font-size: 13px;
    font-weight: 700;
}

.vdm-wc-branch-product-notice {
    margin-bottom: 16px !important;
}

@media (max-width: 760px) {
    .vdm-wc-toolbar-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .vdm-wc-toolbar-actions .vdm-wc-btn {
        width: 100%;
    }

    .vdm-wc-branch-selector {
        align-items: stretch;
        flex-direction: column;
    }

    .vdm-wc-branch-selector .vdm-wc-btn {
        width: 100%;
    }

    .vdm-wc-branch-actions {
        flex-direction: column;
    }

    .vdm-wc-branch-actions .vdm-wc-btn {
        width: 100%;
    }

    .vdm-wc-branch-table tr {
        grid-template-columns: 76px 1fr;
    }

    .vdm-wc-branch-table td:first-child {
        grid-row: 1 / span 5;
    }
}

/* v1.1.1: contraste seguro para páginas/temas oscuros. */
.vdm-wc-manager {
    font-family: inherit;
    line-height: 1.5;
}
.vdm-wc-manager .vdm-wc-title,
.vdm-wc-manager .vdm-wc-card,
.vdm-wc-manager .vdm-wc-card strong,
.vdm-wc-manager .vdm-wc-table td,
.vdm-wc-manager .vdm-wc-table td strong,
.vdm-wc-manager label,
.vdm-wc-manager .vdm-wc-field > span {
    color: var(--vdm-text);
}
.vdm-wc-manager .vdm-wc-alert {
    display: block !important;
    width: 100%;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 15px;
    line-height: 1.55;
}
.vdm-wc-manager .vdm-wc-alert strong,
.vdm-wc-manager .vdm-wc-alert em {
    color: inherit;
}

/* =============================================================
 * Catálogo público propio por sucursal
 * ============================================================= */
.vdm-wc-public-catalog,
.vdm-wc-public-catalog * { box-sizing: border-box; }

.vdm-wc-public-catalog {
    --vdm-catalog-accent: #b91c1c;
    --vdm-catalog-accent-hover: #991b1b;
    --vdm-catalog-card: #ffffff;
    --vdm-catalog-text: #111827;
    --vdm-catalog-muted: #6b7280;
    --vdm-catalog-border: #e5e7eb;
    width: 100%;
    margin: 0 auto;
}

.vdm-wc-public-search {
    display: flex;
    gap: 10px;
    margin: 0 0 18px;
}
.vdm-wc-public-search-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid var(--vdm-catalog-border);
    border-radius: 12px;
    background: #fff;
    color: var(--vdm-catalog-text);
    font: inherit;
}
.vdm-wc-public-search-button,
.vdm-wc-public-page {
    min-height: 46px;
    padding: 10px 18px;
    border: 0;
    border-radius: 12px;
    background: var(--vdm-catalog-accent);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.vdm-wc-public-search-button:hover,
.vdm-wc-public-page:hover:not(:disabled) { background: var(--vdm-catalog-accent-hover); }

.vdm-wc-public-branch-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    margin: 0 0 18px;
    color: inherit;
}
.vdm-wc-public-branch-heading span { opacity: .72; }
.vdm-wc-public-branch-heading strong { font-size: 1.08em; }

.vdm-wc-public-grid {
    display: grid;
    grid-template-columns: repeat(var(--vdm-wc-public-columns, 3), minmax(0, 1fr));
    gap: 20px;
}

.vdm-wc-public-product {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--vdm-catalog-border);
    border-radius: 16px;
    background: var(--vdm-catalog-card);
    color: var(--vdm-catalog-text);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.vdm-wc-public-product-image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f3f4f6;
}
.vdm-wc-public-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
}
.vdm-wc-public-sale {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--vdm-catalog-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}
.vdm-wc-public-product-body { padding: 16px; }
.vdm-wc-public-product-title { margin: 0 0 10px; font-size: 18px; line-height: 1.25; }
.vdm-wc-public-product-title a { color: var(--vdm-catalog-text); text-decoration: none; }
.vdm-wc-public-product-price { margin-bottom: 14px; font-size: 19px; font-weight: 800; color: var(--vdm-catalog-text); }
.vdm-wc-public-product-price del { opacity: .55; font-size: .82em; }
.vdm-wc-public-product-price ins { text-decoration: none; }
.vdm-wc-public-product-actions { margin-top: auto; }
.vdm-wc-public-cart,
.vdm-wc-public-view,
.vdm-wc-public-out {
    display: inline-flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none !important;
    font-weight: 800;
}
.vdm-wc-public-cart,
.vdm-wc-public-view { background: var(--vdm-catalog-accent) !important; color: #fff !important; border: 0 !important; }
.vdm-wc-public-cart:hover,
.vdm-wc-public-view:hover { background: var(--vdm-catalog-accent-hover) !important; color: #fff !important; }
.vdm-wc-public-out { background: #f3f4f6; color: #6b7280; }

.vdm-wc-public-loading,
.vdm-wc-public-empty {
    width: 100%;
    padding: 24px 18px;
    border: 1px solid var(--vdm-catalog-border);
    border-radius: 14px;
    background: #fff;
    color: var(--vdm-catalog-text);
    text-align: center;
}
.vdm-wc-public-empty--error { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.vdm-wc-public-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: -3px;
    border: 2px solid #d1d5db;
    border-top-color: var(--vdm-catalog-accent);
    border-radius: 50%;
    animation: vdm-wc-spin .7s linear infinite;
}
@keyframes vdm-wc-spin { to { transform: rotate(360deg); } }

.vdm-wc-public-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
    color: inherit;
}
.vdm-wc-public-page { width: 44px; padding: 8px; }
.vdm-wc-public-page:disabled { opacity: .4; cursor: default; }
.vdm-wc-public-catalog.is-loading .vdm-wc-public-catalog-content { opacity: .72; }

@media (max-width: 600px) {
    /* En teléfono el catálogo mantiene dos productos por fila. */
    .vdm-wc-public-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .vdm-wc-public-search { flex-direction: column; }
    .vdm-wc-public-search-button { width: 100%; }
    .vdm-wc-public-product { border-radius: 12px; }
    .vdm-wc-public-product-body { padding: 10px; }
    .vdm-wc-public-product-title {
        margin-bottom: 7px;
        font-size: 15px;
        line-height: 1.2;
    }
    .vdm-wc-public-product-price {
        margin-bottom: 10px;
        font-size: 16px;
    }
    .vdm-wc-public-cart,
    .vdm-wc-public-view,
    .vdm-wc-public-out {
        min-height: 40px;
        padding: 8px 7px;
        border-radius: 8px;
        font-size: 13px;
        line-height: 1.15;
    }
    .vdm-wc-public-sale {
        top: 7px;
        left: 7px;
        padding: 4px 6px;
        font-size: 10px;
    }
}

/* Acciones del gestor de productos */
.vdm-wc-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vdm-wc-delete-product-form {
    margin: 0;
}

.vdm-wc-btn--danger,
.vdm-wc-manager button.vdm-wc-btn--danger {
    background: #fff;
    border-color: #fecaca;
    color: #b91c1c;
}

.vdm-wc-btn--danger:hover,
.vdm-wc-manager button.vdm-wc-btn--danger:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

@media (max-width: 760px) {
    .vdm-wc-row-actions {
        align-items: stretch;
    }

    .vdm-wc-row-actions .vdm-wc-btn,
    .vdm-wc-delete-product-form {
        width: 100%;
    }

    .vdm-wc-delete-product-form .vdm-wc-btn {
        width: 100%;
    }
}

/* v1.2.0: carga directa de imágenes desde el dispositivo. */
.vdm-wc-upload-field { margin-top: 10px; }
.vdm-wc-upload-field input[type="file"] { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #dbe1e8; border-radius: 10px; background: #fff; color: #111827; }
.vdm-wc-upload-field input[type="file"]::file-selector-button { margin-right: 10px; padding: 9px 12px; border: 0; border-radius: 8px; background: #111827; color: #fff; font-weight: 700; cursor: pointer; }
.vdm-wc-remove-upload { margin-top: 10px; }
@media (max-width: 760px) {
    .vdm-wc-upload-field input[type="file"] { font-size: 13px; }
    .vdm-wc-upload-field input[type="file"]::file-selector-button { padding: 8px 10px; }
}

/* === Precio y visibilidad por sucursal (v1.3.0) === */
.vdm-wc-branch-price-input {
    width: 150px;
    max-width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    background: #fff;
    color: var(--vdm-text);
    font: inherit;
}

.vdm-wc-branch-price-input:focus {
    outline: 2px solid rgba(29,78,216,.2);
    border-color: var(--vdm-primary);
}

.vdm-wc-product-branch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.vdm-wc-product-branch-card {
    padding: 16px;
    border: 1px solid var(--vdm-border);
    border-radius: 12px;
    background: var(--vdm-bg);
}

.vdm-wc-product-branch-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.vdm-wc-product-branch-head > strong {
    font-size: 16px;
}

.vdm-wc-product-branch-card .vdm-wc-field {
    margin-bottom: 0;
}

@media (max-width: 760px) {
    .vdm-wc-product-branch-grid {
        grid-template-columns: 1fr;
    }

    .vdm-wc-product-branch-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .vdm-wc-branch-price-input {
        width: 100%;
    }

    .vdm-wc-branch-table td:first-child {
        grid-row: 1 / span 8;
    }
}

/* === Presentaciones / unidades de venta (v1.4.0) === */
.vdm-wc-presentations-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }
.vdm-wc-presentations-heading h3 { margin-bottom:5px; }
.vdm-wc-presentations-list { display:grid; gap:14px; }
.vdm-wc-presentation-row { padding:15px; border:1px solid var(--vdm-border); border-radius:12px; background:#fff; }
.vdm-wc-grid--4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.vdm-wc-remove-presentation { margin-top:10px; border:0; background:transparent; color:#b91c1c; font-weight:700; cursor:pointer; padding:5px 0; }
.vdm-wc-presentation-branches { margin-top:12px; border-top:1px solid var(--vdm-border); padding-top:10px; }
.vdm-wc-presentation-branches summary { cursor:pointer; font-weight:700; }
.vdm-wc-presentation-branch-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:12px; }
.vdm-wc-presentation-branch-item { padding:10px; border:1px solid var(--vdm-border); border-radius:10px; background:var(--vdm-bg); }
.vdm-wc-presentation-branch-item > strong { display:block; margin-bottom:8px; }
.vdm-wc-presentation-branch-item .vdm-wc-field { margin:6px 0 0; }
.vdm-wc-presentation-picker { margin:8px 0 12px; }
.vdm-wc-presentation-picker label { display:block; }
.vdm-wc-presentation-picker label > span { display:block; margin-bottom:5px; font-size:12px; font-weight:700; color:inherit; opacity:.78; }
.vdm-wc-presentation-picker select { width:100%; min-height:42px; padding:8px 10px; border:1px solid #d1d5db; border-radius:9px; background:#fff; color:#111827; font:inherit; }
.vdm-wc-presentation-picker.is-compact { margin:4px 0 10px; }
.vdm-wc-presentation-picker.is-compact label > span { font-size:11px; }
.vdm-wc-presentation-picker.is-compact select { min-height:38px; padding:6px 8px; font-size:13px; }
.vdm-wc-price-from { white-space:nowrap; }
@media (max-width:900px){ .vdm-wc-grid--4 { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px){
  .vdm-wc-presentations-heading { flex-direction:column; }
  .vdm-wc-presentations-heading .vdm-wc-btn { width:100%; }
  .vdm-wc-grid--4, .vdm-wc-presentation-branch-grid { grid-template-columns:1fr; }
  .vdm-wc-public-product .vdm-wc-presentation-picker select { font-size:12px; }
}


/* =============================================================
   Catálogo VDM v1.4.1 — visualizador independiente de WooCommerce
   CSS limitado a .vdm-wc-public-catalog para no afectar al tema.
   ============================================================= */
.vdm-wc-public-catalog {
    --vdm-catalog-accent-hover: color-mix(in srgb, var(--vdm-catalog-accent) 78%, black);
    --vdm-catalog-card: #fff;
    --vdm-catalog-text: #1f2937;
    --vdm-catalog-muted: #64748b;
    --vdm-catalog-border: #e5e7eb;
    width: 100%;
    max-width: 100%;
    scroll-margin-top: 24px;
    color: var(--vdm-catalog-text);
}
.vdm-wc-public-catalog .vdm-wc-public-toolbar {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin: 0 0 14px;
}
.vdm-wc-public-catalog .vdm-wc-public-search-field { flex: 1 1 230px; min-width: 0; display: flex; }
.vdm-wc-public-catalog .vdm-wc-public-search-input,
.vdm-wc-public-catalog .vdm-wc-public-sort {
    min-width: 0;
    min-height: 45px;
    border: 1px solid #d9dee7 !important;
    border-radius: 12px !important;
    background: white !important;
    color: #1f2937 !important;
    font-family: inherit;
    font-size: 14px !important;
    line-height: 1.4;
    box-shadow: none !important;
    padding: 10px 13px !important;
    margin: 0 !important;
}
.vdm-wc-public-catalog .vdm-wc-public-search-input { width: 100%; }
.vdm-wc-public-catalog .vdm-wc-public-sort-wrap { flex: 0 1 230px; min-width: 170px; display: flex; }
.vdm-wc-public-catalog .vdm-wc-public-sort { width: 100%; }
.vdm-wc-public-catalog .vdm-wc-public-search-button {
    min-height: 45px;
    padding: 10px 18px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--vdm-catalog-accent) !important;
    color: white !important;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;
    cursor: pointer;
}
.vdm-wc-public-catalog .vdm-wc-public-results {
    margin: 0 0 14px;
    color: var(--vdm-catalog-muted);
    font-size: 13px;
    line-height: 1.5;
}
.vdm-wc-public-catalog .vdm-wc-public-grid {
    display: grid !important;
    grid-template-columns: repeat(var(--vdm-wc-public-columns, 3), minmax(0, 1fr)) !important;
    gap: 18px;
    align-items: stretch;
    width: 100%;
}
.vdm-wc-public-catalog .vdm-wc-public-product {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: white;
    border: 1px solid var(--vdm-catalog-border);
    border-radius: 16px;
    box-shadow: 0 3px 13px rgba(15, 23, 42, 0.055);
    transition: box-shadow .18s ease, transform .18s ease;
}
@media (hover:hover) {
    .vdm-wc-public-catalog .vdm-wc-public-product:hover { box-shadow: 0 10px 26px rgba(15, 23, 42, .12); transform: translateY(-2px); }
}
.vdm-wc-public-catalog .vdm-wc-public-product-image {
    display: flex !important;
    position: relative;
    justify-content: center;
    align-items: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: white !important;
    overflow: hidden;
    padding: 12px;
    margin: 0;
    border: 0;
    text-decoration: none;
}
/* Usamos "medium_large", no la miniatura WooCommerce que puede venir
   recortada desde el servidor. Aún si el tema fuerza cover, prevalece contain. */
.vdm-wc-public-catalog .vdm-wc-public-product-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff;
}
.vdm-wc-public-catalog .vdm-wc-public-product-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 7px;
    padding: 13px 15px 16px;
    min-width: 0;
}
.vdm-wc-public-catalog .vdm-wc-public-product-title {
    font-size: clamp(14px, 1.1vw + 11px, 18px) !important;
    line-height: 1.33 !important;
    font-weight: 700 !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-wrap: anywhere;
    color: #111827;
}
.vdm-wc-public-catalog .vdm-wc-public-product-title a { color: inherit !important; text-decoration: none !important; }
.vdm-wc-public-catalog .vdm-wc-public-product-desc {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--vdm-catalog-muted);
    font-size: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.vdm-wc-public-catalog .vdm-wc-public-product-price {
    color: #111827;
    margin: 3px 0 6px !important;
    padding: 0;
    font-size: clamp(15px, 1.1vw + 12px, 20px);
    font-weight: 800;
    line-height: 1.3;
}
.vdm-wc-public-catalog .vdm-wc-public-product-price .amount { font-weight: inherit; }
.vdm-wc-public-catalog .vdm-wc-public-product-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.vdm-wc-public-catalog .vdm-wc-public-quickview {
    width: 100%;
    min-height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 9px 12px;
    background: #fff !important;
    color: var(--vdm-catalog-accent) !important;
    border: 1.5px solid var(--vdm-catalog-accent) !important;
    border-radius: 10px !important;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.3;
    cursor: pointer;
    text-align: center;
}
.vdm-wc-public-catalog .vdm-wc-public-quickview:hover { background: #fafafa !important; }
.vdm-wc-public-catalog .vdm-wc-public-cart,
.vdm-wc-public-catalog .vdm-wc-public-view,
.vdm-wc-public-catalog .vdm-wc-public-out { margin: 0 !important; min-height: 42px; line-height: 1.35; }
.vdm-wc-public-catalog .vdm-wc-public-sale { left: 9px; top: 9px; z-index: 1; }
.vdm-wc-public-catalog .vdm-wc-public-detail-template[hidden],
.vdm-wc-public-catalog .vdm-wc-viewer[hidden] { display: none !important; }

/* Navegación de página: números tocables y primera/última implícitas. */
.vdm-wc-public-catalog .vdm-wc-public-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 25px 0 24px;
    font-size: 13px;
}
.vdm-wc-public-catalog .vdm-wc-public-page-numbers { display: flex; justify-content: center; align-items: center; gap: 6px; }
.vdm-wc-public-catalog .vdm-wc-public-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 42px;
    width: auto;
    min-height: 42px;
    border-radius: 10px;
    padding: 7px 11px;
    border: 1px solid var(--vdm-catalog-border) !important;
    background: white !important;
    color: var(--vdm-catalog-text) !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    line-height: 1.2;
}
.vdm-wc-public-catalog .vdm-wc-public-page.is-current {
    background: var(--vdm-catalog-accent) !important;
    color: #fff !important;
    border-color: var(--vdm-catalog-accent) !important;
}
.vdm-wc-public-catalog .vdm-wc-public-page.is-disabled { opacity: .36; cursor: not-allowed; }
.vdm-wc-public-catalog .vdm-wc-public-page-gap { padding: 0 2px; color: var(--vdm-catalog-muted); }
.vdm-wc-public-catalog .vdm-wc-public-page:not(.is-disabled):not(.is-current):hover { border-color: var(--vdm-catalog-accent) !important; color: var(--vdm-catalog-accent) !important; }

/* Modal de vista rápida. */
.vdm-wc-viewer-open { overflow: hidden !important; }
.vdm-wc-public-catalog .vdm-wc-viewer {
    position: fixed;
    inset: 0;
    z-index: 2147482000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.vdm-wc-public-catalog .vdm-wc-viewer-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .76); }
.vdm-wc-public-catalog .vdm-wc-viewer-panel {
    position: relative;
    width: min(950px, 100%);
    max-height: min(92vh, 1000px);
    max-height: min(92dvh, 1000px);
    overflow-y: auto;
    background: #fff;
    color: #1f2937;
    border-radius: 18px;
    padding: clamp(16px, 3vw, 28px);
    box-shadow: 0 25px 70px rgba(0,0,0,.25);
}
.vdm-wc-public-catalog .vdm-wc-viewer-close {
    position: sticky;
    top: 0;
    margin: 0 0 -40px auto;
    z-index: 3;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f1f5f9;
    color: #0f172a;
    border: 0;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}
.vdm-wc-public-catalog .vdm-wc-viewer-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 25px; padding-top: 6px; }
.vdm-wc-public-catalog .vdm-wc-viewer-image-wrap { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1 / 1; background: #fff; }
.vdm-wc-public-catalog .vdm-wc-viewer-main-image,
.vdm-wc-public-catalog .vdm-wc-viewer-image-wrap img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: contain; }
.vdm-wc-public-catalog .vdm-wc-viewer-thumbnails { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.vdm-wc-public-catalog .vdm-wc-viewer-thumbnail { display: flex; align-items: center; justify-content: center; width: 66px; height: 66px; padding: 3px; background: #fff; border: 2px solid #e5e7eb; border-radius: 9px; cursor: pointer; }
.vdm-wc-public-catalog .vdm-wc-viewer-thumbnail.is-active { border-color: var(--vdm-catalog-accent); }
.vdm-wc-public-catalog .vdm-wc-viewer-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.vdm-wc-public-catalog .vdm-wc-viewer-information { min-width: 0; padding: 38px 2px 10px 0; }
.vdm-wc-public-catalog .vdm-wc-viewer-information h2 { font-size: clamp(20px, 2.1vw, 29px); font-weight: 750; line-height: 1.2; margin: 0 0 14px; }
.vdm-wc-public-catalog .vdm-wc-viewer-price { font-size: 23px; font-weight: 800; margin: 0 0 18px; }
.vdm-wc-public-catalog .vdm-wc-viewer-price del { color: #94a3b8; font-size: .8em; }
.vdm-wc-public-catalog .vdm-wc-viewer-price ins { text-decoration: none; }
.vdm-wc-public-catalog .vdm-wc-viewer-description { font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.vdm-wc-public-catalog .vdm-wc-viewer-description p { margin: 0 0 10px; }
.vdm-wc-public-catalog .vdm-wc-viewer-link { display: inline-flex; margin-top: 18px; padding: 12px 16px; background: var(--vdm-catalog-accent); color: #fff !important; text-decoration: none !important; border-radius: 10px; font-weight: 750; }
.vdm-wc-public-catalog .vdm-wc-viewer-stock { color: #b91c1c; font-weight: 700; }
@media (max-width: 767px) {
    .vdm-wc-public-catalog .vdm-wc-public-grid { grid-template-columns: repeat(var(--vdm-wc-mobile-columns, 2), minmax(0, 1fr)) !important; gap: 10px; }
    .vdm-wc-public-catalog .vdm-wc-public-product { border-radius: 12px; }
    .vdm-wc-public-catalog .vdm-wc-public-product-image { padding: 7px; }
    .vdm-wc-public-catalog .vdm-wc-public-product-body { padding: 10px; gap: 6px; }
    .vdm-wc-public-catalog .vdm-wc-public-product-title { font-size: 14px !important; }
    .vdm-wc-public-catalog .vdm-wc-public-product-desc { display: none; }
    .vdm-wc-public-catalog .vdm-wc-public-product-price { font-size: 15px; }
    .vdm-wc-public-catalog .vdm-wc-public-quickview { min-height: 38px; padding: 7px 8px; font-size: 12px; }
    .vdm-wc-public-catalog .vdm-wc-public-toolbar { gap: 8px; }
    .vdm-wc-public-catalog .vdm-wc-public-sort-wrap { flex: 1 1 160px; }
    .vdm-wc-public-catalog .vdm-wc-public-search-button { flex: 0 0 auto; }
    .vdm-wc-public-catalog .vdm-wc-public-page-numbers { gap: 3px; }
    .vdm-wc-public-catalog .vdm-wc-public-page { min-width: 36px; min-height: 38px; padding: 7px; font-size: 12px; }
    .vdm-wc-public-catalog .vdm-wc-public-page--arrow span { display: none; }
    .vdm-wc-public-catalog .vdm-wc-viewer { padding: 8px; }
    .vdm-wc-public-catalog .vdm-wc-viewer-panel { border-radius: 13px; padding: 16px; }
    .vdm-wc-public-catalog .vdm-wc-viewer-layout { grid-template-columns: 1fr; gap: 8px; }
    .vdm-wc-public-catalog .vdm-wc-viewer-image-wrap { max-height: 45dvh; }
    .vdm-wc-public-catalog .vdm-wc-viewer-information { padding: 8px 0 16px; }
    .vdm-wc-public-catalog .vdm-wc-viewer-information h2 { font-size: 20px; }
    .vdm-wc-public-catalog .vdm-wc-viewer-thumbnail { width: 52px; height: 52px; }
    .vdm-wc-public-catalog { margin-bottom: 65px; }
}

/* Integración catálogo y presentaciones de v1.4.0 (sin recortar imágenes) */
.vdm-wc-public-catalog .vdm-wc-presentation-picker {
    margin: 2px 0 7px; min-width: 0;
}
.vdm-wc-public-catalog .vdm-wc-presentation-picker label,
.vdm-wc-public-catalog .vdm-wc-presentation-picker select { width: 100%; min-width: 0; }
.vdm-wc-public-catalog .vdm-wc-presentation-current-price {
    display: block; font-size: 12px; padding-top: 4px; color: #334155;
}
.vdm-wc-public-catalog .vdm-wc-viewer-information .vdm-wc-presentation-picker { max-width: 400px; margin: 0 0 16px; }
@media (max-width: 600px) {
    .vdm-wc-public-catalog .vdm-wc-presentation-picker select { font-size: 12px; }
}

/* v1.4.2 — Marcas: formulario, listado de administración y catálogo público */
.vdm-wc-manager .vdm-wc-brand-editor .vdm-wc-brand-choices {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 8px 12px;
    max-height: 240px;
    overflow-y: auto;
    padding: 12px;
    margin: 10px 0 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}
.vdm-wc-manager .vdm-wc-brand-choices .vdm-wc-check {
    display: flex;
    gap: 7px;
    align-items: center;
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}
.vdm-wc-manager .vdm-wc-brand-choices .vdm-wc-check input { flex: 0 0 auto; }
.vdm-wc-manager .vdm-wc-new-brand-field { max-width: 480px; margin-top: 12px; }
.vdm-wc-manager .vdm-wc-manager-brand-select {
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 9px 12px;
    min-width: 165px;
    max-width: 100%;
    background: #fff;
    color: #111827;
    font: inherit;
}
.vdm-wc-public-catalog .vdm-wc-public-brand-wrap { display: flex; flex: 0 1 200px; min-width: 155px; }
.vdm-wc-public-catalog .vdm-wc-public-brand { width: 100%; }
.vdm-wc-public-catalog .vdm-wc-public-product-brand,
.vdm-wc-public-catalog .vdm-wc-viewer-brand {
    color: var(--vdm-catalog-accent, #b91c1c);
    font-size: 11px;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: .025em;
    overflow-wrap: anywhere;
    margin: 0;
}
.vdm-wc-public-catalog .vdm-wc-viewer-brand { font-size: 13px; margin-bottom: 6px; }
@media (max-width: 767px) {
    .vdm-wc-manager .vdm-wc-manager-brand-select { width: 100%; }
    .vdm-wc-public-catalog .vdm-wc-public-brand-wrap { flex: 1 1 140px; min-width: 120px; }
    .vdm-wc-public-catalog .vdm-wc-public-product-brand { font-size: 10px; }
}

/* VDM Cotizaciones v1.4.3 */
.vdm-wc-public-catalog .vdm-wc-public-quote,
.vdm-wc-viewer .vdm-wc-public-quote,
.vdm-wc-quote-action {
    display: inline-flex; align-items: center; justify-content: center;
    font: inherit; font-weight: 700; cursor: pointer;
    padding: 11px 13px; min-height: 42px;
    background: var(--vdm-catalog-accent, #b91c1c); color: #fff;
    border: 0; border-radius: 11px; text-decoration: none;
    max-width: 100%; text-align: center; line-height: 1.25;
}
.vdm-wc-public-catalog .vdm-wc-public-quote:hover,
.vdm-wc-quote-action:hover { filter: brightness(.9); color:#fff; }
.vdm-wc-viewer-quote-action { margin: 15px 0; }
.vdm-wc-quote-summary {
    position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%);
    z-index: 2147482000; box-sizing: border-box; display: flex;
    align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px;
    max-width: min(95vw, 580px); width: max-content;
    padding: 12px; border: 1px solid #e2e8f0; border-radius: 18px;
    background: #fff; color: #111827; box-shadow: 0 12px 32px rgba(15,23,42,.18);
    font-size: 14px; font-weight: 600;
}
.vdm-wc-quote-summary a {
    background: #b91c1c; color: #fff; border-radius: 10px; padding: 10px 14px;
    text-decoration: none; white-space: nowrap; font-weight: 700;
}
.vdm-wc-quote-summary button { border: 0; background: #f1f5f9; color: #111827;
    font-size: 20px; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; }
@media(max-width: 767px) {
    .vdm-wc-quote-summary { bottom: 106px; max-width: calc(100vw - 20px); font-size: 12px; }
    .vdm-wc-quote-summary a { padding: 9px 11px; }
    .vdm-wc-public-catalog .vdm-wc-public-quote { font-size: 12px; }
}
