/* Marca de agua en canvas con logos */
.watermark-overlay {
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    z-index: 999 !important;
}

.watermark-overlay img {
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    -webkit-user-drag: none !important;
}

/* Protección del canvas */
.canvas-container,
.canvas-wrapper {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    -webkit-touch-callout: none !important;
}

#layered-custom-canvas {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    -webkit-user-drag: none !important;
}

/* Prevenir interacciones táctiles en mobile */
.canvas-container,
.canvas-wrapper {
    -webkit-tap-highlight-color: transparent !important;
}

/* ============================================
           ESTILOS PARA MODAL DE CATÁLOGOS - VERSIÓN ELEGANTE
        ============================================ */

/* Animaciones */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(-50%);
    }

    20% {
        transform: translateY(-52%);
    }

    40% {
        transform: translateY(-48%);
    }

    60% {
        transform: translateY(-52%);
    }

    80% {
        transform: translateY(-48%);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

/* Botón flotante de catálogos */
.catalogs-btn-floating {
    position: fixed !important;
    left: 20px !important;
    top: 20px !important;
    z-index: 1000 !important;
    background: linear-gradient(135deg, #DE208B 0%, #C71D7A 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    box-shadow: 0 4px 15px rgba(222, 32, 139, 0.3) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    animation: bounce 2s infinite !important;
    margin-bottom: 10px !important;
    margin-top: 10px !important;
    width: 100% !important;
}

.catalogs-btn-floating:hover {
    background: linear-gradient(135deg, #C71D7A 0%, #A01965 100%) !important;
    box-shadow: 0 6px 20px rgba(222, 32, 139, 0.4) !important;
    transform: scale(1.05) !important;
}

.catalogs-btn-floating i {
    font-size: 18px !important;
}

/* Estilos para el botón integrado en la toolbar */
.customization-toolbar .catalogs-btn-floating {
    position: static !important;
    bottom: auto !important;
    right: auto !important;
    z-index: auto !important;
    transform: none !important;
    display: inline-block !important;
}

.customization-toolbar .catalogs-btn-floating:hover {
    transform: none !important;
    background: linear-gradient(135deg, #C71D7A 0%, #A01965 100%) !important;
    box-shadow: 0 6px 20px rgba(222, 32, 139, 0.4) !important;
}

/* Modal de Catálogos */
.catalog-modal-content {
    border: none !important;
    border-radius: 15px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
}

.catalog-modal-header {
    background: linear-gradient(135deg, #DE208B 0%, #C71D7A 100%) !important;
    color: white !important;
    padding: 20px 30px !important;
    border-bottom: none !important;
}

.catalog-modal-header .modal-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 !important;
}

.catalog-modal-header .modal-title i {
    font-size: 28px !important;
}

.catalog-modal-header .close {
    color: white !important;
    opacity: 0.9 !important;
    text-shadow: none !important;
    font-size: 32px !important;
    font-weight: 300 !important;
    transition: opacity 0.3s ease !important;
}

.catalog-modal-header .close:hover {
    opacity: 1 !important;
}

.catalog-modal-body {
    padding: 20px !important;
    background: #f8f9fa !important;
    min-height: 400px !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
}

.catalog-modal-footer {
    background: white !important;
    padding: 20px 30px !important;
    border-top: 1px solid #e0e0e0 !important;
}

/* Tarjetas de catálogos - Diseño Grid Elegante */
.catalog-card {
    background: white !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    margin-bottom: 25px !important;
    animation: fadeInUp 0.5s ease !important;
    border: 2px solid transparent !important;
}

.catalog-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(222, 32, 139, 0.15) !important;
    border-color: #DE208B !important;
}

.catalog-thumbnail-container {
    position: relative !important;
    width: 100% !important;
    height: 150px !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.catalog-thumbnail {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    transition: transform 0.5s ease !important;
}

.catalog-card:hover .catalog-thumbnail {
    transform: scale(1.08) !important;
}

.catalog-badge {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    background: rgba(222, 32, 139, 0.95) !important;
    color: white !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.catalog-info {
    padding: 15px !important;
}

.catalog-info h5 {
    color: #2c3e50 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    margin-bottom: 10px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.catalog-category {
    display: inline-block !important;
    background: #e3f2fd !important;
    color: #1976d2 !important;
    padding: 4px 12px !important;
    border-radius: 15px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-bottom: 10px !important;
}

.catalog-info p {
    color: #666 !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
    margin-bottom: 10px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.catalog-meta {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    color: #999 !important;
    font-size: 11px !important;
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid #f0f0f0 !important;
}

.catalog-meta i {
    color: #DE208B !important;
    margin-right: 5px !important;
}

.catalog-actions {
    display: flex !important;
    gap: 10px !important;
    margin-top: 15px !important;
}

.btn-catalog-action {
    flex: 1 !important;
    border: none !important;
    padding: 8px 12px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.btn-view-catalog {
    background: linear-gradient(135deg, #DE208B 0%, #C71D7A 100%) !important;
    color: white !important;
}

.btn-view-catalog:hover {
    background: linear-gradient(135deg, #C71D7A 0%, #A01965 100%) !important;
    transform: scale(1.02) !important;
    box-shadow: 0 4px 12px rgba(222, 32, 139, 0.3) !important;
    color: white !important;
}

.btn-download-catalog {
    background: #ffffff !important;
    color: #DE208B !important;
    border: 2px solid #DE208B !important;
}

.btn-download-catalog:hover {
    background: #DE208B !important;
    color: white !important;
    transform: scale(1.02) !important;
}

/* Loading State */
.catalog-loading {
    text-align: center !important;
    padding: 60px 20px !important;
}

.catalog-loading .spinner-border {
    width: 3rem !important;
    height: 3rem !important;
    border-width: 0.3em !important;
    color: #DE208B !important;
}

.catalog-loading p {
    margin-top: 20px !important;
    color: #666 !important;
    font-size: 16px !important;
}

/* Empty State */
.catalog-empty {
    text-align: center !important;
    padding: 80px 20px !important;
}

.catalog-empty i {
    font-size: 80px !important;
    color: #ddd !important;
    margin-bottom: 20px !important;
}

.catalog-empty h5 {
    color: #666 !important;
    font-weight: 600 !important;
    margin-bottom: 10px !important;
}

.catalog-empty p {
    color: #999 !important;
    font-size: 14px !important;
}

/* Modal de Vista Previa PDF */
.pdf-preview-content {
    border: none !important;
    height: 100% !important;
}

.pdf-preview-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    color: white !important;
    padding: 15px 30px !important;
    border-bottom: none !important;
}

.pdf-preview-header .modal-title {
    font-size: 20px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.pdf-preview-header .close {
    color: white !important;
    opacity: 0.9 !important;
    text-shadow: none !important;
    font-size: 28px !important;
}

.pdf-preview-body {
    padding: 0 !important;
    height: 70vh !important;
    background: #525252 !important;
}

.pdf-preview-footer {
    background: #f8f9fa !important;
    padding: 15px 30px !important;
    border-top: 1px solid #e0e0e0 !important;
}

#pdf-viewer {
    border: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .catalogs-btn-floating {
        right: 15px !important;
        padding: 12px 20px !important;
        font-size: 14px !important;
    }

    .catalog-modal-body {
        padding: 15px !important;
    }

    .catalog-card {
        margin-bottom: 20px !important;
    }

    .catalog-thumbnail-container {
        height: 120px !important;
    }

    .catalog-actions {
        flex-direction: column !important;
    }

    .btn-catalog-action {
        width: 100% !important;
    }

    .catalog-modal-header .modal-title {
        font-size: 20px !important;
    }
}