.j-admin-designs {
    max-width: 1200px;
    margin: 40px auto;
    font-family: 'Cairo', sans-serif;
}

.j-admin-filtros-wrapper {
    margin-top: 50px;
    margin-bottom: 50px;
}

.j-admin-filtros {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 35px;
}

.j-admin-categorias {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex: 1;
}

.j-admin-categoria {
    height: 40px;
    padding: 0 20px;
    border: 1px solid #D9D9D9;
    background: #FFFFFF;
    border-radius: 8px;
    color: #5D5D5D;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

.j-admin-categoria:hover {
    background: #FA299C;
    border-color: #FA299C;
    color: #FFFFFF;
}

.j-admin-categoria.active {
    background: #FA299C;
    border-color: #FA299C;
    color: #FFFFFF;
}

.j-admin-add {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 22px;
    background: #FA299C;
    color: #FFFFFF;
    text-decoration: none !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: .2s;
}

.j-admin-add:hover,
.j-admin-add:active,
.j-admin-add:focus {
    background: #FA299C !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
}


.j-admin-designs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.j-admin-design-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

.j-admin-design-card .j-design-image-wrapper {
    width: 170px;
    height: 255px;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
    flex-shrink: 0;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.j-admin-design-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.j-admin-design-card:hover img {
    transform: none;
}

.j-admin-design-nombre {
    margin-top: 12px;
    color: #24B8C8;
    font-size: 15px;
    font-weight: 700;
}



.j-admin-card-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
}

.j-admin-edit,
.j-admin-edit:hover {
    width: 170px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border-radius: 6px;
    color: #FFFFFF !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    transition: .2s;
}

.j-admin-delete {
    width: 170px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border: 1px solid #D9D9D9;
    border-radius: 6px;
    color: #E53935;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
}

.j-admin-delete:hover {
    color: #E53935;
    background: none !important;
    border: none;
}

/* ==========================================
   CONTENEDOR DE LA IMAGEN
   ========================================== */
   .j-baraja-preview {
    position: relative;  /* 🔥 IMPORTANTE: Para que el botón se posicione dentro */
    width: 100%;
    padding-top: 100%;  /* Cuadrado */
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.j-baraja-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.j-baraja-preview .j-baraja-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    font-weight: 600;
}

/* ==========================================
   BOTÓN "✎ Editar" - POSICIONADO SOBRE LA IMAGEN
   ========================================== */
.j-baraja-edit-image-btn {
    position: absolute;  /* 🔥 Posicionado dentro de .j-baraja-preview */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: rgba(36, 184, 200, 0.92);
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    z-index: 10;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* 🔥 MOSTRAR EL BOTÓN AL HACER HOVER SOBRE LA IMAGEN */
.j-baraja-preview:hover .j-baraja-edit-image-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.j-baraja-edit-image-btn:hover {
    background: #1d9ba8;
    transform: translate(-50%, -50%) scale(1.05);
}

.j-baraja-edit-image-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.j-baraja-edit-image-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed;
    transform: translate(-50%, -50%) scale(0.95);
}

/* ==========================================
   BARRA DE PROGRESO
   ========================================== */
.j-baraja-upload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.8);
    z-index: 15;
    display: none;
    border-radius: 0 0 6px 6px;
}

.j-baraja-progress-bar {
    height: 4px;
    background: #24B8C8;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

.j-baraja-progress-text {
    font-size: 10px;
    color: #fff;
    display: block;
    text-align: center;
    margin-top: 3px;
    font-weight: 500;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .j-baraja-edit-image-btn {
        font-size: 11px;
        padding: 6px 12px;
    }
}